Skip to content

Commit

Permalink
Merge branch 'adjust-spacing-utilities'
Browse files Browse the repository at this point in the history
  • Loading branch information
ngblaylock committed Feb 25, 2025
2 parents dbf54c2 + 1cb789a commit 7b51627
Show file tree
Hide file tree
Showing 29 changed files with 272 additions and 73 deletions.
4 changes: 2 additions & 2 deletions dist/GDebug.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ let show = $derived(showInProd || dev);
/>
</div>
{#await codeToHtml( JSON.stringify(data, null, 2), { lang: 'json', theme: 'material-theme' }, )}
<div class="m-n3 shiki-example bg-dark">
<div class="m-n4 shiki-example bg-dark">
<pre style="background-color: #263238; color: #EEFFFF;">{JSON.stringify(
data,
null,
2,
)}</pre>
</div>
{:then value}
<div class="m-n3 shiki-example">{@html value}</div>
<div class="m-n4 shiki-example">{@html value}</div>
{/await}
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion dist/nathanblaylock.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nathanblaylock.com",
"version": "2.3.3",
"version": "2.3.4",
"private": true,
"type": "module",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions src/PACKAGE/components/GDebug.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
/>
</div>
{#await codeToHtml( JSON.stringify(data, null, 2), { lang: 'json', theme: 'material-theme' }, )}
<div class="m-n3 shiki-example bg-dark">
<div class="m-n4 shiki-example bg-dark">
<pre style="background-color: #263238; color: #EEFFFF;">{JSON.stringify(
data,
null,
2,
)}</pre>
</div>
{:then value}
<div class="m-n3 shiki-example">{@html value}</div>
<div class="m-n4 shiki-example">{@html value}</div>
{/await}
</div>
{/if}
Expand Down
11 changes: 9 additions & 2 deletions src/PACKAGE/examples/CheckboxGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
</script>

<div class="vstack">
<GCheckboxGroup {items} bind:group legend="Car Brands" />
<GDebug data={group} showInProd />
<GCheckboxGroup
{items}
bind:group
legend="Car Brands"
/>
<GDebug
data={group}
showInProd
/>
</div>
22 changes: 18 additions & 4 deletions src/PACKAGE/examples/Checkboxes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@
});
</script>

<GCheckbox bind:checked={checks.check1} label="Checkbox 1" />
<GCheckbox
bind:checked={checks.check1}
label="Checkbox 1"
/>
<GCheckbox
bind:checked={checks.check2}
id="foo"
label="Checkbox 2"
hint="This is a hint for this selection."
/>
<GCheckbox bind:checked={checks.check3} hideLabel label="Checkbox 3" />
<GCheckbox bind:checked={checks.check4} disabled label="Disabled Checkbox" />
<GCheckbox
bind:checked={checks.check3}
hideLabel
label="Checkbox 3"
/>
<GCheckbox
bind:checked={checks.check4}
disabled
label="Disabled Checkbox"
/>

<GDebug data={checks} showInProd />
<GDebug
data={checks}
showInProd
/>
12 changes: 10 additions & 2 deletions src/PACKAGE/examples/Debug.svelte
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
<GDebug data={['one', 'two', 'three']} showInProd />
<GDebug title="Custom Title" data={['one', 'two', 'three']} class="mb-0" showInProd />
<GDebug
data={['one', 'two', 'three']}
showInProd
/>
<GDebug
title="Custom Title"
data={['one', 'two', 'three']}
class="mb-0"
showInProd
/>
5 changes: 4 additions & 1 deletion src/PACKAGE/examples/DebugProd.svelte
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<GDebug data={['one', 'two', 'three']} />
<GDebug data={['four', 'five', 'six']} showInProd />
<GDebug
data={['four', 'five', 'six']}
showInProd
/>
7 changes: 6 additions & 1 deletion src/PACKAGE/examples/DebugUpdateData.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
<GBtn onclick={() => data.pop()}>Remove Item</GBtn>
</div>

<GDebug title="Custom Title" {data} class="mb-0" showInProd />
<GDebug
title="Custom Title"
{data}
class="mb-0"
showInProd
/>
6 changes: 5 additions & 1 deletion src/PACKAGE/examples/DevNote.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
This is a note that only shows up in development mode.
</GDevNote>

<GDevNote title="Custom Title" class="mb-0" showInProd>
<GDevNote
title="Custom Title"
class="mb-0"
showInProd
>
This one has a custom title.
</GDevNote>
2 changes: 1 addition & 1 deletion src/PACKAGE/examples/DevNoteProd.svelte
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<GDevNote>This only shows up in Dev Mode.</GDevNote>
<GDevNote showInProd>This shows up in Dev and Prod.</GDevNote>
<GDevNote showInProd>This shows up in Dev and Prod.</GDevNote>
12 changes: 10 additions & 2 deletions src/PACKAGE/examples/Icon.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<div class="vstack">
<GIcon name="home" />

<GIcon name="table" size={2} />
<GIcon
name="table"
size={2}
/>

<span class="text-secondary"><GIcon name="poll" size={5.5} /></span>
<span class="text-secondary"
><GIcon
name="poll"
size={5.5}
/></span
>
</div>
33 changes: 26 additions & 7 deletions src/PACKAGE/examples/IconBtn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,53 @@
<h3>Variants</h3>
<div class="hstack">
{#each variants as variant}
<GIconBtn title="Example Title" {variant} icon="home" />
<GIconBtn
title="Example Title"
{variant}
icon="home"
/>
{/each}
</div>
</div>

<div>
<h3>Active</h3>
<div class="hstack">
{#each variants as variant}
<GIconBtn title="Example Title" {variant} icon="home" class="active" />
<GIconBtn
title="Example Title"
{variant}
icon="home"
class="active"
/>
{/each}
</div>
</div>

<div>
<h3>Disabled</h3>
<div class="hstack">
{#each variants as variant}
<GIconBtn title="Example Title" {variant} icon="home" disabled />
<GIconBtn
title="Example Title"
{variant}
icon="home"
disabled
/>
{/each}
</div>
</div>

<div>
<h3>Outline</h3>
<div class="hstack">
{#each variants as variant}
<GIconBtn title="Example Title" {variant} icon="home" outline />
<GIconBtn
title="Example Title"
{variant}
icon="home"
outline
/>
{/each}
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions src/PACKAGE/examples/RadioGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
</script>

<div class="vstack">
<GRadioGroup {items} bind:group legend="Car Brands" />
<GDebug data={group} showInProd />
<GRadioGroup
{items}
bind:group
legend="Car Brands"
/>
<GDebug
data={group}
showInProd
/>
</div>
10 changes: 8 additions & 2 deletions src/PACKAGE/examples/SegmentedControl.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@

<div class="vstack">
<div>
<GSegmentedControl {items} bind:group />
<GSegmentedControl
{items}
bind:group
/>
</div>
<GDebug data={group} showInProd />
<GDebug
data={group}
showInProd
/>
</div>
10 changes: 8 additions & 2 deletions src/PACKAGE/examples/SegmentedControlIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@

<div class="vstack">
<div>
<GSegmentedControl {items} bind:group />
<GSegmentedControl
{items}
bind:group
/>
</div>
<GDebug data={group} showInProd />
<GDebug
data={group}
showInProd
/>
</div>
5 changes: 4 additions & 1 deletion src/PACKAGE/examples/SortableCards.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@

<div class="vstack">
<GSortableCards bind:items={data} />
<GDebug {data} showInProd />
<GDebug
{data}
showInProd
/>
</div>
11 changes: 9 additions & 2 deletions src/PACKAGE/examples/SortableCardsSnippets.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
</GSortableCards>

<div class="hstack align-items-end mt-4">
<GTextInput label="Add Fruit" bind:value={newItem} />
<GTextInput
label="Add Fruit"
bind:value={newItem}
/>
<GBtn
disabled={!newItem}
onclick={() => {
Expand All @@ -41,4 +44,8 @@
>
</div>

<GDebug class="mt-4" {data} showInProd />
<GDebug
class="mt-4"
{data}
showInProd
/>
21 changes: 17 additions & 4 deletions src/PACKAGE/examples/TextInputValue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,21 @@
</script>

<div class="vstack">
<GTextInput label="Value 1" bind:value={myValues.value1} />
<GTextInput label="Value 2" bind:value={myValues.value2} />
<GTextInput label="Value 3" type="number" bind:value={myValues.value3} />
<GDebug data={myValues} showInProd />
<GTextInput
label="Value 1"
bind:value={myValues.value1}
/>
<GTextInput
label="Value 2"
bind:value={myValues.value2}
/>
<GTextInput
label="Value 3"
type="number"
bind:value={myValues.value3}
/>
<GDebug
data={myValues}
showInProd
/>
</div>
38 changes: 30 additions & 8 deletions src/PACKAGE/examples/TextInputs.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
<div class="vstack">
<GTextInput label="Basic Input" />
<GTextInput label="Hidden Label" hideLabel />
<GTextInput label="Required" required />
<GTextInput label="Placeholder" placeholder="Here is a placeholder" />
<GTextInput label="Number" type="number" />
<GTextInput label="Disabled" disabled />
<GTextInput label="Readonly" readonly value="Foo" />
<GTextInput label="Hint" hint="This is helper text." />
</div>
<GTextInput
label="Hidden Label"
hideLabel
/>
<GTextInput
label="Required"
required
/>
<GTextInput
label="Placeholder"
placeholder="Here is a placeholder"
/>
<GTextInput
label="Number"
type="number"
/>
<GTextInput
label="Disabled"
disabled
/>
<GTextInput
label="Readonly"
readonly
value="Foo"
/>
<GTextInput
label="Hint"
hint="This is helper text."
/>
</div>
2 changes: 1 addition & 1 deletion src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</script>

<div class="container">
<footer class="border-top hstack flex-wrap justify-content-center py-3">
<footer class="border-top hstack flex-wrap justify-content-center py-4">
<div>© Nathan Blaylock {new Date().getFullYear()}</div>
<div class="hstack flex-wrap justify-content-center">
<a href="https://docs.nathanblaylock.com/" target="_blank">Documentation</a>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Logos.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</script>

{#if logos.length}
<div class="border-top pt-5 mt-5 text-center">
<div class="border-top pt-6 mt-6 text-center">
<div class="hstack flex-wrap justify-content-center">
{#each logos as logo}
<Logo name={logo} />
Expand Down
Loading

0 comments on commit 7b51627

Please sign in to comment.