@devalok/shilp-sutra 0.37.0 → 0.38.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.
Files changed (183) hide show
  1. package/MIGRATION.md +67 -0
  2. package/dist/_chunks/tiptap.js +977 -968
  3. package/dist/_chunks/tiptap.js.map +1 -1
  4. package/dist/composed/index.d.ts +0 -2
  5. package/dist/composed/index.d.ts.map +1 -1
  6. package/dist/composed/index.js +5 -6
  7. package/dist/composed/inline-edit.d.ts.map +1 -1
  8. package/dist/composed/inline-edit.js +42 -40
  9. package/dist/composed/inline-edit.js.map +1 -1
  10. package/dist/hooks/index.d.ts +2 -2
  11. package/dist/hooks/index.d.ts.map +1 -1
  12. package/dist/hooks/index.js +0 -1
  13. package/dist/test-utils/conformance.d.ts +37 -0
  14. package/dist/test-utils/conformance.d.ts.map +1 -0
  15. package/dist/ui/alert.d.ts +1 -2
  16. package/dist/ui/alert.d.ts.map +1 -1
  17. package/dist/ui/alert.js +1 -27
  18. package/dist/ui/alert.js.map +1 -1
  19. package/dist/ui/banner.d.ts +3 -5
  20. package/dist/ui/banner.d.ts.map +1 -1
  21. package/dist/ui/banner.js +13 -13
  22. package/dist/ui/banner.js.map +1 -1
  23. package/dist/ui/index.d.ts +1 -1
  24. package/dist/ui/index.d.ts.map +1 -1
  25. package/dist/ui/index.js +2 -2
  26. package/dist/ui/index.js.map +1 -1
  27. package/dist/ui/input.d.ts +1 -9
  28. package/dist/ui/input.d.ts.map +1 -1
  29. package/dist/ui/input.js +26 -27
  30. package/dist/ui/input.js.map +1 -1
  31. package/dist/ui/segmented-control.d.ts +1 -1
  32. package/dist/ui/segmented-control.d.ts.map +1 -1
  33. package/dist/ui/segmented-control.js +2 -4
  34. package/dist/ui/segmented-control.js.map +1 -1
  35. package/docs/components/_header.md +1 -1
  36. package/docs/components/composed/activity-feed.md +6 -0
  37. package/docs/components/composed/avatar-group.md +8 -0
  38. package/docs/components/composed/bulk-action-bar.md +6 -0
  39. package/docs/components/composed/command-palette.md +7 -0
  40. package/docs/components/composed/confirm-dialog.md +6 -0
  41. package/docs/components/composed/content-card.md +6 -0
  42. package/docs/components/composed/date-picker.md +10 -0
  43. package/docs/components/composed/deadline-indicator.md +7 -0
  44. package/docs/components/composed/emoji-picker.md +8 -0
  45. package/docs/components/composed/empty-state.md +8 -0
  46. package/docs/components/composed/error-boundary.md +7 -0
  47. package/docs/components/composed/file-preview.md +8 -0
  48. package/docs/components/composed/filter-bar.md +8 -0
  49. package/docs/components/composed/form-section.md +6 -0
  50. package/docs/components/composed/global-loading.md +6 -0
  51. package/docs/components/composed/inline-edit.md +8 -0
  52. package/docs/components/composed/loading-skeleton.md +7 -0
  53. package/docs/components/composed/markdown-viewer.md +9 -0
  54. package/docs/components/composed/master-detail.md +7 -0
  55. package/docs/components/composed/member-picker.md +7 -0
  56. package/docs/components/composed/multi-select-popover.md +11 -0
  57. package/docs/components/composed/page-header.md +7 -0
  58. package/docs/components/composed/page-skeletons.md +10 -0
  59. package/docs/components/composed/priority-indicator.md +7 -0
  60. package/docs/components/composed/rich-chat-input.md +12 -0
  61. package/docs/components/composed/rich-text-editor.md +9 -0
  62. package/docs/components/composed/schedule-view.md +8 -0
  63. package/docs/components/composed/simple-tooltip.md +7 -0
  64. package/docs/components/composed/status-badge.md +10 -0
  65. package/docs/components/shell/app-command-palette.md +8 -0
  66. package/docs/components/shell/bottom-navbar.md +12 -0
  67. package/docs/components/shell/command-registry.md +7 -0
  68. package/docs/components/shell/link-context.md +15 -0
  69. package/docs/components/shell/notification-center.md +10 -0
  70. package/docs/components/shell/notification-preferences.md +7 -0
  71. package/docs/components/shell/sidebar.md +11 -0
  72. package/docs/components/shell/top-bar.md +11 -0
  73. package/docs/components/ui/accordion.md +10 -0
  74. package/docs/components/ui/alert-dialog.md +10 -1
  75. package/docs/components/ui/alert.md +13 -2
  76. package/docs/components/ui/aspect-ratio.md +7 -0
  77. package/docs/components/ui/autocomplete.md +7 -0
  78. package/docs/components/ui/avatar.md +10 -0
  79. package/docs/components/ui/badge-group.md +7 -0
  80. package/docs/components/ui/badge-indicator.md +7 -0
  81. package/docs/components/ui/badge.md +12 -0
  82. package/docs/components/ui/banner.md +10 -1
  83. package/docs/components/ui/breadcrumb.md +8 -0
  84. package/docs/components/ui/button-group.md +24 -4
  85. package/docs/components/ui/button-processing.md +5 -0
  86. package/docs/components/ui/button.md +9 -0
  87. package/docs/components/ui/card.md +16 -4
  88. package/docs/components/ui/charts.md +9 -0
  89. package/docs/components/ui/chat.md +9 -0
  90. package/docs/components/ui/checkbox.md +15 -1
  91. package/docs/components/ui/chip.md +9 -0
  92. package/docs/components/ui/code.md +7 -0
  93. package/docs/components/ui/collapsible.md +9 -0
  94. package/docs/components/ui/color-input.md +8 -0
  95. package/docs/components/ui/color-swatch.md +7 -0
  96. package/docs/components/ui/combobox.md +16 -3
  97. package/docs/components/ui/container.md +11 -0
  98. package/docs/components/ui/context-menu.md +8 -0
  99. package/docs/components/ui/data-table-body.md +4 -0
  100. package/docs/components/ui/data-table-bulk-actions.md +4 -0
  101. package/docs/components/ui/data-table-card.md +4 -0
  102. package/docs/components/ui/data-table-context.md +4 -0
  103. package/docs/components/ui/data-table-header.md +4 -0
  104. package/docs/components/ui/data-table-pagination.md +4 -0
  105. package/docs/components/ui/data-table-toolbar.md +7 -0
  106. package/docs/components/ui/data-table.md +25 -0
  107. package/docs/components/ui/devalok-grain.md +8 -0
  108. package/docs/components/ui/dialog.md +10 -0
  109. package/docs/components/ui/dropdown-menu.md +10 -0
  110. package/docs/components/ui/file-upload.md +8 -0
  111. package/docs/components/ui/form.md +21 -0
  112. package/docs/components/ui/hover-card.md +9 -0
  113. package/docs/components/ui/icon-button.md +7 -0
  114. package/docs/components/ui/icon-context.md +7 -0
  115. package/docs/components/ui/icon-group.md +9 -0
  116. package/docs/components/ui/icon.md +7 -0
  117. package/docs/components/ui/input-otp.md +29 -7
  118. package/docs/components/ui/input.md +11 -2
  119. package/docs/components/ui/label.md +7 -1
  120. package/docs/components/ui/link.md +7 -0
  121. package/docs/components/ui/menubar.md +9 -0
  122. package/docs/components/ui/navigation-menu.md +9 -0
  123. package/docs/components/ui/number-input.md +10 -0
  124. package/docs/components/ui/pagination.md +10 -0
  125. package/docs/components/ui/popover.md +9 -0
  126. package/docs/components/ui/progress-ring.md +7 -0
  127. package/docs/components/ui/progress.md +7 -0
  128. package/docs/components/ui/radio.md +27 -2
  129. package/docs/components/ui/search-input.md +8 -0
  130. package/docs/components/ui/segmented-control.md +21 -6
  131. package/docs/components/ui/select.md +14 -3
  132. package/docs/components/ui/separator.md +7 -0
  133. package/docs/components/ui/sheet.md +10 -0
  134. package/docs/components/ui/sidebar.md +30 -0
  135. package/docs/components/ui/skeleton.md +7 -0
  136. package/docs/components/ui/slider.md +15 -1
  137. package/docs/components/ui/spinner.md +7 -0
  138. package/docs/components/ui/split-button.md +11 -0
  139. package/docs/components/ui/stack.md +8 -0
  140. package/docs/components/ui/stat-card.md +9 -0
  141. package/docs/components/ui/status-dot.md +9 -0
  142. package/docs/components/ui/stepper.md +8 -0
  143. package/docs/components/ui/switch.md +8 -0
  144. package/docs/components/ui/table.md +8 -0
  145. package/docs/components/ui/tabs.md +10 -2
  146. package/docs/components/ui/text.md +9 -4
  147. package/docs/components/ui/textarea.md +7 -1
  148. package/docs/components/ui/toast.md +9 -0
  149. package/docs/components/ui/toaster.md +8 -0
  150. package/docs/components/ui/toggle-group.md +13 -4
  151. package/docs/components/ui/toggle.md +10 -2
  152. package/docs/components/ui/tooltip.md +11 -1
  153. package/docs/components/ui/tree-view.md +12 -0
  154. package/docs/components/ui/visually-hidden.md +7 -0
  155. package/docs/recipes/customize-brand.md +216 -0
  156. package/docs/recipes/index.md +51 -0
  157. package/docs/recipes/install-astro.md +178 -0
  158. package/docs/recipes/install-next-app-router.md +230 -0
  159. package/docs/recipes/install-next-pages.md +123 -0
  160. package/docs/recipes/install-remix.md +171 -0
  161. package/docs/recipes/install-tanstack-start.md +143 -0
  162. package/docs/recipes/install-vite.md +170 -0
  163. package/docs/recipes/server-components.md +209 -0
  164. package/docs/recipes/troubleshoot.md +217 -0
  165. package/llms-full.txt +1133 -88
  166. package/llms.txt +33 -16
  167. package/package.json +45 -35
  168. package/dist/composed/responsive-overlay.d.ts +0 -23
  169. package/dist/composed/responsive-overlay.d.ts.map +0 -1
  170. package/dist/composed/responsive-overlay.js +0 -40
  171. package/dist/composed/responsive-overlay.js.map +0 -1
  172. package/dist/hooks/use-toast.d.ts +0 -17
  173. package/dist/hooks/use-toast.d.ts.map +0 -1
  174. package/dist/hooks/use-toast.js +0 -3
  175. package/dist/tailwind/index.cjs +0 -41
  176. package/dist/tailwind/index.d.ts +0 -2
  177. package/dist/tailwind/index.d.ts.map +0 -1
  178. package/dist/tailwind/index.js +0 -2
  179. package/dist/tailwind/preset.d.ts +0 -25
  180. package/dist/tailwind/preset.d.ts.map +0 -1
  181. package/dist/tailwind/preset.js +0 -17
  182. package/dist/tailwind/preset.js.map +0 -1
  183. package/docs/components/composed/responsive-overlay.md +0 -34
package/dist/ui/index.js CHANGED
@@ -36,7 +36,7 @@ import { FileUpload as Dt } from "./file-upload.js";
36
36
  import { HoverCard as Ot, HoverCardContent as kt, HoverCardTrigger as At } from "./hover-card.js";
37
37
  import { IconButton as jt } from "./icon-button.js";
38
38
  import { IconGroup as Mt } from "./icon-group.js";
39
- import { Input as Nt, inputVariants as Pt } from "./input.js";
39
+ import { Input as Nt, inputWrapperVariants as Pt } from "./input.js";
40
40
  import { Label as Ft } from "./label.js";
41
41
  import { Separator as It } from "./separator.js";
42
42
  import { SplitButton as Lt } from "./split-button.js";
@@ -88,4 +88,4 @@ function di() {
88
88
  //#region src/ui/index.ts
89
89
  di();
90
90
  //#endregion
91
- export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as CardContent, re as CardDescription, ie as CardFooter, ae as CardHeader, oe as CardTitle, ce as Checkbox, le as Code, ue as Collapsible, de as CollapsibleContent, fe as CollapsibleTrigger, _e as ColorInput, ve as ColorSwatch, ye as Combobox, xe as Container, Se as ContextMenu, Ce as ContextMenuCheckboxItem, we as ContextMenuContent, Te as ContextMenuGroup, Ee as ContextMenuItem, De as ContextMenuLabel, Oe as ContextMenuPortal, ke as ContextMenuRadioGroup, Ae as ContextMenuRadioItem, je as ContextMenuSeparator, Me as ContextMenuShortcut, Ne as ContextMenuSub, Pe as ContextMenuSubContent, Fe as ContextMenuSubTrigger, Ie as ContextMenuTrigger, ni as DateSeparator, ht as DevalokGrain, gt as Dialog, _t as DialogClose, vt as DialogContent, yt as DialogContentRaw, bt as DialogDescription, xt as DialogFooter, St as DialogHeader, Ct as DialogOverlay, wt as DialogPortal, Tt as DialogTitle, Et as DialogTrigger, et as DropdownMenu, tt as DropdownMenuCheckboxItem, nt as DropdownMenuContent, rt as DropdownMenuGroup, it as DropdownMenuItem, at as DropdownMenuLabel, ot as DropdownMenuPortal, st as DropdownMenuRadioGroup, ct as DropdownMenuRadioItem, lt as DropdownMenuSeparator, ut as DropdownMenuShortcut, dt as DropdownMenuSub, ft as DropdownMenuSubContent, pt as DropdownMenuSubTrigger, mt as DropdownMenuTrigger, Dt as FileUpload, T as FormField, E as FormHelperText, Ot as HoverCard, kt as HoverCardContent, At as HoverCardTrigger, o as Icon, jt as IconButton, ee as IconContext, Mt as IconGroup, te as IconProvider, Nt as Input, zt as InputOTP, Bt as InputOTPGroup, Vt as InputOTPSeparator, Ht as InputOTPSlot, Ft as Label, li as Link, zn as Menubar, Bn as MenubarCheckboxItem, Vn as MenubarContent, Hn as MenubarGroup, Un as MenubarItem, Wn as MenubarLabel, Gn as MenubarMenu, Kn as MenubarPortal, qn as MenubarRadioGroup, Jn as MenubarRadioItem, Yn as MenubarSeparator, Xn as MenubarShortcut, Zn as MenubarSub, Qn as MenubarSubContent, $n as MenubarSubTrigger, er as MenubarTrigger, ai as Message, ti as MessageInput, ri as MessageList, Fn as MultiProgressRing, tr as NavigationMenu, nr as NavigationMenuContent, rr as NavigationMenuIndicator, ir as NavigationMenuItem, ar as NavigationMenuLink, or as NavigationMenuList, sr as NavigationMenuTrigger, cr as NavigationMenuViewport, Ut as NumberInput, lr as PaginationContent, ur as PaginationEllipsis, dr as PaginationItem, fr as PaginationLink, pr as PaginationNav, mr as PaginationNext, hr as PaginationPrevious, gr as PaginationRoot, ge as Popover, me as PopoverAnchor, he as PopoverContent, pe as PopoverTrigger, Tn as Progress, In as ProgressRing, Gt as RadioGroup, Kt as RadioGroupItem, qt as SearchInput, ei as SegmentedControl, Jt as Select, Yt as SelectContent, Q as SelectGroup, Xt as SelectItem, Zt as SelectLabel, Qt as SelectScrollDownButton, $t as SelectScrollUpButton, en as SelectSeparator, tn as SelectTrigger, nn as SelectValue, It as Separator, hn as Sheet, gn as SheetClose, _n as SheetContent, vn as SheetDescription, yn as SheetFooter, bn as SheetHeader, xn as SheetOverlay, Sn as SheetPortal, Cn as SheetTitle, wn as SheetTrigger, vr as Sidebar, yr as SidebarContent, br as SidebarFooter, xr as SidebarGroup, Sr as SidebarGroupAction, Cr as SidebarGroupContent, wr as SidebarGroupLabel, Tr as SidebarHeader, Er as SidebarInput, Dr as SidebarInset, Or as SidebarMenu, kr as SidebarMenuAction, Ar as SidebarMenuBadge, jr as SidebarMenuButton, Mr as SidebarMenuItem, Nr as SidebarMenuSkeleton, Pr as SidebarMenuSub, Fr as SidebarMenuSubButton, Ir as SidebarMenuSubItem, Lr as SidebarProvider, Rr as SidebarRail, zr as SidebarSeparator, Br as SidebarTrigger, Le as Skeleton, Re as SkeletonAvatar, ze as SkeletonButton, Be as SkeletonChart, Ve as SkeletonGroup, He as SkeletonImage, Ue as SkeletonInput, We as SkeletonText, an as Slider, a as Spinner, Lt as SplitButton, Xr as Stack, Ln as StatCard, Rn as StatusDot, Kr as Step, qr as Stepper, cn as Switch, oi as SystemMessage, Ke as Table, qe as TableBody, Je as TableCaption, Ye as TableCell, Xe as TableFooter, Ze as TableHead, Qe as TableHeader, $e as TableRow, Hr as Tabs, Ur as TabsContent, Wr as TabsList, Gr as TabsTrigger, Jr as Text, ln as Textarea, An as Toaster, dn as Toggle, pn as ToggleGroup, mn as ToggleGroupItem, jn as Tooltip, Mn as TooltipContent, Nn as TooltipProvider, Pn as TooltipTrigger, $r as TreeItem, Zr as TreeView, ii as TypingIndicator, ci as UnreadSeparator, Rt as VisuallyHidden, C as alertVariants, M as avatarVariants, F as badgeVariants, R as bannerVariants, Y as buttonVariants, se as cardVariants, i as cn, be as comboboxTriggerVariants, On as formatFileSize, ui as formatRelativeTime, _r as generatePagination, Pt as inputVariants, Wt as numberInputWrapperVariants, En as progressIndicatorVariants, Dn as progressTrackVariants, rn as selectTriggerVariants, Ge as skeletonVariants, on as sliderThumbVariants, sn as sliderTrackVariants, e as springs, t as stagger, Yr as textVariants, un as textareaVariants, kn as toast, fn as toggleVariants, n as tweens, q as useButtonGroup, D as useFormField, ne as useIconContext, si as useMessageContext, Vr as useSidebar, Qr as useTree, r as withReducedMotion };
91
+ export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as CardContent, re as CardDescription, ie as CardFooter, ae as CardHeader, oe as CardTitle, ce as Checkbox, le as Code, ue as Collapsible, de as CollapsibleContent, fe as CollapsibleTrigger, _e as ColorInput, ve as ColorSwatch, ye as Combobox, xe as Container, Se as ContextMenu, Ce as ContextMenuCheckboxItem, we as ContextMenuContent, Te as ContextMenuGroup, Ee as ContextMenuItem, De as ContextMenuLabel, Oe as ContextMenuPortal, ke as ContextMenuRadioGroup, Ae as ContextMenuRadioItem, je as ContextMenuSeparator, Me as ContextMenuShortcut, Ne as ContextMenuSub, Pe as ContextMenuSubContent, Fe as ContextMenuSubTrigger, Ie as ContextMenuTrigger, ni as DateSeparator, ht as DevalokGrain, gt as Dialog, _t as DialogClose, vt as DialogContent, yt as DialogContentRaw, bt as DialogDescription, xt as DialogFooter, St as DialogHeader, Ct as DialogOverlay, wt as DialogPortal, Tt as DialogTitle, Et as DialogTrigger, et as DropdownMenu, tt as DropdownMenuCheckboxItem, nt as DropdownMenuContent, rt as DropdownMenuGroup, it as DropdownMenuItem, at as DropdownMenuLabel, ot as DropdownMenuPortal, st as DropdownMenuRadioGroup, ct as DropdownMenuRadioItem, lt as DropdownMenuSeparator, ut as DropdownMenuShortcut, dt as DropdownMenuSub, ft as DropdownMenuSubContent, pt as DropdownMenuSubTrigger, mt as DropdownMenuTrigger, Dt as FileUpload, T as FormField, E as FormHelperText, Ot as HoverCard, kt as HoverCardContent, At as HoverCardTrigger, o as Icon, jt as IconButton, ee as IconContext, Mt as IconGroup, te as IconProvider, Nt as Input, zt as InputOTP, Bt as InputOTPGroup, Vt as InputOTPSeparator, Ht as InputOTPSlot, Ft as Label, li as Link, zn as Menubar, Bn as MenubarCheckboxItem, Vn as MenubarContent, Hn as MenubarGroup, Un as MenubarItem, Wn as MenubarLabel, Gn as MenubarMenu, Kn as MenubarPortal, qn as MenubarRadioGroup, Jn as MenubarRadioItem, Yn as MenubarSeparator, Xn as MenubarShortcut, Zn as MenubarSub, Qn as MenubarSubContent, $n as MenubarSubTrigger, er as MenubarTrigger, ai as Message, ti as MessageInput, ri as MessageList, Fn as MultiProgressRing, tr as NavigationMenu, nr as NavigationMenuContent, rr as NavigationMenuIndicator, ir as NavigationMenuItem, ar as NavigationMenuLink, or as NavigationMenuList, sr as NavigationMenuTrigger, cr as NavigationMenuViewport, Ut as NumberInput, lr as PaginationContent, ur as PaginationEllipsis, dr as PaginationItem, fr as PaginationLink, pr as PaginationNav, mr as PaginationNext, hr as PaginationPrevious, gr as PaginationRoot, ge as Popover, me as PopoverAnchor, he as PopoverContent, pe as PopoverTrigger, Tn as Progress, In as ProgressRing, Gt as RadioGroup, Kt as RadioGroupItem, qt as SearchInput, ei as SegmentedControl, Jt as Select, Yt as SelectContent, Q as SelectGroup, Xt as SelectItem, Zt as SelectLabel, Qt as SelectScrollDownButton, $t as SelectScrollUpButton, en as SelectSeparator, tn as SelectTrigger, nn as SelectValue, It as Separator, hn as Sheet, gn as SheetClose, _n as SheetContent, vn as SheetDescription, yn as SheetFooter, bn as SheetHeader, xn as SheetOverlay, Sn as SheetPortal, Cn as SheetTitle, wn as SheetTrigger, vr as Sidebar, yr as SidebarContent, br as SidebarFooter, xr as SidebarGroup, Sr as SidebarGroupAction, Cr as SidebarGroupContent, wr as SidebarGroupLabel, Tr as SidebarHeader, Er as SidebarInput, Dr as SidebarInset, Or as SidebarMenu, kr as SidebarMenuAction, Ar as SidebarMenuBadge, jr as SidebarMenuButton, Mr as SidebarMenuItem, Nr as SidebarMenuSkeleton, Pr as SidebarMenuSub, Fr as SidebarMenuSubButton, Ir as SidebarMenuSubItem, Lr as SidebarProvider, Rr as SidebarRail, zr as SidebarSeparator, Br as SidebarTrigger, Le as Skeleton, Re as SkeletonAvatar, ze as SkeletonButton, Be as SkeletonChart, Ve as SkeletonGroup, He as SkeletonImage, Ue as SkeletonInput, We as SkeletonText, an as Slider, a as Spinner, Lt as SplitButton, Xr as Stack, Ln as StatCard, Rn as StatusDot, Kr as Step, qr as Stepper, cn as Switch, oi as SystemMessage, Ke as Table, qe as TableBody, Je as TableCaption, Ye as TableCell, Xe as TableFooter, Ze as TableHead, Qe as TableHeader, $e as TableRow, Hr as Tabs, Ur as TabsContent, Wr as TabsList, Gr as TabsTrigger, Jr as Text, ln as Textarea, An as Toaster, dn as Toggle, pn as ToggleGroup, mn as ToggleGroupItem, jn as Tooltip, Mn as TooltipContent, Nn as TooltipProvider, Pn as TooltipTrigger, $r as TreeItem, Zr as TreeView, ii as TypingIndicator, ci as UnreadSeparator, Rt as VisuallyHidden, C as alertVariants, M as avatarVariants, F as badgeVariants, R as bannerVariants, Y as buttonVariants, se as cardVariants, i as cn, be as comboboxTriggerVariants, On as formatFileSize, ui as formatRelativeTime, _r as generatePagination, Pt as inputWrapperVariants, Wt as numberInputWrapperVariants, En as progressIndicatorVariants, Dn as progressTrackVariants, rn as selectTriggerVariants, Ge as skeletonVariants, on as sliderThumbVariants, sn as sliderTrackVariants, e as springs, t as stagger, Yr as textVariants, un as textareaVariants, kn as toast, fn as toggleVariants, n as tweens, q as useButtonGroup, D as useFormField, ne as useIconContext, si as useMessageContext, Vr as useSidebar, Qr as useTree, r as withReducedMotion };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState,inputVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\nexport { InputOTP, InputOTPGroup, type InputOTPProps,InputOTPSeparator, InputOTPSlot } from './input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\nexport {\n formatFileSize,\n toast,\n type ToastActionOptions,\n type ToastOptions,\n type ToastProps,\n type ToastType,\n type ToastUndoOptions,\n type ToastUploadOptions,\n type UploadFile,\n} from './toast'\nexport { Toaster, type ToasterProps } from './toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState, inputWrapperVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\nexport { InputOTP, InputOTPGroup, type InputOTPProps,InputOTPSeparator, InputOTPSlot } from './input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\nexport {\n formatFileSize,\n toast,\n type ToastActionOptions,\n type ToastOptions,\n type ToastProps,\n type ToastType,\n type ToastUndoOptions,\n type ToastUploadOptions,\n type UploadFile,\n} from './toast'\nexport { Toaster, type ToasterProps } from './toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
@@ -52,15 +52,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
52
52
  endSectionType?: 'icon' | 'label';
53
53
  /** Classes for the wrapper div (border, bg, ring). */
54
54
  wrapperClassName?: string;
55
- /** @deprecated Use startSection */
56
- startIcon?: React.ReactNode;
57
- /** @deprecated Use endSection */
58
- endIcon?: React.ReactNode;
59
55
  }
60
56
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
61
- /** @deprecated Use inputWrapperVariants — semantics changed (now targets wrapper, not input) */
62
- declare const inputVariants: (props?: ({
63
- size?: "xs" | "sm" | "md" | "lg" | null | undefined;
64
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
65
- export { Input, inputVariants, inputWrapperVariants };
57
+ export { Input, inputWrapperVariants };
66
58
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEpE,QAAA,MAAM,oBAAoB;;8EAsBzB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,UACf,SAAQ,IA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CAAC,EAC/D,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC3C,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;qFACiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACnC;qFACiF;IACjF,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,QAAA,MAAM,KAAK,qFAyJV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAA"}
package/dist/ui/input.js CHANGED
@@ -33,30 +33,30 @@ var s = t([
33
33
  sm: "sm",
34
34
  md: "md",
35
35
  lg: "lg"
36
- }, u = i.forwardRef(({ className: t, type: i, state: u, size: d = "md", startSection: f, endSection: p, startSectionClickable: m, endSectionClickable: h, startSectionType: g, endSectionType: _, startIcon: v, endIcon: y, wrapperClassName: b, ...x }, S) => {
37
- let C = d ?? "md", w = r(), T = u ?? (w.state === "helper" ? void 0 : w.state), E = x["aria-describedby"] ?? w.helperTextId, D = x["aria-required"] ?? w.required, O = x.id ?? w.inputId, k = f ?? v, A = p ?? y, j = !!k, M = !!A, N = g ?? (typeof k == "string" ? "label" : "icon"), P = _ ?? (typeof A == "string" ? "label" : "icon"), F = {
36
+ }, u = i.forwardRef(({ className: t, type: i, state: u, size: d = "md", startSection: f, endSection: p, startSectionClickable: m, endSectionClickable: h, startSectionType: g, endSectionType: _, wrapperClassName: v, ...y }, b) => {
37
+ let x = d ?? "md", S = r(), C = u ?? (S.state === "helper" ? void 0 : S.state), w = y["aria-describedby"] ?? S.helperTextId, T = y["aria-required"] ?? S.required, E = y.id ?? S.inputId, D = !!f, O = !!p, k = g ?? (typeof f == "string" ? "label" : "icon"), A = _ ?? (typeof p == "string" ? "label" : "icon"), j = {
38
38
  xs: "px-ds-02",
39
39
  sm: "px-ds-02",
40
40
  md: "px-ds-03",
41
41
  lg: "px-ds-03"
42
- }, I = {
42
+ }, M = {
43
43
  xs: "text-ds-sm",
44
44
  sm: "text-ds-sm",
45
45
  md: "text-ds-sm",
46
46
  lg: "text-ds-md"
47
47
  };
48
48
  return /* @__PURE__ */ o("div", {
49
- className: n(s({ size: C }), T === "error" && "border-error-7 focus-within:ring-error-7", T === "warning" && "border-warning-7 focus-within:ring-warning-7", T === "success" && "border-success-7 focus-within:ring-success-7", b),
49
+ className: n(s({ size: x }), C === "error" && "border-error-7 focus-within:ring-error-7", C === "warning" && "border-warning-7 focus-within:ring-warning-7", C === "success" && "border-success-7 focus-within:ring-success-7", v),
50
50
  children: [
51
- j && N === "label" && /* @__PURE__ */ a("span", {
52
- className: n("flex items-center shrink-0 select-none self-stretch", "border-r border-surface-border", "bg-surface-raised text-surface-fg-muted", "rounded-l-[inherit]", F[C], I[C], !m && "pointer-events-none"),
53
- children: k
51
+ D && k === "label" && /* @__PURE__ */ a("span", {
52
+ className: n("flex items-center shrink-0 select-none self-stretch", "border-r border-surface-border", "bg-surface-raised text-surface-fg-muted", "rounded-l-[inherit]", j[x], M[x], !m && "pointer-events-none"),
53
+ children: f
54
54
  }),
55
- j && N === "icon" && /* @__PURE__ */ a(e, {
56
- size: l[C],
55
+ D && k === "icon" && /* @__PURE__ */ a(e, {
56
+ size: l[x],
57
57
  children: /* @__PURE__ */ a("span", {
58
- className: n("flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted", c[C], !m && "pointer-events-none"),
59
- children: k
58
+ className: n("flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted", c[x], !m && "pointer-events-none"),
59
+ children: f
60
60
  })
61
61
  }),
62
62
  /* @__PURE__ */ a("input", {
@@ -66,29 +66,28 @@ var s = t([
66
66
  sm: "px-ds-03",
67
67
  md: "px-ds-03",
68
68
  lg: "px-ds-04"
69
- }[C], j && N === "icon" && "pl-0", M && P === "icon" && "pr-0", t),
70
- "aria-invalid": T === "error" || void 0,
71
- "aria-describedby": E,
72
- "aria-required": D || void 0,
73
- ref: S,
74
- ...x,
75
- id: O
69
+ }[x], D && k === "icon" && "pl-0", O && A === "icon" && "pr-0", t),
70
+ "aria-invalid": C === "error" || void 0,
71
+ "aria-describedby": w,
72
+ "aria-required": T || void 0,
73
+ ref: b,
74
+ ...y,
75
+ id: E
76
76
  }),
77
- M && P === "label" && /* @__PURE__ */ a("span", {
78
- className: n("flex items-center shrink-0 select-none self-stretch", "border-l border-surface-border", "bg-surface-raised text-surface-fg-muted", "rounded-r-[inherit]", F[C], I[C], !h && "pointer-events-none"),
79
- children: A
77
+ O && A === "label" && /* @__PURE__ */ a("span", {
78
+ className: n("flex items-center shrink-0 select-none self-stretch", "border-l border-surface-border", "bg-surface-raised text-surface-fg-muted", "rounded-r-[inherit]", j[x], M[x], !h && "pointer-events-none"),
79
+ children: p
80
80
  }),
81
- M && P === "icon" && /* @__PURE__ */ a(e, {
82
- size: l[C],
81
+ O && A === "icon" && /* @__PURE__ */ a(e, {
82
+ size: l[x],
83
83
  children: /* @__PURE__ */ a("span", {
84
- className: n("flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted", c[C], !h && "pointer-events-none"),
85
- children: A
84
+ className: n("flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted", c[x], !h && "pointer-events-none"),
85
+ children: p
86
86
  })
87
87
  })
88
88
  ]
89
89
  });
90
90
  });
91
91
  u.displayName = "Input";
92
- var d = s;
93
92
  //#endregion
94
- export { u as Input, d as inputVariants, s as inputWrapperVariants };
93
+ export { u as Input, s as inputWrapperVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../src/ui/input.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useFormField } from './form'\nimport { IconProvider, type IconSize } from './icon-context'\nimport { cn } from './lib/utils'\n\nexport type InputState = 'default' | 'error' | 'warning' | 'success'\n\nconst inputWrapperVariants = cva(\n [\n 'relative flex items-center w-full font-sans',\n 'bg-surface-raised-hover text-surface-fg',\n 'border border-surface-border-strong rounded-ds-md',\n 'hover:bg-surface-raised-active',\n 'transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard',\n 'focus-within:outline-hidden focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-surface-border',\n 'has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-action-disabled',\n 'has-[:read-only]:bg-surface-raised has-[:read-only]:cursor-default',\n ],\n {\n variants: {\n size: {\n xs: 'h-ds-xs-plus text-ds-sm',\n sm: 'h-ds-sm text-ds-sm',\n md: 'h-ds-md text-ds-md',\n lg: 'h-ds-lg rounded-ds-lg text-ds-md',\n },\n },\n defaultVariants: { size: 'md' },\n },\n)\n\nconst sectionWidthMap: Record<string, string> = {\n xs: 'w-[26px]',\n sm: 'w-[30px]',\n md: 'w-[38px]',\n lg: 'w-[46px]',\n}\n\nconst iconSizeMap: Record<string, IconSize> = {\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n}\n\n/**\n * Props for Input — a single-line text field with container-first architecture,\n * section-based icons with automatic padding, per-size scaling, and validation state coloring.\n *\n * **Sizes:** `xs` (28px) | `sm` (32px) | `md` (40px, default) | `lg` (48px)\n * HTML's native `size` attribute is excluded — use CSS width instead.\n *\n * **Validation states:** `state=\"error\"` colors the border red and sets `aria-invalid`.\n * Use with `<FormField>` to show helper text below the input.\n *\n * **Section-based icons:** `startSection` and `endSection` accept any React node.\n * Icons are auto-sized via `IconProvider`. Sections are `pointer-events-none` by default;\n * use `startSectionClickable`/`endSectionClickable` for interactive sections.\n *\n * **className** targets the `<input>` element (backward compatible).\n * **wrapperClassName** targets the wrapper div for border/bg/ring overrides.\n *\n * @example\n * // Basic email field with placeholder:\n * <Input type=\"email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Search input with a leading icon:\n * <Input size=\"md\" startSection={<IconSearch />} placeholder=\"Search projects...\" />\n *\n * @example\n * // Validated error state (pair with FormField for label + helper text):\n * <Input state=\"error\" value={email} onChange={handleChange} />\n *\n * @example\n * // Read-only field (shows a muted background, non-editable):\n * <Input readOnly value=\"https://devalok.com/api/key/abc123\" endSection={<IconCopy />} />\n */\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof inputWrapperVariants> {\n state?: InputState\n startSection?: React.ReactNode\n endSection?: React.ReactNode\n startSectionClickable?: boolean\n endSectionClickable?: boolean\n /** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).\n * `'label'` = tinted background with border separator (default for strings). */\n startSectionType?: 'icon' | 'label'\n /** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).\n * `'label'` = tinted background with border separator (default for strings). */\n endSectionType?: 'icon' | 'label'\n /** Classes for the wrapper div (border, bg, ring). */\n wrapperClassName?: string\n /** @deprecated Use startSection */\n startIcon?: React.ReactNode\n /** @deprecated Use endSection */\n endIcon?: React.ReactNode\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n type,\n state: stateProp,\n size: sizeProp = 'md',\n startSection,\n endSection,\n startSectionClickable,\n endSectionClickable,\n startSectionType: startSectionTypeProp,\n endSectionType: endSectionTypeProp,\n startIcon,\n endIcon,\n wrapperClassName,\n ...props\n },\n ref,\n ) => {\n const size = sizeProp ?? 'md'\n const fieldCtx = useFormField()\n // Merge FormField context — explicit props always win\n const state =\n stateProp ??\n (fieldCtx.state === 'helper'\n ? undefined\n : (fieldCtx.state as InputState | undefined))\n const ariaDescribedBy = props['aria-describedby'] ?? fieldCtx.helperTextId\n const ariaRequired = props['aria-required'] ?? fieldCtx.required\n // Explicit id wins; otherwise adopt FormField's inputId so <Label htmlFor> resolves.\n const inputId = props.id ?? fieldCtx.inputId\n\n // Backward compat: map deprecated props\n const resolvedStart = startSection ?? startIcon\n const resolvedEnd = endSection ?? endIcon\n\n const hasStart = !!resolvedStart\n const hasEnd = !!resolvedEnd\n\n // Infer section type: string → label, ReactElement → icon\n const startType = startSectionTypeProp ?? (typeof resolvedStart === 'string' ? 'label' : 'icon')\n const endType = endSectionTypeProp ?? (typeof resolvedEnd === 'string' ? 'label' : 'icon')\n\n const labelPaddingMap: Record<string, string> = {\n xs: 'px-ds-02',\n sm: 'px-ds-02',\n md: 'px-ds-03',\n lg: 'px-ds-03',\n }\n\n const labelTextMap: Record<string, string> = {\n xs: 'text-ds-sm',\n sm: 'text-ds-sm',\n md: 'text-ds-sm',\n lg: 'text-ds-md',\n }\n\n const inputPadding: Record<string, string> = {\n xs: 'px-ds-02',\n sm: 'px-ds-03',\n md: 'px-ds-03',\n lg: 'px-ds-04',\n }\n\n return (\n <div\n className={cn(\n inputWrapperVariants({ size }),\n state === 'error' && 'border-error-7 focus-within:ring-error-7',\n state === 'warning' && 'border-warning-7 focus-within:ring-warning-7',\n state === 'success' && 'border-success-7 focus-within:ring-success-7',\n wrapperClassName,\n )}\n >\n {hasStart && startType === 'label' && (\n <span\n className={cn(\n 'flex items-center shrink-0 select-none self-stretch',\n 'border-r border-surface-border',\n 'bg-surface-raised text-surface-fg-muted',\n 'rounded-l-[inherit]',\n labelPaddingMap[size],\n labelTextMap[size],\n !startSectionClickable && 'pointer-events-none',\n )}\n >\n {resolvedStart}\n </span>\n )}\n\n {hasStart && startType === 'icon' && (\n <IconProvider size={iconSizeMap[size]}>\n <span\n className={cn(\n 'flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted',\n sectionWidthMap[size],\n !startSectionClickable && 'pointer-events-none',\n )}\n >\n {resolvedStart}\n </span>\n </IconProvider>\n )}\n\n <input\n type={type}\n className={cn(\n 'flex-1 min-w-0 h-full bg-transparent outline-hidden font-sans',\n 'placeholder:text-surface-fg-subtle',\n 'disabled:cursor-not-allowed',\n 'read-only:cursor-default',\n inputPadding[size],\n // Remove left padding when start icon section is present (icon provides visual space)\n hasStart && startType === 'icon' && 'pl-0',\n // Remove right padding when end icon section is present\n hasEnd && endType === 'icon' && 'pr-0',\n className,\n )}\n aria-invalid={state === 'error' || undefined}\n aria-describedby={ariaDescribedBy}\n aria-required={ariaRequired || undefined}\n ref={ref}\n {...props}\n id={inputId}\n />\n\n {hasEnd && endType === 'label' && (\n <span\n className={cn(\n 'flex items-center shrink-0 select-none self-stretch',\n 'border-l border-surface-border',\n 'bg-surface-raised text-surface-fg-muted',\n 'rounded-r-[inherit]',\n labelPaddingMap[size],\n labelTextMap[size],\n !endSectionClickable && 'pointer-events-none',\n )}\n >\n {resolvedEnd}\n </span>\n )}\n\n {hasEnd && endType === 'icon' && (\n <IconProvider size={iconSizeMap[size]}>\n <span\n className={cn(\n 'flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted',\n sectionWidthMap[size],\n !endSectionClickable && 'pointer-events-none',\n )}\n >\n {resolvedEnd}\n </span>\n </IconProvider>\n )}\n </div>\n )\n },\n)\nInput.displayName = 'Input'\n\n/** @deprecated Use inputWrapperVariants — semantics changed (now targets wrapper, not input) */\nconst inputVariants = inputWrapperVariants\n\nexport { Input, inputVariants, inputWrapperVariants }\n"],"mappings":";;;;;;;;AAWA,IAAM,IAAuB,EAC3B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACD;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACL,EACF;CACD,iBAAiB,EAAE,MAAM,MAAM;CAChC,CACF,EAEK,IAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL,EAEK,IAAwC;CAC5C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL,EAyDK,IAAQ,EAAM,YAEhB,EACE,cACA,SACA,OAAO,GACP,MAAM,IAAW,MACjB,iBACA,eACA,0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;IACnC,oBAAkB;IAClB,iBAAe,KAAgB,KAAA;IAC1B;IACL,GAAI;IACJ,IAAI;IACJ,CAAA;GAED,KAAU,MAAY,WACrB,kBAAC,QAAD;IACE,WAAW,EACT,uDACA,kCACA,2CACA,uBACA,EAAgB,IAChB,EAAa,IACb,CAAC,KAAuB,sBACzB;cAEA;IACI,CAAA;GAGR,KAAU,MAAY,UACrB,kBAAC,GAAD;IAAc,MAAM,EAAY;cAC9B,kBAAC,QAAD;KACE,WAAW,EACT,gFACA,EAAgB,IAChB,CAAC,KAAuB,sBACzB;eAEA;KACI,CAAA;IACM,CAAA;GAEb;;EAGX;AACD,EAAM,cAAc;AAGpB,IAAM,IAAgB"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/ui/input.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useFormField } from './form'\nimport { IconProvider, type IconSize } from './icon-context'\nimport { cn } from './lib/utils'\n\nexport type InputState = 'default' | 'error' | 'warning' | 'success'\n\nconst inputWrapperVariants = cva(\n [\n 'relative flex items-center w-full font-sans',\n 'bg-surface-raised-hover text-surface-fg',\n 'border border-surface-border-strong rounded-ds-md',\n 'hover:bg-surface-raised-active',\n 'transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard',\n 'focus-within:outline-hidden focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-surface-border',\n 'has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-action-disabled',\n 'has-[:read-only]:bg-surface-raised has-[:read-only]:cursor-default',\n ],\n {\n variants: {\n size: {\n xs: 'h-ds-xs-plus text-ds-sm',\n sm: 'h-ds-sm text-ds-sm',\n md: 'h-ds-md text-ds-md',\n lg: 'h-ds-lg rounded-ds-lg text-ds-md',\n },\n },\n defaultVariants: { size: 'md' },\n },\n)\n\nconst sectionWidthMap: Record<string, string> = {\n xs: 'w-[26px]',\n sm: 'w-[30px]',\n md: 'w-[38px]',\n lg: 'w-[46px]',\n}\n\nconst iconSizeMap: Record<string, IconSize> = {\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n}\n\n/**\n * Props for Input — a single-line text field with container-first architecture,\n * section-based icons with automatic padding, per-size scaling, and validation state coloring.\n *\n * **Sizes:** `xs` (28px) | `sm` (32px) | `md` (40px, default) | `lg` (48px)\n * HTML's native `size` attribute is excluded — use CSS width instead.\n *\n * **Validation states:** `state=\"error\"` colors the border red and sets `aria-invalid`.\n * Use with `<FormField>` to show helper text below the input.\n *\n * **Section-based icons:** `startSection` and `endSection` accept any React node.\n * Icons are auto-sized via `IconProvider`. Sections are `pointer-events-none` by default;\n * use `startSectionClickable`/`endSectionClickable` for interactive sections.\n *\n * **className** targets the `<input>` element (backward compatible).\n * **wrapperClassName** targets the wrapper div for border/bg/ring overrides.\n *\n * @example\n * // Basic email field with placeholder:\n * <Input type=\"email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Search input with a leading icon:\n * <Input size=\"md\" startSection={<IconSearch />} placeholder=\"Search projects...\" />\n *\n * @example\n * // Validated error state (pair with FormField for label + helper text):\n * <Input state=\"error\" value={email} onChange={handleChange} />\n *\n * @example\n * // Read-only field (shows a muted background, non-editable):\n * <Input readOnly value=\"https://devalok.com/api/key/abc123\" endSection={<IconCopy />} />\n */\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof inputWrapperVariants> {\n state?: InputState\n startSection?: React.ReactNode\n endSection?: React.ReactNode\n startSectionClickable?: boolean\n endSectionClickable?: boolean\n /** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).\n * `'label'` = tinted background with border separator (default for strings). */\n startSectionType?: 'icon' | 'label'\n /** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).\n * `'label'` = tinted background with border separator (default for strings). */\n endSectionType?: 'icon' | 'label'\n /** Classes for the wrapper div (border, bg, ring). */\n wrapperClassName?: string\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n type,\n state: stateProp,\n size: sizeProp = 'md',\n startSection,\n endSection,\n startSectionClickable,\n endSectionClickable,\n startSectionType: startSectionTypeProp,\n endSectionType: endSectionTypeProp,\n wrapperClassName,\n ...props\n },\n ref,\n ) => {\n const size = sizeProp ?? 'md'\n const fieldCtx = useFormField()\n // Merge FormField context — explicit props always win\n const state =\n stateProp ??\n (fieldCtx.state === 'helper'\n ? undefined\n : (fieldCtx.state as InputState | undefined))\n const ariaDescribedBy = props['aria-describedby'] ?? fieldCtx.helperTextId\n const ariaRequired = props['aria-required'] ?? fieldCtx.required\n // Explicit id wins; otherwise adopt FormField's inputId so <Label htmlFor> resolves.\n const inputId = props.id ?? fieldCtx.inputId\n\n const hasStart = !!startSection\n const hasEnd = !!endSection\n\n // Infer section type: string → label, ReactElement → icon\n const startType = startSectionTypeProp ?? (typeof startSection === 'string' ? 'label' : 'icon')\n const endType = endSectionTypeProp ?? (typeof endSection === 'string' ? 'label' : 'icon')\n\n const labelPaddingMap: Record<string, string> = {\n xs: 'px-ds-02',\n sm: 'px-ds-02',\n md: 'px-ds-03',\n lg: 'px-ds-03',\n }\n\n const labelTextMap: Record<string, string> = {\n xs: 'text-ds-sm',\n sm: 'text-ds-sm',\n md: 'text-ds-sm',\n lg: 'text-ds-md',\n }\n\n const inputPadding: Record<string, string> = {\n xs: 'px-ds-02',\n sm: 'px-ds-03',\n md: 'px-ds-03',\n lg: 'px-ds-04',\n }\n\n return (\n <div\n className={cn(\n inputWrapperVariants({ size }),\n state === 'error' && 'border-error-7 focus-within:ring-error-7',\n state === 'warning' && 'border-warning-7 focus-within:ring-warning-7',\n state === 'success' && 'border-success-7 focus-within:ring-success-7',\n wrapperClassName,\n )}\n >\n {hasStart && startType === 'label' && (\n <span\n className={cn(\n 'flex items-center shrink-0 select-none self-stretch',\n 'border-r border-surface-border',\n 'bg-surface-raised text-surface-fg-muted',\n 'rounded-l-[inherit]',\n labelPaddingMap[size],\n labelTextMap[size],\n !startSectionClickable && 'pointer-events-none',\n )}\n >\n {startSection}\n </span>\n )}\n\n {hasStart && startType === 'icon' && (\n <IconProvider size={iconSizeMap[size]}>\n <span\n className={cn(\n 'flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted',\n sectionWidthMap[size],\n !startSectionClickable && 'pointer-events-none',\n )}\n >\n {startSection}\n </span>\n </IconProvider>\n )}\n\n <input\n type={type}\n className={cn(\n 'flex-1 min-w-0 h-full bg-transparent outline-hidden font-sans',\n 'placeholder:text-surface-fg-subtle',\n 'disabled:cursor-not-allowed',\n 'read-only:cursor-default',\n inputPadding[size],\n // Remove left padding when start icon section is present (icon provides visual space)\n hasStart && startType === 'icon' && 'pl-0',\n // Remove right padding when end icon section is present\n hasEnd && endType === 'icon' && 'pr-0',\n className,\n )}\n aria-invalid={state === 'error' || undefined}\n aria-describedby={ariaDescribedBy}\n aria-required={ariaRequired || undefined}\n ref={ref}\n {...props}\n id={inputId}\n />\n\n {hasEnd && endType === 'label' && (\n <span\n className={cn(\n 'flex items-center shrink-0 select-none self-stretch',\n 'border-l border-surface-border',\n 'bg-surface-raised text-surface-fg-muted',\n 'rounded-r-[inherit]',\n labelPaddingMap[size],\n labelTextMap[size],\n !endSectionClickable && 'pointer-events-none',\n )}\n >\n {endSection}\n </span>\n )}\n\n {hasEnd && endType === 'icon' && (\n <IconProvider size={iconSizeMap[size]}>\n <span\n className={cn(\n 'flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted',\n sectionWidthMap[size],\n !endSectionClickable && 'pointer-events-none',\n )}\n >\n {endSection}\n </span>\n </IconProvider>\n )}\n </div>\n )\n },\n)\nInput.displayName = 'Input'\n\nexport { Input, inputWrapperVariants }\n"],"mappings":";;;;;;;;AAWA,IAAM,IAAuB,EAC3B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACD;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ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CAAA;GAGjB,kBAAC,SAAD;IACQ;IACN,WAAW,EACT,iEACA,sCACA,+BACA,4BArDqC;KAC3C,IAAI;KACJ,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAiDoB,IAEb,KAAY,MAAc,UAAU,QAEpC,KAAU,MAAY,UAAU,QAChC,EACD;IACD,gBAAc,MAAU,WAAW,KAAA;IACnC,oBAAkB;IAClB,iBAAe,KAAgB,KAAA;IAC1B;IACL,GAAI;IACJ,IAAI;IACJ,CAAA;GAED,KAAU,MAAY,WACrB,kBAAC,QAAD;IACE,WAAW,EACT,uDACA,kCACA,2CACA,uBACA,EAAgB,IAChB,EAAa,IACb,CAAC,KAAuB,sBACzB;cAEA;IACI,CAAA;GAGR,KAAU,MAAY,UACrB,kBAAC,GAAD;IAAc,MAAM,EAAY;cAC9B,kBAAC,QAAD;KACE,WAAW,EACT,gFACA,EAAgB,IAChB,CAAC,KAAuB,sBACzB;eAEA;KACI,CAAA;IACM,CAAA;GAEb;;EAGX;AACD,EAAM,cAAc"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
3
  export type SegmentedControlSize = 'sm' | 'md' | 'lg';
4
- export type SegmentedControlVariant = 'default' | 'solid' | /** @deprecated Use `'solid'` instead. */ 'accent';
4
+ export type SegmentedControlVariant = 'default' | 'solid';
5
5
  export interface SegmentedControlOption {
6
6
  id: string;
7
7
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../src/ui/segmented-control.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AACrD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,yCAAyC,CAAC,QAAQ,CAAA;AAE9G,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,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sBAAsB,EAAE,CAAA;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AA6BD,QAAA,MAAM,gBAAgB,8FA+HrB,CAAA;AAKD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -19,12 +19,10 @@ var o = {
19
19
  }
20
20
  }, s = {
21
21
  default: "bg-surface-overlay shadow-raised",
22
- solid: "bg-accent-9",
23
- accent: "bg-accent-9"
22
+ solid: "bg-accent-9"
24
23
  }, c = {
25
24
  default: "text-surface-fg",
26
- solid: "text-accent-fg",
27
- accent: "text-accent-fg"
25
+ solid: "text-accent-fg"
28
26
  }, l = {
29
27
  type: "spring",
30
28
  stiffness: 400,
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-control.js","names":[],"sources":["../../src/ui/segmented-control.tsx"],"sourcesContent":["'use client'\n\nimport { LayoutGroup,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { cn } from './lib/utils'\n\n/* ── Types ─────────────────────────────────────────────────── */\n\nexport type SegmentedControlSize = 'sm' | 'md' | 'lg'\nexport type SegmentedControlVariant = 'default' | 'solid' | /** @deprecated Use `'solid'` instead. */ 'accent'\n\nexport interface SegmentedControlOption {\n id: string\n text: string\n /** Optional icon component rendered before the text label. */\n icon?: React.ComponentType<{ className?: string }>\n}\n\nexport interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n size?: SegmentedControlSize\n variant?: SegmentedControlVariant\n options: SegmentedControlOption[]\n selectedId: string\n onSelect: (id: string) => void\n disabled?: boolean\n}\n\n/* ── Size config ───────────────────────────────────────────── */\n\nconst sizeConfig = {\n sm: { button: 'h-7 px-ds-04 text-ds-sm', icon: 'h-3.5 w-3.5' },\n md: { button: 'h-8 px-ds-05 text-ds-md', icon: 'h-4 w-4' },\n lg: { button: 'h-10 px-ds-06 text-ds-md', icon: 'h-4 w-4' },\n} as const\n\n/* ── Pill styles per variant ───────────────────────────────── */\n\nconst pillStyles = {\n default: 'bg-surface-overlay shadow-raised',\n solid: 'bg-accent-9',\n /** @deprecated Use `solid` instead. */\n accent: 'bg-accent-9',\n} as const\n\nconst selectedTextStyles = {\n default: 'text-surface-fg',\n solid: 'text-accent-fg',\n /** @deprecated Use `solid` instead. */\n accent: 'text-accent-fg',\n} as const\n\n/* ── Spring config (snappy, minimal overshoot) ─────────────── */\n/* Intentionally softer than springs.snappy (500/30/0.5) for pill slide feel */\n\nconst pillSpring = { type: 'spring' as const, stiffness: 400, damping: 30 }\n\n/* ── SegmentedControl ──────────────────────────────────────── */\n\nconst SegmentedControl = React.forwardRef<HTMLDivElement, SegmentedControlProps>(\n function SegmentedControl(\n {\n size = 'md',\n variant = 'default',\n options,\n selectedId,\n onSelect,\n disabled = false,\n className,\n ...props\n },\n ref,\n ) {\n const instanceId = React.useId()\n const tablistRef = React.useRef<HTMLDivElement | null>(null)\n\n // Compose refs\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n tablistRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n // Keyboard navigation\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return\n\n const currentIndex = options.findIndex((o) => o.id === selectedId)\n let nextIndex = currentIndex\n\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault()\n nextIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1\n break\n case 'ArrowRight':\n e.preventDefault()\n nextIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0\n break\n case 'Home':\n e.preventDefault()\n nextIndex = 0\n break\n case 'End':\n e.preventDefault()\n nextIndex = options.length - 1\n break\n default:\n return\n }\n\n onSelect(options[nextIndex].id)\n requestAnimationFrame(() => {\n const buttons = tablistRef.current?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')\n buttons?.[nextIndex]?.focus()\n })\n }\n\n const { button: buttonSize, icon: iconSize } = sizeConfig[size]\n\n return (\n <div\n ref={mergedRef}\n role=\"tablist\"\n tabIndex={-1}\n aria-label={props['aria-label'] ?? 'Segmented control'}\n onKeyDown={handleKeyDown}\n className={cn(\n 'inline-flex p-[3px] rounded-ds-lg',\n 'bg-surface-raised-hover border border-surface-border-subtle shadow-inset',\n disabled && 'opacity-action-disabled pointer-events-none',\n className,\n )}\n {...props}\n >\n <LayoutGroup id={instanceId}>\n {options.map((option) => {\n const isSelected = option.id === selectedId\n const OptionIcon = option.icon\n\n return (\n <button\n key={option.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={isSelected}\n tabIndex={isSelected ? 0 : -1}\n disabled={disabled}\n onClick={() => onSelect(option.id)}\n className={cn(\n 'relative inline-flex items-center justify-center gap-ds-02 rounded-ds-md',\n 'font-medium transition-colors duration-fast-02 ease-productive-standard',\n 'outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2',\n buttonSize,\n isSelected\n ? selectedTextStyles[variant]\n : 'text-surface-fg-muted hover:text-surface-fg',\n )}\n >\n {/* Sliding pill indicator */}\n {isSelected && (\n <motion.span\n layoutId=\"segment-pill\"\n className={cn(\n 'absolute inset-0 rounded-ds-md pointer-events-none',\n pillStyles[variant],\n )}\n transition={pillSpring}\n />\n )}\n\n {/* Content (above pill via z-index) */}\n {OptionIcon && (\n <OptionIcon className={cn('relative z-[1] shrink-0', iconSize)} />\n )}\n <span className=\"relative z-[1]\">{option.text}</span>\n </button>\n )\n })}\n </LayoutGroup>\n </div>\n )\n },\n)\nSegmentedControl.displayName = 'SegmentedControl'\n\n/* ── Exports ───────────────────────────────────────────────── */\n\nexport { SegmentedControl }\n"],"mappings":";;;;;;AA8BA,IAAM,IAAa;CACjB,IAAI;EAAE,QAAQ;EAA2B,MAAM;EAAe;CAC9D,IAAI;EAAE,QAAQ;EAA2B,MAAM;EAAW;CAC1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ACX,WAAW,EACT,qCACA,4EACA,KAAY,+CACZ,EACD;EACD,GAAI;YAEJ,kBAAC,GAAD;GAAa,IAAI;aACd,EAAQ,KAAK,MAAW;IACvB,IAAM,IAAa,EAAO,OAAO,GAC3B,IAAa,EAAO;AAE1B,WACE,kBAAC,UAAD;KAEE,MAAK;KACL,MAAK;KACL,iBAAe;KACf,UAAU,IAAa,IAAI;KACjB;KACV,eAAe,EAAS,EAAO,GAAG;KAClC,WAAW,EACT,4EACA,2EACA,+FACA,GACA,IACI,EAAmB,KACnB,8CACL;eAhBH;MAmBG,KACC,kBAAC,EAAO,MAAR;OACE,UAAS;OACT,WAAW,EACT,sDACA,EAAW,GACZ;OACD,YAAY;OACZ,CAAA;MAIH,KACC,kBAAC,GAAD,EAAY,WAAW,EAAG,2BAA2B,EAAS,EAAI,CAAA;MAEpE,kBAAC,QAAD;OAAM,WAAU;iBAAkB,EAAO;OAAY,CAAA;MAC9C;OAlCF,EAAO,GAkCL;KAEX;GACU,CAAA;EACV,CAAA;EAGX;AACD,EAAiB,cAAc"}
1
+ {"version":3,"file":"segmented-control.js","names":[],"sources":["../../src/ui/segmented-control.tsx"],"sourcesContent":["'use client'\n\nimport { LayoutGroup,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { cn } from './lib/utils'\n\n/* ── Types ─────────────────────────────────────────────────── */\n\nexport type SegmentedControlSize = 'sm' | 'md' | 'lg'\nexport type SegmentedControlVariant = 'default' | 'solid'\n\nexport interface SegmentedControlOption {\n id: string\n text: string\n /** Optional icon component rendered before the text label. */\n icon?: React.ComponentType<{ className?: string }>\n}\n\nexport interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n size?: SegmentedControlSize\n variant?: SegmentedControlVariant\n options: SegmentedControlOption[]\n selectedId: string\n onSelect: (id: string) => void\n disabled?: boolean\n}\n\n/* ── Size config ───────────────────────────────────────────── */\n\nconst sizeConfig = {\n sm: { button: 'h-7 px-ds-04 text-ds-sm', icon: 'h-3.5 w-3.5' },\n md: { button: 'h-8 px-ds-05 text-ds-md', icon: 'h-4 w-4' },\n lg: { button: 'h-10 px-ds-06 text-ds-md', icon: 'h-4 w-4' },\n} as const\n\n/* ── Pill styles per variant ───────────────────────────────── */\n\nconst pillStyles = {\n default: 'bg-surface-overlay shadow-raised',\n solid: 'bg-accent-9',\n} as const\n\nconst selectedTextStyles = {\n default: 'text-surface-fg',\n solid: 'text-accent-fg',\n} as const\n\n/* ── Spring config (snappy, minimal overshoot) ─────────────── */\n/* Intentionally softer than springs.snappy (500/30/0.5) for pill slide feel */\n\nconst pillSpring = { type: 'spring' as const, stiffness: 400, damping: 30 }\n\n/* ── SegmentedControl ──────────────────────────────────────── */\n\nconst SegmentedControl = React.forwardRef<HTMLDivElement, SegmentedControlProps>(\n function SegmentedControl(\n {\n size = 'md',\n variant = 'default',\n options,\n selectedId,\n onSelect,\n disabled = false,\n className,\n ...props\n },\n ref,\n ) {\n const instanceId = React.useId()\n const tablistRef = React.useRef<HTMLDivElement | null>(null)\n\n // Compose refs\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n tablistRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n // Keyboard navigation\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return\n\n const currentIndex = options.findIndex((o) => o.id === selectedId)\n let nextIndex = currentIndex\n\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault()\n nextIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1\n break\n case 'ArrowRight':\n e.preventDefault()\n nextIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0\n break\n case 'Home':\n e.preventDefault()\n nextIndex = 0\n break\n case 'End':\n e.preventDefault()\n nextIndex = options.length - 1\n break\n default:\n return\n }\n\n onSelect(options[nextIndex].id)\n requestAnimationFrame(() => {\n const buttons = tablistRef.current?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')\n buttons?.[nextIndex]?.focus()\n })\n }\n\n const { button: buttonSize, icon: iconSize } = sizeConfig[size]\n\n return (\n <div\n ref={mergedRef}\n role=\"tablist\"\n tabIndex={-1}\n aria-label={props['aria-label'] ?? 'Segmented control'}\n onKeyDown={handleKeyDown}\n className={cn(\n 'inline-flex p-[3px] rounded-ds-lg',\n 'bg-surface-raised-hover border border-surface-border-subtle shadow-inset',\n disabled && 'opacity-action-disabled pointer-events-none',\n className,\n )}\n {...props}\n >\n <LayoutGroup id={instanceId}>\n {options.map((option) => {\n const isSelected = option.id === selectedId\n const OptionIcon = option.icon\n\n return (\n <button\n key={option.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={isSelected}\n tabIndex={isSelected ? 0 : -1}\n disabled={disabled}\n onClick={() => onSelect(option.id)}\n className={cn(\n 'relative inline-flex items-center justify-center gap-ds-02 rounded-ds-md',\n 'font-medium transition-colors duration-fast-02 ease-productive-standard',\n 'outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2',\n buttonSize,\n isSelected\n ? selectedTextStyles[variant]\n : 'text-surface-fg-muted hover:text-surface-fg',\n )}\n >\n {/* Sliding pill indicator */}\n {isSelected && (\n <motion.span\n layoutId=\"segment-pill\"\n className={cn(\n 'absolute inset-0 rounded-ds-md pointer-events-none',\n pillStyles[variant],\n )}\n transition={pillSpring}\n />\n )}\n\n {/* Content (above pill via z-index) */}\n {OptionIcon && (\n <OptionIcon className={cn('relative z-[1] shrink-0', iconSize)} />\n )}\n <span className=\"relative z-[1]\">{option.text}</span>\n </button>\n )\n })}\n </LayoutGroup>\n </div>\n )\n },\n)\nSegmentedControl.displayName = 'SegmentedControl'\n\n/* ── Exports ───────────────────────────────────────────────── */\n\nexport { SegmentedControl }\n"],"mappings":";;;;;;AA8BA,IAAM,IAAa;CACjB,IAAI;EAAE,QAAQ;EAA2B,MAAM;EAAe;CAC9D,IAAI;EAAE,QAAQ;EAA2B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,EACT,qCACA,4EACA,KAAY,+CACZ,EACD;EACD,GAAI;YAEJ,kBAAC,GAAD;GAAa,IAAI;aACd,EAAQ,KAAK,MAAW;IACvB,IAAM,IAAa,EAAO,OAAO,GAC3B,IAAa,EAAO;AAE1B,WACE,kBAAC,UAAD;KAEE,MAAK;KACL,MAAK;KACL,iBAAe;KACf,UAAU,IAAa,IAAI;KACjB;KACV,eAAe,EAAS,EAAO,GAAG;KAClC,WAAW,EACT,4EACA,2EACA,+FACA,GACA,IACI,EAAmB,KACnB,8CACL;eAhBH;MAmBG,KACC,kBAAC,EAAO,MAAR;OACE,UAAS;OACT,WAAW,EACT,sDACA,EAAW,GACZ;OACD,YAAY;OACZ,CAAA;MAIH,KACC,kBAAC,GAAD,EAAY,WAAW,EAAG,2BAA2B,EAAS,EAAI,CAAA;MAEpE,kBAAC,QAAD;OAAM,WAAU;iBAAkB,EAAO;OAAY,CAAA;MAC9C;OAlCF,EAAO,GAkCL;KAEX;GACU,CAAA;EACV,CAAA;EAGX;AACD,EAAiB,cAAc"}
@@ -39,7 +39,7 @@ pnpm add sonner
39
39
  transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
40
40
  ```
41
41
 
42
- **Do NOT** import `@devalok/shilp-sutra/tailwind` in a `tailwind.config.ts`. That export is a deprecated no-op stub and logs a dev-mode `console.warn`. It is scheduled for removal in 0.38.
42
+ **Do NOT** import `@devalok/shilp-sutra/tailwind`. That export was removed in 0.38.0. Use the CSS-first setup (`@import "tailwindcss"; @import "@devalok/shilp-sutra/css";`) — no `tailwind.config.ts` is required.
43
43
 
44
44
  ### Peer dependencies (0.37.0)
45
45
 
@@ -35,6 +35,12 @@
35
35
  ## Exported Utilities
36
36
  groupItemsByTime(items: ActivityItem[], labels?: GroupLabels) — pure function that buckets items into time groups; returns { label: string, items: ActivityItem[] }[]
37
37
 
38
+ ## Composability
39
+ - **Built from ui primitives:** Avatar (actor), Button (Load more), Skeleton (loading), Text (body). Override via `renderItem` to use your own primitives per row.
40
+ - **renderItem** is the composition hook — return your own JSX or `undefined` to fall back to default ActivityEntry. Timeline dot + layout wrapper stay consistent.
41
+ - **groupBy="time"** wraps items in Today/Yesterday/This Week/Older buckets; `groupItemsByTime()` export reusable for custom renderers.
42
+ - **Pagination is consumer-driven** — `hasMore` + `onLoadMore` for server-side, or `maxInitialItems` + "Show all" toggle for client-side truncation.
43
+
38
44
  ## Gotchas
39
45
  - `items` is required — passing an empty array renders the `emptyState` content
40
46
  - `color` on each item controls the timeline dot color
@@ -38,6 +38,14 @@
38
38
  />
39
39
  ```
40
40
 
41
+ ## Composability
42
+ - **Built on ui/Avatar** — each slot is an Avatar with overlap + border + optional Tooltip.
43
+ - **Wraps TooltipProvider internally** — don't add another.
44
+ - **renderAvatar** escape hatch for custom shapes. Wrapper handles overlap/border positioning; your renderer sets size + shape.
45
+ - **borderColor** must match the surface the group sits on (`surface-raised` on Card, `surface-base` on page bg). Mismatch = visible seam.
46
+ - **Overflow:** +N badge with optional `onOverflowClick` → pair with a Popover/Sheet for "show all members".
47
+ - Per-user `ring` (lead/admin/client) surfaces Avatar's ring semantic at group level — use for role/presence hints.
48
+
41
49
  ## Gotchas
42
50
  - Wraps TooltipProvider internally — no need to add one yourself
43
51
  - Users beyond `max` are collapsed into a "+N" overflow badge
@@ -34,6 +34,12 @@
34
34
  />
35
35
  ```
36
36
 
37
+ ## Composability
38
+ - **Standalone floating toolbar** — use with DataTable, TreeView, or any selection-capable UI.
39
+ - **DataTable auto-integration:** DataTable's `bulkActions` prop renders this internally — typically you don't render BulkActionBar directly when using DataTable.
40
+ - **Data-driven actions:** `{ label, icon, onClick, color, disabled }[]`. For destructive confirmation, call ConfirmDialog from the onClick handler.
41
+ - **Portal to body + fixed bottom-center z-50** — independent of parent layout. Check for other fixed elements that might overlap.
42
+
37
43
  ## Gotchas
38
44
  - Renders via `createPortal` into `document.body` — will not appear during SSR (mounts only client-side)
39
45
  - Positioned fixed at bottom-center with `z-50`; ensure no other fixed elements conflict
@@ -25,6 +25,13 @@ CommandItem shape: { id, label, description?, icon?, shortcut?, onSelect: () =>
25
25
  />
26
26
  ```
27
27
 
28
+ ## Composability
29
+ - **Built on Dialog (portal) + cmdk-style fuzzy matching.** Global Ctrl+K / Cmd+K by default; customize via `keybinding`.
30
+ - **Groups + items are data-driven.** Each item: `{ id, label, icon?, shortcut?, description?, onSelect }`. Labels accept ReactNode for rich rendering; pair with `filterValue` for typeahead matching against a text representation.
31
+ - **renderLabel hook** lets you highlight matched characters in query (`(query) => ReactNode`).
32
+ - **Controlled / uncontrolled** via `open`+`onOpenChange` or `defaultOpen`.
33
+ - **AppCommandPalette (shell)** is the app-wide variant with CommandRegistry — use that for global palettes with dynamically registered commands.
34
+
28
35
  ## Gotchas
29
36
  - Opens with Ctrl+K / Cmd+K by default
30
37
  - Items animate in with staggered slide-up (30ms delay cascade); groups fade in; active item icon/shortcut highlight in interactive color (v0.15.0)
@@ -33,6 +33,12 @@ const [open, setOpen] = useState(false)
33
33
  />
34
34
  ```
35
35
 
36
+ ## Composability
37
+ - **Built on AlertDialog** — non-dismissible (no click-outside, Cancel-first focus), portal-rendered.
38
+ - **Controlled-only.** Parent owns `open` + `onOpenChange`.
39
+ - **onConfirm can be async.** `loading=true` replaces confirm text with "Processing..." and disables both buttons. Typical: setLoading(true) → await action() → setLoading(false) + setOpen(false).
40
+ - **Stays open after confirm** — close via onOpenChange. Keeps the modal up on errors or for chained confirmations.
41
+
36
42
  ## Gotchas
37
43
  - Dialog stays open after confirm — consumer must close it via `onOpenChange`
38
44
  - Built on AlertDialog internally
@@ -23,6 +23,12 @@
23
23
  </ContentCard>
24
24
  ```
25
25
 
26
+ ## Composability
27
+ - **Server-safe higher-level Card** — wraps ui/Card with conventional header/title/actions/footer slots.
28
+ - **When to use:** List rows, dashboard tiles, any "card with title + optional actions + body + optional footer" pattern. Use raw ui/Card for custom layouts or when you need accent bars.
29
+ - **Slot precedence:** `header` beats `headerTitle`. Use `headerTitle` for simple strings, `header` for rich content.
30
+ - **padding variants** (default/compact/spacious/none) set once on ContentCard; the underlying Card size cascade propagates.
31
+
26
32
  ## Gotchas
27
33
  - Server-safe: can be imported directly in Next.js Server Components
28
34
  - Use `headerTitle` for simple text headers; use `header` for custom header content
@@ -111,6 +111,16 @@ PresetKey: 'today' | 'yesterday' | 'last7days' | 'last30days' | 'thisMonth' | 'l
111
111
  <TimePicker value={time} onChange={setTime} format="24h" minuteStep={15} />
112
112
  ```
113
113
 
114
+ ## Composability
115
+ - **7 sub-components in one kit:** DatePicker, DateRangePicker, DateTimePicker, TimePicker, CalendarGrid, MonthPicker, YearPicker, Presets. Built on Popover (trigger + calendar content) + date-fns.
116
+ - **Layered abstractions:**
117
+ - High-level: DatePicker / DateRangePicker / DateTimePicker / TimePicker (use these 95% of the time — Popover-wrapped, single-field pickers with formatted value display).
118
+ - Low-level: CalendarGrid / MonthPicker / YearPicker (use for custom picker layouts, inline calendars, dashboards with embedded date selection).
119
+ - **useCalendar hook** manages month navigation state — use it when building custom picker UI (e.g. inline calendar with custom header).
120
+ - **Presets component** is standalone — drop it next to a DateRangePicker's calendar for quick-select sidebars (Today / Last 7 days / This month / etc.).
121
+ - **Events on calendar:** CalendarGrid accepts `events: { date, color, label }[]` — renders up to 3 colored dots per day cell. Useful for availability / booked-days highlights.
122
+ - **min/max/disabledDates** are shared contract across the whole family — pass the same bounds config to any date picker variant.
123
+
114
124
  ## Gotchas
115
125
  - TimePicker stores time inside a Date object — only hours/minutes/seconds are meaningful
116
126
  - CalendarGrid is a low-level building block — prefer DatePicker/DateRangePicker for most use cases
@@ -21,6 +21,13 @@
21
21
  <DeadlineIndicator deadline={task.dueDate} warningThreshold={2880} criticalThreshold={480} />
22
22
  ```
23
23
 
24
+ ## Composability
25
+ - **Server-safe inline status** — renders a colored text label ("2d left" / "3h left" / "Overdue by 1d") with optional clock icon prefix.
26
+ - **Threshold-driven color:** `warningThreshold` + `criticalThreshold` drive the green→yellow→red progression. Tune per use case (billing deadlines vs. task due dates have different urgency cadences).
27
+ - **Composes inside Card, StatusBadge, DataTable cells** — anywhere a short inline deadline string fits.
28
+ - **Doesn't live-update** — uses `Date.now()` at render time. For ticking timestamps, re-render via a parent interval or use a dedicated "time ago" library.
29
+ - For static absolute timestamps (not relative), set `format="absolute"` — useful when you want the exact date rendered with semantic color coding.
30
+
24
31
  ## Gotchas
25
32
  - Color is semantic: green (on-track) -> yellow (warning threshold) -> red (critical/overdue)
26
33
  - Overdue deadlines show bold red text with "Overdue by Xd/h/m"
@@ -37,6 +37,14 @@ EmojiPicker, EmojiPickerPopover
37
37
  <EmojiPicker onSelect={handleEmoji} theme="dark" />
38
38
  ```
39
39
 
40
+ ## Composability
41
+ - **Two exports:** `EmojiPicker` (inline grid, no trigger) and `EmojiPickerPopover` (trigger + popover wrapper). Use EmojiPickerPopover 95% of the time — trigger-on-click is the standard UX.
42
+ - **Wraps @emoji-mart/react**, lazy-loaded with a Skeleton placeholder while the ~200KB bundle fetches. Don't pre-import unless you need it eagerly.
43
+ - **Trigger composition:** EmojiPickerPopover's `children` is the trigger — wrap any Button/IconButton. Typical pairing is an icon-only IconButton with a 😀 label.
44
+ - **TipTap integration:** Use `createEmojiSuggestion(set?)` factory to create a TipTap suggestion plugin that opens the picker on typing `:emoji`. Works with RichChatInput and RichTextEditor.
45
+ - **Theme matching:** `theme="auto"` reads the `.dark` class on `<html>` — matches the DS dark mode toggle automatically. Override with explicit light/dark.
46
+ - **Emoji sets:** Pass `set="apple" | "google" | ...` for consistent cross-platform emoji art (defaults to native OS glyphs).
47
+
40
48
  ## Gotchas
41
49
  - Wraps `@emoji-mart/react` which is lazy-loaded — shows a Skeleton placeholder while loading
42
50
  - `theme="auto"` reads the `.dark` class on `<html>` to pick light/dark
@@ -27,6 +27,14 @@ Note: EmptyState was server-safe prior to v0.18.0 but is NO LONGER server-safe d
27
27
  />
28
28
  ```
29
29
 
30
+ ## Composability
31
+ - **Centered block for "no data" / "no results" states.** Renders icon + title + description + optional action slot.
32
+ - **Icon composition:** Accepts both JSX (`<IconFolder />`) and component references (`IconFolder`). Component refs auto-instantiate with correct sizing. Default icon is the Devalok chakra.
33
+ - **DataTable integration:** Pass an EmptyState component to DataTable's `emptyState` prop; takes precedence over `noResultsText` string.
34
+ - **compact mode** for embedding inside Cards, sidebars, narrow sections. Defaults iconSize to 'sm' in compact mode automatically.
35
+ - **Action slot** typically holds a single primary Button ("Create your first task", "Invite members"). For multi-action, use a div + flex with gap.
36
+ - No longer server-safe (Framer Motion entrance animation).
37
+
30
38
  ## Gotchas
31
39
  - `icon` accepts both JSX elements (`<IconFolder />`) and component references (`IconFolder`). Component references are auto-instantiated with correct sizing classes.
32
40
  - `iconSize` controls icon dimensions regardless of icon type. When `compact=true` and no `iconSize`, defaults to `'sm'`.
@@ -16,6 +16,13 @@
16
16
  <ErrorDisplay error={error} onReset={() => refetch()} />
17
17
  ```
18
18
 
19
+ ## Composability
20
+ - **ErrorDisplay, not ErrorBoundary** — confusingly, the import path is `error-boundary` but the component is `ErrorDisplay`. It renders an error UI; it does NOT catch errors. Pair it with your own ErrorBoundary (from react-error-boundary, Next.js error.tsx, etc.) as the fallback UI.
21
+ - **Auto-detects HTTP status codes** (404, 403, 500) when the `error` object has a `status` field — shows appropriate icon + message.
22
+ - **Dev-only stack trace:** Renders the stack trace only when `process.env.NODE_ENV !== 'production'`. Production users see a clean error page.
23
+ - **onReset for retry:** Pass a callback that re-fetches / resets state. Commonly wired to a react-query `refetch` or router `replace(...)`.
24
+ - Composes with EmptyState for "no data" states (which aren't really errors) — use EmptyState for empty, ErrorDisplay for failed.
25
+
19
26
  ## Gotchas
20
27
  - Auto-detects HTTP status codes (404, 403, 500) and shows appropriate icon/message
21
28
  - Shows stack trace in development mode only
@@ -32,6 +32,14 @@
32
32
  <FilePreview url="https://youtube.com/watch?v=..." />
33
33
  ```
34
34
 
35
+ ## Composability
36
+ - **Type-auto-detection** from URL + mimeType routes to the right renderer (image / pdf / video / audio / embed). For ambiguous URLs, pass `type` explicitly.
37
+ - **Heavy deps are lazy-loaded** — react-pdf (PDF), react-zoom-pan-pinch (Image zoom) are only fetched when first needed. Skeleton placeholder while loading. Don't pre-import.
38
+ - **Composes inside Dialog/Sheet** — common pattern: thumbnail in a list → click to open a Dialog with `<FilePreview>` filling it.
39
+ - **Embed URL normalization:** YouTube/Vimeo/Figma/Loom URLs auto-convert to embed format. Pass the original share URL; FilePreview handles it.
40
+ - **PDF worker from unpkg CDN** — for offline apps, override `pdfjs.GlobalWorkerOptions.workerSrc` in your app entry.
41
+ - **Download + error fallback** built in — if the file fails to load, users still get a download link.
42
+
35
43
  ## Gotchas
36
44
  - Image/PDF lazy-loaded (Skeleton on first render)
37
45
  - PDF worker from unpkg CDN — configure workerSrc for offline apps
@@ -51,6 +51,14 @@ FilterBar, FilterSelect, FilterMultiSelect
51
51
  </FilterBar>
52
52
  ```
53
53
 
54
+ ## Composability
55
+ - **FilterBar + FilterSelect + FilterMultiSelect** — three-part kit. FilterBar is the toolbar container; FilterSelect/FilterMultiSelect are the individual filter controls.
56
+ - **size propagates via context** from FilterBar to every FilterSelect/FilterMultiSelect child. Don't set size on individual filters.
57
+ - **Children MUST be direct** — the size cascade breaks if filters are wrapped in extra divs. Use React fragments or let them be direct children.
58
+ - **Active filter highlight:** FilterSelect/FilterMultiSelect auto-show an accent border when their value is set (non-empty array for multi, non-"all" for single).
59
+ - **Pair with DataTable or any list:** FilterBar sits above a DataTable/list; `searchValue` + `onSearchChange` drive global filter; individual filters drive column filters via your own state management.
60
+ - **"Clear all" convention:** Passing `onClearAll` renders a Reset button that's your escape hatch — implement it to clear all filter state in one call.
61
+
54
62
  ## Gotchas
55
63
  - FilterSelect and FilterMultiSelect must be direct children of FilterBar to inherit the size context
56
64
  - FilterSelect uses `"all"` as the sentinel value for "no filter" — do not use `"all"` as a real option value