@vjdesigns/vjdesigns-ui 3.4.0 → 3.5.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 (503) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +854 -873
  3. package/dist/components/data-display/Accordion/Accordion.mjs +97 -166
  4. package/dist/components/data-display/Chat/Chat.d.ts +13 -2
  5. package/dist/components/data-display/Collapsible/Collapsible.d.ts +70 -0
  6. package/dist/components/data-display/Collapsible/Collapsible.mjs +102 -0
  7. package/dist/components/data-display/Collapsible/Collapsible.module.css.mjs +8 -0
  8. package/dist/components/data-display/Collapsible/index.d.ts +1 -0
  9. package/dist/components/feedback/Progress/Progress.d.ts +32 -2
  10. package/dist/components/feedback/Progress/Progress.mjs +78 -74
  11. package/dist/components/feedback/Progress/Progress.module.css.mjs +1 -1
  12. package/dist/components/forms/Radio/Radio.mjs +12 -10
  13. package/dist/components/forms/ToggleGroup/ToggleGroup.mjs +133 -131
  14. package/dist/components/navigation/Toolbar/Toolbar.mjs +106 -0
  15. package/dist/components/navigation/Toolbar/Toolbar.module.css.mjs +11 -0
  16. package/dist/components/navigation/Toolbar/ToolbarContext.mjs +4 -0
  17. package/dist/components/navigation/Toolbar/index.d.ts +1 -0
  18. package/dist/components/primitives/CopyButton/CopyButton.d.ts +39 -0
  19. package/dist/components/primitives/CopyButton/CopyButton.mjs +49 -0
  20. package/dist/components/primitives/CopyButton/index.d.ts +1 -0
  21. package/dist/hooks/useCollapsePresence.mjs +83 -0
  22. package/dist/i18n/en.mjs +5 -0
  23. package/dist/index.mjs +104 -101
  24. package/dist/locales/ar.mjs +5 -0
  25. package/dist/locales/bn.mjs +5 -0
  26. package/dist/locales/cs.mjs +5 -0
  27. package/dist/locales/da.mjs +5 -0
  28. package/dist/locales/de.mjs +5 -0
  29. package/dist/locales/el.mjs +5 -0
  30. package/dist/locales/es.mjs +5 -0
  31. package/dist/locales/fa.mjs +5 -0
  32. package/dist/locales/fi.mjs +5 -0
  33. package/dist/locales/fr.mjs +5 -0
  34. package/dist/locales/he.mjs +5 -0
  35. package/dist/locales/hi.mjs +5 -0
  36. package/dist/locales/hu.mjs +5 -0
  37. package/dist/locales/id.mjs +5 -0
  38. package/dist/locales/it.mjs +5 -0
  39. package/dist/locales/ja.mjs +5 -0
  40. package/dist/locales/ko.mjs +5 -0
  41. package/dist/locales/nb.mjs +5 -0
  42. package/dist/locales/nl.mjs +5 -0
  43. package/dist/locales/pl.mjs +5 -0
  44. package/dist/locales/pt-BR.mjs +5 -0
  45. package/dist/locales/ro.mjs +5 -0
  46. package/dist/locales/ru.mjs +5 -0
  47. package/dist/locales/sv.mjs +5 -0
  48. package/dist/locales/th.mjs +5 -0
  49. package/dist/locales/tr.mjs +5 -0
  50. package/dist/locales/uk.mjs +5 -0
  51. package/dist/locales/ur.mjs +5 -0
  52. package/dist/locales/vi.mjs +5 -0
  53. package/dist/locales/zh-Hans.mjs +5 -0
  54. package/dist/locales/zh-Hant.mjs +5 -0
  55. package/dist/vjdesigns-ui.css +1 -1
  56. package/package.json +7 -5
  57. package/dist/ai/llms-full.txt +0 -8500
  58. package/dist/ai/llms.txt +0 -198
  59. package/dist/ai/mcp-server.mjs +0 -212
  60. package/dist/ai/registry.json +0 -21058
  61. package/dist/components/data-display/Accordion/Accordion.cjs.js +0 -1
  62. package/dist/components/data-display/Accordion/Accordion.module.css.cjs.js +0 -1
  63. package/dist/components/data-display/Avatar/Avatar.cjs.js +0 -1
  64. package/dist/components/data-display/Avatar/Avatar.module.css.cjs.js +0 -1
  65. package/dist/components/data-display/Badge/Badge.cjs.js +0 -1
  66. package/dist/components/data-display/Badge/Badge.module.css.cjs.js +0 -1
  67. package/dist/components/data-display/Card/Card.cjs.js +0 -1
  68. package/dist/components/data-display/Card/Card.module.css.cjs.js +0 -1
  69. package/dist/components/data-display/Carousel/Carousel.cjs.js +0 -1
  70. package/dist/components/data-display/Carousel/Carousel.module.css.cjs.js +0 -1
  71. package/dist/components/data-display/Chat/Chat.cjs.js +0 -1
  72. package/dist/components/data-display/Chat/Chat.module.css.cjs.js +0 -1
  73. package/dist/components/data-display/Chat/streams.cjs.js +0 -4
  74. package/dist/components/data-display/Chip/Chip.cjs.js +0 -1
  75. package/dist/components/data-display/Chip/Chip.module.css.cjs.js +0 -1
  76. package/dist/components/data-display/CodeBlock/CodeBlock.cjs.js +0 -6
  77. package/dist/components/data-display/CodeBlock/CodeBlock.module.css.cjs.js +0 -1
  78. package/dist/components/data-display/CodeBlock/tokenize.cjs.js +0 -13
  79. package/dist/components/data-display/CodeBlock/tokenize.d.ts +0 -26
  80. package/dist/components/data-display/Countdown/Countdown.cjs.js +0 -1
  81. package/dist/components/data-display/Countdown/Countdown.module.css.cjs.js +0 -1
  82. package/dist/components/data-display/DataGrid/DataGrid.cjs.js +0 -1
  83. package/dist/components/data-display/DataGrid/DataGrid.module.css.cjs.js +0 -1
  84. package/dist/components/data-display/DataGrid/dataGridUtils.cjs.js +0 -1
  85. package/dist/components/data-display/DataGrid/dataGridUtils.d.ts +0 -46
  86. package/dist/components/data-display/EmptyState/EmptyState.cjs.js +0 -1
  87. package/dist/components/data-display/EmptyState/EmptyState.module.css.cjs.js +0 -1
  88. package/dist/components/data-display/Image/Image.cjs.js +0 -1
  89. package/dist/components/data-display/Image/Image.module.css.cjs.js +0 -1
  90. package/dist/components/data-display/List/List.cjs.js +0 -1
  91. package/dist/components/data-display/List/List.module.css.cjs.js +0 -1
  92. package/dist/components/data-display/Stat/Stat.cjs.js +0 -1
  93. package/dist/components/data-display/Stat/Stat.module.css.cjs.js +0 -1
  94. package/dist/components/data-display/Table/Table.cjs.js +0 -1
  95. package/dist/components/data-display/Table/Table.module.css.cjs.js +0 -1
  96. package/dist/components/data-display/Table/useTable.cjs.js +0 -1
  97. package/dist/components/data-display/Table/useTable.d.ts +0 -118
  98. package/dist/components/data-display/Timeline/Timeline.cjs.js +0 -1
  99. package/dist/components/data-display/Timeline/Timeline.module.css.cjs.js +0 -1
  100. package/dist/components/data-display/TreeView/TreeView.cjs.js +0 -1
  101. package/dist/components/data-display/TreeView/TreeView.module.css.cjs.js +0 -1
  102. package/dist/components/data-display/TreeView/treeUtils.cjs.js +0 -1
  103. package/dist/components/data-display/TreeView/treeUtils.d.ts +0 -82
  104. package/dist/components/data-display/VirtualList/VirtualList.cjs.js +0 -1
  105. package/dist/components/data-display/VirtualList/VirtualList.module.css.cjs.js +0 -1
  106. package/dist/components/feedback/Alert/Alert.cjs.js +0 -1
  107. package/dist/components/feedback/Alert/Alert.module.css.cjs.js +0 -1
  108. package/dist/components/feedback/Banner/Banner.cjs.js +0 -1
  109. package/dist/components/feedback/Banner/Banner.module.css.cjs.js +0 -1
  110. package/dist/components/feedback/ErrorSummary/ErrorSummary.cjs.js +0 -1
  111. package/dist/components/feedback/ErrorSummary/ErrorSummary.module.css.cjs.js +0 -1
  112. package/dist/components/feedback/Progress/Progress.cjs.js +0 -1
  113. package/dist/components/feedback/Progress/Progress.module.css.cjs.js +0 -1
  114. package/dist/components/feedback/Skeleton/Skeleton.cjs.js +0 -1
  115. package/dist/components/feedback/Skeleton/Skeleton.module.css.cjs.js +0 -1
  116. package/dist/components/feedback/Spinner/Spinner.cjs.js +0 -1
  117. package/dist/components/feedback/Spinner/Spinner.module.css.cjs.js +0 -1
  118. package/dist/components/feedback/Toast/Toast.cjs.js +0 -1
  119. package/dist/components/feedback/Toast/Toast.module.css.cjs.js +0 -1
  120. package/dist/components/feedback/Toast/Toast.storyHelpers.d.ts +0 -21
  121. package/dist/components/feedback/Toast/ToastItem.cjs.js +0 -1
  122. package/dist/components/feedback/Toast/ToastItem.d.ts +0 -18
  123. package/dist/components/feedback/Toast/ToastProvider.cjs.js +0 -1
  124. package/dist/components/feedback/Toast/ToastViewport.cjs.js +0 -1
  125. package/dist/components/feedback/Toast/ToastViewport.d.ts +0 -25
  126. package/dist/components/feedback/Toast/toastStore.cjs.js +0 -1
  127. package/dist/components/feedback/Toast/toastTiming.cjs.js +0 -1
  128. package/dist/components/feedback/Toast/toastTypes.d.ts +0 -136
  129. package/dist/components/feedback/Toast/useToast.cjs.js +0 -1
  130. package/dist/components/feedback/Toast/useToastAnnouncer.cjs.js +0 -1
  131. package/dist/components/feedback/Toast/useToastAnnouncer.d.ts +0 -15
  132. package/dist/components/forms/CheckBox/CheckBox.cjs.js +0 -1
  133. package/dist/components/forms/CheckBox/CheckBox.d.ts +0 -87
  134. package/dist/components/forms/CheckBox/CheckBox.module.css.cjs.js +0 -1
  135. package/dist/components/forms/ColorPicker/ColorInput.cjs.js +0 -1
  136. package/dist/components/forms/ColorPicker/ColorInput.d.ts +0 -38
  137. package/dist/components/forms/ColorPicker/ColorPicker.cjs.js +0 -1
  138. package/dist/components/forms/ColorPicker/ColorPicker.d.ts +0 -129
  139. package/dist/components/forms/ColorPicker/ColorPicker.module.css.cjs.js +0 -1
  140. package/dist/components/forms/ColorPicker/colorUtils.cjs.js +0 -1
  141. package/dist/components/forms/ColorPicker/colorUtils.d.ts +0 -86
  142. package/dist/components/forms/Combobox/Combobox.cjs.js +0 -1
  143. package/dist/components/forms/Combobox/Combobox.d.ts +0 -172
  144. package/dist/components/forms/Combobox/Combobox.module.css.cjs.js +0 -1
  145. package/dist/components/forms/Combobox/ComboboxPopup.cjs.js +0 -1
  146. package/dist/components/forms/Combobox/ComboboxPopup.d.ts +0 -40
  147. package/dist/components/forms/Combobox/comboboxUtils.cjs.js +0 -1
  148. package/dist/components/forms/Combobox/comboboxUtils.d.ts +0 -73
  149. package/dist/components/forms/DatePicker/Calendar.cjs.js +0 -1
  150. package/dist/components/forms/DatePicker/Calendar.d.ts +0 -98
  151. package/dist/components/forms/DatePicker/Calendar.module.css.cjs.js +0 -1
  152. package/dist/components/forms/DatePicker/DatePicker.cjs.js +0 -1
  153. package/dist/components/forms/DatePicker/DatePicker.d.ts +0 -100
  154. package/dist/components/forms/DatePicker/DatePicker.module.css.cjs.js +0 -1
  155. package/dist/components/forms/DatePicker/DateRangePicker.cjs.js +0 -1
  156. package/dist/components/forms/DatePicker/DateRangePicker.d.ts +0 -124
  157. package/dist/components/forms/DatePicker/DateRangePicker.module.css.cjs.js +0 -1
  158. package/dist/components/forms/DatePicker/dateUtils.cjs.js +0 -1
  159. package/dist/components/forms/DatePicker/dateUtils.d.ts +0 -88
  160. package/dist/components/forms/DateTimePicker/DateTimePicker.cjs.js +0 -1
  161. package/dist/components/forms/DateTimePicker/DateTimePicker.d.ts +0 -101
  162. package/dist/components/forms/DateTimePicker/DateTimePicker.module.css.cjs.js +0 -1
  163. package/dist/components/forms/Field/Field.cjs.js +0 -1
  164. package/dist/components/forms/Field/Field.d.ts +0 -171
  165. package/dist/components/forms/Field/Field.module.css.cjs.js +0 -1
  166. package/dist/components/forms/Field/FieldContext.cjs.js +0 -1
  167. package/dist/components/forms/Field/FieldContext.d.ts +0 -74
  168. package/dist/components/forms/FileUpload/FileUpload.cjs.js +0 -1
  169. package/dist/components/forms/FileUpload/FileUpload.d.ts +0 -153
  170. package/dist/components/forms/FileUpload/FileUpload.module.css.cjs.js +0 -1
  171. package/dist/components/forms/Input/Input.cjs.js +0 -1
  172. package/dist/components/forms/Input/Input.d.ts +0 -98
  173. package/dist/components/forms/Input/Input.module.css.cjs.js +0 -1
  174. package/dist/components/forms/NumberInput/NumberInput.cjs.js +0 -1
  175. package/dist/components/forms/NumberInput/NumberInput.d.ts +0 -87
  176. package/dist/components/forms/NumberInput/NumberInput.module.css.cjs.js +0 -1
  177. package/dist/components/forms/PasswordInput/PasswordInput.cjs.js +0 -1
  178. package/dist/components/forms/PasswordInput/PasswordInput.d.ts +0 -117
  179. package/dist/components/forms/PasswordInput/PasswordInput.module.css.cjs.js +0 -1
  180. package/dist/components/forms/PinInput/PinInput.cjs.js +0 -1
  181. package/dist/components/forms/PinInput/PinInput.d.ts +0 -92
  182. package/dist/components/forms/PinInput/PinInput.module.css.cjs.js +0 -1
  183. package/dist/components/forms/Radio/Radio.cjs.js +0 -1
  184. package/dist/components/forms/Radio/Radio.d.ts +0 -119
  185. package/dist/components/forms/Radio/Radio.module.css.cjs.js +0 -1
  186. package/dist/components/forms/Rating/Rating.cjs.js +0 -1
  187. package/dist/components/forms/Rating/Rating.d.ts +0 -128
  188. package/dist/components/forms/Rating/Rating.module.css.cjs.js +0 -1
  189. package/dist/components/forms/SearchInput/SearchInput.cjs.js +0 -1
  190. package/dist/components/forms/SearchInput/SearchInput.d.ts +0 -124
  191. package/dist/components/forms/SearchInput/SearchInput.module.css.cjs.js +0 -1
  192. package/dist/components/forms/SegmentedControl/SegmentedControl.cjs.js +0 -1
  193. package/dist/components/forms/SegmentedControl/SegmentedControl.d.ts +0 -120
  194. package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.cjs.js +0 -1
  195. package/dist/components/forms/Select/Select.cjs.js +0 -1
  196. package/dist/components/forms/Select/Select.d.ts +0 -86
  197. package/dist/components/forms/Select/Select.module.css.cjs.js +0 -1
  198. package/dist/components/forms/Slider/Slider.cjs.js +0 -1
  199. package/dist/components/forms/Slider/Slider.d.ts +0 -84
  200. package/dist/components/forms/Slider/Slider.module.css.cjs.js +0 -1
  201. package/dist/components/forms/Switch/Switch.cjs.js +0 -1
  202. package/dist/components/forms/Switch/Switch.d.ts +0 -62
  203. package/dist/components/forms/Switch/Switch.module.css.cjs.js +0 -1
  204. package/dist/components/forms/TagInput/TagInput.cjs.js +0 -1
  205. package/dist/components/forms/TagInput/TagInput.d.ts +0 -144
  206. package/dist/components/forms/TagInput/TagInput.module.css.cjs.js +0 -1
  207. package/dist/components/forms/Textarea/Textarea.cjs.js +0 -1
  208. package/dist/components/forms/Textarea/Textarea.d.ts +0 -62
  209. package/dist/components/forms/Textarea/Textarea.module.css.cjs.js +0 -1
  210. package/dist/components/forms/TimePicker/TimePicker.cjs.js +0 -1
  211. package/dist/components/forms/TimePicker/TimePicker.d.ts +0 -116
  212. package/dist/components/forms/TimePicker/TimePicker.module.css.cjs.js +0 -1
  213. package/dist/components/forms/TimePicker/timeUtils.cjs.js +0 -1
  214. package/dist/components/forms/TimePicker/timeUtils.d.ts +0 -26
  215. package/dist/components/forms/ToggleGroup/ToggleGroup.cjs.js +0 -1
  216. package/dist/components/forms/ToggleGroup/ToggleGroup.d.ts +0 -153
  217. package/dist/components/forms/ToggleGroup/ToggleGroup.module.css.cjs.js +0 -1
  218. package/dist/components/layout/Box/Box.cjs.js +0 -1
  219. package/dist/components/layout/Box/Box.module.css.cjs.js +0 -1
  220. package/dist/components/layout/Container/Container.cjs.js +0 -1
  221. package/dist/components/layout/Container/Container.module.css.cjs.js +0 -1
  222. package/dist/components/layout/Divider/Divider.cjs.js +0 -1
  223. package/dist/components/layout/Divider/Divider.module.css.cjs.js +0 -1
  224. package/dist/components/layout/Flex/Flex.cjs.js +0 -1
  225. package/dist/components/layout/Flex/Flex.module.css.cjs.js +0 -1
  226. package/dist/components/layout/Grid/Grid.cjs.js +0 -1
  227. package/dist/components/layout/Grid/Grid.module.css.cjs.js +0 -1
  228. package/dist/components/layout/ResizablePanels/ResizablePanels.cjs.js +0 -1
  229. package/dist/components/layout/ResizablePanels/ResizablePanels.module.css.cjs.js +0 -1
  230. package/dist/components/layout/ScrollArea/ScrollArea.cjs.js +0 -1
  231. package/dist/components/layout/ScrollArea/ScrollArea.module.css.cjs.js +0 -1
  232. package/dist/components/layout/Stack/Stack.cjs.js +0 -1
  233. package/dist/components/layout/Stack/Stack.module.css.cjs.js +0 -1
  234. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.cjs.js +0 -1
  235. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.module.css.cjs.js +0 -1
  236. package/dist/components/navigation/ContextMenu/ContextMenu.cjs.js +0 -1
  237. package/dist/components/navigation/ContextMenu/ContextMenu.module.css.cjs.js +0 -1
  238. package/dist/components/navigation/Link/Link.cjs.js +0 -1
  239. package/dist/components/navigation/Link/Link.module.css.cjs.js +0 -1
  240. package/dist/components/navigation/Menu/Menu.cjs.js +0 -1
  241. package/dist/components/navigation/Menu/Menu.module.css.cjs.js +0 -1
  242. package/dist/components/navigation/Menu/MenuContent.cjs.js +0 -1
  243. package/dist/components/navigation/Menu/MenuContent.d.ts +0 -46
  244. package/dist/components/navigation/Menu/MenuContext.cjs.js +0 -1
  245. package/dist/components/navigation/Menu/MenuContext.d.ts +0 -84
  246. package/dist/components/navigation/Menu/MenuItem.cjs.js +0 -1
  247. package/dist/components/navigation/Menu/MenuItem.d.ts +0 -133
  248. package/dist/components/navigation/Menu/MenuSub.cjs.js +0 -1
  249. package/dist/components/navigation/Menu/MenuSub.d.ts +0 -28
  250. package/dist/components/navigation/Menu/useMenuRoot.cjs.js +0 -1
  251. package/dist/components/navigation/Menu/useMenuRoot.d.ts +0 -14
  252. package/dist/components/navigation/Navbar/Navbar.cjs.js +0 -1
  253. package/dist/components/navigation/Navbar/Navbar.module.css.cjs.js +0 -1
  254. package/dist/components/navigation/Pagination/Pagination.cjs.js +0 -1
  255. package/dist/components/navigation/Pagination/Pagination.d.ts +0 -97
  256. package/dist/components/navigation/Pagination/Pagination.module.css.cjs.js +0 -1
  257. package/dist/components/navigation/Sidebar/Sidebar.cjs.js +0 -1
  258. package/dist/components/navigation/Sidebar/Sidebar.module.css.cjs.js +0 -1
  259. package/dist/components/navigation/Sidebar/Sidebar.storyHelpers.d.ts +0 -27
  260. package/dist/components/navigation/Sidebar/SidebarContext.cjs.js +0 -1
  261. package/dist/components/navigation/Sidebar/SidebarContext.d.ts +0 -45
  262. package/dist/components/navigation/Sidebar/SidebarParts.cjs.js +0 -1
  263. package/dist/components/navigation/Sidebar/SidebarParts.d.ts +0 -179
  264. package/dist/components/navigation/SkipLink/SkipLink.cjs.js +0 -1
  265. package/dist/components/navigation/SkipLink/SkipLink.d.ts +0 -41
  266. package/dist/components/navigation/SkipLink/SkipLink.module.css.cjs.js +0 -1
  267. package/dist/components/navigation/Stepper/Stepper.cjs.js +0 -1
  268. package/dist/components/navigation/Stepper/Stepper.module.css.cjs.js +0 -1
  269. package/dist/components/navigation/Tabs/Tabs.cjs.js +0 -1
  270. package/dist/components/navigation/Tabs/Tabs.d.ts +0 -132
  271. package/dist/components/navigation/Tabs/Tabs.module.css.cjs.js +0 -1
  272. package/dist/components/overlays/CommandPalette/CommandPalette.cjs.js +0 -1
  273. package/dist/components/overlays/CommandPalette/CommandPalette.module.css.cjs.js +0 -1
  274. package/dist/components/overlays/CommandPalette/CommandPaletteContext.cjs.js +0 -1
  275. package/dist/components/overlays/CommandPalette/CommandPaletteContext.d.ts +0 -96
  276. package/dist/components/overlays/CommandPalette/CommandPaletteParts.cjs.js +0 -1
  277. package/dist/components/overlays/CommandPalette/CommandPaletteParts.d.ts +0 -115
  278. package/dist/components/overlays/CommandPalette/commandPaletteUtils.cjs.js +0 -1
  279. package/dist/components/overlays/CommandPalette/commandPaletteUtils.d.ts +0 -50
  280. package/dist/components/overlays/Drawer/Drawer.cjs.js +0 -1
  281. package/dist/components/overlays/Drawer/Drawer.module.css.cjs.js +0 -1
  282. package/dist/components/overlays/Drawer/Drawer.storyHelpers.d.ts +0 -16
  283. package/dist/components/overlays/Drawer/DrawerContent.cjs.js +0 -1
  284. package/dist/components/overlays/Drawer/DrawerContent.d.ts +0 -27
  285. package/dist/components/overlays/Drawer/DrawerContext.cjs.js +0 -1
  286. package/dist/components/overlays/Drawer/DrawerContext.d.ts +0 -39
  287. package/dist/components/overlays/Drawer/DrawerParts.cjs.js +0 -1
  288. package/dist/components/overlays/Drawer/DrawerParts.d.ts +0 -65
  289. package/dist/components/overlays/Drawer/internal.cjs.js +0 -1
  290. package/dist/components/overlays/Drawer/internal.d.ts +0 -1
  291. package/dist/components/overlays/Drawer/useDragToClose.cjs.js +0 -1
  292. package/dist/components/overlays/Drawer/useDragToClose.d.ts +0 -28
  293. package/dist/components/overlays/HoverCard/HoverCard.cjs.js +0 -1
  294. package/dist/components/overlays/HoverCard/HoverCard.module.css.cjs.js +0 -1
  295. package/dist/components/overlays/Modal/ConfirmModal.cjs.js +0 -1
  296. package/dist/components/overlays/Modal/Modal.cjs.js +0 -1
  297. package/dist/components/overlays/Modal/Modal.module.css.cjs.js +0 -1
  298. package/dist/components/overlays/Modal/ModalContent.cjs.js +0 -1
  299. package/dist/components/overlays/Modal/ModalContent.d.ts +0 -12
  300. package/dist/components/overlays/Modal/ModalContext.cjs.js +0 -1
  301. package/dist/components/overlays/Modal/ModalContext.d.ts +0 -56
  302. package/dist/components/overlays/Modal/useScrollRegion.cjs.js +0 -1
  303. package/dist/components/overlays/Modal/useScrollRegion.d.ts +0 -7
  304. package/dist/components/overlays/Popover/Popover.cjs.js +0 -1
  305. package/dist/components/overlays/Popover/Popover.module.css.cjs.js +0 -1
  306. package/dist/components/overlays/Popover/PopoverContent.cjs.js +0 -1
  307. package/dist/components/overlays/Popover/PopoverContent.d.ts +0 -41
  308. package/dist/components/overlays/Popover/PopoverContext.cjs.js +0 -1
  309. package/dist/components/overlays/Popover/PopoverContext.d.ts +0 -38
  310. package/dist/components/overlays/Tooltip/Tooltip.cjs.js +0 -1
  311. package/dist/components/overlays/Tooltip/Tooltip.module.css.cjs.js +0 -1
  312. package/dist/components/primitives/Button/Button.cjs.js +0 -1
  313. package/dist/components/primitives/Button/Button.module.css.cjs.js +0 -1
  314. package/dist/components/primitives/Icon/Icon.cjs.js +0 -1
  315. package/dist/components/primitives/Icon/Icon.module.css.cjs.js +0 -1
  316. package/dist/components/primitives/Icon/IconSvg.cjs.js +0 -1
  317. package/dist/components/primitives/Icon/IconSvg.d.ts +0 -31
  318. package/dist/components/primitives/Icon/icons.cjs.js +0 -1
  319. package/dist/components/primitives/Kbd/Kbd.cjs.js +0 -1
  320. package/dist/components/primitives/Kbd/Kbd.module.css.cjs.js +0 -1
  321. package/dist/components/primitives/Typography/Typography.cjs.js +0 -1
  322. package/dist/components/primitives/Typography/Typography.module.css.cjs.js +0 -1
  323. package/dist/components/utilities/LocaleProvider/LocaleProvider.cjs.js +0 -1
  324. package/dist/components/utilities/LocaleProvider/LocaleProvider.module.css.cjs.js +0 -1
  325. package/dist/components/utilities/Portal/Portal.cjs.js +0 -1
  326. package/dist/components/utilities/Theme/Theme.cjs.js +0 -1
  327. package/dist/components/utilities/Theme/Theme.module.css.cjs.js +0 -1
  328. package/dist/components/utilities/VisuallyHidden/VisuallyHidden.cjs.js +0 -1
  329. package/dist/components/utilities/VisuallyHidden/VisuallyHidden.module.css.cjs.js +0 -1
  330. package/dist/hooks/elementSource.cjs.js +0 -1
  331. package/dist/hooks/elementSource.d.ts +0 -16
  332. package/dist/hooks/index.d.ts +0 -21
  333. package/dist/hooks/useClipboard.cjs.js +0 -1
  334. package/dist/hooks/useClipboard.d.ts +0 -24
  335. package/dist/hooks/useControllableState.cjs.js +0 -1
  336. package/dist/hooks/useControllableState.d.ts +0 -15
  337. package/dist/hooks/useDisclosure.cjs.js +0 -1
  338. package/dist/hooks/useDisclosure.d.ts +0 -35
  339. package/dist/hooks/useDismiss.cjs.js +0 -1
  340. package/dist/hooks/useDismiss.d.ts +0 -33
  341. package/dist/hooks/useElementObservers.cjs.js +0 -1
  342. package/dist/hooks/useElementObservers.d.ts +0 -70
  343. package/dist/hooks/useEnvironment.cjs.js +0 -1
  344. package/dist/hooks/useEnvironment.d.ts +0 -42
  345. package/dist/hooks/useFloatingPosition.cjs.js +0 -1
  346. package/dist/hooks/useFloatingPosition.d.ts +0 -55
  347. package/dist/hooks/useFocusTrap.cjs.js +0 -1
  348. package/dist/hooks/useFocusTrap.d.ts +0 -52
  349. package/dist/hooks/useFormReset.cjs.js +0 -1
  350. package/dist/hooks/useFormReset.d.ts +0 -17
  351. package/dist/hooks/useFormValidation.cjs.js +0 -1
  352. package/dist/hooks/useFormValidation.d.ts +0 -101
  353. package/dist/hooks/useHotkeys.cjs.js +0 -1
  354. package/dist/hooks/useHotkeys.d.ts +0 -50
  355. package/dist/hooks/useInertOutside.cjs.js +0 -1
  356. package/dist/hooks/useInertOutside.d.ts +0 -23
  357. package/dist/hooks/useMediaQuery.cjs.js +0 -1
  358. package/dist/hooks/useMediaQuery.d.ts +0 -11
  359. package/dist/hooks/useMergedRef.cjs.js +0 -1
  360. package/dist/hooks/useMergedRef.d.ts +0 -7
  361. package/dist/hooks/useOverlayLayer.cjs.js +0 -1
  362. package/dist/hooks/useOverlayLayer.d.ts +0 -92
  363. package/dist/hooks/useResponsiveValue.cjs.js +0 -1
  364. package/dist/hooks/useResponsiveValue.d.ts +0 -10
  365. package/dist/hooks/useScrollLock.cjs.js +0 -1
  366. package/dist/hooks/useScrollLock.d.ts +0 -4
  367. package/dist/hooks/useStorage.cjs.js +0 -1
  368. package/dist/hooks/useStorage.d.ts +0 -21
  369. package/dist/hooks/useTiming.cjs.js +0 -1
  370. package/dist/hooks/useTiming.d.ts +0 -78
  371. package/dist/hooks/useVirtualizer.cjs.js +0 -1
  372. package/dist/hooks/useVirtualizer.d.ts +0 -90
  373. package/dist/i18n/en.cjs.js +0 -1
  374. package/dist/i18n/en.d.ts +0 -3
  375. package/dist/i18n/index.d.ts +0 -4
  376. package/dist/i18n/locales/ar.d.ts +0 -3
  377. package/dist/i18n/locales/bn.d.ts +0 -3
  378. package/dist/i18n/locales/cs.d.ts +0 -3
  379. package/dist/i18n/locales/da.d.ts +0 -3
  380. package/dist/i18n/locales/de.d.ts +0 -3
  381. package/dist/i18n/locales/el.d.ts +0 -3
  382. package/dist/i18n/locales/es.d.ts +0 -3
  383. package/dist/i18n/locales/fa.d.ts +0 -3
  384. package/dist/i18n/locales/fi.d.ts +0 -3
  385. package/dist/i18n/locales/fr.d.ts +0 -3
  386. package/dist/i18n/locales/he.d.ts +0 -3
  387. package/dist/i18n/locales/hi.d.ts +0 -3
  388. package/dist/i18n/locales/hu.d.ts +0 -3
  389. package/dist/i18n/locales/id.d.ts +0 -3
  390. package/dist/i18n/locales/it.d.ts +0 -3
  391. package/dist/i18n/locales/ja.d.ts +0 -3
  392. package/dist/i18n/locales/ko.d.ts +0 -3
  393. package/dist/i18n/locales/nb.d.ts +0 -3
  394. package/dist/i18n/locales/nl.d.ts +0 -3
  395. package/dist/i18n/locales/pl.d.ts +0 -3
  396. package/dist/i18n/locales/pt-BR.d.ts +0 -3
  397. package/dist/i18n/locales/ro.d.ts +0 -3
  398. package/dist/i18n/locales/ru.d.ts +0 -3
  399. package/dist/i18n/locales/sv.d.ts +0 -3
  400. package/dist/i18n/locales/th.d.ts +0 -3
  401. package/dist/i18n/locales/tr.d.ts +0 -3
  402. package/dist/i18n/locales/uk.d.ts +0 -3
  403. package/dist/i18n/locales/ur.d.ts +0 -3
  404. package/dist/i18n/locales/vi.d.ts +0 -3
  405. package/dist/i18n/locales/zh-Hans.d.ts +0 -3
  406. package/dist/i18n/locales/zh-Hant.d.ts +0 -3
  407. package/dist/i18n/merge.cjs.js +0 -1
  408. package/dist/i18n/merge.d.ts +0 -6
  409. package/dist/i18n/plural.cjs.js +0 -1
  410. package/dist/i18n/plural.d.ts +0 -45
  411. package/dist/i18n/types.d.ts +0 -1160
  412. package/dist/index.cjs.js +0 -1
  413. package/dist/index.d.ts +0 -83
  414. package/dist/locales/ar.cjs.js +0 -1
  415. package/dist/locales/ar.d.ts +0 -6
  416. package/dist/locales/bn.cjs.js +0 -1
  417. package/dist/locales/bn.d.ts +0 -6
  418. package/dist/locales/cs.cjs.js +0 -1
  419. package/dist/locales/cs.d.ts +0 -6
  420. package/dist/locales/da.cjs.js +0 -1
  421. package/dist/locales/da.d.ts +0 -6
  422. package/dist/locales/de.cjs.js +0 -1
  423. package/dist/locales/de.d.ts +0 -6
  424. package/dist/locales/el.cjs.js +0 -1
  425. package/dist/locales/el.d.ts +0 -6
  426. package/dist/locales/es.cjs.js +0 -1
  427. package/dist/locales/es.d.ts +0 -6
  428. package/dist/locales/fa.cjs.js +0 -1
  429. package/dist/locales/fa.d.ts +0 -6
  430. package/dist/locales/fi.cjs.js +0 -1
  431. package/dist/locales/fi.d.ts +0 -6
  432. package/dist/locales/fr.cjs.js +0 -1
  433. package/dist/locales/fr.d.ts +0 -6
  434. package/dist/locales/he.cjs.js +0 -1
  435. package/dist/locales/he.d.ts +0 -6
  436. package/dist/locales/hi.cjs.js +0 -1
  437. package/dist/locales/hi.d.ts +0 -6
  438. package/dist/locales/hu.cjs.js +0 -1
  439. package/dist/locales/hu.d.ts +0 -6
  440. package/dist/locales/id.cjs.js +0 -1
  441. package/dist/locales/id.d.ts +0 -6
  442. package/dist/locales/it.cjs.js +0 -1
  443. package/dist/locales/it.d.ts +0 -6
  444. package/dist/locales/ja.cjs.js +0 -1
  445. package/dist/locales/ja.d.ts +0 -6
  446. package/dist/locales/ko.cjs.js +0 -1
  447. package/dist/locales/ko.d.ts +0 -6
  448. package/dist/locales/nb.cjs.js +0 -1
  449. package/dist/locales/nb.d.ts +0 -6
  450. package/dist/locales/nl.cjs.js +0 -1
  451. package/dist/locales/nl.d.ts +0 -6
  452. package/dist/locales/pl.cjs.js +0 -1
  453. package/dist/locales/pl.d.ts +0 -6
  454. package/dist/locales/pt-BR.cjs.js +0 -1
  455. package/dist/locales/pt-BR.d.ts +0 -6
  456. package/dist/locales/ro.cjs.js +0 -1
  457. package/dist/locales/ro.d.ts +0 -6
  458. package/dist/locales/ru.cjs.js +0 -1
  459. package/dist/locales/ru.d.ts +0 -6
  460. package/dist/locales/sv.cjs.js +0 -1
  461. package/dist/locales/sv.d.ts +0 -6
  462. package/dist/locales/th.cjs.js +0 -1
  463. package/dist/locales/th.d.ts +0 -6
  464. package/dist/locales/tr.cjs.js +0 -1
  465. package/dist/locales/tr.d.ts +0 -6
  466. package/dist/locales/uk.cjs.js +0 -1
  467. package/dist/locales/uk.d.ts +0 -6
  468. package/dist/locales/ur.cjs.js +0 -1
  469. package/dist/locales/ur.d.ts +0 -6
  470. package/dist/locales/vi.cjs.js +0 -1
  471. package/dist/locales/vi.d.ts +0 -6
  472. package/dist/locales/zh-Hans.cjs.js +0 -1
  473. package/dist/locales/zh-Hans.d.ts +0 -6
  474. package/dist/locales/zh-Hant.cjs.js +0 -1
  475. package/dist/locales/zh-Hant.d.ts +0 -6
  476. package/dist/types/common.cjs.js +0 -1
  477. package/dist/types/common.d.ts +0 -31
  478. package/dist/types/style.d.ts +0 -7
  479. package/dist/utils/announce.cjs.js +0 -1
  480. package/dist/utils/announce.d.ts +0 -1
  481. package/dist/utils/brandPalette.cjs.js +0 -3
  482. package/dist/utils/brandPalette.d.ts +0 -146
  483. package/dist/utils/clipboard.cjs.js +0 -1
  484. package/dist/utils/clipboard.d.ts +0 -6
  485. package/dist/utils/cx.cjs.js +0 -1
  486. package/dist/utils/cx.d.ts +0 -2
  487. package/dist/utils/fillSlot.cjs.js +0 -1
  488. package/dist/utils/fillSlot.d.ts +0 -9
  489. package/dist/utils/flattenChildren.cjs.js +0 -1
  490. package/dist/utils/flattenChildren.d.ts +0 -8
  491. package/dist/utils/hotkeys.cjs.js +0 -1
  492. package/dist/utils/hotkeys.d.ts +0 -27
  493. package/dist/utils/index.d.ts +0 -11
  494. package/dist/utils/intl.cjs.js +0 -1
  495. package/dist/utils/intl.d.ts +0 -10
  496. package/dist/utils/refs.cjs.js +0 -1
  497. package/dist/utils/refs.d.ts +0 -15
  498. package/dist/utils/responsive.cjs.js +0 -1
  499. package/dist/utils/responsive.d.ts +0 -43
  500. package/dist/utils/slot.cjs.js +0 -1
  501. package/dist/utils/slot.d.ts +0 -11
  502. package/dist/utils/validators.cjs.js +0 -1
  503. package/dist/utils/validators.d.ts +0 -72
@@ -1,65 +1,65 @@
1
1
  "use client";
2
- import { useMergedRef as e } from "../../../hooks/useMergedRef.mjs";
3
- import { cx as t } from "../../../utils/cx.mjs";
4
- import { useControllableState as n } from "../../../hooks/useControllableState.mjs";
5
- import { ChevronDownIcon as r, MinusIcon as i, PlusIcon as a } from "../../primitives/Icon/icons.mjs";
6
- import o from "./Accordion.module.css.mjs";
7
- import { createContext as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
2
+ import { useCollapsePresence as e } from "../../../hooks/useCollapsePresence.mjs";
3
+ import { useMergedRef as t } from "../../../hooks/useMergedRef.mjs";
4
+ import { cx as n } from "../../../utils/cx.mjs";
5
+ import { useControllableState as r } from "../../../hooks/useControllableState.mjs";
6
+ import { ChevronDownIcon as i, MinusIcon as a, PlusIcon as o } from "../../primitives/Icon/icons.mjs";
7
+ import s from "./Accordion.module.css.mjs";
8
+ import { createContext as c, isValidElement as l, useCallback as u, useContext as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
8
9
  import { jsx as _, jsxs as v } from "react/jsx-runtime";
9
- import { flushSync as y } from "react-dom";
10
10
  // src/components/data-display/Accordion/Accordion.tsx
11
- var b = 6, x = {
12
- separated: o.separated,
13
- contained: o.contained,
14
- flush: o.flush
11
+ var y = 6, b = {
12
+ separated: s.separated,
13
+ contained: s.contained,
14
+ flush: s.flush
15
+ }, x = {
16
+ sm: s.sm,
17
+ md: s.md,
18
+ lg: s.lg
15
19
  }, S = {
16
- sm: o.sm,
17
- md: o.md,
18
- lg: o.lg
20
+ start: s.iconStart,
21
+ end: s.iconEnd
19
22
  }, C = {
20
- start: o.iconStart,
21
- end: o.iconEnd
22
- }, w = {
23
23
  sm: "sm",
24
24
  md: "md",
25
25
  lg: "md"
26
- }, T = s(null);
27
- function E(e) {
28
- let t = u(T);
26
+ }, w = c(null);
27
+ function T(e) {
28
+ let t = d(w);
29
29
  if (!t) throw Error(`<${e}> must be used inside <Accordion>.`);
30
30
  return t;
31
31
  }
32
- var D = s(null);
33
- function O(e) {
34
- let t = u(D);
32
+ var E = c(null);
33
+ function D(e) {
34
+ let t = d(E);
35
35
  if (!t) throw Error(`<${e}> must be used inside <Accordion.Item>.`);
36
36
  return t;
37
37
  }
38
- var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
39
- let { type: i = "single", collapsible: a = !0, value: s, defaultValue: c, onValueChange: u, variant: d = "separated", size: f = "md", headingLevel: p = 3, icon: v = "chevron", iconPosition: y = "end", keyboardNavigation: b = !0, regionRole: w = "auto", forceMount: E = !1, hiddenUntilFound: D = !1, disabled: O = !1, className: A, children: j, ref: M, ...N } = r, P = i === "multiple", [F, I] = n({
40
- value: s,
38
+ var O = (e) => Array.isArray(e) ? e : e == null ? [] : [e], k = (e) => {
39
+ let { type: i = "single", collapsible: a = !0, value: o, defaultValue: c, onValueChange: l, variant: d = "separated", size: f = "md", headingLevel: p = 3, icon: v = "chevron", iconPosition: y = "end", keyboardNavigation: C = !0, regionRole: T = "auto", forceMount: E = !1, hiddenUntilFound: D = !1, disabled: k = !1, className: A, children: j, ref: M, ...N } = e, P = i === "multiple", [F, I] = r({
40
+ value: o,
41
41
  defaultValue: c ?? (P ? [] : null),
42
- onChange: u
43
- }), L = m(() => k(F), [F]), R = l((e, t) => {
42
+ onChange: l
43
+ }), L = m(() => O(F), [F]), R = u((e, t) => {
44
44
  I((n) => {
45
- let r = k(n);
45
+ let r = O(n);
46
46
  return t === r.includes(e) ? n : P ? t ? [...r, e] : r.filter((t) => t !== e) : t ? e : a ? null : n;
47
47
  });
48
48
  }, [
49
49
  I,
50
50
  P,
51
51
  a
52
- ]), z = l((e) => R(e, !L.includes(e)), [R, L]), [B, V] = g(0), H = l(() => (V((e) => e + 1), () => V((e) => e - 1)), []), U = w === "auto" ? B <= 6 : w, W = h(null), G = e(M, W), K = m(() => ({
52
+ ]), z = u((e) => R(e, !L.includes(e)), [R, L]), [B, V] = g(0), H = u(() => (V((e) => e + 1), () => V((e) => e - 1)), []), U = T === "auto" ? B <= 6 : T, W = h(null), G = t(M, W), K = m(() => ({
53
53
  rootRef: W,
54
54
  openValues: L,
55
55
  multiple: P,
56
56
  collapsible: P ? !0 : a,
57
- disabled: O,
57
+ disabled: k,
58
58
  headingLevel: p,
59
59
  size: f,
60
60
  icon: v,
61
61
  iconPosition: y,
62
- keyboardNavigation: b,
62
+ keyboardNavigation: C,
63
63
  isRegion: U,
64
64
  forceMount: E,
65
65
  hiddenUntilFound: D,
@@ -70,12 +70,12 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
70
70
  L,
71
71
  P,
72
72
  a,
73
- O,
73
+ k,
74
74
  p,
75
75
  f,
76
76
  v,
77
77
  y,
78
- b,
78
+ C,
79
79
  U,
80
80
  E,
81
81
  D,
@@ -83,21 +83,21 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
83
83
  R,
84
84
  H
85
85
  ]);
86
- return /* @__PURE__ */ _(T.Provider, {
86
+ return /* @__PURE__ */ _(w.Provider, {
87
87
  value: K,
88
88
  children: /* @__PURE__ */ _("div", {
89
89
  ...N,
90
90
  ref: G,
91
91
  "data-accordion-root": "",
92
92
  "data-orientation": "vertical",
93
- className: t(o.root, x[d], S[f], C[y], A),
93
+ className: n(s.root, b[d], x[f], S[y], A),
94
94
  children: j
95
95
  })
96
96
  });
97
- }, j = ({ value: e, disabled: n = !1, headingLevel: r, className: i, children: a, ...s }) => {
98
- let c = E("Accordion.Item"), l = f(), [u, d] = g(), [h, v] = g(), { registerItem: y } = c;
97
+ }, A = ({ value: e, disabled: t = !1, headingLevel: r, className: i, children: a, ...o }) => {
98
+ let c = T("Accordion.Item"), l = f(), [u, d] = g(), [h, v] = g(), { registerItem: y } = c;
99
99
  p(() => y(), [y]);
100
- let b = c.openValues.includes(e), x = c.disabled || n, S = m(() => ({
100
+ let b = c.openValues.includes(e), x = c.disabled || t, S = m(() => ({
101
101
  value: e,
102
102
  open: b,
103
103
  disabled: x,
@@ -116,36 +116,36 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
116
116
  h,
117
117
  l
118
118
  ]);
119
- return /* @__PURE__ */ _(D.Provider, {
119
+ return /* @__PURE__ */ _(E.Provider, {
120
120
  value: S,
121
121
  children: /* @__PURE__ */ _("div", {
122
- ...s,
122
+ ...o,
123
123
  "data-state": b ? "open" : "closed",
124
124
  "data-disabled": x ? "" : void 0,
125
- className: t(o.item, i),
125
+ className: n(s.item, i),
126
126
  children: a
127
127
  })
128
128
  });
129
- }, M = ({ size: e }) => /* @__PURE__ */ _(r, {
129
+ }, j = ({ size: e }) => /* @__PURE__ */ _(i, {
130
130
  size: e,
131
- className: o.rotating
132
- }), N = ({ size: e }) => /* @__PURE__ */ v("span", {
133
- className: o.plusMinus,
134
- children: [/* @__PURE__ */ _(a, {
131
+ className: s.rotating
132
+ }), M = ({ size: e }) => /* @__PURE__ */ v("span", {
133
+ className: s.plusMinus,
134
+ children: [/* @__PURE__ */ _(o, {
135
135
  size: e,
136
- className: o.plus
137
- }), /* @__PURE__ */ _(i, {
136
+ className: s.plus
137
+ }), /* @__PURE__ */ _(a, {
138
138
  size: e,
139
- className: o.minus
139
+ className: s.minus
140
140
  })]
141
- }), P = ({ children: e, description: n, startIcon: r, badge: i, headingClassName: a, className: s, id: l, onClick: u, onKeyDown: d, disabled: m, ...h }) => {
142
- let g = E("Accordion.Trigger"), y = O("Accordion.Trigger"), b = f(), x = `${b}-title`, S = `${b}-description`, C = `${b}-badge`, { setTriggerId: T } = y;
141
+ }), N = ({ children: e, description: t, startIcon: r, badge: i, headingClassName: a, className: o, id: c, onClick: u, onKeyDown: d, disabled: m, ...h }) => {
142
+ let g = T("Accordion.Trigger"), y = D("Accordion.Trigger"), b = f(), x = `${b}-title`, S = `${b}-description`, w = `${b}-badge`, { setTriggerId: E } = y;
143
143
  p(() => {
144
- T(l);
145
- }, [l, T]);
146
- let D = y.disabled || !!m, k = y.open && !g.collapsible, A = (e) => {
147
- u?.(e), e.defaultPrevented || D || k || g.toggle(y.value);
148
- }, j = (e) => {
144
+ E(c);
145
+ }, [c, E]);
146
+ let O = y.disabled || !!m, k = y.open && !g.collapsible, A = (e) => {
147
+ u?.(e), e.defaultPrevented || O || k || g.toggle(y.value);
148
+ }, N = (e) => {
149
149
  if (d?.(e), e.defaultPrevented || !g.keyboardNavigation || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
150
150
  let t = g.rootRef.current;
151
151
  if (!t) return;
@@ -168,160 +168,91 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
168
168
  default: return;
169
169
  }
170
170
  e.preventDefault(), n[i]?.focus();
171
- }, P = w[g.size], { icon: F } = g, I = null;
172
- F === "chevron" ? I = /* @__PURE__ */ _(M, { size: P }) : F === "plus-minus" ? I = /* @__PURE__ */ _(N, { size: P }) : typeof F == "function" ? I = F({
171
+ }, P = C[g.size], { icon: F } = g, I = null;
172
+ F === "chevron" ? I = /* @__PURE__ */ _(j, { size: P }) : F === "plus-minus" ? I = /* @__PURE__ */ _(M, { size: P }) : typeof F == "function" ? I = F({
173
173
  open: y.open,
174
- disabled: D
175
- }) : c(F) && (I = /* @__PURE__ */ _("span", {
176
- className: o.rotating,
174
+ disabled: O
175
+ }) : l(F) && (I = /* @__PURE__ */ _("span", {
176
+ className: s.rotating,
177
177
  children: F
178
178
  }));
179
179
  let L = F === "none" || I == null ? null : /* @__PURE__ */ _("span", {
180
- className: o.indicator,
180
+ className: s.indicator,
181
181
  "aria-hidden": "true",
182
182
  children: I
183
- }), R = i != null && i !== !1, z = n != null && n !== !1 && n !== "", B = `h${y.headingLevel}`;
183
+ }), R = i != null && i !== !1, z = t != null && t !== !1 && t !== "", B = `h${y.headingLevel}`;
184
184
  return /* @__PURE__ */ _(B, {
185
- className: t(o.heading, a),
185
+ className: n(s.heading, a),
186
186
  children: /* @__PURE__ */ v("button", {
187
- "aria-labelledby": R ? `${x} ${C}` : x,
187
+ "aria-labelledby": R ? `${x} ${w}` : x,
188
188
  "aria-describedby": z ? S : void 0,
189
189
  ...h,
190
190
  type: "button",
191
191
  id: y.triggerId,
192
192
  "data-accordion-trigger": "",
193
193
  "data-state": y.open ? "open" : "closed",
194
- "data-disabled": D ? "" : void 0,
194
+ "data-disabled": O ? "" : void 0,
195
195
  "aria-expanded": y.open,
196
196
  "aria-controls": y.contentId,
197
- "aria-disabled": k && !D ? !0 : void 0,
198
- disabled: D,
199
- className: t(o.trigger, k && o.locked, s),
197
+ "aria-disabled": k && !O ? !0 : void 0,
198
+ disabled: O,
199
+ className: n(s.trigger, k && s.locked, o),
200
200
  onClick: A,
201
- onKeyDown: j,
201
+ onKeyDown: N,
202
202
  children: [
203
203
  g.iconPosition === "start" && L,
204
204
  r != null && /* @__PURE__ */ _("span", {
205
- className: o.startIcon,
205
+ className: s.startIcon,
206
206
  "aria-hidden": "true",
207
207
  children: r
208
208
  }),
209
209
  /* @__PURE__ */ v("span", {
210
- className: o.text,
210
+ className: s.text,
211
211
  children: [/* @__PURE__ */ _("span", {
212
212
  id: x,
213
- className: o.title,
213
+ className: s.title,
214
214
  children: e
215
215
  }), z && /* @__PURE__ */ _("span", {
216
216
  id: S,
217
- className: o.description,
218
- children: n
217
+ className: s.description,
218
+ children: t
219
219
  })]
220
220
  }),
221
221
  R && /* @__PURE__ */ _("span", {
222
- id: C,
223
- className: o.badge,
222
+ id: w,
223
+ className: s.badge,
224
224
  children: i
225
225
  }),
226
226
  g.iconPosition === "end" && L
227
227
  ]
228
228
  })
229
229
  });
230
- };
231
- function F(e) {
232
- let t = getComputedStyle(e), n = (e) => e.split(",").map((e) => {
233
- let t = parseFloat(e);
234
- return Number.isNaN(t) ? 0 : e.trim().endsWith("ms") ? t : t * 1e3;
235
- }), r = n(t.transitionDuration), i = n(t.transitionDelay);
236
- return Math.max(0, ...r.map((e, t) => e + (i[t] ?? i[0] ?? 0)));
237
- }
238
- var I = () => typeof document < "u" && !!document.body && "onbeforematch" in document.body, L = ({ forceMount: n, hiddenUntilFound: r, bodyClassName: i, className: a, children: s, id: c, ref: l, ...u }) => {
239
- let f = E("Accordion.Content"), m = O("Accordion.Content"), v = n ?? f.forceMount, b = r ?? f.hiddenUntilFound, { setContentId: x } = m;
240
- p(() => {
241
- x(c);
242
- }, [c, x]);
243
- let S = m.open, C = h(null), w = e(l, C), [T, D] = g(S), [k, A] = g(S), [j, M] = g(!1), N = h(!1);
230
+ }, P = ({ forceMount: r, hiddenUntilFound: i, bodyClassName: a, className: o, children: c, id: l, ref: u, ...d }) => {
231
+ let f = T("Accordion.Content"), m = D("Accordion.Content"), h = r ?? f.forceMount, g = i ?? f.hiddenUntilFound, { setContentId: v } = m;
244
232
  p(() => {
245
- if (S) {
246
- if (N.current) {
247
- N.current = !1, M(!0), D(!0), A(!0);
248
- return;
249
- }
250
- if (!T) {
251
- D(!0);
252
- return;
253
- }
254
- k || (C.current?.getBoundingClientRect(), A(!0));
255
- } else k && A(!1);
256
- }, [
257
- S,
258
- T,
259
- k
260
- ]), d(() => {
261
- if (S || k || !T) return;
262
- let e = C.current, t = e ? F(e) : 0;
263
- if (!e || t === 0) {
264
- D(!1);
265
- return;
266
- }
267
- let n = () => D(!1), r = (t) => {
268
- t.target === e && n();
269
- };
270
- e.addEventListener("transitionend", r);
271
- let i = window.setTimeout(n, t + 50);
272
- return () => {
273
- e.removeEventListener("transitionend", r), window.clearTimeout(i);
274
- };
275
- }, [
276
- S,
277
- k,
278
- T
279
- ]), d(() => {
280
- if (!j) return;
281
- let e = requestAnimationFrame(() => M(!1));
282
- return () => cancelAnimationFrame(e);
283
- }, [j]);
284
- let [P, L] = g(!1);
285
- d(() => {
286
- L(b && I());
287
- }, [b]), p(() => {
288
- let e = C.current;
289
- e && P && !T && e.setAttribute("hidden", "until-found");
290
- }, [P, T]);
291
- let { setItemOpen: R } = f, z = m.value, B = m.disabled;
292
- d(() => {
293
- let e = C.current;
294
- if (!e || !P) return;
295
- let t = () => {
296
- B || (N.current = !0, y(() => R(z, !0)));
297
- };
298
- return e.addEventListener("beforematch", t), () => e.removeEventListener("beforematch", t);
299
- }, [
300
- P,
301
- R,
302
- z,
303
- B
304
- ]);
305
- let V = v || b || T;
233
+ v(l);
234
+ }, [l, v]);
235
+ let { setItemOpen: y } = f, b = m.value, x = e({
236
+ open: m.open,
237
+ hiddenUntilFound: g,
238
+ onFound: m.disabled ? void 0 : () => y(b, !0)
239
+ }), S = t(u, x.ref), C = h || g || x.visible;
306
240
  return /* @__PURE__ */ _("div", {
307
241
  role: f.isRegion ? "region" : void 0,
308
242
  "aria-labelledby": m.triggerId,
309
- ...u,
310
- ref: w,
243
+ ...d,
244
+ ref: S,
311
245
  id: m.contentId,
312
- "data-state": k ? "open" : "closed",
313
- "data-instant": j ? "" : void 0,
314
- hidden: !T,
315
- inert: T && !k ? !0 : void 0,
316
- className: t(o.content, a),
246
+ ...x.panelProps,
247
+ className: n(s.content, o),
317
248
  children: /* @__PURE__ */ _("div", {
318
- className: o.clip,
249
+ className: s.clip,
319
250
  children: /* @__PURE__ */ _("div", {
320
- className: t(o.body, i),
321
- children: V ? s : null
251
+ className: n(s.body, a),
252
+ children: C ? c : null
322
253
  })
323
254
  })
324
255
  });
325
- }, R = A;
326
- R.Item = j, R.Trigger = P, R.Content = L;
327
- export { b as ACCORDION_AUTO_REGION_MAX, R as Accordion, L as AccordionContent, j as AccordionItem, P as AccordionTrigger };
256
+ }, F = k;
257
+ F.Item = A, F.Trigger = N, F.Content = P;
258
+ export { y as ACCORDION_AUTO_REGION_MAX, F as Accordion, P as AccordionContent, A as AccordionItem, N as AccordionTrigger };
@@ -67,8 +67,19 @@ export interface ChatProps extends Omit<ComponentPropsWithRef<"section">, "child
67
67
  emptyState?: ReactNode;
68
68
  /**
69
69
  * Renders a message's content, e.g. through your Markdown renderer.
70
- * Defaults to plain text with line breaks kept. Never render
71
- * unsanitized HTML from a model or a user.
70
+ * Defaults to plain text with line breaks kept, which is always safe.
71
+ *
72
+ * **Security:** treat every message as untrusted, including the model's
73
+ * replies (a prompt injection can make a model write anything). When you
74
+ * render it yourself:
75
+ * - Render to React elements, not an HTML string. Don't pass content to
76
+ * `dangerouslySetInnerHTML`, and don't enable raw HTML in your Markdown
77
+ * renderer. If you must render HTML, sanitize it first (e.g. DOMPurify).
78
+ * - Allow only `http:`, `https:`, and `mailto:` link URLs (no
79
+ * `javascript:` or `data:`), and give external links
80
+ * `rel="noopener noreferrer"`.
81
+ * - Don't load remote images from message content automatically: an image
82
+ * URL can leak data from the conversation to another server.
72
83
  */
73
84
  renderContent?: (message: ChatMessage) => ReactNode;
74
85
  /** Name of the assistant, read to screen readers ("Coach said:"). Defaults to `labels.assistant`. */
@@ -0,0 +1,70 @@
1
+ import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { ButtonStyleProps } from '../../primitives/Button';
3
+ export interface CollapsibleProps extends ComponentPropsWithRef<"div"> {
4
+ /** Controlled open state. */
5
+ open?: boolean;
6
+ /** Initial open state when uncontrolled. @default false */
7
+ defaultOpen?: boolean;
8
+ /** Called with the next open state when the trigger is pressed (or find-in-page reveals the content). */
9
+ onOpenChange?: (open: boolean) => void;
10
+ /** Disables the trigger, so the section stays in its current state. @default false */
11
+ disabled?: boolean;
12
+ /** A `Collapsible.Trigger` and a `Collapsible.Content`, anywhere inside. */
13
+ children?: ReactNode;
14
+ }
15
+ /**
16
+ * A single section that shows and hides its content: the WAI-ARIA
17
+ * disclosure pattern. Unlike `Accordion`, it adds no layout or styling of its
18
+ * own, and the trigger and content can sit anywhere inside the root (e.g. a
19
+ * "Show more" button below a list).
20
+ *
21
+ * The trigger is a real `<button>` with `aria-expanded` and `aria-controls`.
22
+ * Closed content is `hidden`, so it can't be focused or read, and
23
+ * `hiddenUntilFound` lets the browser's find-in-page reveal it.
24
+ */
25
+ declare function CollapsibleRoot({ open: openProp, defaultOpen, onOpenChange, disabled, className, children, ...rest }: CollapsibleProps): import("react").JSX.Element;
26
+ export interface CollapsibleTriggerProps extends ButtonStyleProps, Omit<ComponentPropsWithRef<"button">, keyof ButtonStyleProps> {
27
+ /**
28
+ * Render your own element instead of a `Button`, passing it the trigger's
29
+ * ARIA attributes, `onClick`, and `ref`. It must be a single element that
30
+ * renders a `<button>` (or a component that forwards these props to one).
31
+ * @default false
32
+ */
33
+ asChild?: boolean;
34
+ /** Show a chevron after the label that turns when open. Ignored with `asChild`. @default true */
35
+ indicator?: boolean;
36
+ /** The visible label, or your element with `asChild`. */
37
+ children?: ReactNode;
38
+ }
39
+ /**
40
+ * The button that opens and closes the content. Renders a `Button`
41
+ * (`variant="ghost"`, `tone="neutral"` by default) with a turning chevron,
42
+ * or your own element with `asChild`.
43
+ */
44
+ declare function CollapsibleTrigger({ asChild, indicator, variant, tone, disabled: disabledProp, onClick, className, children, ref, ...rest }: CollapsibleTriggerProps): import("react").JSX.Element;
45
+ export interface CollapsibleContentProps extends ComponentPropsWithRef<"div"> {
46
+ /** Keep the children mounted while closed (still hidden), e.g. to keep form state. @default false */
47
+ forceMount?: boolean;
48
+ /**
49
+ * Use `hidden="until-found"` where supported, so the browser's
50
+ * find-in-page can search the closed content and opens it on a match.
51
+ * Keeps the children mounted. @default false
52
+ */
53
+ hiddenUntilFound?: boolean;
54
+ /** The content to show and hide. */
55
+ children?: ReactNode;
56
+ }
57
+ /**
58
+ * The content the trigger controls. Animates its height open and closed
59
+ * (instantly under `prefers-reduced-motion`), then gets the `hidden`
60
+ * attribute. Adds no padding, so it fits any layout.
61
+ */
62
+ declare function CollapsibleContent({ forceMount, hiddenUntilFound, id, className, children, ref, ...rest }: CollapsibleContentProps): import("react").JSX.Element;
63
+ type CollapsibleComponent = typeof CollapsibleRoot & {
64
+ Trigger: typeof CollapsibleTrigger;
65
+ Content: typeof CollapsibleContent;
66
+ };
67
+ /** A show/hide section (WAI-ARIA disclosure). See `CollapsibleRoot`. */
68
+ export declare const Collapsible: CollapsibleComponent;
69
+ /** Named exports, for React Server Components (which can't dot into a client module). */
70
+ export { CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import { useCollapsePresence as e } from "../../../hooks/useCollapsePresence.mjs";
3
+ import { useControllableState as t } from "../../../hooks/useControllableState.mjs";
4
+ import { useMergedRef as n } from "../../../hooks/useMergedRef.mjs";
5
+ import { cx as r } from "../../../utils/cx.mjs";
6
+ import { getChildRef as i, isSingleElement as a } from "../../../utils/refs.mjs";
7
+ import { cloneSlot as o } from "../../../utils/slot.mjs";
8
+ import { Button as s } from "../../primitives/Button/Button.mjs";
9
+ import { ChevronDownIcon as c } from "../../primitives/Icon/icons.mjs";
10
+ import l from "./Collapsible.module.css.mjs";
11
+ import { createContext as u, useContext as d, useId as f, useLayoutEffect as p, useMemo as m, useState as h } from "react";
12
+ import { jsx as g } from "react/jsx-runtime";
13
+ // src/components/data-display/Collapsible/Collapsible.tsx
14
+ var _ = u(null);
15
+ function v(e) {
16
+ let t = d(_);
17
+ if (!t) throw Error(`${e} must be used inside <Collapsible>.`);
18
+ return t;
19
+ }
20
+ function y({ open: e, defaultOpen: n = !1, onOpenChange: r, disabled: i = !1, className: a, children: o, ...s }) {
21
+ let [c, l] = t({
22
+ value: e,
23
+ defaultValue: n,
24
+ onChange: r
25
+ }), u = f(), d = f(), [p, v] = h(), y = p ?? d, b = m(() => ({
26
+ open: c,
27
+ setOpen: l,
28
+ disabled: i,
29
+ triggerId: u,
30
+ contentId: y,
31
+ setContentId: v
32
+ }), [
33
+ c,
34
+ l,
35
+ i,
36
+ u,
37
+ y
38
+ ]);
39
+ return /* @__PURE__ */ g(_.Provider, {
40
+ value: b,
41
+ children: /* @__PURE__ */ g("div", {
42
+ ...s,
43
+ "data-state": c ? "open" : "closed",
44
+ "data-disabled": i || void 0,
45
+ className: a,
46
+ children: o
47
+ })
48
+ });
49
+ }
50
+ function b({ asChild: e = !1, indicator: t = !0, variant: u = "ghost", tone: d = "neutral", disabled: f, onClick: p, className: m, children: h, ref: _, ...y }) {
51
+ let b = v("Collapsible.Trigger"), x = f ?? b.disabled, S = e && a(h) ? h : null, C = n(_, S ? i(S) : void 0), w = {
52
+ id: b.triggerId,
53
+ "aria-expanded": b.open,
54
+ "aria-controls": b.contentId,
55
+ "data-state": b.open ? "open" : "closed",
56
+ onClick: (e) => {
57
+ p?.(e), e.defaultPrevented || x || b.setOpen(!b.open);
58
+ }
59
+ };
60
+ return S ? o(S, {
61
+ ...y,
62
+ ...w,
63
+ disabled: x,
64
+ className: m
65
+ }, C) : /* @__PURE__ */ g(s, {
66
+ type: "button",
67
+ ...y,
68
+ ...w,
69
+ ref: C,
70
+ variant: u,
71
+ tone: d,
72
+ disabled: x,
73
+ className: r(l.trigger, m),
74
+ endIcon: t ? /* @__PURE__ */ g(c, { className: l.chevron }) : void 0,
75
+ children: h
76
+ });
77
+ }
78
+ function x({ forceMount: t = !1, hiddenUntilFound: i = !1, id: a, className: o, children: s, ref: c, ...u }) {
79
+ let d = v("Collapsible.Content"), { setContentId: f, setOpen: m, disabled: h } = d;
80
+ p(() => {
81
+ f(a);
82
+ }, [a, f]);
83
+ let _ = e({
84
+ open: d.open,
85
+ hiddenUntilFound: i,
86
+ onFound: h ? void 0 : () => m(!0)
87
+ }), y = n(c, _.ref), b = t || i || _.visible;
88
+ return /* @__PURE__ */ g("div", {
89
+ ...u,
90
+ ref: y,
91
+ id: d.contentId,
92
+ ..._.panelProps,
93
+ className: r(l.content, o),
94
+ children: /* @__PURE__ */ g("div", {
95
+ className: l.clip,
96
+ children: b ? s : null
97
+ })
98
+ });
99
+ }
100
+ var S = y;
101
+ S.Trigger = b, S.Content = x;
102
+ export { S as Collapsible, x as CollapsibleContent, b as CollapsibleTrigger };
@@ -0,0 +1,8 @@
1
+ // src/components/data-display/Collapsible/Collapsible.module.css
2
+ var e = "_chevron_1fs2m_13", t = "_trigger_1fs2m_21", n = "_content_1fs2m_33", r = "_clip_1fs2m_79", i = {
3
+ chevron: e,
4
+ trigger: t,
5
+ content: n,
6
+ clip: r
7
+ };
8
+ export { e as chevron, r as clip, n as content, i as default, t as trigger };
@@ -0,0 +1 @@
1
+ export * from './Collapsible';
@@ -16,6 +16,26 @@ export type ProgressSemantic = "progressbar" | "meter";
16
16
  export type ProgressFormatValue = (value: number, max: number, min: number) => string;
17
17
  /** Default formatter: a whole-number percentage of the range, e.g. `"42%"`. */
18
18
  export declare const formatProgressPercent: ProgressFormatValue;
19
+ /**
20
+ * One color band for `toneSteps`. The fill takes the `tone` of the first
21
+ * step whose `upTo` is at or above the current percentage. A step without
22
+ * `upTo` matches everything left (put it last as the catch-all).
23
+ */
24
+ export interface ProgressToneStep {
25
+ /**
26
+ * Upper bound of this band, as a percentage of the range (0 to 100),
27
+ * inclusive. Leave it out on the last step to cover the rest.
28
+ */
29
+ upTo?: number;
30
+ /** Fill color while the value is inside this band. */
31
+ tone: Tone;
32
+ }
33
+ /**
34
+ * Picks the tone for the current percentage from `toneSteps`, falling back to
35
+ * `fallback` when there are no steps, no step matches, or the value is
36
+ * indeterminate. Exported for custom indicators that want the same bands.
37
+ */
38
+ export declare function resolveProgressTone(percent: number | undefined, steps: readonly ProgressToneStep[] | undefined, fallback: Tone): Tone;
19
39
  /** Props shared by `Progress` and `CircularProgress`. */
20
40
  interface ProgressValueProps {
21
41
  /**
@@ -33,6 +53,16 @@ interface ProgressValueProps {
33
53
  * `danger`/`warning` with a `label` and `showValue` (or `valueText`).
34
54
  */
35
55
  tone?: Tone;
56
+ /**
57
+ * Change the fill color with the value. Bands are percentages of the range,
58
+ * checked in order; the first whose `upTo` is at or above the current
59
+ * percentage wins, and a step without `upTo` catches the rest. `tone` is
60
+ * used while indeterminate or when no step matches. Example:
61
+ * `[{ upTo: 40, tone: "danger" }, { upTo: 75, tone: "warning" }, { tone: "success" }]`.
62
+ * Color never carries meaning alone: also show the value or describe the
63
+ * state in `label` / `valueText`.
64
+ */
65
+ toneSteps?: readonly ProgressToneStep[];
36
66
  /**
37
67
  * Visible label. Becomes the accessible name through `aria-labelledby`.
38
68
  * Without it, pass `aria-label` (or `aria-labelledby`).
@@ -75,7 +105,7 @@ export interface ProgressProps extends ProgressValueProps, Omit<ComponentPropsWi
75
105
  * or an indeterminate sweep when `value` is not set. The root carries
76
106
  * `role="progressbar"` (or `meter`) with the ARIA range attributes.
77
107
  */
78
- export declare function Progress({ value, min, max, tone, size, radius, striped, animated, label, showValue, formatValue, valueText, semantic, buffer, className, "aria-labelledby": ariaLabelledBy, ...rest }: ProgressProps): import("react").JSX.Element;
108
+ export declare function Progress({ value, min, max, tone, toneSteps, size, radius, striped, animated, label, showValue, formatValue, valueText, semantic, buffer, className, "aria-labelledby": ariaLabelledBy, ...rest }: ProgressProps): import("react").JSX.Element;
79
109
  /** One part of a `ProgressSegments` bar. */
80
110
  export interface ProgressSegment {
81
111
  /** Amount this segment takes up, in the same units as `max`. */
@@ -146,5 +176,5 @@ export interface CircularProgressProps extends ProgressValueProps, Omit<Componen
146
176
  * slot. Determinate when `value` is set, spinning otherwise (a calm pulse
147
177
  * under `prefers-reduced-motion`).
148
178
  */
149
- export declare function CircularProgress({ value, min, max, tone, size, thickness, label, showValue, formatValue, valueText, semantic, children, className, style, "aria-labelledby": ariaLabelledBy, ...rest }: CircularProgressProps): import("react").JSX.Element;
179
+ export declare function CircularProgress({ value, min, max, tone, toneSteps, size, thickness, label, showValue, formatValue, valueText, semantic, children, className, style, "aria-labelledby": ariaLabelledBy, ...rest }: CircularProgressProps): import("react").JSX.Element;
150
180
  export {};