@urbicon-ui/design-content 6.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/content/auth/components/account-settings/llm.txt +33 -0
- package/content/auth/components/forgot-password-page/llm.txt +25 -0
- package/content/auth/components/invitation-manager/llm.txt +28 -0
- package/content/auth/components/login-page/llm.txt +34 -0
- package/content/auth/components/notification-badge/llm.txt +21 -0
- package/content/auth/components/notification-center/llm.txt +33 -0
- package/content/auth/components/notification-listener/llm.txt +24 -0
- package/content/auth/components/passkey-manager/llm.txt +27 -0
- package/content/auth/components/push-permission-prompt/llm.txt +32 -0
- package/content/auth/components/register-page/llm.txt +35 -0
- package/content/auth/components/reset-password-page/llm.txt +26 -0
- package/content/auth/components/session-manager/llm.txt +32 -0
- package/content/auth/components/two-factor-manager/llm.txt +40 -0
- package/content/auth/components/verify-email-page/llm.txt +25 -0
- package/content/blocks/components/area-chart/llm.txt +46 -0
- package/content/blocks/components/bar-chart/llm.txt +44 -0
- package/content/blocks/components/calendar/llm.txt +105 -0
- package/content/blocks/components/chart-frame/llm.txt +38 -0
- package/content/blocks/components/command-palette/llm.txt +60 -0
- package/content/blocks/components/composition-bar/llm.txt +69 -0
- package/content/blocks/components/currency-input/llm.txt +65 -0
- package/content/blocks/components/date-picker/llm.txt +90 -0
- package/content/blocks/components/donut-chart/llm.txt +45 -0
- package/content/blocks/components/empty-state/llm.txt +43 -0
- package/content/blocks/components/file-upload/llm.txt +76 -0
- package/content/blocks/components/guide/llm.txt +49 -0
- package/content/blocks/components/guide-article/llm.txt +30 -0
- package/content/blocks/components/guide-beacon/llm.txt +38 -0
- package/content/blocks/components/guide-hint/llm.txt +41 -0
- package/content/blocks/components/guide-marker/llm.txt +36 -0
- package/content/blocks/components/guide-mention/llm.txt +31 -0
- package/content/blocks/components/guide-panel/llm.txt +42 -0
- package/content/blocks/components/guide-provider/llm.txt +31 -0
- package/content/blocks/components/line-chart/llm.txt +45 -0
- package/content/blocks/components/locale-switcher/llm.txt +44 -0
- package/content/blocks/components/planner/llm.txt +68 -0
- package/content/blocks/components/sankey/llm.txt +72 -0
- package/content/blocks/components/sidebar-layout/llm.txt +87 -0
- package/content/blocks/components/sparkline/llm.txt +33 -0
- package/content/blocks/components/theme-switcher/llm.txt +40 -0
- package/content/blocks/primitives/accordion/llm.txt +57 -0
- package/content/blocks/primitives/alert/llm.txt +54 -0
- package/content/blocks/primitives/avatar/llm.txt +61 -0
- package/content/blocks/primitives/badge/llm.txt +60 -0
- package/content/blocks/primitives/breadcrumb/llm.txt +47 -0
- package/content/blocks/primitives/button/llm.txt +80 -0
- package/content/blocks/primitives/button-group/llm.txt +65 -0
- package/content/blocks/primitives/card/llm.txt +68 -0
- package/content/blocks/primitives/checkbox/llm.txt +61 -0
- package/content/blocks/primitives/collapsible/llm.txt +66 -0
- package/content/blocks/primitives/combobox/llm.txt +86 -0
- package/content/blocks/primitives/confirm-dialog/llm.txt +47 -0
- package/content/blocks/primitives/dialog/llm.txt +59 -0
- package/content/blocks/primitives/drawer/llm.txt +54 -0
- package/content/blocks/primitives/form-field/llm.txt +43 -0
- package/content/blocks/primitives/input/llm.txt +73 -0
- package/content/blocks/primitives/menu/llm.txt +81 -0
- package/content/blocks/primitives/pagination/llm.txt +68 -0
- package/content/blocks/primitives/popover/llm.txt +72 -0
- package/content/blocks/primitives/progress/llm.txt +55 -0
- package/content/blocks/primitives/radio-group/llm.txt +53 -0
- package/content/blocks/primitives/segment-group/llm.txt +51 -0
- package/content/blocks/primitives/select/llm.txt +130 -0
- package/content/blocks/primitives/separator/llm.txt +45 -0
- package/content/blocks/primitives/sidebar/llm.txt +79 -0
- package/content/blocks/primitives/skeleton/llm.txt +54 -0
- package/content/blocks/primitives/slider/llm.txt +82 -0
- package/content/blocks/primitives/spinner/llm.txt +46 -0
- package/content/blocks/primitives/stepper/llm.txt +60 -0
- package/content/blocks/primitives/tab/llm.txt +72 -0
- package/content/blocks/primitives/textarea/llm.txt +61 -0
- package/content/blocks/primitives/toast/llm.txt +45 -0
- package/content/blocks/primitives/toggle/llm.txt +62 -0
- package/content/blocks/primitives/toolbar/llm.txt +60 -0
- package/content/blocks/primitives/tooltip/llm.txt +54 -0
- package/content/component-catalog.json +5010 -0
- package/content/design-system/patterns/dashboard.md +55 -0
- package/content/design-system/patterns/form-page.md +69 -0
- package/content/design-system/patterns/onboarding-guide.md +50 -0
- package/content/design-system/patterns/planning-board.md +46 -0
- package/content/design-system/patterns/settings-page.md +48 -0
- package/content/design-system/patterns/tab-navigation.md +136 -0
- package/content/design-system/principles.md +260 -0
- package/content/docs/components/api-reference/llm.txt +32 -0
- package/content/docs/components/code-example/llm.txt +44 -0
- package/content/docs/components/code-panel/llm.txt +26 -0
- package/content/docs/components/docs-layout/llm.txt +61 -0
- package/content/docs/components/info-card/llm.txt +31 -0
- package/content/docs/components/playground-configurator/llm.txt +49 -0
- package/content/docs/components/section/llm.txt +46 -0
- package/content/docs/components/table-of-contents/llm.txt +48 -0
- package/content/docs/components/types-reference/llm.txt +38 -0
- package/content/guides/llms-full-template.md +1019 -0
- package/content/icons.json +4834 -0
- package/content/meta.json +5 -0
- package/content/table/table/llm.txt +110 -0
- package/content/verbs/adopt.md +33 -0
- package/content/verbs/audit.md +29 -0
- package/content/verbs/compose.md +38 -0
- package/content/verbs/critique.md +27 -0
- package/content/verbs/fix.md +29 -0
- package/content/verbs/migrate.md +30 -0
- package/content/verbs/onboard.md +33 -0
- package/content/verbs/polish.md +25 -0
- package/content/verbs/redesign.md +29 -0
- package/content/verbs/retheme.md +29 -0
- package/package.json +45 -0
- package/src/content-loader.test.ts +78 -0
- package/src/content-loader.ts +97 -0
- package/src/index.ts +23 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Sparkline
|
|
5
|
+
Tiny inline trend line — no axes, no labels — sized to flow in
|
|
6
|
+
table cells, cards, or running text. Zero-dependency SVG, optional area fill
|
|
7
|
+
and end-point dot. Aria-hidden by default with an optional `ariaLabel`.
|
|
8
|
+
|
|
9
|
+
**Import:** `import { Sparkline } from '@urbicon-ui/blocks';`
|
|
10
|
+
|
|
11
|
+
### Examples
|
|
12
|
+
```svelte
|
|
13
|
+
<Sparkline data={[3, 5, 4, 8, 6, 9]} area />
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Api
|
|
17
|
+
| Prop | Type | Required | Default | Description |
|
|
18
|
+
| --- | --- | :---: | --- | --- |
|
|
19
|
+
| data | `number[]` | yes | | Sequence of values plotted left → right. |
|
|
20
|
+
| ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
21
|
+
| area | `boolean` | no | false | Fill the area under the line. |
|
|
22
|
+
| ariaLabel | `string` | no | | Accessible label; when omitted the sparkline is aria-hidden. |
|
|
23
|
+
| class | `string` | no | | Extra classes merged onto the wrapper. |
|
|
24
|
+
| color | `string` | no | var(--color-chart-1) | Color property for the Sparkline component |
|
|
25
|
+
| height | `number` | no | 24 | Height property for the Sparkline component |
|
|
26
|
+
| showEndPoint | `boolean` | no | false | Mark the last point with a dot. |
|
|
27
|
+
| slotClasses | `SparklineSlotClasses` | no | | Per-slot class overrides. |
|
|
28
|
+
| strokeWidth | `number` | no | 1.5 | StrokeWidth property for the Sparkline component |
|
|
29
|
+
| unstyled | `boolean` | no | | Remove all default classes. |
|
|
30
|
+
| width | `number` | no | 96 | Width property for the Sparkline component |
|
|
31
|
+
|
|
32
|
+
Inherited from:
|
|
33
|
+
- Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## ThemeSwitcher
|
|
5
|
+
Cycles between light, dark, and system color schemes.
|
|
6
|
+
Applies light/dark classes on the html element and persists to localStorage.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { ThemeSwitcher } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<ThemeSwitcher />
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<ThemeSwitcher size="lg" variant="outlined" strategy="toggle" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Variants
|
|
20
|
+
- variant: filled, ghost, outlined (default: ghost)
|
|
21
|
+
- size: lg, md, sm (default: md)
|
|
22
|
+
- disabled: true (default: false)
|
|
23
|
+
|
|
24
|
+
### Api
|
|
25
|
+
| Prop | Type | Required | Default | Description |
|
|
26
|
+
| --- | --- | :---: | --- | --- |
|
|
27
|
+
| class | `string` | no | | Additional CSS classes. |
|
|
28
|
+
| disabled | `boolean` | no | | Disable the switcher. |
|
|
29
|
+
| onThemeChange | `(theme: Theme) => void` | no | | Called after the theme changes. |
|
|
30
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ ThemeSwitcher: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
31
|
+
| size | `ThemeSwitcherVariants['size']` | no | 'md' | Size variant that controls dimensions and spacing of the ThemeSwitcher |
|
|
32
|
+
| slotClasses | `Partial<Record<'button' | 'icon', string>>` | no | | Per-slot class overrides. |
|
|
33
|
+
| storageKey | `string | false` | no | 'urbicon-theme' | `localStorage` key for persistence. Set to `false` to disable. |
|
|
34
|
+
| strategy | `'cycle' | 'toggle'` | no | 'cycle' | Interaction mode. - `'cycle'` — single button cycling light → dark → system (default) - `'toggle'` — single button toggling light ↔ dark (no system option) |
|
|
35
|
+
| theme | `Theme` | no | 'system' | Current theme. Supports `bind:theme`. |
|
|
36
|
+
| unstyled | `boolean` | no | false | Strip all default styles. |
|
|
37
|
+
| variant | `ThemeSwitcherVariants['variant']` | no | 'ghost' | Visual style of the button. |
|
|
38
|
+
|
|
39
|
+
### Slots (slotClasses keys)
|
|
40
|
+
`button`, `icon`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Accordion
|
|
5
|
+
Collapsible content sections with expand/collapse animation.
|
|
6
|
+
Supports single or multiple open items, keyboard navigation, and ARIA accordion pattern.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Accordion } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Accordion>
|
|
13
|
+
<AccordionItem value="faq-1" title="What is Urbicon UI?">
|
|
14
|
+
A Svelte 5 component library with built-in i18n and design tokens.
|
|
15
|
+
</AccordionItem>
|
|
16
|
+
<AccordionItem value="faq-2" title="How does dark mode work?">
|
|
17
|
+
Semantic tokens automatically handle light/dark via prefers-color-scheme.
|
|
18
|
+
</AccordionItem>
|
|
19
|
+
</Accordion>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```svelte
|
|
23
|
+
<Accordion type="multiple" variant="separated" bind:value={openItems}>
|
|
24
|
+
<AccordionItem value="section-1" title="Section 1">Content</AccordionItem>
|
|
25
|
+
<AccordionItem value="section-2" title="Section 2">Content</AccordionItem>
|
|
26
|
+
</Accordion>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Variants
|
|
30
|
+
- variant: default, ghost, separated (default: default)
|
|
31
|
+
- size: lg, md, sm (default: md)
|
|
32
|
+
|
|
33
|
+
### Api
|
|
34
|
+
| Prop | Type | Required | Default | Description |
|
|
35
|
+
| --- | --- | :---: | --- | --- |
|
|
36
|
+
| children | `Snippet` | yes | | Content to render inside the Accordion component |
|
|
37
|
+
| ...AccordionVariants | `VariantProps` | no | | Styling variants from AccordionVariants |
|
|
38
|
+
| ...HTMLAttributes<HTMLDivElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
39
|
+
| class | `string` | no | | Additional CSS classes to apply to the Accordion component |
|
|
40
|
+
| collapsible | `boolean` | no | true | Whether items can be fully collapsed |
|
|
41
|
+
| defaultValue | `string | string[]` | no | | Default open item(s) |
|
|
42
|
+
| disabled | `boolean` | no | false | Whether the Accordion is disabled and non-interactive |
|
|
43
|
+
| onValueChange | `(value: string | string[]) => void` | no | | Callback when open items change |
|
|
44
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Accordion: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
45
|
+
| size | `'sm' | 'md' | 'lg'` | no | 'md' | Size variant that controls dimensions and spacing of the Accordion |
|
|
46
|
+
| slotClasses | `Partial<Record<'base' | 'item' | 'trigger' | 'chevron' | 'content' | 'contentInner', string>>` | no | | Per-slot class overrides |
|
|
47
|
+
| type | `'single' | 'multiple'` | no | 'single' | Allow single or multiple items open at once |
|
|
48
|
+
| unstyled | `boolean` | no | | Remove default styles |
|
|
49
|
+
| value | `string | string[]` | no | | Controlled open item(s) – string for single, string[] for multiple |
|
|
50
|
+
| variant | `'default' | 'separated' | 'ghost'` | no | 'default' | Visual style variant for the Accordion component |
|
|
51
|
+
|
|
52
|
+
Inherited from:
|
|
53
|
+
- AccordionVariants (external)
|
|
54
|
+
- Omit<HTMLAttributes<HTMLDivElement>, 'children'> (omit-pattern)
|
|
55
|
+
|
|
56
|
+
### Slots (slotClasses keys)
|
|
57
|
+
`base`, `item`, `trigger`, `chevron`, `content`, `contentInner`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Alert
|
|
5
|
+
Persistent inline notification for communicating status, warnings, errors,
|
|
6
|
+
or informational messages. Supports icons, titles, descriptions, actions, and dismissal.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Alert } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Alert intent="success" title="Saved successfully">
|
|
13
|
+
Your changes have been saved.
|
|
14
|
+
</Alert>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```svelte
|
|
18
|
+
<Alert intent="danger" variant="inline" dismissible onDismiss={() => (visible = false)}>
|
|
19
|
+
{#snippet icon()}<AlertCircle size={20} />{/snippet}
|
|
20
|
+
Something went wrong. Please try again.
|
|
21
|
+
{#snippet actions()}<Button size="sm" variant="ghost">Retry</Button>{/snippet}
|
|
22
|
+
</Alert>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Variants
|
|
26
|
+
- intent: danger, info, neutral, primary, success, warning (default: primary)
|
|
27
|
+
- variant: filled, inline, soft (default: soft)
|
|
28
|
+
- size: lg, md, sm (default: md)
|
|
29
|
+
|
|
30
|
+
### Api
|
|
31
|
+
| Prop | Type | Required | Default | Description |
|
|
32
|
+
| --- | --- | :---: | --- | --- |
|
|
33
|
+
| ...AlertVariants | `VariantProps` | no | | Styling variants from AlertVariants |
|
|
34
|
+
| ...HTMLAttributes<HTMLDivElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'title' | 'children') |
|
|
35
|
+
| actions | `Snippet` | no | | Action buttons snippet |
|
|
36
|
+
| children | `Snippet` | no | | Description content (children slot) |
|
|
37
|
+
| class | `string` | no | | Additional CSS classes to apply to the Alert component |
|
|
38
|
+
| dismissible | `boolean` | no | false | Show dismiss/close button |
|
|
39
|
+
| icon | `Snippet` | no | | Custom icon snippet (replaces default intent icon) |
|
|
40
|
+
| intent | `'primary' | 'info' | 'success' | 'warning' | 'danger' | 'neutral'` | no | 'primary' | Semantic color intent |
|
|
41
|
+
| onDismiss | `() => void` | no | | Callback when dismissed |
|
|
42
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Alert: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
43
|
+
| size | `'sm' | 'md' | 'lg'` | no | 'md' | Size variant that controls dimensions and spacing of the Alert |
|
|
44
|
+
| slotClasses | `Partial<Record<'base' | 'icon' | 'content' | 'title' | 'description' | 'actions' | 'dismissButton', string>>` | no | | Per-slot class overrides |
|
|
45
|
+
| title | `string` | no | | Alert title (bold header text) |
|
|
46
|
+
| unstyled | `boolean` | no | | Remove default styles |
|
|
47
|
+
| variant | `'soft' | 'inline' | 'filled'` | no | 'soft' | Visual style variant for the Alert component |
|
|
48
|
+
|
|
49
|
+
Inherited from:
|
|
50
|
+
- AlertVariants (external)
|
|
51
|
+
- Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'> (omit-pattern)
|
|
52
|
+
|
|
53
|
+
### Slots (slotClasses keys)
|
|
54
|
+
`base`, `icon`, `content`, `title`, `description`, `actions`, `dismissButton`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Avatar
|
|
5
|
+
User profile image component with fallback initials, multiple sizes, and interactive states.
|
|
6
|
+
|
|
7
|
+
**Import:** `import { Avatar } from '@urbicon-ui/blocks';`
|
|
8
|
+
|
|
9
|
+
### Examples
|
|
10
|
+
```svelte
|
|
11
|
+
<Avatar src="/user-photo.jpg" name="John Doe" size="lg" />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```svelte
|
|
15
|
+
<Avatar name="Jane Smith" randomColor clickable onclick={() => showProfile()} />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Variants
|
|
19
|
+
- intent: danger, neutral, primary, secondary, success, warning (default: neutral)
|
|
20
|
+
- variant: circle, rounded, square (default: circle)
|
|
21
|
+
- size: 2xl, lg, md, sm, xl, xs (default: md)
|
|
22
|
+
- interactive: true (default: false)
|
|
23
|
+
- ring: true (default: false)
|
|
24
|
+
- ringIntent: danger, neutral, primary, secondary, success, warning (default: primary)
|
|
25
|
+
- status: away, busy, offline, online
|
|
26
|
+
- statusPosition: bottom-left, bottom-right, top-left, top-right (default: bottom-right)
|
|
27
|
+
|
|
28
|
+
### Api
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| --- | --- | :---: | --- | --- |
|
|
31
|
+
| ...AvatarVariants | `VariantProps` | no | | Styling variants from AvatarVariants |
|
|
32
|
+
| ...HTMLAttributes<HTMLDivElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
33
|
+
| alt | `string` | no | | Alt text for the image. Defaults to `name`. |
|
|
34
|
+
| children | `Snippet` | no | | Custom fallback content rendered instead of auto-generated initials. Useful for overflow counters, icons, or fully custom avatars with `unstyled`. |
|
|
35
|
+
| class | `string` | no | | Extra classes merged onto the root element. |
|
|
36
|
+
| clickable | `boolean` | no | | Mark the avatar as clickable (adds hover/focus styles and keyboard support). Alias for the `interactive` variant. |
|
|
37
|
+
| mint | `MintProp` | no | | Micro-interaction preset. Only applies when the avatar is interactive. |
|
|
38
|
+
| name | `string` | no | | Full user name — used for initials generation, `randomColor` hashing, and `aria-label`. |
|
|
39
|
+
| onclick | `(event: MouseEvent) => void` | no | | Click handler. Automatically enables interactive styles. |
|
|
40
|
+
| onHover | `(hovered: boolean) => void` | no | | Called when the hover state changes. |
|
|
41
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Avatar: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
42
|
+
| randomColor | `boolean` | no | | Derive a deterministic background color from `name`. The same name always produces the same color, making it easy to visually distinguish users without images. Overrides `intent`. |
|
|
43
|
+
| ringColor | `string` | no | | Custom ring color (CSS value). Overrides `ringIntent` when set. |
|
|
44
|
+
| slotClasses | `Partial<Record<'base' | 'image' | 'fallback' | 'status', string>>` | no | | Per-slot class overrides merged with tv styles. |
|
|
45
|
+
| src | `string` | no | | Image URL. Falls back to initials or `children` when empty or on load error. |
|
|
46
|
+
| unstyled | `boolean` | no | | Remove all default tv classes. |
|
|
47
|
+
| intent | `'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning'` | no | neutral | Controls the color theme and semantic meaning of the Avatar. Affects the overall appearance and user perception. Available options: danger, neutral, primary, and 3 more. |
|
|
48
|
+
| variant | `'circle' | 'rounded' | 'square'` | no | circle | Controls the visual style and presentation of the Avatar. Determines the component's visual treatment. Available options: circle, rounded, square. |
|
|
49
|
+
| size | `'2xl' | 'lg' | 'md' | 'sm' | 'xl' | 'xs'` | no | md | Controls the dimensions, padding, and text size of the Avatar. Affects the component's physical footprint. Available options: 2xl, lg, md, and 3 more. |
|
|
50
|
+
| interactive | `'true'` | no | false | Controls the interactive behavior and appearance of the Avatar component. Available options: true. |
|
|
51
|
+
| ring | `'true'` | no | false | Controls the ring behavior and appearance of the Avatar component. Available options: true. |
|
|
52
|
+
| ringIntent | `'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning'` | no | primary | Controls the ringIntent behavior and appearance of the Avatar component. Available options: danger, neutral, primary, and 3 more. |
|
|
53
|
+
| status | `'away' | 'busy' | 'offline' | 'online'` | no | | Controls the status behavior and appearance of the Avatar component. Available options: away, busy, offline, online. |
|
|
54
|
+
| statusPosition | `'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'` | no | bottom-right | Controls the statusPosition behavior and appearance of the Avatar component. Available options: bottom-left, bottom-right, top-left, top-right. |
|
|
55
|
+
|
|
56
|
+
Inherited from:
|
|
57
|
+
- AvatarVariants (external)
|
|
58
|
+
- Omit<HTMLAttributes<HTMLDivElement>, 'children'> (omit-pattern)
|
|
59
|
+
|
|
60
|
+
### Slots (slotClasses keys)
|
|
61
|
+
`base`, `image`, `fallback`, `status`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Badge
|
|
5
|
+
Compact label for status, categories, counters, and notifications.
|
|
6
|
+
|
|
7
|
+
**Import:** `import { Badge } from '@urbicon-ui/blocks';`
|
|
8
|
+
|
|
9
|
+
### Examples
|
|
10
|
+
```svelte
|
|
11
|
+
<Badge variant="filled" intent="primary">New Feature</Badge>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```svelte
|
|
15
|
+
<div class="relative">
|
|
16
|
+
<Button>Notifications</Button>
|
|
17
|
+
<Badge intent="danger" counter placement="top-end" border>5</Badge>
|
|
18
|
+
</div>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Variants
|
|
22
|
+
- intent: danger, neutral, primary, secondary, success, warning (default: primary)
|
|
23
|
+
- variant: dot, filled, outlined, soft (default: filled)
|
|
24
|
+
- size: lg, md, sm, xs (default: md)
|
|
25
|
+
- border: true (default: false)
|
|
26
|
+
- counter: true (default: false)
|
|
27
|
+
- disabled: true (default: false)
|
|
28
|
+
- interactive: true (default: false)
|
|
29
|
+
- placement: bottom, bottom-end, bottom-start, left, right, top, top-end, top-start
|
|
30
|
+
- pulse: true (default: false)
|
|
31
|
+
- removable: true (default: false)
|
|
32
|
+
- tier: commit, modify (default: commit)
|
|
33
|
+
|
|
34
|
+
### Api
|
|
35
|
+
| Prop | Type | Required | Default | Description |
|
|
36
|
+
| --- | --- | :---: | --- | --- |
|
|
37
|
+
| border | `boolean` | no | | Add a ring outline in the page background color — useful to visually separate overlapping or positioned badges from their parent. |
|
|
38
|
+
| children | `Snippet` | no | | Badge content (text, icons, numbers). |
|
|
39
|
+
| class | `string` | no | | Extra classes merged onto the root element. |
|
|
40
|
+
| counter | `boolean` | no | | Display as a compact pill for numeric counts. Tightens padding and uses tabular-nums so digits align. |
|
|
41
|
+
| disabled | `boolean` | no | | Visually disable the badge (reduced opacity, no pointer events). |
|
|
42
|
+
| interactive | `boolean` | no | | Enable hover/focus styles and keyboard activation. Automatically enabled when `onclick` is provided. |
|
|
43
|
+
| mint | `MintProp` | no | | Micro-interaction preset. Only applies when the badge is interactive. |
|
|
44
|
+
| onclick | `(event: MouseEvent) => void` | no | | Click handler. Automatically enables interactive styles. |
|
|
45
|
+
| onHover | `(hovered: boolean) => void` | no | | Called when the hover state changes. |
|
|
46
|
+
| onRemove | `() => void` | no | | Fired when the remove button is clicked (only when `removable` is true). |
|
|
47
|
+
| placement | `BadgePlacement` | no | | Anchor the badge absolutely within a `position: relative` parent. |
|
|
48
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Badge: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
49
|
+
| pulse | `boolean` | no | | Add a pulsing animation to draw attention (e.g. for live indicators). |
|
|
50
|
+
| removable | `boolean` | no | | Show a remove (×) button. |
|
|
51
|
+
| role | `'status' | 'alert' | 'badge'` | no | | ARIA role. Defaults to `"status"`. Use `"alert"` for time-sensitive notifications. |
|
|
52
|
+
| slotClasses | `Partial<Record<'base' | 'content' | 'removeButton' | 'removeIcon', string>>` | no | | Per-slot class overrides merged with tv styles. |
|
|
53
|
+
| unstyled | `boolean` | no | | Remove all default tv classes. |
|
|
54
|
+
| variant | `'dot' | 'filled' | 'outlined' | 'soft'` | no | 'filled' | Visual variant. `dot` renders a pure indicator (content hidden); the label variants accept the full surface. |
|
|
55
|
+
| intent | `'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning'` | no | primary | Controls the color theme and semantic meaning of the Badge. Affects the overall appearance and user perception. Available options: danger, neutral, primary, and 3 more. |
|
|
56
|
+
| size | `'lg' | 'md' | 'sm' | 'xs'` | no | md | Controls the dimensions, padding, and text size of the Badge. Affects the component's physical footprint. Available options: lg, md, sm, xs. |
|
|
57
|
+
| tier | `'commit' | 'modify'` | no | commit | Controls the tier behavior and appearance of the Badge component. Available options: commit, modify. |
|
|
58
|
+
|
|
59
|
+
### Slots (slotClasses keys)
|
|
60
|
+
`base`, `content`, `removeButton`, `removeIcon`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Breadcrumb
|
|
5
|
+
Navigation aid showing the current page's location in a hierarchy.
|
|
6
|
+
Renders an accessible nav with structured items and customizable separators.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Breadcrumb } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Breadcrumb items={[
|
|
13
|
+
{ label: 'Home', href: '/' },
|
|
14
|
+
{ label: 'Products', href: '/products' },
|
|
15
|
+
{ label: 'Widget' }
|
|
16
|
+
]} />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```svelte
|
|
20
|
+
<Breadcrumb items={breadcrumbs} size="sm">
|
|
21
|
+
{#snippet separator()}<ChevronRight size={14} />{/snippet}
|
|
22
|
+
</Breadcrumb>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Variants
|
|
26
|
+
- size: lg, md, sm (default: md)
|
|
27
|
+
|
|
28
|
+
### Api
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| --- | --- | :---: | --- | --- |
|
|
31
|
+
| items | `BreadcrumbItem[]` | yes | | Ordered breadcrumb items (last item is current page) |
|
|
32
|
+
| ...BreadcrumbVariants | `VariantProps` | no | | Styling variants from BreadcrumbVariants |
|
|
33
|
+
| ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
34
|
+
| aria-label | `string` | no | 'Breadcrumb' | Accessible label for the nav element |
|
|
35
|
+
| class | `string` | no | | Additional CSS classes to apply to the Breadcrumb component |
|
|
36
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Breadcrumb: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
37
|
+
| separator | `Snippet` | no | | Custom separator snippet (default: "/") |
|
|
38
|
+
| size | `'sm' | 'md' | 'lg'` | no | 'md' | Size variant that controls dimensions and spacing of the Breadcrumb |
|
|
39
|
+
| slotClasses | `Partial<Record<'nav' | 'list' | 'item' | 'link' | 'currentPage' | 'separator', string>>` | no | | Per-slot class overrides |
|
|
40
|
+
| unstyled | `boolean` | no | | Remove default styles |
|
|
41
|
+
|
|
42
|
+
Inherited from:
|
|
43
|
+
- BreadcrumbVariants (external)
|
|
44
|
+
- Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
|
|
45
|
+
|
|
46
|
+
### Slots (slotClasses keys)
|
|
47
|
+
`nav`, `list`, `item`, `link`, `currentPage`, `separator`
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Button
|
|
5
|
+
Versatile button component with multiple variants, sizes, intents, and micro-interaction patterns.
|
|
6
|
+
Built with Svelte 5 and optimized for performance and accessibility.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Button } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Button variant="filled" intent="primary" size="md">
|
|
13
|
+
Click me
|
|
14
|
+
</Button>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```svelte
|
|
18
|
+
<Button variant="outlined" intent="danger" mint={['shake', 'ripple']}>
|
|
19
|
+
Delete Item
|
|
20
|
+
</Button>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```svelte
|
|
24
|
+
<!-- Register once at app root: -->
|
|
25
|
+
<BlocksProvider
|
|
26
|
+
presets={{
|
|
27
|
+
Button: {
|
|
28
|
+
overlay: {
|
|
29
|
+
slotClasses: {
|
|
30
|
+
base: 'bg-black/20 hover:bg-black/30 active:bg-black/40 text-white border-transparent'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<Button preset="overlay">Reinholen</Button>
|
|
37
|
+
</BlocksProvider>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Variants
|
|
41
|
+
- intent: danger, neutral, primary, secondary, success, warning (default: neutral)
|
|
42
|
+
- variant: filled, ghost, outlined, text (default: filled)
|
|
43
|
+
- size: 2xs, lg, md, sm, xl, xs (default: md)
|
|
44
|
+
- active: false, true (default: false)
|
|
45
|
+
- buttonGroupConnected: true
|
|
46
|
+
- loading: false, true (default: false)
|
|
47
|
+
- loadingPlacement: end, overlay, start (default: start)
|
|
48
|
+
- pressed: true (default: false)
|
|
49
|
+
- tier: commit, modify (default: commit)
|
|
50
|
+
|
|
51
|
+
### Api
|
|
52
|
+
| Prop | Type | Required | Default | Description |
|
|
53
|
+
| --- | --- | :---: | --- | --- |
|
|
54
|
+
| ...ButtonVariants | `VariantProps` | no | | Styling variants from ButtonVariants |
|
|
55
|
+
| ...HTMLButtonAttributes | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
56
|
+
| active | `boolean` | no | false | Whether the button is visually active/selected (e.g. in a ButtonGroup with selection). Unlike `pressed` (momentary feedback), `active` represents a persistent selected state. |
|
|
57
|
+
| children | `Snippet` | no | | The content of the button |
|
|
58
|
+
| class | `string` | no | | Custom CSS class name |
|
|
59
|
+
| disabled | `boolean` | no | false | Whether the button is disabled |
|
|
60
|
+
| loading | `boolean` | no | false | Whether the button is in a loading state |
|
|
61
|
+
| loadingPlacement | `'overlay' | 'start' | 'end'` | no | 'overlay' | Where the loading indicator should appear when loading is true - 'overlay': spinner overlays content and hides it (default) - 'start': spinner appears before the content - 'end': spinner appears after the content |
|
|
62
|
+
| mint | `MintProp` | no | 'scale' | Micro-interaction patterns Can be a string, array of strings, or array of config objects |
|
|
63
|
+
| onclick | `(event: MouseEvent) => void` | no | | Onclick property for the Button component |
|
|
64
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Button: {...} }}>`. Prefer this over `class="bg-…!"` overrides when the requested look is outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
65
|
+
| pressed | `boolean` | no | false | Whether the button is pressed (for toggle buttons) |
|
|
66
|
+
| slotClasses | `Partial<Record<'base' | 'content' | 'spinner', string>>` | no | | Per-slot class overrides merged with tv styles: base | content | spinner |
|
|
67
|
+
| unstyled | `boolean` | no | | Remove default tailwind-variants classes. Only user classes apply. |
|
|
68
|
+
| value | `string` | no | | The value associated with the button (useful in ButtonGroups) |
|
|
69
|
+
| intent | `'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning'` | no | neutral | Controls the color theme and semantic meaning of the Button. Affects the overall appearance and user perception. Available options: danger, neutral, primary, and 3 more. |
|
|
70
|
+
| variant | `'filled' | 'ghost' | 'outlined' | 'text'` | no | filled | Controls the visual style and presentation of the Button. Determines the component's visual treatment. Available options: filled, ghost, outlined, text. |
|
|
71
|
+
| size | `'2xs' | 'lg' | 'md' | 'sm' | 'xl' | 'xs'` | no | md | Controls the dimensions, padding, and text size of the Button. Affects the component's physical footprint. Available options: 2xs, lg, md, and 3 more. |
|
|
72
|
+
| buttonGroupConnected | `'true'` | no | | Controls the buttonGroupConnected behavior and appearance of the Button component. Available options: true. |
|
|
73
|
+
| tier | `'commit' | 'modify'` | no | commit | Controls the tier behavior and appearance of the Button component. Available options: commit, modify. |
|
|
74
|
+
|
|
75
|
+
Inherited from:
|
|
76
|
+
- ButtonVariants (external)
|
|
77
|
+
- Omit<HTMLButtonAttributes, 'children'> (omit-pattern)
|
|
78
|
+
|
|
79
|
+
### Slots (slotClasses keys)
|
|
80
|
+
`base`, `content`, `spinner`
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## ButtonGroup
|
|
5
|
+
Groups related buttons with shared styling, layout, and optional selection behaviour.
|
|
6
|
+
Supports single-select (radio), multi-select (checkbox), or no selection.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { ButtonGroup } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<ButtonGroup selection="single" bind:value={selectedView}>
|
|
13
|
+
<Button value="list">List</Button>
|
|
14
|
+
<Button value="grid">Grid</Button>
|
|
15
|
+
</ButtonGroup>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```svelte
|
|
19
|
+
<ButtonGroup
|
|
20
|
+
selection="multiple"
|
|
21
|
+
bind:value={selectedFormats}
|
|
22
|
+
connected
|
|
23
|
+
size="sm"
|
|
24
|
+
variant="outlined"
|
|
25
|
+
>
|
|
26
|
+
<Button value="bold">B</Button>
|
|
27
|
+
<Button value="italic">I</Button>
|
|
28
|
+
<Button value="underline">U</Button>
|
|
29
|
+
</ButtonGroup>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Variants
|
|
33
|
+
- connected: false, true (default: true)
|
|
34
|
+
- disabled: true (default: false)
|
|
35
|
+
- orientation: horizontal, vertical (default: horizontal)
|
|
36
|
+
- tier: commit, modify (default: commit)
|
|
37
|
+
|
|
38
|
+
### Api
|
|
39
|
+
| Prop | Type | Required | Default | Description |
|
|
40
|
+
| --- | --- | :---: | --- | --- |
|
|
41
|
+
| ...HTMLAttributes<HTMLDivElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
42
|
+
| ariaLabel | `string` | no | | Accessible label for the group (prefer this over `aria-label` for correct HTML attribute). |
|
|
43
|
+
| ariaLabelledBy | `string` | no | | ID of the element that labels the group. |
|
|
44
|
+
| children | `Snippet` | no | | Button children to group. |
|
|
45
|
+
| class | `string` | no | | Extra classes merged onto the root element. |
|
|
46
|
+
| connected | `boolean` | no | | Visually connect buttons (overlapping borders, shared rounding). When `false`, buttons are spaced with a small gap. |
|
|
47
|
+
| disabled | `boolean` | no | | Disable the entire group and all child Buttons. |
|
|
48
|
+
| intent | `ComponentIntent` | no | | Semantic colour propagated to child Buttons. |
|
|
49
|
+
| mint | `MintProp` | no | | Micro-interaction preset propagated to child Buttons. |
|
|
50
|
+
| onSelectionChange | `(value: ButtonGroupValue, selectedValues: string[]) => void` | no | | Fired when selection changes. Receives the new value and an array of all selected values. |
|
|
51
|
+
| orientation | `ButtonGroupOrientation` | no | | Orientation property for the ButtonGroup component |
|
|
52
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ ButtonGroup: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
53
|
+
| selection | `ButtonGroupSelection` | no | | Selection mode. `"single"` = radio-group, `"multiple"` = checkbox-group, `"none"` = no selection. |
|
|
54
|
+
| size | `ComponentSize` | no | | Size propagated to child Buttons (unless a Button sets its own). |
|
|
55
|
+
| slotClasses | `Partial<Record<'base', string>>` | no | | Per-slot class overrides. |
|
|
56
|
+
| tier | `InteractiveTier` | no | | Semantic radius tier propagated to child Buttons. `commit` (default) → pill caps for the group; `modify` → soft caps. Inherits from a wrapping Toolbar via TierContext when not set explicitly. |
|
|
57
|
+
| unstyled | `boolean` | no | | Remove all default tv classes. |
|
|
58
|
+
| value | `ButtonGroupValue` | no | | Current selection value. Bind with `bind:value` for two-way sync. String for single, string[] for multiple. |
|
|
59
|
+
| variant | `ButtonVariants['variant']` | no | | Visual weight propagated to child Buttons. |
|
|
60
|
+
|
|
61
|
+
Inherited from:
|
|
62
|
+
- Omit<HTMLAttributes<HTMLDivElement>, 'children'> (omit-pattern)
|
|
63
|
+
|
|
64
|
+
### Slots (slotClasses keys)
|
|
65
|
+
`base`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Card
|
|
5
|
+
Flexible container for grouping related content with optional header, footer,
|
|
6
|
+
and interactive states. Renders as div, button, or anchor depending on the provided props.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Card } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Card padding="lg">
|
|
13
|
+
{#snippet header()}
|
|
14
|
+
<h3>Title</h3>
|
|
15
|
+
{/snippet}
|
|
16
|
+
<p>Body content</p>
|
|
17
|
+
</Card>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```svelte
|
|
21
|
+
<Card variant="elevated" dividers onclick={() => navigate('/detail')}>
|
|
22
|
+
{#snippet header()}
|
|
23
|
+
<div class="flex items-center gap-3">
|
|
24
|
+
<Avatar name="Jane Doe" size="sm" />
|
|
25
|
+
<span class="font-medium">Jane Doe</span>
|
|
26
|
+
</div>
|
|
27
|
+
{/snippet}
|
|
28
|
+
<p>Interactive card that navigates on click.</p>
|
|
29
|
+
{#snippet footer()}
|
|
30
|
+
<span class="text-text-tertiary text-sm">2 min ago</span>
|
|
31
|
+
{/snippet}
|
|
32
|
+
</Card>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Variants
|
|
36
|
+
- variant: elevated, floating, outlined, quiet (default: quiet)
|
|
37
|
+
- disabled: true (default: false)
|
|
38
|
+
- dividers: true (default: false)
|
|
39
|
+
- padding: lg, md, none, sm, xl (default: md)
|
|
40
|
+
|
|
41
|
+
### Api
|
|
42
|
+
| Prop | Type | Required | Default | Description |
|
|
43
|
+
| --- | --- | :---: | --- | --- |
|
|
44
|
+
| ...CardVariants | `VariantProps` | no | | Styling variants from CardVariants |
|
|
45
|
+
| ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
|
|
46
|
+
| children | `Snippet` | no | | Content to render inside the Card component |
|
|
47
|
+
| class | `string` | no | | Extra classes merged onto the root element. |
|
|
48
|
+
| clickable | `boolean` | no | | Force `<button>` rendering and interactive hover styles without providing an `onclick` handler — useful when delegating clicks through a wrapper component or library. `onclick` and `href` already enable interactive styles automatically; reach for `clickable` only when neither is appropriate. Don't combine with an outer `<a href>` or inner interactive content — `<a><Card clickable>…</Card></a>` produces nested interactive elements (invalid HTML, a11y violation). Prefer `<Card href={…}>` so the card itself becomes the anchor. |
|
|
49
|
+
| footer | `Snippet` | no | | Content rendered below the body. With `dividers`, a hairline separates body from footer. |
|
|
50
|
+
| header | `Snippet` | no | | Content rendered above the body. With `dividers`, a hairline separates header from body. |
|
|
51
|
+
| href | `string` | no | | URL target. When provided, the card renders as `<a>`. |
|
|
52
|
+
| mint | `MintProp` | no | | Micro-interaction preset. Only takes effect on interactive cards. |
|
|
53
|
+
| onclick | `(event: MouseEvent) => void` | no | | Click handler. When provided, the card renders as `<button>` and gains interactive styles. |
|
|
54
|
+
| onHover | `(hovered: boolean) => void` | no | | Called when hover state changes. Receives `true` on mouse-enter, `false` on mouse-leave. |
|
|
55
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Card: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
56
|
+
| slotClasses | `Partial<Record<'base' | 'header' | 'content' | 'footer', string>>` | no | | Per-slot class overrides. |
|
|
57
|
+
| unstyled | `boolean` | no | | Remove all default tv classes. |
|
|
58
|
+
| variant | `'elevated' | 'floating' | 'outlined' | 'quiet'` | no | quiet | Controls the visual style and presentation of the Card. Determines the component's visual treatment. Available options: elevated, floating, outlined, quiet. |
|
|
59
|
+
| disabled | `'true'` | no | false | Controls the disabled behavior and appearance of the Card component. Available options: true. |
|
|
60
|
+
| dividers | `'true'` | no | false | Controls the dividers behavior and appearance of the Card component. Available options: true. |
|
|
61
|
+
| padding | `'lg' | 'md' | 'none' | 'sm' | 'xl'` | no | md | Controls the padding behavior and appearance of the Card component. Available options: lg, md, none, and 2 more. |
|
|
62
|
+
|
|
63
|
+
Inherited from:
|
|
64
|
+
- Omit<CardVariants, 'elementType' | 'interactive'> (omit-pattern)
|
|
65
|
+
- Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
|
|
66
|
+
|
|
67
|
+
### Slots (slotClasses keys)
|
|
68
|
+
`base`, `header`, `content`, `footer`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## Checkbox
|
|
5
|
+
Accessible checkbox with indeterminate support, semantic intents, and form integration.
|
|
6
|
+
Uses a hidden native input for correct form behavior and ARIA semantics.
|
|
7
|
+
|
|
8
|
+
**Import:** `import { Checkbox } from '@urbicon-ui/blocks';`
|
|
9
|
+
|
|
10
|
+
### Examples
|
|
11
|
+
```svelte
|
|
12
|
+
<Checkbox label="Accept terms" bind:checked />
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<Checkbox
|
|
17
|
+
label="Select all"
|
|
18
|
+
indeterminate
|
|
19
|
+
onCheckedChange={(val) => console.log(val)}
|
|
20
|
+
/>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Variants
|
|
24
|
+
- intent: danger, neutral, primary, secondary, success, warning (default: primary)
|
|
25
|
+
- variant: filled, ghost, outlined (default: outlined)
|
|
26
|
+
- size: lg, md, sm, xs (default: md)
|
|
27
|
+
- disabled: true (default: false)
|
|
28
|
+
- tier: commit, modify (default: modify)
|
|
29
|
+
|
|
30
|
+
### Api
|
|
31
|
+
| Prop | Type | Required | Default | Description |
|
|
32
|
+
| --- | --- | :---: | --- | --- |
|
|
33
|
+
| ...CheckboxVariants | `VariantProps` | no | | Styling variants from CheckboxVariants |
|
|
34
|
+
| ...HTMLInputAttributes | `HTMLAttributes` | no | | HTML attributes (excluding: 'type' | 'size' | 'checked' | 'class' | 'children') |
|
|
35
|
+
| checked | `boolean` | no | | Current checked state. Supports two-way binding via `bind:checked`. |
|
|
36
|
+
| class | `string` | no | | Extra classes merged onto the wrapper element. |
|
|
37
|
+
| disabled | `boolean` | no | | Prevent interaction and dim the control. |
|
|
38
|
+
| error | `string` | no | | Error message that replaces `helper`, styles the message red, and sets `aria-invalid` on the input. |
|
|
39
|
+
| helper | `string` | no | | Hint text shown below the control. Hidden when `error` is set. |
|
|
40
|
+
| id | `string` | no | | Explicit `id` to link `<label>` and `<input>`. Auto-generated if omitted. |
|
|
41
|
+
| indeterminate | `boolean` | no | | Visual-only third state showing a dash icon. Resets to unchecked on next user toggle. Does not affect the submitted form value. Supports `bind:indeterminate`. |
|
|
42
|
+
| label | `string` | no | | Text label displayed to the right of the checkbox box. |
|
|
43
|
+
| mint | `MintProp` | no | | Micro-interaction preset applied to the control area on hover/click. |
|
|
44
|
+
| name | `string` | no | | The `name` attribute of the underlying `<input>`. Used for form submission. |
|
|
45
|
+
| onCheckedChange | `(checked: boolean) => void` | no | | Fired after the checked state changes. Receives the new `checked` value. |
|
|
46
|
+
| preset | `string` | no | | Apply a named preset registered via `<BlocksProvider presets={{ Checkbox: {...} }}>`. Prefer this over `class` overrides when the requested look falls outside the semantic intent palette — presets keep hover/active/dark-mode logic coherent and make the custom look reusable across the project. |
|
|
47
|
+
| required | `boolean` | no | | Mark the native input as required for form validation. |
|
|
48
|
+
| slotClasses | `Partial<Record<'wrapper' | 'control' | 'box' | 'icon' | 'label' | 'message', string>>` | no | | Per-slot class overrides merged with (or replacing, when `unstyled`) the default styles. |
|
|
49
|
+
| tier | `InteractiveTier` | no | | Semantic radius tier. Default `modify` — checkbox is an input-tap surface. Inherited from TierContext when omitted; falls back to `modify` outside of any tier-aware container. |
|
|
50
|
+
| unstyled | `boolean` | no | | Strip all default tailwind-variants classes. Use with `slotClasses` for a fully custom look. The box exposes `data-state` for conditional styling. |
|
|
51
|
+
| value | `string` | no | | The value submitted when checked. Defaults to `'on'`. |
|
|
52
|
+
| intent | `'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning'` | no | primary | Controls the color theme and semantic meaning of the Checkbox. Affects the overall appearance and user perception. Available options: danger, neutral, primary, and 3 more. |
|
|
53
|
+
| variant | `'filled' | 'ghost' | 'outlined'` | no | outlined | Controls the visual style and presentation of the Checkbox. Determines the component's visual treatment. Available options: filled, ghost, outlined. |
|
|
54
|
+
| size | `'lg' | 'md' | 'sm' | 'xs'` | no | md | Controls the dimensions, padding, and text size of the Checkbox. Affects the component's physical footprint. Available options: lg, md, sm, xs. |
|
|
55
|
+
|
|
56
|
+
Inherited from:
|
|
57
|
+
- Omit<CheckboxVariants, 'error' | 'checked' | 'indeterminate'> (omit-pattern)
|
|
58
|
+
- Omit<HTMLInputAttributes, 'type' | 'size' | 'checked' | 'class' | 'children'> (omit-pattern)
|
|
59
|
+
|
|
60
|
+
### Slots (slotClasses keys)
|
|
61
|
+
`wrapper`, `control`, `box`, `icon`, `label`, `message`
|