@devalok/shilp-sutra 0.48.0 → 0.49.0
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/BREAKING.json +32 -0
- package/MIGRATION.md +891 -881
- package/dist/_chunks/badge-group.js +50 -63
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chat.js +1 -1
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/field-state.js +8 -0
- package/dist/_chunks/field-state.js.map +1 -0
- package/dist/_chunks/popover.js +50 -47
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives.js +155 -155
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/shared.js +4 -4
- package/dist/_chunks/tiptap.js +10 -10
- package/dist/_chunks/use-calendar.js +1 -1
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/_chunks/use-controllable-open.js +15 -0
- package/dist/_chunks/use-controllable-open.js.map +1 -0
- package/dist/composed/command-palette.js +3 -3
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/confirm-dialog.js +3 -3
- package/dist/composed/confirm-dialog.js.map +1 -1
- package/dist/composed/date-picker/index.js +3 -3
- package/dist/composed/date-picker/index.js.map +1 -1
- package/dist/composed/error-boundary.js +1 -1
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/index.d.ts +3 -1
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +4 -3
- package/dist/composed/loading-skeleton.js +15 -15
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +32 -45
- package/dist/composed/page-header.js.map +1 -1
- package/dist/composed/page-skeletons.js +19 -19
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/responsive-modal.d.ts +39 -0
- package/dist/composed/responsive-modal.d.ts.map +1 -0
- package/dist/composed/responsive-modal.js +212 -0
- package/dist/composed/responsive-modal.js.map +1 -0
- package/dist/composed/rich-chat-input.js +4 -4
- package/dist/composed/rich-text-editor.js +1 -1
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.d.ts +1 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/composed/schedule-view.js +48 -54
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/composed/status-badge.d.ts +13 -11
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +54 -130
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/top-bar.js +1 -1
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tokens/semantic.css +8 -1
- package/dist/ui/accordion.js +9 -9
- package/dist/ui/alert-dialog.js +26 -26
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +7 -7
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +87 -82
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/breadcrumb.d.ts +0 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +58 -35
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button.js +3 -3
- package/dist/ui/checkbox.d.ts +4 -2
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +33 -28
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/combobox.d.ts +3 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +137 -132
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/context-menu.js +46 -46
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +53 -50
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dot.d.ts +38 -0
- package/dist/ui/dot.d.ts.map +1 -0
- package/dist/ui/dot.js +92 -0
- package/dist/ui/dot.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +70 -65
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/hover-card.js +11 -11
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +67 -67
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts +4 -2
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +38 -37
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/field-state.d.ts +21 -0
- package/dist/ui/lib/field-state.d.ts.map +1 -0
- package/dist/ui/lib/use-controllable-open.d.ts +32 -0
- package/dist/ui/lib/use-controllable-open.d.ts.map +1 -0
- package/dist/ui/link.js +1 -1
- package/dist/ui/number-input.d.ts +4 -2
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +51 -50
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/progress.d.ts +66 -42
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +144 -40
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.d.ts +6 -2
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +44 -33
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +58 -57
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.js +2 -2
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +59 -56
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.js +5 -5
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/slider.js +6 -6
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +122 -125
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/surface.js +1 -1
- package/dist/ui/switch.d.ts +3 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +32 -27
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/textarea.d.ts +3 -3
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +18 -17
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast.js +2 -2
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +36 -33
- package/dist/ui/tooltip.js.map +1 -1
- package/docs/components/ai/ai-command-provider.md +46 -0
- package/docs/components/ai/block-renderer.md +59 -0
- package/docs/components/ai/command-bar.md +78 -0
- package/docs/components/ai/conversation.md +59 -0
- package/docs/components/ai/devadoot-icon.md +41 -0
- package/docs/components/composed/page-header.md +1 -1
- package/docs/components/composed/responsive-modal.md +66 -0
- package/docs/components/composed/schedule-view.md +6 -2
- package/docs/components/ui/breadcrumb.md +1 -1
- package/docs/components/ui/checkbox.md +4 -1
- package/docs/components/ui/combobox.md +4 -0
- package/docs/components/ui/dot.md +61 -0
- package/docs/components/ui/progress.md +54 -16
- package/docs/components/ui/radio.md +6 -2
- package/docs/components/ui/select.md +9 -5
- package/docs/components/ui/switch.md +4 -1
- package/docs/components/ui/table.md +2 -1
- package/llms.txt +11 -3
- package/make-kit/components/form.md +2 -2
- package/make-kit/components/icon.md +2 -2
- package/make-kit/components/overview.md +2 -2
- package/make-kit/components/select.md +1 -1
- package/make-kit/components/table.md +1 -1
- package/mcp-manifest.json +2656 -1068
- package/mcp-manifest.schema.json +18 -0
- package/package.json +11 -6
- package/skill/SKILL.md +1 -1
- package/skill/references/components.md +11 -3
- package/dist/ui/status-dot.d.ts +0 -27
- package/dist/ui/status-dot.d.ts.map +0 -1
- package/dist/ui/status-dot.js +0 -68
- package/dist/ui/status-dot.js.map +0 -1
- package/docs/components/ui/status-dot.md +0 -35
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
disabled: boolean (propagates to all items)
|
|
13
13
|
orientation: "horizontal" | "vertical"
|
|
14
14
|
name: string (form name for all items)
|
|
15
|
+
state: "default" | "error" | "warning" | "success" (validation; sets aria-invalid on the group + tints item borders. Inherited from FormField when omitted)
|
|
15
16
|
|
|
16
17
|
### RadioGroupItem
|
|
17
18
|
value: string (REQUIRED — what's selected when this item is checked)
|
|
@@ -44,14 +45,17 @@
|
|
|
44
45
|
- **RadioGroup propagates** `disabled` to every RadioGroupItem; items can opt back in with `disabled={false}` for granular control (rare).
|
|
45
46
|
- **Labels:** RadioGroupItem has no intrinsic label — pair each with `<Label htmlFor="x" />` + `<RadioGroupItem id="x" value="..." />`. Screen readers announce the group label (from FormField or aria-labelledby on RadioGroup) plus each item's label.
|
|
46
47
|
- **Form libraries:** RadioGroup works with react-hook-form via Controller (onValueChange maps to field.onChange). The `name` prop puts a hidden form input per item for native form serialization.
|
|
47
|
-
- **FormField integration:** RadioGroup
|
|
48
|
+
- **FormField integration:** RadioGroup now consumes FormField state (or set `state` explicitly). It sets `aria-invalid` on the group and tints each item's border to match — unified with the other form controls via the shared `FieldState` type. An explicit `state` prop wins over FormField context.
|
|
48
49
|
|
|
49
50
|
## Gotchas
|
|
50
51
|
- Each RadioGroupItem needs a unique `value` prop
|
|
51
52
|
- Pair each item with a Label for accessibility
|
|
52
|
-
- RadioGroup
|
|
53
|
+
- RadioGroup inherits FormField state; pass `state` explicitly to override
|
|
53
54
|
|
|
54
55
|
## Changes
|
|
56
|
+
### v0.49.0
|
|
57
|
+
- **Added** `state` prop on RadioGroup (`FieldState = "default" | "error" | "warning" | "success"`) — unified field-state API. Sets `aria-invalid` + tints item borders, and now inherits from `FormField` context.
|
|
58
|
+
|
|
55
59
|
### v0.4.2
|
|
56
60
|
- **Added** `RadioGroupProps`, `RadioGroupItemProps` type exports
|
|
57
61
|
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
## Props
|
|
8
8
|
### SelectTrigger
|
|
9
9
|
variant: "default" | "outline" | "ghost"
|
|
10
|
-
|
|
10
|
+
state: "default" | "error" | "warning" | "success" (validation; sets aria-invalid when error. Inherited from FormField when omitted)
|
|
11
11
|
size: "xs" | "sm" | "md" | "lg"
|
|
12
12
|
|
|
13
13
|
## Compound Components
|
|
14
14
|
Select (root — value, onValueChange, defaultValue)
|
|
15
|
-
SelectTrigger (variant/
|
|
15
|
+
SelectTrigger (variant/state/size go HERE, not on Select root)
|
|
16
16
|
SelectValue (placeholder)
|
|
17
17
|
SelectContent
|
|
18
18
|
SelectGroup (optional grouping)
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
SelectSeparator
|
|
22
22
|
|
|
23
23
|
## Defaults
|
|
24
|
-
SelectTrigger variant="default",
|
|
24
|
+
SelectTrigger variant="default", state="default", size="md"
|
|
25
25
|
|
|
26
26
|
## Example
|
|
27
27
|
```jsx
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
|
|
39
39
|
## Composability
|
|
40
40
|
- **Radix Select** underneath — `value`/`onValueChange`/`defaultValue`/`open`/`onOpenChange` standard state.
|
|
41
|
-
- **Styling props live on SelectTrigger, not Select root.** The Select root owns value/state; the Trigger owns appearance (variant/
|
|
41
|
+
- **Styling props live on SelectTrigger, not Select root.** The Select root owns value/state; the Trigger owns appearance (variant/state/size). Setting `<Select size="lg">` silently does nothing — TypeScript won't catch it.
|
|
42
42
|
- **SelectItem requires `value`** — unique within the Select. Labels are the children of SelectItem.
|
|
43
43
|
- **SelectGroup + SelectLabel:** Organize options into sections with a non-interactive section heading.
|
|
44
|
-
- **FormField integration:** Set `
|
|
44
|
+
- **FormField integration:** Set `state="error"` on SelectTrigger for error visuals, or omit it inside a `<FormField state="error">` — SelectTrigger now inherits the field state from context (explicit `state` prop wins). Unified with Input/Textarea/Checkbox/Radio/Switch/Combobox via the shared `FieldState` type.
|
|
45
45
|
- **Portal + z-popover (1400):** content portals to body, stacks above Dialog/Sheet/other overlays.
|
|
46
46
|
- **Select vs Combobox vs Autocomplete:** Select = short fixed list, click-to-open, no typeahead. Combobox = searchable, forced selection. Autocomplete = searchable, free text. Pick by list size and search need.
|
|
47
47
|
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
- `<Select size="lg">` is silently ignored (no TypeScript error)
|
|
51
51
|
|
|
52
52
|
## Changes
|
|
53
|
+
### v0.49.0
|
|
54
|
+
- **BREAKING** Renamed the SelectTrigger `color` prop → `state` (unified field-state API across all form controls; type `FieldState = "default" | "error" | "warning" | "success"`). Migrate `<SelectTrigger color="error">` → `<SelectTrigger state="error">`.
|
|
55
|
+
- **Added** SelectTrigger now inherits validation state from `FormField` context (was manual-only before).
|
|
56
|
+
|
|
53
57
|
### v0.31.0
|
|
54
58
|
- **Added** `variant` prop on SelectTrigger: `default | outline | ghost`
|
|
55
59
|
- **Added** `color` prop on SelectTrigger: `default | error | success | warning`. Sets `aria-invalid` when error.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## Props
|
|
8
8
|
checked: boolean
|
|
9
9
|
onCheckedChange: (checked: boolean) => void
|
|
10
|
-
|
|
10
|
+
state: "default" | "error" | "warning" | "success" (validation border/checked-track tint; error sets aria-invalid. Inherited from FormField when omitted. Distinct from `color`, the ON-track tint)
|
|
11
11
|
disabled: boolean
|
|
12
12
|
size: "sm" | "md" | "lg"
|
|
13
13
|
color: "accent" | "success" | "warning"
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
- Switch does NOT auto-consume FormField — pass `error` explicitly inside a FormField
|
|
36
36
|
|
|
37
37
|
## Changes
|
|
38
|
+
### v0.49.0
|
|
39
|
+
- **BREAKING** Removed the `error: boolean` prop; use `state` (`FieldState = "default" | "error" | "warning" | "success"`). Migrate `<Switch error />` → `<Switch state="error" />`. Gains `warning`/`success` and inherits from `FormField`. (`color` is unchanged — it's the ON-track tint, not validation.)
|
|
40
|
+
|
|
38
41
|
### v0.29.0
|
|
39
42
|
- **Added** `size` prop: `"sm"` (18px track) | `"md"` (24px, default) | `"lg"` (28px track)
|
|
40
43
|
- **Added** `color` prop: `"accent"` (default) | `"success"` | `"warning"` for checked-state color
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
Reveal is opacity-based: buttons stay in the tab order permanently, appear on row hover AND :focus-within, and are always visible on touch (pointer-coarse). Give the column a visually-hidden header.
|
|
17
17
|
|
|
18
18
|
### TableRowLink (separate import: ui/table-row-link — client component)
|
|
19
|
-
href: string (required)
|
|
19
|
+
href: string (required)
|
|
20
|
+
stretch: boolean (default: true)
|
|
20
21
|
A real anchor placed in the row's primary cell (`<TableCell className="relative">`), stretched across the row via a pseudo-element — cmd/ctrl+click, middle-click, and context menu work, unlike onClick-on-row. Keyboard focus draws a row-level ring. Other interactive elements in the row need `className="relative z-[1]"`. `stretch={false}` = title-only link (keeps row text selectable).
|
|
21
22
|
|
|
22
23
|
## Compound Components
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devalok/shilp-sutra
|
|
2
2
|
|
|
3
|
-
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.
|
|
3
|
+
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.49.0.
|
|
4
4
|
> Built on the same primitives as shadcn/ui but with DIFFERENT prop APIs — never guess from shadcn knowledge; verify every prop.
|
|
5
5
|
> This file is a ROUTER: it tells you what exists and where to get details. Do not look for prop tables here — fetch them per component (MCP tool or per-component doc file below).
|
|
6
6
|
|
|
@@ -65,6 +65,7 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
65
65
|
- [data-table-toolbar](docs/components/ui/data-table-toolbar.md)
|
|
66
66
|
- [devalok-grain](docs/components/ui/devalok-grain.md)
|
|
67
67
|
- [dialog](docs/components/ui/dialog.md)
|
|
68
|
+
- [dot](docs/components/ui/dot.md): A small semantic status/indicator dot — the low-level primitive behind status pills, presence indicators, legend swatches, and `StatusDot`
|
|
68
69
|
- [dropdown-menu](docs/components/ui/dropdown-menu.md)
|
|
69
70
|
- [file-upload](docs/components/ui/file-upload.md)
|
|
70
71
|
- [form](docs/components/ui/form.md)
|
|
@@ -83,7 +84,7 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
83
84
|
- [oauth-button](docs/components/ui/oauth-button.md)
|
|
84
85
|
- [pagination](docs/components/ui/pagination.md)
|
|
85
86
|
- [popover](docs/components/ui/popover.md)
|
|
86
|
-
- [progress](docs/components/ui/progress.md)
|
|
87
|
+
- [progress](docs/components/ui/progress.md): A linear progress bar
|
|
87
88
|
- [progress-ring](docs/components/ui/progress-ring.md)
|
|
88
89
|
- [radio](docs/components/ui/radio.md)
|
|
89
90
|
- [search-input](docs/components/ui/search-input.md)
|
|
@@ -98,7 +99,6 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
98
99
|
- [stack](docs/components/ui/stack.md)
|
|
99
100
|
- [stat-card](docs/components/ui/stat-card.md)
|
|
100
101
|
- [stat-flash](docs/components/ui/stat-flash.md)
|
|
101
|
-
- [status-dot](docs/components/ui/status-dot.md)
|
|
102
102
|
- [stepper](docs/components/ui/stepper.md)
|
|
103
103
|
- [surface](docs/components/ui/surface.md): The low-level elevated container primitive
|
|
104
104
|
- [switch](docs/components/ui/switch.md)
|
|
@@ -141,6 +141,7 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
141
141
|
- [page-header](docs/components/composed/page-header.md)
|
|
142
142
|
- [page-skeletons](docs/components/composed/page-skeletons.md): Exports: DashboardSkeleton, ProjectListSkeleton, TaskDetailSkeleton
|
|
143
143
|
- [priority-indicator](docs/components/composed/priority-indicator.md)
|
|
144
|
+
- [responsive-modal](docs/components/composed/responsive-modal.md)
|
|
144
145
|
- [rich-chat-input](docs/components/composed/rich-chat-input.md): Compact rich text chat input for unified human+AI workspaces
|
|
145
146
|
- [rich-text-editor](docs/components/composed/rich-text-editor.md): Exports: RichTextEditor, RichTextViewer
|
|
146
147
|
- [schedule-view](docs/components/composed/schedule-view.md)
|
|
@@ -157,6 +158,13 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
157
158
|
- [sidebar](docs/components/shell/sidebar.md)
|
|
158
159
|
- [top-bar](docs/components/shell/top-bar.md)
|
|
159
160
|
|
|
161
|
+
### ai
|
|
162
|
+
- [ai-command-provider](docs/components/ai/ai-command-provider.md): Context provider for the AI command system
|
|
163
|
+
- [block-renderer](docs/components/ai/block-renderer.md): Renders an ordered list of typed AI "blocks" — the structured chunks an assistant/ server emits instead of plain text
|
|
164
|
+
- [command-bar](docs/components/ai/command-bar.md): A unified AI command input with three layout variants
|
|
165
|
+
- [conversation](docs/components/ai/conversation.md): A scrollable AI conversation thread: user + assistant turns, streaming processing steps, an agent header, and structured content blocks (rendered via BlockRenderer) with confirm/cancel/undo action support
|
|
166
|
+
- [devadoot-icon](docs/components/ai/devadoot-icon.md): The animated Devalok chakra glyph — the visual identity for the AI command system
|
|
167
|
+
|
|
160
168
|
## Tokens
|
|
161
169
|
|
|
162
170
|
Categories: color, spacing (`ds-01`…), typography (`text-ds-*`), radius (`rounded-ds-*`), shadow (`shadow-raised`/`shadow-overlay`/…), motion, z-layers. Full reference: `get_tokens(category)` via MCP, or the `tokens` object in `mcp-manifest.json`.
|
|
@@ -69,7 +69,7 @@ Use inside a custom control to consume FormField context.
|
|
|
69
69
|
|
|
70
70
|
| Control | Manual wiring needed |
|
|
71
71
|
|---|---|
|
|
72
|
-
| `<Select>` / `<SelectTrigger>` | Set `
|
|
72
|
+
| `<Select>` / `<SelectTrigger>` | Set `state="error"` on `SelectTrigger` from your validation state. |
|
|
73
73
|
| `<Checkbox>`, `<Radio>`, `<Switch>` | Pair `<Label htmlFor>` manually. State is visual on the control. |
|
|
74
74
|
|
|
75
75
|
## Examples
|
|
@@ -134,7 +134,7 @@ The Input receives `aria-describedby` (linked to FormHelperText), `aria-invalid=
|
|
|
134
134
|
<FormField state={errors.role ? 'error' : 'helper'}>
|
|
135
135
|
<Label htmlFor="role">Role</Label>
|
|
136
136
|
<Select>
|
|
137
|
-
<SelectTrigger id="role"
|
|
137
|
+
<SelectTrigger id="role" state={errors.role ? 'error' : 'default'}>
|
|
138
138
|
<SelectValue placeholder="Choose a role" />
|
|
139
139
|
</SelectTrigger>
|
|
140
140
|
<SelectContent>
|
|
@@ -14,7 +14,7 @@ For the broader icon system (which icons exist, how to register custom ones, the
|
|
|
14
14
|
- Any inline SVG icon — inside Button slots, IconButton, Badge slots, table cells, list rows.
|
|
15
15
|
- Need an interactive icon button? Use `<IconButton>`, not Icon wrapped in `<button>`.
|
|
16
16
|
- Need a static cluster of related icons? Use `<IconGroup>`.
|
|
17
|
-
- Need a status indicator? Use `<
|
|
17
|
+
- Need a status indicator? Use `<Dot>` or `<Badge dot>` — they're optimized for that.
|
|
18
18
|
|
|
19
19
|
Tabler-only. Don't mix icon libraries — see `foundations/icons.md` for the rationale.
|
|
20
20
|
|
|
@@ -129,7 +129,7 @@ Input's IconProvider sets size by input size: `xs` / `sm` input → `sm` icon, `
|
|
|
129
129
|
</Stack>
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
For most status displays prefer `<
|
|
132
|
+
For most status displays prefer `<Dot>` — purpose-built. Use this pattern only when you need a specific icon shape.
|
|
133
133
|
|
|
134
134
|
## Composability
|
|
135
135
|
|
|
@@ -77,7 +77,7 @@ Permanent inline message?
|
|
|
77
77
|
Status of an item?
|
|
78
78
|
→ <Badge> — pill label (status / tag)
|
|
79
79
|
→ <StatusBadge> — colored dot + label (discriminated union: status="online"/"away"/...)
|
|
80
|
-
→ <
|
|
80
|
+
→ <Dot> — just the colored status/indicator dot
|
|
81
81
|
|
|
82
82
|
Temporary notification?
|
|
83
83
|
→ toast.success / error / warning / info (imperative) — must have <Toaster /> mounted
|
|
@@ -256,7 +256,7 @@ Code?
|
|
|
256
256
|
| Skeleton | `/ui/skeleton` |
|
|
257
257
|
| Badge | `/ui/badge` |
|
|
258
258
|
| StatusBadge | `/composed/status-badge` |
|
|
259
|
-
|
|
|
259
|
+
| Dot | `/ui/dot` |
|
|
260
260
|
| EmptyState | `/composed/empty-state` |
|
|
261
261
|
|
|
262
262
|
### Layout
|
|
@@ -98,7 +98,7 @@ Styling lives on the **Trigger**, not on `Select` root. Setting `<Select size="l
|
|
|
98
98
|
<FormField state={errors.role ? 'error' : 'helper'}>
|
|
99
99
|
<Label htmlFor="role">Role</Label>
|
|
100
100
|
<Select value={role} onValueChange={setRole}>
|
|
101
|
-
<SelectTrigger id="role"
|
|
101
|
+
<SelectTrigger id="role" state={errors.role ? 'error' : 'default'}>
|
|
102
102
|
<SelectValue placeholder="Choose a role" />
|
|
103
103
|
</SelectTrigger>
|
|
104
104
|
<SelectContent>
|
|
@@ -233,7 +233,7 @@ Table + Badge (server-safe via Badge.Group context — verify per use) + Avatar
|
|
|
233
233
|
|
|
234
234
|
- **Server-safe:** Table and its sub-components are pure HTML semantic wrappers. No state, no context. Use in RSC trees without `'use client'`.
|
|
235
235
|
- **TableHead scope:** Headers automatically get `scope="col"` for screen-reader navigation. Don't override it.
|
|
236
|
-
- **Composes with primitives:** Drop `<Badge>`, `<Avatar>`, `<IconButton>`, `<
|
|
236
|
+
- **Composes with primitives:** Drop `<Badge>`, `<Avatar>`, `<IconButton>`, `<Dot>` inside cells. Check each component's server-safety if you need RSC compatibility.
|
|
237
237
|
- **TableCaption:** Renders as HTML `<caption>` — screen readers announce it before content. Use it for any non-trivial table.
|
|
238
238
|
|
|
239
239
|
See `foundations/typography.md` for the body / label variants inside cells, `foundations/surfaces.md` for table-in-card surface guidance.
|