@devalok/shilp-sutra 0.18.0 → 0.18.2

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.
Files changed (214) hide show
  1. package/dist/_chunks/motion-provider.js +24 -0
  2. package/dist/_chunks/primitives.js +101 -101
  3. package/dist/_chunks/tree-view.js +12 -12
  4. package/dist/_chunks/use-calendar.js +1 -1
  5. package/dist/_chunks/vendor-utils.js +2 -2
  6. package/dist/composed/activity-feed.js +21 -21
  7. package/dist/composed/avatar-group.js +25 -25
  8. package/dist/composed/command-palette.js +3 -3
  9. package/dist/composed/confirm-dialog.js +1 -1
  10. package/dist/composed/content-card.js +1 -1
  11. package/dist/composed/empty-state.js +2 -2
  12. package/dist/composed/error-boundary.js +2 -2
  13. package/dist/composed/global-loading.js +10 -10
  14. package/dist/composed/lib/string-utils.d.ts +0 -1
  15. package/dist/composed/lib/string-utils.js +0 -1
  16. package/dist/composed/loading-skeleton.js +1 -1
  17. package/dist/composed/member-picker.js +6 -6
  18. package/dist/composed/page-header.js +1 -1
  19. package/dist/composed/page-skeletons.js +1 -1
  20. package/dist/composed/priority-indicator.js +6 -6
  21. package/dist/composed/rich-text-editor.js +1 -1
  22. package/dist/composed/schedule-view.js +15 -15
  23. package/dist/composed/simple-tooltip.js +8 -8
  24. package/dist/composed/status-badge.js +12 -12
  25. package/dist/motion/index.d.ts +1 -1
  26. package/dist/motion/index.d.ts.map +1 -1
  27. package/dist/motion/index.js +8 -6
  28. package/dist/motion/primitives-index.js +184 -8
  29. package/dist/shell/app-command-palette.js +1 -1
  30. package/dist/shell/bottom-navbar.js +3 -3
  31. package/dist/shell/notification-center.js +35 -35
  32. package/dist/shell/notification-preferences.js +29 -28
  33. package/dist/shell/sidebar.js +56 -56
  34. package/dist/shell/top-bar.js +25 -25
  35. package/dist/ui/accordion.js +11 -11
  36. package/dist/ui/alert-dialog.js +41 -41
  37. package/dist/ui/alert.js +10 -10
  38. package/dist/ui/aspect-ratio.js +5 -5
  39. package/dist/ui/autocomplete.js +15 -15
  40. package/dist/ui/avatar.js +4 -4
  41. package/dist/ui/badge.js +11 -11
  42. package/dist/ui/banner.js +3 -3
  43. package/dist/ui/breadcrumb.js +8 -8
  44. package/dist/ui/button-group.js +4 -4
  45. package/dist/ui/button.js +25 -25
  46. package/dist/ui/card.js +5 -5
  47. package/dist/ui/charts/index.js +4 -4
  48. package/dist/ui/checkbox.js +4 -4
  49. package/dist/ui/chip.js +14 -14
  50. package/dist/ui/code.js +1 -1
  51. package/dist/ui/collapsible.js +7 -7
  52. package/dist/ui/color-input.js +1 -1
  53. package/dist/ui/combobox.js +5 -5
  54. package/dist/ui/container.js +4 -4
  55. package/dist/ui/context-menu.js +4 -4
  56. package/dist/ui/data-table-toolbar.js +18 -18
  57. package/dist/ui/data-table.js +55 -55
  58. package/dist/ui/dialog.js +3 -3
  59. package/dist/ui/dropdown-menu.js +3 -3
  60. package/dist/ui/file-upload.js +10 -10
  61. package/dist/ui/form.js +1 -1
  62. package/dist/ui/hover-card.js +12 -12
  63. package/dist/ui/icon-button.js +9 -9
  64. package/dist/ui/index.js +322 -516
  65. package/dist/ui/input-otp.js +4 -4
  66. package/dist/ui/input.js +9 -9
  67. package/dist/ui/label.js +9 -9
  68. package/dist/ui/lib/date-utils.d.ts +0 -1
  69. package/dist/{_chunks → ui/lib}/date-utils.js +1 -2
  70. package/dist/{_chunks/motion2.js → ui/lib/motion.js} +13 -14
  71. package/dist/ui/lib/use-ripple.d.ts.map +1 -1
  72. package/dist/ui/lib/utils.js +1 -1
  73. package/dist/ui/link.js +1 -1
  74. package/dist/ui/menubar.js +66 -66
  75. package/dist/ui/navigation-menu.js +4 -4
  76. package/dist/ui/number-input.js +9 -9
  77. package/dist/ui/pagination.js +1 -1
  78. package/dist/ui/popover.js +18 -18
  79. package/dist/ui/progress.js +4 -4
  80. package/dist/ui/radio.js +11 -11
  81. package/dist/ui/search-input.js +2 -2
  82. package/dist/ui/segmented-control.d.ts +2 -0
  83. package/dist/ui/segmented-control.d.ts.map +1 -1
  84. package/dist/ui/segmented-control.js +59 -55
  85. package/dist/ui/select.js +19 -19
  86. package/dist/ui/separator.js +5 -5
  87. package/dist/ui/sheet.js +10 -10
  88. package/dist/ui/sidebar.js +574 -38
  89. package/dist/ui/skeleton.js +1 -1
  90. package/dist/ui/slider.js +9 -9
  91. package/dist/ui/spinner.js +2 -2
  92. package/dist/ui/stack.js +1 -1
  93. package/dist/ui/stat-card.js +35 -35
  94. package/dist/ui/stepper.d.ts +1 -3
  95. package/dist/ui/stepper.d.ts.map +1 -1
  96. package/dist/ui/stepper.js +74 -74
  97. package/dist/ui/switch.js +7 -7
  98. package/dist/ui/table.js +28 -28
  99. package/dist/ui/tabs.js +10 -10
  100. package/dist/ui/text.js +1 -1
  101. package/dist/ui/textarea.js +10 -10
  102. package/dist/ui/toast.js +12 -12
  103. package/dist/ui/toaster.js +11 -11
  104. package/dist/ui/toggle-group.js +2 -2
  105. package/dist/ui/toggle.js +8 -8
  106. package/dist/ui/tooltip.js +21 -21
  107. package/dist/ui/visually-hidden.js +3 -3
  108. package/docs/components/_header.md +83 -0
  109. package/docs/components/composed/activity-feed.md +43 -0
  110. package/docs/components/composed/avatar-group.md +32 -0
  111. package/docs/components/composed/command-palette.md +40 -0
  112. package/docs/components/composed/confirm-dialog.md +46 -0
  113. package/docs/components/composed/content-card.md +36 -0
  114. package/docs/components/composed/date-picker.md +130 -0
  115. package/docs/components/composed/empty-state.md +53 -0
  116. package/docs/components/composed/error-boundary.md +29 -0
  117. package/docs/components/composed/global-loading.md +27 -0
  118. package/docs/components/composed/loading-skeleton.md +51 -0
  119. package/docs/components/composed/member-picker.md +35 -0
  120. package/docs/components/composed/page-header.md +41 -0
  121. package/docs/components/composed/page-skeletons.md +32 -0
  122. package/docs/components/composed/priority-indicator.md +32 -0
  123. package/docs/components/composed/rich-text-editor.md +71 -0
  124. package/docs/components/composed/schedule-view.md +39 -0
  125. package/docs/components/composed/simple-tooltip.md +33 -0
  126. package/docs/components/composed/status-badge.md +41 -0
  127. package/docs/components/shell/app-command-palette.md +44 -0
  128. package/docs/components/shell/bottom-navbar.md +48 -0
  129. package/docs/components/shell/command-registry.md +48 -0
  130. package/docs/components/shell/link-context.md +41 -0
  131. package/docs/components/shell/notification-center.md +63 -0
  132. package/docs/components/shell/notification-preferences.md +42 -0
  133. package/docs/components/shell/sidebar.md +88 -0
  134. package/docs/components/shell/top-bar.md +63 -0
  135. package/docs/components/ui/accordion.md +48 -0
  136. package/docs/components/ui/alert-dialog.md +58 -0
  137. package/docs/components/ui/alert.md +43 -0
  138. package/docs/components/ui/aspect-ratio.md +25 -0
  139. package/docs/components/ui/autocomplete.md +48 -0
  140. package/docs/components/ui/avatar.md +34 -0
  141. package/docs/components/ui/badge.md +48 -0
  142. package/docs/components/ui/banner.md +35 -0
  143. package/docs/components/ui/breadcrumb.md +37 -0
  144. package/docs/components/ui/button-group.md +32 -0
  145. package/docs/components/ui/button.md +55 -0
  146. package/docs/components/ui/card.md +48 -0
  147. package/docs/components/ui/charts.md +43 -0
  148. package/docs/components/ui/checkbox.md +31 -0
  149. package/docs/components/ui/chip.md +43 -0
  150. package/docs/components/ui/code.md +28 -0
  151. package/docs/components/ui/collapsible.md +40 -0
  152. package/docs/components/ui/color-input.md +37 -0
  153. package/docs/components/ui/combobox.md +54 -0
  154. package/docs/components/ui/container.md +26 -0
  155. package/docs/components/ui/context-menu.md +43 -0
  156. package/docs/components/ui/data-table-toolbar.md +44 -0
  157. package/docs/components/ui/data-table.md +91 -0
  158. package/docs/components/ui/dialog.md +51 -0
  159. package/docs/components/ui/dropdown-menu.md +45 -0
  160. package/docs/components/ui/file-upload.md +41 -0
  161. package/docs/components/ui/form.md +51 -0
  162. package/docs/components/ui/hover-card.md +32 -0
  163. package/docs/components/ui/icon-button.md +33 -0
  164. package/docs/components/ui/input-otp.md +44 -0
  165. package/docs/components/ui/input.md +48 -0
  166. package/docs/components/ui/label.md +25 -0
  167. package/docs/components/ui/link.md +29 -0
  168. package/docs/components/ui/menubar.md +44 -0
  169. package/docs/components/ui/navigation-menu.md +46 -0
  170. package/docs/components/ui/number-input.md +44 -0
  171. package/docs/components/ui/pagination.md +48 -0
  172. package/docs/components/ui/popover.md +30 -0
  173. package/docs/components/ui/progress.md +29 -0
  174. package/docs/components/ui/radio.md +34 -0
  175. package/docs/components/ui/search-input.md +43 -0
  176. package/docs/components/ui/segmented-control.md +50 -0
  177. package/docs/components/ui/select.md +49 -0
  178. package/docs/components/ui/separator.md +29 -0
  179. package/docs/components/ui/sheet.md +47 -0
  180. package/docs/components/ui/sidebar.md +72 -0
  181. package/docs/components/ui/skeleton.md +77 -0
  182. package/docs/components/ui/slider.md +29 -0
  183. package/docs/components/ui/spinner.md +50 -0
  184. package/docs/components/ui/stack.md +39 -0
  185. package/docs/components/ui/stat-card.md +61 -0
  186. package/docs/components/ui/stepper.md +49 -0
  187. package/docs/components/ui/switch.md +34 -0
  188. package/docs/components/ui/table.md +47 -0
  189. package/docs/components/ui/tabs.md +56 -0
  190. package/docs/components/ui/text.md +37 -0
  191. package/docs/components/ui/textarea.md +39 -0
  192. package/docs/components/ui/toast.md +65 -0
  193. package/docs/components/ui/toaster.md +47 -0
  194. package/docs/components/ui/toggle-group.md +43 -0
  195. package/docs/components/ui/toggle.md +37 -0
  196. package/docs/components/ui/tooltip.md +33 -0
  197. package/docs/components/ui/tree-view.md +65 -0
  198. package/docs/components/ui/visually-hidden.md +21 -0
  199. package/llms-full.txt +3384 -1591
  200. package/llms.txt +4 -4
  201. package/package.json +28 -3
  202. package/dist/_chunks/avatar.js +0 -52
  203. package/dist/_chunks/button-group.js +0 -27
  204. package/dist/_chunks/button.js +0 -113
  205. package/dist/_chunks/card.js +0 -50
  206. package/dist/_chunks/checkbox.js +0 -16
  207. package/dist/_chunks/form.js +0 -27
  208. package/dist/_chunks/sidebar.js +0 -606
  209. package/dist/_chunks/spinner.js +0 -64
  210. package/dist/_chunks/tooltip.js +0 -30
  211. package/dist/_chunks/utils.js +0 -17
  212. package/dist/motion/motion-provider.js +0 -24
  213. package/dist/motion/primitives.js +0 -187
  214. /package/dist/_chunks/{motion.js → framer.js} +0 -0
@@ -0,0 +1,48 @@
1
+ # Badge
2
+
3
+ - Import: @devalok/shilp-sutra/ui/badge
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ variant: "subtle" | "solid" | "outline" | "secondary" (alias->subtle) | "destructive" (alias->solid+error)
9
+ color: "default" | "info" | "success" | "error" | "warning" | "brand" | "accent" | "teal" | "amber" | "slate" | "indigo" | "cyan" | "orange" | "emerald"
10
+ size: "xs" | "sm" | "md" | "lg"
11
+ dot: boolean (shows leading dot indicator)
12
+ onDismiss: () => void (shows X button when provided)
13
+ children: ReactNode
14
+
15
+ ## Defaults
16
+ variant="subtle", color="default", size="md"
17
+
18
+ ## Example
19
+ ```jsx
20
+ <Badge variant="solid" color="success">Active</Badge>
21
+ <Badge color="teal" onDismiss={() => removeFilter('teal')}>Teal team</Badge>
22
+ ```
23
+
24
+ ## Gotchas
25
+ - DO NOT use variant="destructive" — use variant="solid" color="error"
26
+ - Badge is display-only; for interactive tags use Chip
27
+
28
+ ## Changes
29
+ ### v0.18.0
30
+ - **Changed** Pulse-ring animation migrated to Framer Motion
31
+ - **Fixed** Accent color variants — `text-accent-9` changed to `text-accent-11`, `border-accent-9` changed to `border-accent-7`
32
+ - **Changed** OKLCH color token migration
33
+
34
+ ### v0.8.0
35
+ - **Fixed** `text-[10px]` changed to `text-ds-xs` for token consistency
36
+
37
+ ### v0.4.2
38
+ - **Fixed** `Omit<HTMLAttributes, 'color'>` resolves TS2320 conflict with CVA color prop
39
+
40
+ ### v0.3.1
41
+ - **Fixed** Dismiss button added 24px touch target
42
+
43
+ ### v0.3.0
44
+ - **Changed** (BREAKING) Single `variant` axis split into `variant` (subtle/solid/outline) + `color` (default/info/success/error/...)
45
+ - **Fixed** Solid variant phantom token `text-on-interactive` changed to `text-on-color`
46
+
47
+ ### v0.1.0
48
+ - **Added** Initial release
@@ -0,0 +1,35 @@
1
+ # Banner
2
+
3
+ - Import: @devalok/shilp-sutra/ui/banner
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ color: "info" | "success" | "warning" | "error" | "neutral"
9
+ action: ReactNode (optional action slot, typically a ghost Button)
10
+ onDismiss: () => void (optional, shows X button)
11
+ children: ReactNode (message text)
12
+
13
+ ## Defaults
14
+ color="info"
15
+
16
+ ## Example
17
+ ```jsx
18
+ <Banner color="warning" onDismiss={() => dismiss()}>
19
+ Scheduled maintenance on Sunday.
20
+ </Banner>
21
+ ```
22
+
23
+ ## Gotchas
24
+ - Banner is full-width (spans container). Alert is inline.
25
+ - Renders role="alert" automatically
26
+
27
+ ## Changes
28
+ ### v0.3.1
29
+ - **Fixed** BannerProps uses `Omit<HTMLAttributes, 'color'>` to resolve TypeScript conflict with CVA `color` variant
30
+
31
+ ### v0.3.0
32
+ - **Changed** (BREAKING) `variant` prop renamed to `color` for semantic intent
33
+
34
+ ### v0.1.0
35
+ - **Added** Initial release
@@ -0,0 +1,37 @@
1
+ # Breadcrumb
2
+
3
+ - Import: @devalok/shilp-sutra/ui/breadcrumb
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Compound Components
8
+ Breadcrumb (root nav)
9
+ BreadcrumbList (ol)
10
+ BreadcrumbItem (li)
11
+ BreadcrumbLink (for clickable items) | BreadcrumbPage (for current page)
12
+ BreadcrumbSeparator (auto-rendered or custom)
13
+ BreadcrumbEllipsis (for collapsed items)
14
+
15
+ ## Defaults
16
+ none
17
+
18
+ ## Example
19
+ ```jsx
20
+ <Breadcrumb>
21
+ <BreadcrumbList>
22
+ <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>
23
+ <BreadcrumbSeparator />
24
+ <BreadcrumbItem><BreadcrumbPage>Settings</BreadcrumbPage></BreadcrumbItem>
25
+ </BreadcrumbList>
26
+ </Breadcrumb>
27
+ ```
28
+
29
+ ## Gotchas
30
+ - Use BreadcrumbPage for the current (non-clickable) page, BreadcrumbLink for navigable items
31
+
32
+ ## Changes
33
+ ### v0.18.0
34
+ - **Added** `BreadcrumbProps`, `BreadcrumbLinkProps` type exports
35
+
36
+ ### v0.1.0
37
+ - **Added** Initial release
@@ -0,0 +1,32 @@
1
+ # ButtonGroup
2
+
3
+ - Import: @devalok/shilp-sutra/ui/button-group
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ variant: ButtonProps['variant'] (propagated to children)
9
+ color: ButtonProps['color'] (propagated to children)
10
+ size: ButtonProps['size'] (propagated to children)
11
+ orientation: "horizontal" | "vertical" (default: "horizontal")
12
+
13
+ ## Defaults
14
+ orientation="horizontal"
15
+
16
+ ## Example
17
+ ```jsx
18
+ <ButtonGroup variant="outline" size="sm">
19
+ <Button>Bold</Button>
20
+ <Button>Italic</Button>
21
+ </ButtonGroup>
22
+ ```
23
+
24
+ ## Gotchas
25
+ - Children can override variant/size individually
26
+
27
+ ## Changes
28
+ ### v0.4.2
29
+ - **Fixed** `Omit<HTMLAttributes, 'color'>` resolves TS2320 conflict with CVA color prop
30
+
31
+ ### v0.1.0
32
+ - **Added** Initial release
@@ -0,0 +1,55 @@
1
+ # Button
2
+
3
+ - Import: @devalok/shilp-sutra/ui/button
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ variant: "solid" | "default" (alias->solid) | "outline" | "ghost" | "link" | "destructive" (alias->solid+error)
9
+ color: "default" | "error"
10
+ size: "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-md" | "icon-lg"
11
+ startIcon: ReactNode
12
+ endIcon: ReactNode
13
+ loading: boolean (disables button, shows spinner)
14
+ loadingPosition: "start" | "end" | "center" (default: "start")
15
+ fullWidth: boolean
16
+ asChild: boolean
17
+ onClickAsync: (e: MouseEvent) => Promise<void> (auto loading->success/error->idle)
18
+ asyncFeedbackDuration: number (ms, default 1500)
19
+
20
+ ## Defaults
21
+ variant="solid", color="default", size="md"
22
+
23
+ ## Example
24
+ ```jsx
25
+ <Button variant="solid" color="error" startIcon={<IconTrash />} loading={isDeleting}>
26
+ Delete project
27
+ </Button>
28
+ ```
29
+
30
+ ## Gotchas
31
+ - DO NOT use variant="destructive" — use variant="solid" color="error"
32
+ - DO NOT use variant="secondary" — use variant="outline" or variant="ghost"
33
+ - DO NOT use size="default" — use size="md"
34
+ - DO NOT use color="danger" — use color="error"
35
+ - Inherits variant/color/size from ButtonGroup context if present
36
+ - onClickAsync overrides onClick and loading when active
37
+
38
+ ## Changes
39
+ ### v0.18.0
40
+ - **Added** `onClickAsync` prop — promise-driven loading -> success/error state machine
41
+ - **Added** `asyncFeedbackDuration` prop (default 1500ms)
42
+ - **Changed** whileTap scale animation added via Framer Motion
43
+ - **Fixed** Async feedback colors — `bg-success text-text-on-color` changed to `bg-success-9 text-accent-fg`
44
+ - **Fixed** `onClickAsync` added `isMountedRef` guard to prevent set-state-after-unmount
45
+
46
+ ### v0.4.2
47
+ - **Fixed** `Omit<HTMLAttributes, 'color'>` resolves TS2320 conflict with CVA color prop
48
+ - **Fixed** `className` was passed inside `buttonVariants()` (silently dropped by CVA) — now separate `cn()` argument
49
+
50
+ ### v0.3.0
51
+ - **Changed** (BREAKING) `variant="primary"` renamed to `variant="solid"`, `variant="secondary"` renamed to `variant="outline"`, `variant="error"` moved to `color="error"`
52
+ - **Fixed** All dismiss/close buttons now meet WCAG 2.5.8 minimum 24px touch target
53
+
54
+ ### v0.1.0
55
+ - **Added** Initial release
@@ -0,0 +1,48 @@
1
+ # Card
2
+
3
+ - Import: @devalok/shilp-sutra/ui/card
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ variant: "default" | "elevated" | "outline" | "flat"
9
+ interactive: boolean (enables hover shadow lift + pointer cursor)
10
+
11
+ ## Compound Components
12
+ Card (root)
13
+ CardHeader
14
+ CardTitle
15
+ CardDescription
16
+ CardContent
17
+ CardFooter
18
+
19
+ ## Defaults
20
+ variant="default"
21
+
22
+ ## Example
23
+ ```jsx
24
+ <Card variant="elevated" interactive onClick={() => navigate(url)}>
25
+ <CardHeader>
26
+ <CardTitle>Project</CardTitle>
27
+ <CardDescription>Last updated 2h ago</CardDescription>
28
+ </CardHeader>
29
+ <CardContent><p>Content here</p></CardContent>
30
+ </Card>
31
+ ```
32
+
33
+ ## Gotchas
34
+ - Use `interactive` prop for clickable cards — adds hover lift and pointer cursor
35
+
36
+ ## Changes
37
+ ### v0.18.0
38
+ - **Changed** Interactive card hover lift animation migrated to Framer Motion
39
+
40
+ ### v0.4.2
41
+ - **Changed** (BREAKING) `variant="outlined"` renamed to `variant="outline"`
42
+ - **Added** `cardVariants` export
43
+
44
+ ### v0.1.1
45
+ - **Fixed** `leading-none tracking-tight` changed to `leading-ds-none tracking-ds-tight` for token compliance
46
+
47
+ ### v0.1.0
48
+ - **Added** Initial release
@@ -0,0 +1,43 @@
1
+ # Charts
2
+
3
+ - Import: @devalok/shilp-sutra/ui/charts
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ Charts is a collection of chart components. Each accepts data-specific props.
9
+
10
+ Exported components:
11
+ ChartContainer — wrapper with responsive sizing
12
+ BarChart
13
+ LineChart
14
+ AreaChart
15
+ PieChart
16
+ Sparkline
17
+ GaugeChart
18
+ RadarChart
19
+ Legend — chart legend with LegendItem[]
20
+
21
+ ## Defaults
22
+ none
23
+
24
+ ## Example
25
+ ```jsx
26
+ import { BarChart } from '@devalok/shilp-sutra/ui/charts'
27
+
28
+ <BarChart data={salesData} />
29
+ ```
30
+
31
+ ## Gotchas
32
+ - Barrel-isolated since v0.5.0 — must use `@devalok/shilp-sutra/ui/charts`, NOT the `ui` barrel
33
+ - Requires D3 as an optional peer dependency
34
+
35
+ ## Changes
36
+ ### v0.18.0
37
+ - **Changed** All 8 chart types migrated to Framer Motion entrance animations
38
+
39
+ ### v0.5.0
40
+ - **Changed** (BREAKING) All chart components removed from `@devalok/shilp-sutra/ui` barrel export. Must use `@devalok/shilp-sutra/ui/charts` import path.
41
+
42
+ ### v0.1.0
43
+ - **Added** Initial release
@@ -0,0 +1,31 @@
1
+ # Checkbox
2
+
3
+ - Import: @devalok/shilp-sutra/ui/checkbox
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ checked: boolean | "indeterminate"
9
+ onCheckedChange: (checked: boolean | "indeterminate") => void
10
+ error: boolean (shows red border)
11
+ indeterminate: boolean (overrides checked, shows dash icon)
12
+ disabled: boolean
13
+
14
+ ## Defaults
15
+ none
16
+
17
+ ## Example
18
+ ```jsx
19
+ <Checkbox checked={agreed} onCheckedChange={(v) => setAgreed(v === true)} />
20
+ ```
21
+
22
+ ## Gotchas
23
+ - indeterminate overrides checked visually
24
+
25
+ ## Changes
26
+ ### v0.18.0
27
+ - **Changed** Bouncy check indicator animation migrated to Framer Motion
28
+ - **Fixed** Icon sizing uses design tokens consistently
29
+
30
+ ### v0.1.0
31
+ - **Added** Initial release
@@ -0,0 +1,43 @@
1
+ # Chip
2
+
3
+ - Import: @devalok/shilp-sutra/ui/chip
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ label: string (REQUIRED — use this, NOT children)
9
+ variant: "subtle" | "outline"
10
+ color: "default" | "primary" | "success" | "error" | "warning" | "info" | "teal" | "amber" | "slate" | "indigo" | "cyan" | "orange" | "emerald"
11
+ size: "sm" | "md" | "lg"
12
+ icon: ReactNode
13
+ onClick: MouseEventHandler (renders as <button> when provided)
14
+ onDismiss: () => void (shows X button)
15
+ disabled: boolean
16
+
17
+ ## Defaults
18
+ variant="subtle", size="md", color="default"
19
+
20
+ ## Example
21
+ ```jsx
22
+ <Chip label="In Progress" color="warning" />
23
+ <Chip label="React" color="info" onDismiss={() => removeFilter('react')} />
24
+ ```
25
+
26
+ ## Additional Exports
27
+ ChipGroup — re-exported AnimatePresence from framer-motion; wrap a list of Chips for coordinated exit animations
28
+
29
+ ## Gotchas
30
+ - MUST use label prop — children are NOT rendered
31
+ - `<Chip>text</Chip>` is WRONG — use `<Chip label="text" />`
32
+ - Wrap dynamic chip lists in `<ChipGroup>` for exit animations
33
+
34
+ ## Changes
35
+ ### v0.4.2
36
+ - **Changed** (BREAKING) `variant="filled"` renamed to `"subtle"`, `variant="outlined"` renamed to `"outline"`, `onDelete` renamed to `onDismiss`
37
+
38
+ ### v0.1.1
39
+ - **Fixed** `opacity-[var(--action-disabled-opacity,0.38)]` replaced with `opacity-action-disabled`
40
+ - **Fixed** Converted from `React.createElement` to JSX syntax
41
+
42
+ ### v0.1.0
43
+ - **Added** Initial release
@@ -0,0 +1,28 @@
1
+ # Code
2
+
3
+ - Import: @devalok/shilp-sutra/ui/code
4
+ - Server-safe: Yes
5
+ - Category: ui
6
+
7
+ ## Props
8
+ variant: "inline" | "block"
9
+ children: ReactNode
10
+
11
+ ## Defaults
12
+ variant="inline"
13
+
14
+ ## Example
15
+ ```jsx
16
+ <Code>onClick</Code>
17
+ <Code variant="block">{`const x = 1;\nconsole.log(x);`}</Code>
18
+ ```
19
+
20
+ ## Gotchas
21
+ - "block" renders as `<pre><code>`, "inline" renders as `<code>`
22
+
23
+ ## Changes
24
+ ### v0.1.1
25
+ - **Fixed** `leading-[150%]` replaced with `leading-ds-relaxed` for token compliance
26
+
27
+ ### v0.1.0
28
+ - **Added** Initial release
@@ -0,0 +1,40 @@
1
+ # Collapsible
2
+
3
+ - Import: @devalok/shilp-sutra/ui/collapsible
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ open: boolean (controlled)
9
+ onOpenChange: (open: boolean) => void
10
+ defaultOpen: boolean
11
+
12
+ ## Compound Components
13
+ Collapsible (root)
14
+ CollapsibleTrigger
15
+ CollapsibleContent
16
+
17
+ ## Defaults
18
+ none
19
+
20
+ ## Example
21
+ ```jsx
22
+ <Collapsible>
23
+ <CollapsibleTrigger>Toggle</CollapsibleTrigger>
24
+ <CollapsibleContent>Hidden content</CollapsibleContent>
25
+ </Collapsible>
26
+ ```
27
+
28
+ ## Gotchas
29
+ - Standard Radix Collapsible API
30
+
31
+ ## Changes
32
+ ### v0.13.0
33
+ - **Changed** Default animation changed from fade-only to height-based expand/collapse using `animate-collapsible-down`/`animate-collapsible-up`
34
+ - **Added** `collapsible-down` and `collapsible-up` keyframes added to Tailwind preset
35
+
36
+ ### v0.4.2
37
+ - **Added** `CollapsibleProps` type export
38
+
39
+ ### v0.1.0
40
+ - **Added** Initial release
@@ -0,0 +1,37 @@
1
+ # ColorInput
2
+
3
+ - Import: @devalok/shilp-sutra/ui/color-input
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ value: string (hex color, e.g. "#d33163")
9
+ onChange: (value: string) => void
10
+ presets: string[] (optional preset color swatches)
11
+ disabled: boolean
12
+ className: string
13
+
14
+ ## Defaults
15
+ value="#000000", disabled=false
16
+
17
+ ## Example
18
+ ```jsx
19
+ <ColorInput
20
+ value={color}
21
+ onChange={setColor}
22
+ presets={['#d33163', '#2563eb', '#16a34a']}
23
+ />
24
+ ```
25
+
26
+ ## Gotchas
27
+ - Uses native color picker under the hood; value must be a valid hex string
28
+
29
+ ## Changes
30
+ ### v0.15.0
31
+ - **Changed** `md` size font standardized to `text-ds-md` (14px) from mixed values
32
+
33
+ ### v0.8.0
34
+ - **Fixed** Added `aria-label` to hex color input
35
+
36
+ ### v0.1.0
37
+ - **Added** Initial release
@@ -0,0 +1,54 @@
1
+ # Combobox
2
+
3
+ - Import: @devalok/shilp-sutra/ui/combobox
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ options: ComboboxOption[] (REQUIRED) — { value: string, label: string, description?: string, icon?: ReactNode, disabled?: boolean }
9
+ DISCRIMINATED UNION — type depends on `multiple` flag:
10
+ Single (default): multiple?: false, value: string, onValueChange: (value: string) => void
11
+ Multiple: multiple: true, value: string[], onValueChange: (value: string[]) => void
12
+ placeholder: string (default: "Select...")
13
+ searchPlaceholder: string (default: "Search...")
14
+ emptyMessage: string (default: "No results found")
15
+ disabled: boolean
16
+ triggerClassName: string
17
+ accessibleLabel: string (custom aria-label for trigger, falls back to placeholder)
18
+ maxVisible: number (default: 6, max dropdown items before scroll)
19
+ renderOption: (option, selected) => ReactNode
20
+
21
+ ## Defaults
22
+ placeholder="Select...", searchPlaceholder="Search...", emptyMessage="No results found", maxVisible=6
23
+
24
+ ## Example
25
+ ```jsx
26
+ <Combobox
27
+ multiple
28
+ options={tagOptions}
29
+ value={selectedTags}
30
+ onValueChange={setSelectedTags}
31
+ placeholder="Select tags..."
32
+ />
33
+ ```
34
+
35
+ ## Gotchas
36
+ - Enforces selection from list (unlike Autocomplete which allows free text)
37
+ - In multi mode, selected items appear as pills with "+N more" overflow
38
+
39
+ ## Changes
40
+ ### v0.18.0
41
+ - **Added** `accessibleLabel` prop — custom aria-label for trigger, falls back to placeholder
42
+
43
+ ### v0.14.0
44
+ - **Changed** z-index promoted from `z-dropdown` (1000) to `z-popover` (1400) — fixes dropdown rendering behind Sheet/Dialog overlays
45
+
46
+ ### v0.8.0
47
+ - **Changed** (BREAKING) Props now use discriminated union — `multiple: true` requires `value: string[]` and `onValueChange: (value: string[]) => void`
48
+
49
+ ### v0.3.0
50
+ - **Changed** (BREAKING) `onChange` renamed to `onValueChange`
51
+ - **Changed** Now extends HTMLAttributes — accepts all standard HTML props
52
+
53
+ ### v0.1.0
54
+ - **Added** Initial release
@@ -0,0 +1,26 @@
1
+ # Container
2
+
3
+ - Import: @devalok/shilp-sutra/ui/container
4
+ - Server-safe: Yes
5
+ - Category: ui
6
+
7
+ ## Props
8
+ maxWidth: "default" | "body" | "full"
9
+ as: ElementType (default: "div")
10
+
11
+ ## Defaults
12
+ maxWidth="default"
13
+
14
+ ## Example
15
+ ```jsx
16
+ <Container maxWidth="body">
17
+ <p>Centered content</p>
18
+ </Container>
19
+ ```
20
+
21
+ ## Gotchas
22
+ - Server-safe component — can be imported directly in Next.js Server Components
23
+
24
+ ## Changes
25
+ ### v0.1.0
26
+ - **Added** Initial release
@@ -0,0 +1,43 @@
1
+ # ContextMenu
2
+
3
+ - Import: @devalok/shilp-sutra/ui/context-menu
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Compound Components
8
+ ContextMenu (root)
9
+ ContextMenuTrigger (right-click target)
10
+ ContextMenuContent
11
+ ContextMenuItem
12
+ ContextMenuCheckboxItem
13
+ ContextMenuRadioGroup > ContextMenuRadioItem
14
+ ContextMenuLabel
15
+ ContextMenuSeparator
16
+ ContextMenuSub > ContextMenuSubTrigger, ContextMenuSubContent
17
+
18
+ ## Defaults
19
+ none
20
+
21
+ ## Example
22
+ ```jsx
23
+ <ContextMenu>
24
+ <ContextMenuTrigger>Right-click me</ContextMenuTrigger>
25
+ <ContextMenuContent>
26
+ <ContextMenuItem>Edit</ContextMenuItem>
27
+ <ContextMenuItem>Delete</ContextMenuItem>
28
+ </ContextMenuContent>
29
+ </ContextMenu>
30
+ ```
31
+
32
+ ## Gotchas
33
+ - Triggered by right-click (or long-press on touch devices)
34
+
35
+ ## Changes
36
+ ### v0.18.0
37
+ - **Added** `ContextMenuContentProps`, `ContextMenuItemProps` type exports
38
+
39
+ ### v0.14.0
40
+ - **Changed** z-index promoted from `z-dropdown` (1000) to `z-popover` (1400) — fixes dropdown rendering behind Sheet/Dialog overlays
41
+
42
+ ### v0.1.0
43
+ - **Added** Initial release
@@ -0,0 +1,44 @@
1
+ # DataTableToolbar
2
+
3
+ - Import: @devalok/shilp-sutra/ui/data-table-toolbar
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ table: Table<TData> (TanStack table instance)
9
+ globalFilter: boolean
10
+ globalFilterValue: string
11
+ onGlobalFilterChange: (value: string) => void
12
+ density: 'compact' | 'standard' | 'comfortable'
13
+ onDensityChange: (density: Density) => void
14
+ enableExport: boolean
15
+
16
+ ## Defaults
17
+ none
18
+
19
+ ## Example
20
+ ```jsx
21
+ import { DataTableToolbar } from '@devalok/shilp-sutra/ui/data-table-toolbar'
22
+
23
+ <DataTableToolbar
24
+ table={table}
25
+ globalFilter
26
+ globalFilterValue={filterValue}
27
+ onGlobalFilterChange={setFilterValue}
28
+ density={density}
29
+ onDensityChange={setDensity}
30
+ enableExport
31
+ />
32
+ ```
33
+
34
+ ## Gotchas
35
+ - Barrel-isolated since v0.5.0 — must use `@devalok/shilp-sutra/ui/data-table-toolbar`, NOT the `ui` barrel
36
+ - Companion to DataTable — provides column visibility, density toggle, and CSV export controls
37
+ - Requires @tanstack/react-table as a peer dependency
38
+
39
+ ## Changes
40
+ ### v0.5.0
41
+ - **Changed** (BREAKING) Removed from `@devalok/shilp-sutra/ui` barrel export — must use `@devalok/shilp-sutra/ui/data-table-toolbar`
42
+
43
+ ### v0.1.0
44
+ - **Added** Initial release