@devalok/shilp-sutra 0.8.0 → 0.8.1
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/llms.txt +7 -1
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
> Built on the same primitives as shadcn/ui but with key API differences.
|
|
5
5
|
> Read this file BEFORE writing any UI code. Do NOT guess from shadcn/ui knowledge.
|
|
6
6
|
|
|
7
|
+
## BREAKING CHANGES (v0.8.0)
|
|
8
|
+
- Combobox: Now uses discriminated union. Single: `multiple?: false, value: string, onValueChange: (v: string) => void`. Multiple: `multiple: true, value: string[], onValueChange: (v: string[]) => void`. No more `v as string[]` casts.
|
|
9
|
+
- StatusBadge: Pass either `status` OR `color`, not both (discriminated union).
|
|
10
|
+
- Input/Textarea: Now auto-inherit state, aria-describedby, aria-required from FormField context. Explicit props override.
|
|
11
|
+
|
|
7
12
|
## Install & Setup
|
|
8
13
|
|
|
9
14
|
pnpm add @devalok/shilp-sutra
|
|
@@ -127,12 +132,13 @@ NOTIFICATION SELECTION GUIDE:
|
|
|
127
132
|
- FormField: state(helper|error|warning|success) > Label + Input + FormHelperText
|
|
128
133
|
- useFormField() hook returns { state, helperTextId, required } from FormField context
|
|
129
134
|
- Wire accessibility: const { state, helperTextId } = useFormField(); then aria-describedby={helperTextId}, aria-invalid={state === 'error'}
|
|
135
|
+
- Input/Textarea auto-wire from FormField context (no manual hookup needed). Explicit props override.
|
|
130
136
|
|
|
131
137
|
### Composed Components
|
|
132
138
|
- ConfirmDialog: open, onOpenChange, title, description, onConfirm + confirmText, cancelText, color(default|error), loading
|
|
133
139
|
- PageHeader: title, subtitle, breadcrumbs[], actions(ReactNode)
|
|
134
140
|
- AvatarGroup: users[], max(number), size(sm|md|lg), showTooltip
|
|
135
|
-
- StatusBadge: status(active|pending|approved|rejected|completed|blocked|cancelled|draft) color(success|warning|error|info|neutral) size(sm|md)
|
|
141
|
+
- StatusBadge: DISCRIMINATED UNION — pass status OR color, not both. status(active|pending|approved|rejected|completed|blocked|cancelled|draft) color(success|warning|error|info|neutral) size(sm|md)
|
|
136
142
|
- ContentCard: variant(default|outline|ghost) padding(default|compact|spacious|none)
|
|
137
143
|
- EmptyState: icon, title(required), description, action(ReactNode), compact
|
|
138
144
|
- PriorityIndicator: priority(LOW|MEDIUM|HIGH|URGENT) display(compact|full)
|