Skip to content

Commit cdd7376

Browse files
authored
docs: cleanups (#1847)
1 parent 90a24e6 commit cdd7376

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

docs/content/components/accordion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Disable specific items with the `disabled` prop:
274274

275275
The `hiddenUntilFound` prop enables browser search functionality within collapsed accordion content. When enabled, collapsed content is marked with `hidden="until-found"`, allowing browsers to automatically expand accordion items when users search for text within them.
276276

277-
```svelte {4}
277+
```svelte {6}
278278
<Accordion.Root type="single">
279279
<Accordion.Item value="item-1">
280280
<Accordion.Header>

docs/content/components/avatar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ When you're confident that an image will load (such as local assets), you can by
134134

135135
This example demonstrates how to create a clickable avatar composed with a [Link Preview](/docs/components/link-preview):
136136

137-
<ComponentPreview name="avatar-demo-link-preview" componentName="Avatar with Link Preview">
137+
<ComponentPreview name="avatar-demo-link-preview" componentName="Avatar with Link Preview" size="sm">
138138

139139
{#snippet preview()}
140140
<AvatarDemoLinkPreview />

docs/content/components/radio-group.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ When the `orientation` is set to `'vertical'`, the radio group will navigate thr
194194

195195
When a radio group is readonly, users can focus and navigate through the items but cannot change the selection. This is useful for displaying information that should be visible but not editable.
196196

197-
<ComponentPreview name="radio-group-demo-readonly" componentName="Radio Group Readonly">
197+
<ComponentPreview name="radio-group-demo-readonly" componentName="Radio Group Readonly" size="xs">
198198

199199
{#snippet preview()}
200200
<RadioGroupDemoReadonly />
@@ -212,7 +212,7 @@ When a radio group is readonly, users can focus and navigate through the items b
212212

213213
When a radio group is disabled, users cannot interact with it at all. The entire group becomes non-focusable and non-interactive.
214214

215-
<ComponentPreview name="radio-group-demo-disabled" componentName="Radio Group Disabled">
215+
<ComponentPreview name="radio-group-demo-disabled" componentName="Radio Group Disabled" size="xs">
216216

217217
{#snippet preview()}
218218
<RadioGroupDemoDisabled />

docs/src/lib/components/demos/checkbox-demo-custom.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
bind:checked
2323
{id}
2424
aria-labelledby="terms-label"
25-
class="border-muted bg-foreground data-[state=unchecked]:border-border-input data-[state=unchecked]:bg-background data-[state=unchecked]:hover:border-dark-40 data-disabled:cursor-not-allowed data-disabled:opacity-70 peer inline-flex size-[25px] items-center justify-center rounded-md border transition-all duration-150 ease-in-out active:scale-[0.98]"
25+
class="border-muted bg-foreground data-[state=unchecked]:border-border-input data-[state=unchecked]:bg-background data-[state=unchecked]:hover:border-dark-40 data-disabled:cursor-not-allowed data-disabled:opacity-70 data-disabled:pointer-events-none peer inline-flex size-[25px] items-center justify-center rounded-md border transition-all duration-150 ease-in-out active:scale-[0.98]"
2626
name="hello"
2727
{...restProps}
2828
>
@@ -39,7 +39,7 @@
3939
<Label.Root
4040
id="terms-label"
4141
for={id}
42-
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
42+
class="text-sm font-medium leading-none peer-disabled:pointer-events-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4343
>
4444
{labelText}
4545
</Label.Root>

docs/src/lib/components/demos/radio-group-demo-disabled.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
<RadioGroup.Item
1212
id="disabled-amazing"
1313
value="amazing"
14-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
14+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-disabled:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
1515
/>
1616
<Label.Root for="disabled-amazing" class="pl-3">Amazing</Label.Root>
1717
</div>
1818
<div class="text-foreground group flex select-none items-center transition-all">
1919
<RadioGroup.Item
2020
id="disabled-average"
2121
value="average"
22-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
22+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-disabled:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
2323
/>
2424
<Label.Root for="disabled-average" class="pl-3">Average</Label.Root>
2525
</div>
2626
<div class="text-foreground group flex select-none items-center transition-all">
2727
<RadioGroup.Item
2828
id="disabled-terrible"
2929
value="terrible"
30-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
30+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-disabled:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
3131
/>
3232
<Label.Root for="disabled-terrible" class="pl-3">Terrible</Label.Root>
3333
</div>

docs/src/lib/components/demos/radio-group-demo-readonly.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
<RadioGroup.Item
1212
id="readonly-amazing"
1313
value="amazing"
14-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
14+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-readonly:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
1515
/>
1616
<Label.Root for="readonly-amazing" class="pl-3">Amazing</Label.Root>
1717
</div>
1818
<div class="text-foreground group flex select-none items-center transition-all">
1919
<RadioGroup.Item
2020
id="readonly-average"
2121
value="average"
22-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
22+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-readonly:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
2323
/>
2424
<Label.Root for="readonly-average" class="pl-3">Average</Label.Root>
2525
</div>
2626
<div class="text-foreground group flex select-none items-center transition-all">
2727
<RadioGroup.Item
2828
id="readonly-terrible"
2929
value="terrible"
30-
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
30+
class="border-border-input bg-background hover:border-dark-40 data-[state=checked]:border-foreground data-[state=checked]:border-6 data-readonly:pointer-events-none size-5 shrink-0 cursor-default rounded-full border transition-all duration-100 ease-in-out"
3131
/>
3232
<Label.Root for="readonly-terrible" class="pl-3">Terrible</Label.Root>
3333
</div>

0 commit comments

Comments
 (0)