@leonardaustin/ui 0.24.0 → 0.26.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 (500) hide show
  1. package/README.md +183 -2
  2. package/dist/components/app-shell/AppShell.d.ts +3 -4
  3. package/dist/components/app-shell/AppShell.js +82 -0
  4. package/dist/components/app-shell/AuthLayout.d.ts +3 -4
  5. package/dist/components/app-shell/AuthLayout.js +16 -0
  6. package/dist/components/app-shell/BackLink.d.ts +3 -4
  7. package/dist/components/app-shell/BackLink.js +19 -0
  8. package/dist/components/app-shell/BottomNav.d.ts +3 -3
  9. package/dist/components/app-shell/BottomNav.js +37 -0
  10. package/dist/components/app-shell/Breadcrumbs.d.ts +3 -3
  11. package/dist/components/app-shell/Breadcrumbs.js +46 -0
  12. package/dist/components/app-shell/CommandPalette.d.ts +3 -3
  13. package/dist/components/app-shell/CommandPalette.js +119 -0
  14. package/dist/components/app-shell/MobileDrawer.d.ts +3 -4
  15. package/dist/components/app-shell/MobileDrawer.js +128 -0
  16. package/dist/components/app-shell/Sidebar.d.ts +3 -4
  17. package/dist/components/app-shell/Sidebar.js +355 -0
  18. package/dist/components/app-shell/ThemeMenu.d.ts +3 -3
  19. package/dist/components/app-shell/ThemeMenu.js +273 -0
  20. package/dist/components/app-shell/TopBar.d.ts +3 -4
  21. package/dist/components/app-shell/TopBar.js +129 -0
  22. package/dist/components/app-shell/commandPaletteEvents.d.ts +0 -1
  23. package/dist/components/app-shell/commandPaletteEvents.js +16 -0
  24. package/dist/components/app-shell/navigation.d.ts +0 -1
  25. package/dist/components/app-shell/navigation.js +21 -0
  26. package/dist/components/app-shell/themeMenuEvents.d.ts +0 -1
  27. package/dist/components/app-shell/themeMenuEvents.js +7 -0
  28. package/dist/components/app-shell/types.d.ts +0 -1
  29. package/dist/components/charts/AreaChart.d.ts +4 -4
  30. package/dist/components/charts/AreaChart.js +217 -0
  31. package/dist/components/charts/BarChart.d.ts +4 -4
  32. package/dist/components/charts/BarChart.js +91 -0
  33. package/dist/components/charts/DonutChart.d.ts +4 -4
  34. package/dist/components/charts/DonutChart.js +172 -0
  35. package/dist/components/charts/RadarChart.d.ts +4 -4
  36. package/dist/components/charts/RadarChart.js +142 -0
  37. package/dist/components/charts/RadialBarChart.d.ts +4 -4
  38. package/dist/components/charts/RadialBarChart.js +219 -0
  39. package/dist/components/charts/SparkLine.d.ts +4 -4
  40. package/dist/components/charts/SparkLine.js +39 -0
  41. package/dist/components/charts/StackedBarChart.d.ts +4 -4
  42. package/dist/components/charts/StackedBarChart.js +249 -0
  43. package/dist/components/charts/VerticalBarChart.d.ts +4 -4
  44. package/dist/components/charts/VerticalBarChart.js +143 -0
  45. package/dist/components/charts/chartUtils.d.ts +0 -1
  46. package/dist/components/charts/chartUtils.js +68 -0
  47. package/dist/components/tables/ColumnPicker.d.ts +3 -4
  48. package/dist/components/tables/ColumnPicker.js +59 -0
  49. package/dist/components/tables/Pagination.d.ts +3 -5
  50. package/dist/components/tables/Pagination.js +56 -0
  51. package/dist/components/tables/ResourceTable.d.ts +3 -4
  52. package/dist/components/tables/ResourceTable.js +88 -0
  53. package/dist/components/tables/Table.d.ts +0 -1
  54. package/dist/components/tables/Table.js +95 -0
  55. package/dist/components/tables/sortRows.d.ts +0 -1
  56. package/dist/components/tables/sortRows.js +11 -0
  57. package/dist/components/ui/Accordion.d.ts +9 -2
  58. package/dist/components/ui/Accordion.js +35 -0
  59. package/dist/components/ui/Alert.d.ts +8 -6
  60. package/dist/components/ui/Alert.js +51 -0
  61. package/dist/components/ui/AttachmentList.d.ts +5 -6
  62. package/dist/components/ui/AttachmentList.js +90 -0
  63. package/dist/components/ui/AudioPlayer.d.ts +7 -4
  64. package/dist/components/ui/AudioPlayer.js +447 -0
  65. package/dist/components/ui/AuthCard.d.ts +3 -4
  66. package/dist/components/ui/AuthCard.js +39 -0
  67. package/dist/components/ui/AuthorByline.d.ts +5 -6
  68. package/dist/components/ui/AuthorByline.js +23 -0
  69. package/dist/components/ui/Avatar.d.ts +5 -4
  70. package/dist/components/ui/Avatar.js +36 -0
  71. package/dist/components/ui/Badge.d.ts +3 -3
  72. package/dist/components/ui/Badge.js +47 -0
  73. package/dist/components/ui/Button.d.ts +9 -9
  74. package/dist/components/ui/Button.js +83 -0
  75. package/dist/components/ui/Calendar.d.ts +3 -4
  76. package/dist/components/ui/Calendar.js +344 -0
  77. package/dist/components/ui/CalendarGrid.d.ts +3 -4
  78. package/dist/components/ui/CalendarGrid.js +136 -0
  79. package/dist/components/ui/Card.d.ts +6 -6
  80. package/dist/components/ui/Card.js +53 -0
  81. package/dist/components/ui/CharacterCount.d.ts +3 -4
  82. package/dist/components/ui/CharacterCount.js +27 -0
  83. package/dist/components/ui/Checkbox.d.ts +10 -9
  84. package/dist/components/ui/Checkbox.js +52 -0
  85. package/dist/components/ui/CodeInput.d.ts +7 -5
  86. package/dist/components/ui/CodeInput.js +96 -0
  87. package/dist/components/ui/Combobox.d.ts +8 -7
  88. package/dist/components/ui/Combobox.js +213 -0
  89. package/dist/components/ui/CopyButton.d.ts +6 -2
  90. package/dist/components/ui/CopyButton.js +57 -0
  91. package/dist/components/ui/DangerZone.d.ts +3 -5
  92. package/dist/components/ui/DangerZone.js +23 -0
  93. package/dist/components/ui/DatePartsInput.d.ts +6 -5
  94. package/dist/components/ui/DatePartsInput.js +138 -0
  95. package/dist/components/ui/DatePicker.d.ts +9 -5
  96. package/dist/components/ui/DatePicker.js +84 -0
  97. package/dist/components/ui/DateRangePicker.d.ts +7 -6
  98. package/dist/components/ui/DateRangePicker.js +143 -0
  99. package/dist/components/ui/DateTimePicker.d.ts +7 -5
  100. package/dist/components/ui/DateTimePicker.js +267 -0
  101. package/dist/components/ui/DetailPanel.d.ts +3 -4
  102. package/dist/components/ui/DetailPanel.js +183 -0
  103. package/dist/components/ui/Dialog.d.ts +3 -4
  104. package/dist/components/ui/Dialog.js +411 -0
  105. package/dist/components/ui/DialogActions.d.ts +3 -4
  106. package/dist/components/ui/DialogActions.js +35 -0
  107. package/dist/components/ui/Disclosure.d.ts +7 -4
  108. package/dist/components/ui/Disclosure.js +45 -0
  109. package/dist/components/ui/DividerLabel.d.ts +3 -4
  110. package/dist/components/ui/DividerLabel.js +20 -0
  111. package/dist/components/ui/DropdownMenu.d.ts +4 -5
  112. package/dist/components/ui/DropdownMenu.js +229 -0
  113. package/dist/components/ui/EmptyState.d.ts +3 -5
  114. package/dist/components/ui/EmptyState.js +31 -0
  115. package/dist/components/ui/ErrorBoundary.d.ts +3 -3
  116. package/dist/components/ui/ErrorBoundary.js +46 -0
  117. package/dist/components/ui/FieldContext.d.ts +0 -1
  118. package/dist/components/ui/FieldContext.js +8 -0
  119. package/dist/components/ui/Fieldset.d.ts +2 -3
  120. package/dist/components/ui/Fieldset.js +39 -0
  121. package/dist/components/ui/FilterButton.d.ts +4 -9
  122. package/dist/components/ui/FilterButton.js +17 -0
  123. package/dist/components/ui/FilterDropdown.d.ts +4 -6
  124. package/dist/components/ui/FilterDropdown.js +18 -0
  125. package/dist/components/ui/FormField.d.ts +4 -5
  126. package/dist/components/ui/FormField.js +68 -0
  127. package/dist/components/ui/Grid.d.ts +1 -2
  128. package/dist/components/ui/Grid.js +19 -0
  129. package/dist/components/ui/GridItem.d.ts +1 -2
  130. package/dist/components/ui/GridItem.js +16 -0
  131. package/dist/components/ui/Inline.d.ts +1 -2
  132. package/dist/components/ui/Inline.js +24 -0
  133. package/dist/components/ui/Kbd.d.ts +3 -4
  134. package/dist/components/ui/Kbd.js +13 -0
  135. package/dist/components/ui/ListItemLink.d.ts +3 -4
  136. package/dist/components/ui/ListItemLink.js +44 -0
  137. package/dist/components/ui/LoadingSpinner.d.ts +5 -5
  138. package/dist/components/ui/LoadingSpinner.js +19 -0
  139. package/dist/components/ui/MessageBubble.d.ts +5 -3
  140. package/dist/components/ui/MessageBubble.js +41 -0
  141. package/dist/components/ui/MetadataGrid.d.ts +5 -4
  142. package/dist/components/ui/MetadataGrid.js +76 -0
  143. package/dist/components/ui/MetricCard.d.ts +3 -4
  144. package/dist/components/ui/MetricCard.js +51 -0
  145. package/dist/components/ui/NavTabs.d.ts +2 -3
  146. package/dist/components/ui/NavTabs.js +29 -0
  147. package/dist/components/ui/OAuthButton.d.ts +2 -3
  148. package/dist/components/ui/OAuthButton.js +55 -0
  149. package/dist/components/ui/OverlineLabel.d.ts +3 -4
  150. package/dist/components/ui/OverlineLabel.js +13 -0
  151. package/dist/components/ui/PageHeader.d.ts +3 -4
  152. package/dist/components/ui/PageHeader.js +33 -0
  153. package/dist/components/ui/PageSection.d.ts +3 -4
  154. package/dist/components/ui/PageSection.js +31 -0
  155. package/dist/components/ui/PaginationBar.d.ts +3 -4
  156. package/dist/components/ui/PaginationBar.js +62 -0
  157. package/dist/components/ui/PasswordInput.d.ts +3 -5
  158. package/dist/components/ui/PasswordInput.js +62 -0
  159. package/dist/components/ui/PasswordRequirements.d.ts +3 -3
  160. package/dist/components/ui/PasswordRequirements.js +34 -0
  161. package/dist/components/ui/Popover.d.ts +5 -4
  162. package/dist/components/ui/Popover.js +53 -0
  163. package/dist/components/ui/ProfileHeader.d.ts +3 -4
  164. package/dist/components/ui/ProfileHeader.js +54 -0
  165. package/dist/components/ui/ProgressBar.d.ts +3 -4
  166. package/dist/components/ui/ProgressBar.js +42 -0
  167. package/dist/components/ui/ProseContent.d.ts +3 -4
  168. package/dist/components/ui/ProseContent.js +13 -0
  169. package/dist/components/ui/QrCode.d.ts +3 -4
  170. package/dist/components/ui/QrCode.js +47 -0
  171. package/dist/components/ui/Radio.d.ts +9 -7
  172. package/dist/components/ui/Radio.js +58 -0
  173. package/dist/components/ui/RadioPill.d.ts +10 -8
  174. package/dist/components/ui/RadioPill.js +53 -0
  175. package/dist/components/ui/ReorderList.d.ts +3 -4
  176. package/dist/components/ui/ReorderList.js +123 -0
  177. package/dist/components/ui/SearchInput.d.ts +7 -6
  178. package/dist/components/ui/SearchInput.js +49 -0
  179. package/dist/components/ui/SectionHeader.d.ts +3 -5
  180. package/dist/components/ui/SectionHeader.js +13 -0
  181. package/dist/components/ui/Select.d.ts +4 -6
  182. package/dist/components/ui/Select.js +117 -0
  183. package/dist/components/ui/SelectDropdown.d.ts +10 -6
  184. package/dist/components/ui/SelectDropdown.js +206 -0
  185. package/dist/components/ui/SettingRow.d.ts +5 -7
  186. package/dist/components/ui/SettingRow.js +25 -0
  187. package/dist/components/ui/SideSheet.d.ts +3 -4
  188. package/dist/components/ui/SideSheet.js +164 -0
  189. package/dist/components/ui/Skeleton.d.ts +3 -4
  190. package/dist/components/ui/Skeleton.js +18 -0
  191. package/dist/components/ui/Slider.d.ts +11 -7
  192. package/dist/components/ui/Slider.js +58 -0
  193. package/dist/components/ui/SplitPaneLayout.d.ts +6 -6
  194. package/dist/components/ui/SplitPaneLayout.js +22 -0
  195. package/dist/components/ui/Stack.d.ts +1 -2
  196. package/dist/components/ui/Stack.js +18 -0
  197. package/dist/components/ui/StatusDot.d.ts +3 -3
  198. package/dist/components/ui/StatusDot.js +24 -0
  199. package/dist/components/ui/StepProgress.d.ts +3 -3
  200. package/dist/components/ui/StepProgress.js +33 -0
  201. package/dist/components/ui/Tabs.d.ts +5 -6
  202. package/dist/components/ui/Tabs.js +63 -0
  203. package/dist/components/ui/TextInput.d.ts +3 -5
  204. package/dist/components/ui/TextInput.js +57 -0
  205. package/dist/components/ui/Textarea.d.ts +3 -5
  206. package/dist/components/ui/Textarea.js +59 -0
  207. package/dist/components/ui/ThemePreview.d.ts +3 -4
  208. package/dist/components/ui/ThemePreview.js +28 -0
  209. package/dist/components/ui/TimeInput.d.ts +7 -7
  210. package/dist/components/ui/TimeInput.js +22 -0
  211. package/dist/components/ui/Timeline.d.ts +3 -3
  212. package/dist/components/ui/Timeline.js +29 -0
  213. package/dist/components/ui/Toast.d.ts +0 -1
  214. package/dist/components/ui/Toast.js +121 -0
  215. package/dist/components/ui/Toggle.d.ts +10 -5
  216. package/dist/components/ui/Toggle.js +34 -0
  217. package/dist/components/ui/Toolbar.d.ts +3 -4
  218. package/dist/components/ui/Toolbar.js +70 -0
  219. package/dist/components/ui/Tooltip.d.ts +0 -1
  220. package/dist/components/ui/Tooltip.js +91 -0
  221. package/dist/components/ui/TranscriptLine.d.ts +5 -4
  222. package/dist/components/ui/TranscriptLine.js +40 -0
  223. package/dist/components/ui/UploadDropzone.d.ts +3 -6
  224. package/dist/components/ui/UploadDropzone.js +55 -0
  225. package/dist/components/ui/badgeColors.d.ts +0 -1
  226. package/dist/components/ui/badgeColors.js +5 -0
  227. package/dist/components/ui/calendar/AgendaView.d.ts +0 -1
  228. package/dist/components/ui/calendar/AgendaView.js +140 -0
  229. package/dist/components/ui/calendar/MonthView.d.ts +0 -1
  230. package/dist/components/ui/calendar/MonthView.js +321 -0
  231. package/dist/components/ui/calendar/TimeGrid.d.ts +0 -1
  232. package/dist/components/ui/calendar/TimeGrid.js +501 -0
  233. package/dist/components/ui/calendar/TimelineView.d.ts +0 -1
  234. package/dist/components/ui/calendar/TimelineView.js +311 -0
  235. package/dist/components/ui/calendar/context.d.ts +0 -1
  236. package/dist/components/ui/calendar/context.js +10 -0
  237. package/dist/components/ui/calendar/items.d.ts +0 -1
  238. package/dist/components/ui/calendar/items.js +152 -0
  239. package/dist/components/ui/calendar/types.d.ts +0 -1
  240. package/dist/components/ui/calendar/types.js +38 -0
  241. package/dist/components/ui/calendar/useGridInteraction.d.ts +0 -1
  242. package/dist/components/ui/calendar/useGridInteraction.js +393 -0
  243. package/dist/components/ui/useFieldControl.d.ts +1 -2
  244. package/dist/components/ui/useFieldControl.js +17 -0
  245. package/dist/config/theme.d.ts +0 -1
  246. package/dist/config/theme.js +219 -0
  247. package/dist/core.css +2933 -0
  248. package/dist/hooks/useAnchoredPopup.d.ts +0 -1
  249. package/dist/hooks/useAnchoredPopup.js +162 -0
  250. package/dist/hooks/useApplyTheme.d.ts +0 -1
  251. package/dist/hooks/useApplyTheme.js +16 -0
  252. package/dist/hooks/useControllableState.d.ts +14 -0
  253. package/dist/hooks/useControllableState.js +10 -0
  254. package/dist/hooks/useDismiss.d.ts +0 -1
  255. package/dist/hooks/useDismiss.js +24 -0
  256. package/dist/hooks/useFocusTrap.d.ts +0 -1
  257. package/dist/hooks/useFocusTrap.js +42 -0
  258. package/dist/hooks/useOverlayStack.d.ts +0 -1
  259. package/dist/hooks/useOverlayStack.js +23 -0
  260. package/dist/hooks/usePopover.d.ts +0 -1
  261. package/dist/hooks/usePopover.js +47 -0
  262. package/dist/hooks/usePortalContainer.d.ts +0 -1
  263. package/dist/hooks/usePortalContainer.js +14 -0
  264. package/dist/hooks/useSettings.d.ts +0 -1
  265. package/dist/hooks/useSettings.js +8 -0
  266. package/dist/hooks/useTheme.d.ts +0 -1
  267. package/dist/hooks/useTheme.js +8 -0
  268. package/dist/hooks/useTypeahead.d.ts +0 -1
  269. package/dist/hooks/useTypeahead.js +19 -0
  270. package/dist/index.d.ts +0 -1
  271. package/dist/index.js +133 -12866
  272. package/dist/lib/anchorPlacement.d.ts +0 -1
  273. package/dist/lib/anchorPlacement.js +75 -0
  274. package/dist/lib/calendar.d.ts +0 -1
  275. package/dist/lib/calendar.js +666 -0
  276. package/dist/lib/cn.d.ts +0 -1
  277. package/dist/lib/cn.js +228 -0
  278. package/dist/lib/codeInput.d.ts +0 -1
  279. package/dist/lib/codeInput.js +51 -0
  280. package/dist/lib/dateParts.d.ts +0 -1
  281. package/dist/lib/dateParts.js +31 -0
  282. package/dist/lib/dialogDrag.d.ts +0 -1
  283. package/dist/lib/dialogDrag.js +45 -0
  284. package/dist/lib/dialogResize.d.ts +0 -1
  285. package/dist/lib/dialogResize.js +47 -0
  286. package/dist/lib/formatDate.d.ts +0 -1
  287. package/dist/lib/formatDate.js +29 -0
  288. package/dist/lib/formatMediaTime.d.ts +0 -1
  289. package/dist/lib/formatMediaTime.js +7 -0
  290. package/dist/lib/keyboardStep.d.ts +0 -1
  291. package/dist/lib/layout.d.ts +0 -1
  292. package/dist/lib/layout.js +29 -0
  293. package/dist/lib/math.d.ts +0 -1
  294. package/dist/lib/math.js +6 -0
  295. package/dist/lib/mergeRefs.d.ts +6 -0
  296. package/dist/lib/mergeRefs.js +17 -0
  297. package/dist/lib/months.d.ts +0 -1
  298. package/dist/lib/months.js +30 -0
  299. package/dist/lib/overlayStack.d.ts +0 -1
  300. package/dist/lib/overlayStack.js +47 -0
  301. package/dist/lib/panelResize.d.ts +0 -1
  302. package/dist/lib/panelResize.js +8 -0
  303. package/dist/lib/passwordRequirements.d.ts +0 -1
  304. package/dist/lib/passwordRequirements.js +23 -0
  305. package/dist/lib/qrCode.d.ts +0 -1
  306. package/dist/lib/qrCode.js +570 -0
  307. package/dist/lib/rect.d.ts +0 -1
  308. package/dist/lib/tones.d.ts +0 -1
  309. package/dist/lib/tones.js +104 -0
  310. package/dist/lib/typeahead.d.ts +0 -1
  311. package/dist/lib/typeahead.js +31 -0
  312. package/dist/providers/ControlSizeContext.d.ts +0 -1
  313. package/dist/providers/ControlSizeContext.js +9 -0
  314. package/dist/providers/ControlSizeProvider.d.ts +0 -1
  315. package/dist/providers/ControlSizeProvider.js +11 -0
  316. package/dist/providers/SettingsContext.d.ts +0 -1
  317. package/dist/providers/SettingsContext.js +53 -0
  318. package/dist/providers/SettingsProvider.d.ts +0 -1
  319. package/dist/providers/SettingsProvider.js +249 -0
  320. package/dist/providers/ThemeContext.d.ts +0 -1
  321. package/dist/providers/ThemeContext.js +5 -0
  322. package/dist/providers/ThemeProvider.d.ts +0 -1
  323. package/dist/providers/ThemeProvider.js +17 -0
  324. package/dist/providers/accentColors.d.ts +0 -1
  325. package/dist/providers/accentColors.js +75 -0
  326. package/dist/providers/themeClasses.d.ts +1 -1
  327. package/dist/providers/themeClasses.js +20 -0
  328. package/dist/styles.css +263 -176
  329. package/dist/themes/cyber-brutal-dark.css +53 -0
  330. package/dist/themes/cyber-brutal-light.css +75 -0
  331. package/dist/themes/glass-dark.css +217 -0
  332. package/dist/themes/glass-light.css +215 -0
  333. package/dist/themes/hashi.css +66 -0
  334. package/dist/themes/light-inverted.css +32 -0
  335. package/dist/themes/light.css +1 -0
  336. package/dist/themes/monokai.css +51 -0
  337. package/dist/themes/solarized.css +55 -0
  338. package/package.json +3 -1
  339. package/dist/components/app-shell/AppShell.d.ts.map +0 -1
  340. package/dist/components/app-shell/AuthLayout.d.ts.map +0 -1
  341. package/dist/components/app-shell/BackLink.d.ts.map +0 -1
  342. package/dist/components/app-shell/BottomNav.d.ts.map +0 -1
  343. package/dist/components/app-shell/Breadcrumbs.d.ts.map +0 -1
  344. package/dist/components/app-shell/CommandPalette.d.ts.map +0 -1
  345. package/dist/components/app-shell/MobileDrawer.d.ts.map +0 -1
  346. package/dist/components/app-shell/Sidebar.d.ts.map +0 -1
  347. package/dist/components/app-shell/ThemeMenu.d.ts.map +0 -1
  348. package/dist/components/app-shell/TopBar.d.ts.map +0 -1
  349. package/dist/components/app-shell/commandPaletteEvents.d.ts.map +0 -1
  350. package/dist/components/app-shell/navigation.d.ts.map +0 -1
  351. package/dist/components/app-shell/themeMenuEvents.d.ts.map +0 -1
  352. package/dist/components/app-shell/types.d.ts.map +0 -1
  353. package/dist/components/charts/AreaChart.d.ts.map +0 -1
  354. package/dist/components/charts/BarChart.d.ts.map +0 -1
  355. package/dist/components/charts/DonutChart.d.ts.map +0 -1
  356. package/dist/components/charts/RadarChart.d.ts.map +0 -1
  357. package/dist/components/charts/RadialBarChart.d.ts.map +0 -1
  358. package/dist/components/charts/SparkLine.d.ts.map +0 -1
  359. package/dist/components/charts/StackedBarChart.d.ts.map +0 -1
  360. package/dist/components/charts/VerticalBarChart.d.ts.map +0 -1
  361. package/dist/components/charts/chartUtils.d.ts.map +0 -1
  362. package/dist/components/tables/ColumnPicker.d.ts.map +0 -1
  363. package/dist/components/tables/Pagination.d.ts.map +0 -1
  364. package/dist/components/tables/ResourceTable.d.ts.map +0 -1
  365. package/dist/components/tables/Table.d.ts.map +0 -1
  366. package/dist/components/tables/sortRows.d.ts.map +0 -1
  367. package/dist/components/ui/Accordion.d.ts.map +0 -1
  368. package/dist/components/ui/Alert.d.ts.map +0 -1
  369. package/dist/components/ui/AttachmentList.d.ts.map +0 -1
  370. package/dist/components/ui/AudioPlayer.d.ts.map +0 -1
  371. package/dist/components/ui/AuthCard.d.ts.map +0 -1
  372. package/dist/components/ui/AuthorByline.d.ts.map +0 -1
  373. package/dist/components/ui/Avatar.d.ts.map +0 -1
  374. package/dist/components/ui/Badge.d.ts.map +0 -1
  375. package/dist/components/ui/Button.d.ts.map +0 -1
  376. package/dist/components/ui/Calendar.d.ts.map +0 -1
  377. package/dist/components/ui/CalendarGrid.d.ts.map +0 -1
  378. package/dist/components/ui/Card.d.ts.map +0 -1
  379. package/dist/components/ui/CharacterCount.d.ts.map +0 -1
  380. package/dist/components/ui/Checkbox.d.ts.map +0 -1
  381. package/dist/components/ui/CodeInput.d.ts.map +0 -1
  382. package/dist/components/ui/Combobox.d.ts.map +0 -1
  383. package/dist/components/ui/CopyButton.d.ts.map +0 -1
  384. package/dist/components/ui/DangerZone.d.ts.map +0 -1
  385. package/dist/components/ui/DatePartsInput.d.ts.map +0 -1
  386. package/dist/components/ui/DatePicker.d.ts.map +0 -1
  387. package/dist/components/ui/DateRangePicker.d.ts.map +0 -1
  388. package/dist/components/ui/DateTimePicker.d.ts.map +0 -1
  389. package/dist/components/ui/DetailPanel.d.ts.map +0 -1
  390. package/dist/components/ui/Dialog.d.ts.map +0 -1
  391. package/dist/components/ui/DialogActions.d.ts.map +0 -1
  392. package/dist/components/ui/Disclosure.d.ts.map +0 -1
  393. package/dist/components/ui/DividerLabel.d.ts.map +0 -1
  394. package/dist/components/ui/DropdownMenu.d.ts.map +0 -1
  395. package/dist/components/ui/EmptyState.d.ts.map +0 -1
  396. package/dist/components/ui/ErrorBoundary.d.ts.map +0 -1
  397. package/dist/components/ui/FieldContext.d.ts.map +0 -1
  398. package/dist/components/ui/Fieldset.d.ts.map +0 -1
  399. package/dist/components/ui/FilterButton.d.ts.map +0 -1
  400. package/dist/components/ui/FilterDropdown.d.ts.map +0 -1
  401. package/dist/components/ui/FormField.d.ts.map +0 -1
  402. package/dist/components/ui/Grid.d.ts.map +0 -1
  403. package/dist/components/ui/GridItem.d.ts.map +0 -1
  404. package/dist/components/ui/Inline.d.ts.map +0 -1
  405. package/dist/components/ui/Kbd.d.ts.map +0 -1
  406. package/dist/components/ui/ListItemLink.d.ts.map +0 -1
  407. package/dist/components/ui/LoadingSpinner.d.ts.map +0 -1
  408. package/dist/components/ui/MessageBubble.d.ts.map +0 -1
  409. package/dist/components/ui/MetadataGrid.d.ts.map +0 -1
  410. package/dist/components/ui/MetricCard.d.ts.map +0 -1
  411. package/dist/components/ui/NavTabs.d.ts.map +0 -1
  412. package/dist/components/ui/OAuthButton.d.ts.map +0 -1
  413. package/dist/components/ui/OverlineLabel.d.ts.map +0 -1
  414. package/dist/components/ui/PageHeader.d.ts.map +0 -1
  415. package/dist/components/ui/PageSection.d.ts.map +0 -1
  416. package/dist/components/ui/PaginationBar.d.ts.map +0 -1
  417. package/dist/components/ui/PasswordInput.d.ts.map +0 -1
  418. package/dist/components/ui/PasswordRequirements.d.ts.map +0 -1
  419. package/dist/components/ui/Popover.d.ts.map +0 -1
  420. package/dist/components/ui/ProfileHeader.d.ts.map +0 -1
  421. package/dist/components/ui/ProgressBar.d.ts.map +0 -1
  422. package/dist/components/ui/ProseContent.d.ts.map +0 -1
  423. package/dist/components/ui/QrCode.d.ts.map +0 -1
  424. package/dist/components/ui/Radio.d.ts.map +0 -1
  425. package/dist/components/ui/RadioPill.d.ts.map +0 -1
  426. package/dist/components/ui/ReorderList.d.ts.map +0 -1
  427. package/dist/components/ui/SearchInput.d.ts.map +0 -1
  428. package/dist/components/ui/SectionHeader.d.ts.map +0 -1
  429. package/dist/components/ui/Select.d.ts.map +0 -1
  430. package/dist/components/ui/SelectDropdown.d.ts.map +0 -1
  431. package/dist/components/ui/SettingRow.d.ts.map +0 -1
  432. package/dist/components/ui/SideSheet.d.ts.map +0 -1
  433. package/dist/components/ui/Skeleton.d.ts.map +0 -1
  434. package/dist/components/ui/Slider.d.ts.map +0 -1
  435. package/dist/components/ui/SplitPaneLayout.d.ts.map +0 -1
  436. package/dist/components/ui/Stack.d.ts.map +0 -1
  437. package/dist/components/ui/StatusDot.d.ts.map +0 -1
  438. package/dist/components/ui/StepProgress.d.ts.map +0 -1
  439. package/dist/components/ui/Tabs.d.ts.map +0 -1
  440. package/dist/components/ui/TextInput.d.ts.map +0 -1
  441. package/dist/components/ui/Textarea.d.ts.map +0 -1
  442. package/dist/components/ui/ThemePreview.d.ts.map +0 -1
  443. package/dist/components/ui/TimeInput.d.ts.map +0 -1
  444. package/dist/components/ui/Timeline.d.ts.map +0 -1
  445. package/dist/components/ui/Toast.d.ts.map +0 -1
  446. package/dist/components/ui/Toggle.d.ts.map +0 -1
  447. package/dist/components/ui/Toolbar.d.ts.map +0 -1
  448. package/dist/components/ui/Tooltip.d.ts.map +0 -1
  449. package/dist/components/ui/TranscriptLine.d.ts.map +0 -1
  450. package/dist/components/ui/UploadDropzone.d.ts.map +0 -1
  451. package/dist/components/ui/badgeColors.d.ts.map +0 -1
  452. package/dist/components/ui/calendar/AgendaView.d.ts.map +0 -1
  453. package/dist/components/ui/calendar/MonthView.d.ts.map +0 -1
  454. package/dist/components/ui/calendar/TimeGrid.d.ts.map +0 -1
  455. package/dist/components/ui/calendar/TimelineView.d.ts.map +0 -1
  456. package/dist/components/ui/calendar/context.d.ts.map +0 -1
  457. package/dist/components/ui/calendar/items.d.ts.map +0 -1
  458. package/dist/components/ui/calendar/types.d.ts.map +0 -1
  459. package/dist/components/ui/calendar/useGridInteraction.d.ts.map +0 -1
  460. package/dist/components/ui/useFieldControl.d.ts.map +0 -1
  461. package/dist/config/theme.d.ts.map +0 -1
  462. package/dist/hooks/useAnchoredPopup.d.ts.map +0 -1
  463. package/dist/hooks/useApplyTheme.d.ts.map +0 -1
  464. package/dist/hooks/useDismiss.d.ts.map +0 -1
  465. package/dist/hooks/useFocusTrap.d.ts.map +0 -1
  466. package/dist/hooks/useOverlayStack.d.ts.map +0 -1
  467. package/dist/hooks/usePopover.d.ts.map +0 -1
  468. package/dist/hooks/usePortalContainer.d.ts.map +0 -1
  469. package/dist/hooks/useSettings.d.ts.map +0 -1
  470. package/dist/hooks/useTheme.d.ts.map +0 -1
  471. package/dist/hooks/useTypeahead.d.ts.map +0 -1
  472. package/dist/index.d.ts.map +0 -1
  473. package/dist/lib/anchorPlacement.d.ts.map +0 -1
  474. package/dist/lib/calendar.d.ts.map +0 -1
  475. package/dist/lib/cn.d.ts.map +0 -1
  476. package/dist/lib/codeInput.d.ts.map +0 -1
  477. package/dist/lib/dateParts.d.ts.map +0 -1
  478. package/dist/lib/dialogDrag.d.ts.map +0 -1
  479. package/dist/lib/dialogResize.d.ts.map +0 -1
  480. package/dist/lib/formatDate.d.ts.map +0 -1
  481. package/dist/lib/formatMediaTime.d.ts.map +0 -1
  482. package/dist/lib/keyboardStep.d.ts.map +0 -1
  483. package/dist/lib/layout.d.ts.map +0 -1
  484. package/dist/lib/math.d.ts.map +0 -1
  485. package/dist/lib/months.d.ts.map +0 -1
  486. package/dist/lib/overlayStack.d.ts.map +0 -1
  487. package/dist/lib/panelResize.d.ts.map +0 -1
  488. package/dist/lib/passwordRequirements.d.ts.map +0 -1
  489. package/dist/lib/qrCode.d.ts.map +0 -1
  490. package/dist/lib/rect.d.ts.map +0 -1
  491. package/dist/lib/tones.d.ts.map +0 -1
  492. package/dist/lib/typeahead.d.ts.map +0 -1
  493. package/dist/providers/ControlSizeContext.d.ts.map +0 -1
  494. package/dist/providers/ControlSizeProvider.d.ts.map +0 -1
  495. package/dist/providers/SettingsContext.d.ts.map +0 -1
  496. package/dist/providers/SettingsProvider.d.ts.map +0 -1
  497. package/dist/providers/ThemeContext.d.ts.map +0 -1
  498. package/dist/providers/ThemeProvider.d.ts.map +0 -1
  499. package/dist/providers/accentColors.d.ts.map +0 -1
  500. package/dist/providers/themeClasses.d.ts.map +0 -1
@@ -0,0 +1,53 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { useControlSize as t } from "../../providers/ControlSizeContext.js";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ //#region src/components/ui/Card.tsx
5
+ function a({ children: a, className: o, header: s, footer: c, cover: l, selected: u, flush: d = !1, bodyClassName: f, ...p }) {
6
+ let m = t(), h = p.as === "button", g = p.as === "a", _ = h && p.disabled, v = h ? "span" : "div", y = e("ui-glass bg-bg-card border-border overflow-hidden rounded-md border", u && "border-accent", (h || g) && "focus-visible:outline-accent block w-full cursor-pointer appearance-none text-left transition-colors duration-[100ms] focus-visible:outline-2 focus-visible:outline-offset-2", (h || g) && !u && !_ && "hover:border-border-strong", _ && "cursor-not-allowed opacity-40", o), b = /* @__PURE__ */ i(n, { children: [
7
+ l != null && typeof l != "boolean" && l !== "" && /* @__PURE__ */ r(v, {
8
+ className: "block",
9
+ children: l
10
+ }),
11
+ s && /* @__PURE__ */ r(v, {
12
+ "data-control-size": m,
13
+ className: "ui-bar border-border flex flex-col justify-center border-b px-3 py-2.5",
14
+ children: s
15
+ }),
16
+ /* @__PURE__ */ r(v, {
17
+ className: e(h && "block", !d && "ui-surface-body p-3", f),
18
+ children: a
19
+ }),
20
+ c && /* @__PURE__ */ r(v, {
21
+ "data-control-size": m,
22
+ className: "ui-bar border-border bg-bg-primary/50 flex flex-col justify-center border-t px-3 py-2.5",
23
+ children: c
24
+ })
25
+ ] });
26
+ if (p.as === "a") {
27
+ let { as: e, renderLink: t, ...n } = p, i = {
28
+ ...n,
29
+ "aria-current": u ? "page" : n["aria-current"],
30
+ className: y,
31
+ children: b
32
+ };
33
+ return t ? t(i) : /* @__PURE__ */ r(e, { ...i });
34
+ }
35
+ if (p.as === "button") {
36
+ let { as: e, ...t } = p;
37
+ return /* @__PURE__ */ r(e, {
38
+ ...t,
39
+ type: t.type ?? "button",
40
+ "aria-pressed": u ?? t["aria-pressed"],
41
+ className: y,
42
+ children: b
43
+ });
44
+ }
45
+ let { as: x = "div", ...S } = p;
46
+ return /* @__PURE__ */ r(x, {
47
+ ...S,
48
+ className: y,
49
+ children: b
50
+ });
51
+ }
52
+ //#endregion
53
+ export { a as Card };
@@ -1,5 +1,5 @@
1
- import { type HTMLAttributes } from "react";
2
- export interface CharacterCountProps extends HTMLAttributes<HTMLParagraphElement> {
1
+ import { type ComponentPropsWithRef } from "react";
2
+ export interface CharacterCountProps extends ComponentPropsWithRef<"p"> {
3
3
  /** Current text; its length is counted. */
4
4
  value: string;
5
5
  /** Character limit; the count turns red when exceeded. */
@@ -8,5 +8,4 @@ export interface CharacterCountProps extends HTMLAttributes<HTMLParagraphElement
8
8
  announcementDelay?: number;
9
9
  }
10
10
  /** Counts UTF-16 code units, matching native input/textarea maxLength. */
11
- export declare function CharacterCount({ value, maxLength, announcementDelay, className, ...props }: CharacterCountProps): import("react/jsx-runtime").JSX.Element;
12
- //# sourceMappingURL=CharacterCount.d.ts.map
11
+ export declare function CharacterCount({ value, maxLength, announcementDelay, className, ref, ...props }: CharacterCountProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { useEffect as t, useState as n } from "react";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ //#region src/components/ui/CharacterCount.tsx
5
+ function a({ value: a, maxLength: o, announcementDelay: s = 1e3, className: c, ref: l, ...u }) {
6
+ let d = o - a.length, f = Math.abs(d), p = `${f} ${f === 1 ? "character" : "characters"} ${d < 0 ? "over the limit" : "remaining"}`, [m, h] = n(p);
7
+ return t(() => {
8
+ let e = setTimeout(() => h(p), s);
9
+ return () => clearTimeout(e);
10
+ }, [p, s]), /* @__PURE__ */ i("p", {
11
+ ref: l,
12
+ ...u,
13
+ className: e("text-2xs", d < 0 ? "text-danger-fg" : "text-text-tertiary", c),
14
+ children: [/* @__PURE__ */ r("span", {
15
+ "aria-hidden": "true",
16
+ children: p
17
+ }), /* @__PURE__ */ r("span", {
18
+ className: "sr-only",
19
+ role: "status",
20
+ "aria-live": "polite",
21
+ "aria-atomic": "true",
22
+ children: m
23
+ })]
24
+ });
25
+ }
26
+ //#endregion
27
+ export { a as CharacterCount };
@@ -1,17 +1,18 @@
1
- import { type ChangeEvent, type InputHTMLAttributes, type ReactNode } from "react";
2
- export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "size"> {
1
+ import { type ComponentPropsWithRef, type ReactNode } from "react";
2
+ export interface CheckboxProps extends Omit<ComponentPropsWithRef<"input">, "type" | "size" | "checked" | "defaultChecked"> {
3
3
  /** Whether the checkbox is checked (controlled). */
4
- checked: boolean;
4
+ checked?: boolean;
5
+ /** Initial checked state when uncontrolled. */
6
+ defaultChecked?: boolean;
5
7
  /** Show the mixed state (dash) and expose aria-checked="mixed". */
6
8
  indeterminate?: boolean;
7
- /** Existing boolean-first callback; native event is also available. */
8
- onChange: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
9
+ /** Called with the new checked state. */
10
+ onCheckedChange?: (checked: boolean) => void;
9
11
  /** Visible label rendered beside the checkbox. */
10
12
  label?: ReactNode;
11
- /** Accessible name when no visible label is given; aria-label takes precedence. */
12
- ariaLabel?: string;
13
+ /** Accessible name when no visible label is given. */
14
+ "aria-label"?: string;
13
15
  /** Opt-in larger controls, or inherit ControlSizeProvider. */
14
16
  controlSize?: "compact" | "comfortable";
15
17
  }
16
- export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
17
- //# sourceMappingURL=Checkbox.d.ts.map
18
+ export declare function Checkbox({ id, checked: checkedProp, defaultChecked, indeterminate, onChange, onCheckedChange, label, disabled, controlSize, className, "aria-label": ariaLabel, "aria-describedby": describedBy, "aria-invalid": invalid, required, ref, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,52 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { mergeRefs as t } from "../../lib/mergeRefs.js";
3
+ import { useControlSize as n } from "../../providers/ControlSizeContext.js";
4
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
5
+ import { FieldContext as i, describeField as a } from "./FieldContext.js";
6
+ import { useContext as o, useEffect as s, useId as c, useMemo as l, useRef as u } from "react";
7
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
+ import { Check as p, Minus as m } from "lucide-react";
9
+ //#region src/components/ui/Checkbox.tsx
10
+ function h({ id: h, checked: g, defaultChecked: _ = !1, indeterminate: v, onChange: y, onCheckedChange: b, label: x, disabled: S, controlSize: C, className: w, "aria-label": T, "aria-describedby": E, "aria-invalid": D, required: O, ref: k, ...A }) {
11
+ let [j, M] = r({
12
+ value: g,
13
+ defaultValue: _,
14
+ onChange: b
15
+ }), N = c(), P = n(C), F = o(i), I = h ?? F?.id ?? N, L = u(null), R = l(() => t(L, k), [k]);
16
+ return s(() => {
17
+ L.current && (L.current.indeterminate = !!v);
18
+ }, [v]), /* @__PURE__ */ f("div", {
19
+ className: e("ui-choice flex w-fit items-center gap-2.5", S ? "cursor-not-allowed opacity-40" : "cursor-pointer", w),
20
+ "data-control-size": P,
21
+ children: [/* @__PURE__ */ f("span", {
22
+ className: "ui-checkbox-control",
23
+ children: [/* @__PURE__ */ d("input", {
24
+ ...A,
25
+ ref: R,
26
+ id: I,
27
+ type: "checkbox",
28
+ checked: j,
29
+ "aria-checked": v ? "mixed" : j,
30
+ "aria-label": T,
31
+ "aria-describedby": a(E, F?.describedBy),
32
+ "aria-invalid": D ?? (F?.invalid || void 0),
33
+ disabled: S,
34
+ required: O ?? F?.required,
35
+ onChange: (e) => {
36
+ y?.(e), M(e.target.checked);
37
+ },
38
+ className: "ui-checkbox-input"
39
+ }), /* @__PURE__ */ d("span", {
40
+ className: "ui-checkbox-decoration",
41
+ "aria-hidden": "true",
42
+ children: v ? /* @__PURE__ */ d(m, { className: "h-3 w-3" }) : j ? /* @__PURE__ */ d(p, { className: "h-3 w-3" }) : null
43
+ })]
44
+ }), x && /* @__PURE__ */ d("label", {
45
+ htmlFor: I,
46
+ className: e("text-text-primary text-xs", S ? "cursor-not-allowed" : "cursor-pointer"),
47
+ children: x
48
+ })]
49
+ });
50
+ }
51
+ //#endregion
52
+ export { h as Checkbox };
@@ -1,11 +1,14 @@
1
- export interface CodeInputProps {
1
+ import { type ComponentPropsWithRef } from "react";
2
+ export interface CodeInputProps extends Omit<ComponentPropsWithRef<"div">, "children" | "defaultValue" | "onChange"> {
2
3
  /**
3
4
  * The digits entered so far (controlled). Boxes the user has cleared are
4
5
  * left out, so `value.length === length` only when every box is filled.
5
6
  */
6
- value: string;
7
+ value?: string;
8
+ /** Initial digits when uncontrolled. */
9
+ defaultValue?: string;
7
10
  /** Called with the digits entered so far after every edit. */
8
- onChange: (value: string) => void;
11
+ onValueChange?: (value: string) => void;
9
12
  /**
10
13
  * Called with the code whenever an edit leaves every box filled — use it
11
14
  * to auto-submit. Fires again if the user then changes a digit.
@@ -33,5 +36,4 @@ export interface CodeInputProps {
33
36
  * Handles typing, paste, SMS autofill, Backspace/Delete and arrow keys; each
34
37
  * box keeps its position, so clearing one never shifts the others.
35
38
  */
36
- export declare function CodeInput({ value, onChange, onComplete, length, error, invalid, disabled, autoFocus, name, "aria-label": ariaLabel, className, }: CodeInputProps): import("react/jsx-runtime").JSX.Element;
37
- //# sourceMappingURL=CodeInput.d.ts.map
39
+ export declare function CodeInput({ value: valueProp, defaultValue, onValueChange, onComplete, length, error, invalid, disabled, autoFocus, name, "aria-label": ariaLabel, className, ref, ...rest }: CodeInputProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,96 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { useControllableState as t } from "../../hooks/useControllableState.js";
3
+ import { applyBackspace as n, applyInput as r, applyText as i, toSlots as a } from "../../lib/codeInput.js";
4
+ import { useId as o, useRef as s, useState as c } from "react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ //#region src/components/ui/CodeInput.tsx
7
+ function d({ value: d, defaultValue: f = "", onValueChange: p, onComplete: m, length: h = 6, error: g, invalid: _, disabled: v, autoFocus: y, name: b, "aria-label": x = "Verification code", className: S, ref: C, ...w }) {
8
+ let [T, E] = t({
9
+ value: d,
10
+ defaultValue: f,
11
+ onChange: p
12
+ }), D = s([]), O = o(), k = _ || !!g, [A, j] = c(() => {
13
+ let e = a(T, h);
14
+ return {
15
+ proposed: e,
16
+ shown: e
17
+ };
18
+ }), M = (e) => e.length === h && e.join("") === T, [N, P] = c({
19
+ value: T,
20
+ length: h
21
+ });
22
+ if ((N.value !== T || N.length !== h) && (P({
23
+ value: T,
24
+ length: h
25
+ }), !M(A.proposed) && !M(A.shown))) {
26
+ let e = a(T, h);
27
+ j({
28
+ proposed: e,
29
+ shown: e
30
+ });
31
+ }
32
+ let F = M(A.proposed) ? A.proposed : M(A.shown) ? A.shown : a(T, h);
33
+ function I(e) {
34
+ let t = D.current[Math.max(0, Math.min(e, h - 1))];
35
+ t?.focus(), t?.select();
36
+ }
37
+ function L(e) {
38
+ if (!e) return;
39
+ j({
40
+ proposed: e.slots,
41
+ shown: F
42
+ });
43
+ let t = e.slots.join("");
44
+ E(t), e.slots.every(Boolean) && m?.(t), I(e.focus);
45
+ }
46
+ function R(e, t) {
47
+ t.key === "Backspace" ? (t.preventDefault(), L(n(F, e))) : t.key === "ArrowLeft" ? (t.preventDefault(), I(e - 1)) : t.key === "ArrowRight" && (t.preventDefault(), I(e + 1));
48
+ }
49
+ return /* @__PURE__ */ u("div", {
50
+ ref: C,
51
+ ...w,
52
+ className: e("flex flex-col gap-1.5", S),
53
+ children: [
54
+ /* @__PURE__ */ l("div", {
55
+ role: "group",
56
+ "aria-label": x,
57
+ className: "flex justify-between gap-2",
58
+ children: F.map((t, n) => /* @__PURE__ */ l("input", {
59
+ ref: (e) => {
60
+ D.current[n] = e;
61
+ },
62
+ type: "text",
63
+ inputMode: "numeric",
64
+ autoComplete: n === 0 ? "one-time-code" : "off",
65
+ autoFocus: y && n === 0,
66
+ disabled: v,
67
+ "aria-label": `Digit ${n + 1} of ${h}`,
68
+ "aria-invalid": k || void 0,
69
+ "aria-describedby": g ? O : void 0,
70
+ value: t,
71
+ onFocus: (e) => e.target.select(),
72
+ onChange: (e) => L(r(F, n, e.target.value, e.target.selectionStart)),
73
+ onKeyDown: (e) => R(n, e),
74
+ onPaste: (e) => {
75
+ e.preventDefault(), L(i(F, n, e.clipboardData.getData("text")));
76
+ },
77
+ className: e("bg-bg-secondary text-text-primary h-10 w-10 rounded-md border text-center font-mono text-sm", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", k ? "border-danger" : "border-border")
78
+ }, n))
79
+ }),
80
+ b && /* @__PURE__ */ l("input", {
81
+ type: "hidden",
82
+ name: b,
83
+ value: T,
84
+ disabled: v
85
+ }),
86
+ g && /* @__PURE__ */ l("p", {
87
+ id: O,
88
+ role: "alert",
89
+ className: "text-2xs text-danger-fg",
90
+ children: g
91
+ })
92
+ ]
93
+ });
94
+ }
95
+ //#endregion
96
+ export { d as CodeInput };
@@ -1,8 +1,8 @@
1
- import { type ReactNode } from "react";
1
+ import { type ComponentPropsWithRef, type ReactNode } from "react";
2
2
  import { type PopoverCloseReason, type PopoverOpenReason } from "../../hooks/usePopover";
3
3
  import { type ControlSize } from "../../providers/ControlSizeContext";
4
4
  export interface ComboboxOption {
5
- /** Unique value returned to onChange when the option is chosen. */
5
+ /** Unique value returned to onValueChange when the option is chosen. */
6
6
  value: string;
7
7
  /** Text shown in the list and, once selected, on the trigger. */
8
8
  label: string;
@@ -20,13 +20,15 @@ export interface ComboboxOption {
20
20
  * `disabled` (the field was disabled while open).
21
21
  */
22
22
  export type ComboboxOpenChangeReason = PopoverOpenReason | PopoverCloseReason;
23
- export interface ComboboxProps<T extends ComboboxOption = ComboboxOption> {
23
+ export interface ComboboxProps<T extends ComboboxOption = ComboboxOption> extends Omit<ComponentPropsWithRef<"div">, "children" | "defaultValue" | "onChange" | "placeholder"> {
24
24
  /** Options to choose from. Filtered by label against the search text unless filterOptions is false. */
25
25
  options: T[];
26
26
  /** Value of the selected option (controlled). */
27
- value: string;
27
+ value?: string;
28
+ /** Initially selected value when uncontrolled. */
29
+ defaultValue?: string;
28
30
  /** Called with the value of the chosen option. */
29
- onChange: (value: string) => void;
31
+ onValueChange?: (value: string) => void;
30
32
  /** Receives the complete result, including caller-owned metadata. */
31
33
  onOptionChange?: (option: T) => void;
32
34
  /** Text shown on the trigger when nothing is selected. Defaults to "Select...". */
@@ -83,5 +85,4 @@ export interface ComboboxProps<T extends ComboboxOption = ComboboxOption> {
83
85
  */
84
86
  flip?: boolean;
85
87
  }
86
- export declare function Combobox<T extends ComboboxOption = ComboboxOption>({ options, value, onChange, onOptionChange, placeholder, label, className, controlSize, id, name, disabled, "aria-label": ariaLabel, "aria-describedby": describedBy, "aria-invalid": invalid, query, onQueryChange, filterOptions, selectedOption, renderOption, loading, loadingMessage, error, onRetry, emptyMessage, footer, onOpenChange, flip, }: ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
87
- //# sourceMappingURL=Combobox.d.ts.map
88
+ export declare function Combobox<T extends ComboboxOption = ComboboxOption>({ options, value: valueProp, defaultValue, onValueChange, onOptionChange, placeholder, label, className, controlSize, id, name, disabled, "aria-label": ariaLabel, "aria-describedby": describedBy, "aria-invalid": invalid, query, onQueryChange, filterOptions, selectedOption, renderOption, loading, loadingMessage, error, onRetry, emptyMessage, footer, onOpenChange, flip, ref, onBlur, ...rest }: ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,213 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { mergeRefs as t } from "../../lib/mergeRefs.js";
3
+ import { useControlSize as n } from "../../providers/ControlSizeContext.js";
4
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
5
+ import { usePopover as i } from "../../hooks/usePopover.js";
6
+ import { useEffect as a, useId as ee, useMemo as te, useReducer as ne, useRef as o, useState as s } from "react";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { Check as re, ChevronDown as ie, Search as ae } from "lucide-react";
9
+ //#region src/components/ui/Combobox.tsx
10
+ function u({ options: u, value: oe, defaultValue: d = "", onValueChange: se, onOptionChange: ce, placeholder: f = "Select...", label: p, className: le, controlSize: ue, id: de, name: m, disabled: h, "aria-label": g, "aria-describedby": _, "aria-invalid": v, query: y, onQueryChange: fe, filterOptions: pe = !0, selectedOption: b, renderOption: x, loading: S = !1, loadingMessage: me = "Loading results…", error: C, onRetry: w, emptyMessage: he = "No results", footer: T, onOpenChange: ge, flip: _e = !0, ref: E, onBlur: ve, ...ye }) {
11
+ let D = n(ue), { open: O, show: be, close: k, rootRef: A, anchorRef: j, triggerRef: M, popupRef: N, labelId: P, triggerId: F, popupId: I } = i({
12
+ haspopup: "listbox",
13
+ matchWidth: !0,
14
+ disabled: h,
15
+ flip: _e,
16
+ onOpenChange: ge
17
+ }), [L, xe] = r({
18
+ value: oe,
19
+ defaultValue: d,
20
+ onChange: se
21
+ }), [Se, R] = s(""), [Ce, z] = s(0), [B, we] = s(() => u.find((e) => e.value === L)), V = o(null), H = o(!1), [, Te] = ne((e) => e + 1, 0);
22
+ function U() {
23
+ H.current = !0, Te();
24
+ }
25
+ let W = ee(), Ee = de ?? `${W}-search`, G = `${W}-selected`, K = y ?? Se, q = u.find((e) => e.value === L) ?? (b?.value === L ? b : void 0) ?? (B?.value === L ? B : void 0), J = pe ? u.filter((e) => e.label.toLowerCase().includes(K.toLowerCase())) : u, Y = Math.min(Ce, Math.max(J.length - 1, 0)), X = J[Y]?.disabled ? J.findIndex((e) => !e.disabled) : Y, Z = J[X];
26
+ function De(e) {
27
+ y === void 0 && R(e), fe?.(e), z(0), U();
28
+ let t = N.current?.ownerDocument.getElementById(I);
29
+ t && (t.scrollTop = 0);
30
+ }
31
+ function Q(e) {
32
+ e.disabled || (we(e), xe(e.value), ce?.(e), k("select"));
33
+ }
34
+ function Oe(e) {
35
+ if ([
36
+ "ArrowDown",
37
+ "ArrowUp",
38
+ "Home",
39
+ "End"
40
+ ].includes(e.key)) {
41
+ e.preventDefault();
42
+ let t = e.key === "ArrowUp" || e.key === "End" ? -1 : 1, n = e.key === "Home" ? 0 : e.key === "End" ? J.length - 1 : X + t;
43
+ for (; n >= 0 && n < J.length && J[n].disabled;) n += t;
44
+ n >= 0 && n < J.length && (z(n), U());
45
+ } else e.key === "Enter" ? (e.preventDefault(), Z && Q(Z)) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), k("escape"));
46
+ }
47
+ function $(e) {
48
+ be(e), y === void 0 && R("");
49
+ let t = (y === void 0 ? u : J).findIndex((e) => e.value === L && !e.disabled);
50
+ z(Math.max(t, 0)), U(), setTimeout(() => V.current?.focus(), 0);
51
+ }
52
+ a(() => {
53
+ h && k("disabled");
54
+ }, [
55
+ h,
56
+ O,
57
+ k
58
+ ]), a(() => {
59
+ if (!O || !H.current) return;
60
+ H.current = !1;
61
+ let e = N.current?.ownerDocument, t = e?.getElementById(I), n = e?.getElementById(`${I}-${X}`);
62
+ if (!t || !n) return;
63
+ let r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = t.offsetHeight ? r.height / t.offsetHeight : 1;
64
+ i.top < r.top ? t.scrollTop -= (r.top - i.top) / a : i.bottom > r.bottom && (t.scrollTop += (i.bottom - r.bottom) / a);
65
+ });
66
+ let ke = te(() => t(A, E), [A, E]);
67
+ return /* @__PURE__ */ l("div", {
68
+ ...ye,
69
+ className: e("flex flex-col gap-1.5", le),
70
+ ref: ke,
71
+ onBlur: (e) => {
72
+ ve?.(e), !e.defaultPrevented && O && !e.currentTarget.contains(e.relatedTarget) && k("blur");
73
+ },
74
+ children: [
75
+ p && /* @__PURE__ */ c("span", {
76
+ id: P,
77
+ className: "ui-field-label font-label text-xs font-medium",
78
+ children: p
79
+ }),
80
+ m && /* @__PURE__ */ c("input", {
81
+ type: "hidden",
82
+ name: m,
83
+ value: L,
84
+ disabled: h
85
+ }),
86
+ /* @__PURE__ */ l("div", {
87
+ className: "relative",
88
+ ref: j,
89
+ children: [
90
+ /* @__PURE__ */ c("button", {
91
+ ref: M,
92
+ id: F,
93
+ "data-control-size": D,
94
+ type: "button",
95
+ disabled: h,
96
+ "aria-label": g ?? (p ? void 0 : f),
97
+ "aria-labelledby": p && !g ? `${P} ${G}` : void 0,
98
+ "aria-describedby": _,
99
+ "aria-invalid": v,
100
+ "aria-expanded": O,
101
+ "aria-haspopup": "listbox",
102
+ "aria-controls": O ? I : void 0,
103
+ onClick: () => O ? k("toggle") : $("toggle"),
104
+ onKeyDown: (e) => {
105
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), $("keyboard"));
106
+ },
107
+ className: e("ui-sized-control font-control flex h-7 w-full cursor-pointer items-center rounded-md px-2 pr-7 text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms] disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2"),
108
+ children: /* @__PURE__ */ c("span", {
109
+ id: G,
110
+ children: q ? q.label : /* @__PURE__ */ c("span", {
111
+ className: "text-text-placeholder",
112
+ children: L || f
113
+ })
114
+ })
115
+ }),
116
+ /* @__PURE__ */ c(ie, {
117
+ "aria-hidden": "true",
118
+ className: e("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", O && "rotate-180")
119
+ }),
120
+ O && /* @__PURE__ */ l("div", {
121
+ ref: N,
122
+ className: e("ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] rounded-md border shadow-lg", "flex flex-col overflow-hidden"),
123
+ onMouseDown: (e) => {
124
+ e.target.closest("input, textarea, select, [contenteditable]") || e.preventDefault();
125
+ },
126
+ children: [
127
+ /* @__PURE__ */ c("div", {
128
+ className: "border-border shrink-0 border-b p-1.5",
129
+ children: /* @__PURE__ */ l("div", {
130
+ className: "relative",
131
+ children: [/* @__PURE__ */ c(ae, {
132
+ "aria-hidden": "true",
133
+ className: "text-text-tertiary absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2"
134
+ }), /* @__PURE__ */ c("input", {
135
+ ref: V,
136
+ "data-control-size": D,
137
+ "data-has-icon": "true",
138
+ id: Ee,
139
+ type: "text",
140
+ role: "combobox",
141
+ "aria-label": g ?? (p ? `Search ${p}` : "Search options"),
142
+ "aria-expanded": "true",
143
+ "aria-controls": I,
144
+ "aria-activedescendant": Z && !Z.disabled ? `${I}-${X}` : void 0,
145
+ "aria-autocomplete": "list",
146
+ "aria-describedby": _,
147
+ "aria-invalid": v,
148
+ value: K,
149
+ onChange: (e) => De(e.target.value),
150
+ onKeyDown: Oe,
151
+ placeholder: "Search...",
152
+ className: "ui-sized-control bg-bg-secondary text-text-primary border-border placeholder:text-text-placeholder focus:border-accent font-control h-7 w-full rounded border pr-2 pl-7 text-xs focus:outline-none"
153
+ })]
154
+ })
155
+ }),
156
+ S && /* @__PURE__ */ c("div", {
157
+ role: "status",
158
+ className: "text-text-tertiary shrink-0 px-3 py-2 text-xs",
159
+ children: me
160
+ }),
161
+ C && /* @__PURE__ */ l("div", {
162
+ role: "alert",
163
+ className: "text-text-secondary shrink-0 px-3 py-2 text-xs",
164
+ children: [C, w && /* @__PURE__ */ c("button", {
165
+ type: "button",
166
+ onClick: w,
167
+ className: "text-accent-fg ml-2",
168
+ children: "Retry"
169
+ })]
170
+ }),
171
+ /* @__PURE__ */ c("ul", {
172
+ id: I,
173
+ className: "max-h-48 min-h-0 overflow-y-auto py-1",
174
+ role: "listbox",
175
+ "aria-label": p ?? g ?? "Options",
176
+ "aria-busy": S,
177
+ children: J.map((t, n) => /* @__PURE__ */ l("li", {
178
+ id: `${I}-${n}`,
179
+ role: "option",
180
+ "aria-selected": t.value === L,
181
+ "aria-disabled": t.disabled || void 0,
182
+ onClick: () => Q(t),
183
+ onMouseEnter: () => {
184
+ t.disabled || z(n);
185
+ },
186
+ className: e("font-control flex w-full items-center gap-2 px-3 py-1.5 text-xs", "transition-colors duration-[100ms]", t.disabled ? "text-text-disabled cursor-not-allowed" : "cursor-pointer", !t.disabled && (n === X ? "bg-accent-muted text-accent-fg" : t.value === L ? "text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover")),
187
+ children: [/* @__PURE__ */ c("span", {
188
+ className: "flex-1",
189
+ children: x ? x(t) : t.label
190
+ }), t.value === L && /* @__PURE__ */ c(re, {
191
+ "aria-hidden": "true",
192
+ className: "h-3 w-3 shrink-0"
193
+ })]
194
+ }, t.value))
195
+ }),
196
+ J.length === 0 && !S && !C && /* @__PURE__ */ c("div", {
197
+ role: "status",
198
+ className: "text-text-tertiary shrink-0 px-3 py-2 text-center text-xs",
199
+ children: he
200
+ }),
201
+ T && /* @__PURE__ */ c("div", {
202
+ className: "border-border shrink-0 border-t p-1.5",
203
+ children: T
204
+ })
205
+ ]
206
+ })
207
+ ]
208
+ })
209
+ ]
210
+ });
211
+ }
212
+ //#endregion
213
+ export { u as Combobox };
@@ -1,10 +1,14 @@
1
1
  import { type ButtonProps } from "./Button";
2
2
  export interface CopyButtonProps extends Omit<ButtonProps, "children" | "icon" | "hideLabel" | "onClick" | "onCopy" | "value"> {
3
+ /** Text to copy or a function evaluated when the button is pressed. */
3
4
  value: string | (() => string);
5
+ /** Visible label, or accessible name and tooltip in icon-only mode. */
4
6
  label?: string;
7
+ /** Temporary success label. */
5
8
  copiedLabel?: string;
9
+ /** Show the icon without visible text. */
6
10
  iconOnly?: boolean;
11
+ /** Called with true on success or false on failure. */
7
12
  onCopy?: (ok: boolean) => void;
8
13
  }
9
- export declare function CopyButton({ value, label, copiedLabel, iconOnly, onCopy, variant, ...props }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
10
- //# sourceMappingURL=CopyButton.d.ts.map
14
+ export declare function CopyButton({ value, label, copiedLabel, iconOnly, onCopy, variant, ref, ...props }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { Button as e } from "./Button.js";
2
+ import { useEffect as t, useRef as n, useState as r } from "react";
3
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { Check as s, Copy as c } from "lucide-react";
5
+ //#region src/components/ui/CopyButton.tsx
6
+ function l(e) {
7
+ let t = document.activeElement, n = document.createElement("textarea");
8
+ n.value = e, n.setAttribute("readonly", ""), n.style.position = "fixed", n.style.opacity = "0", document.body.appendChild(n);
9
+ try {
10
+ return n.focus(), n.select(), document.execCommand("copy");
11
+ } catch {
12
+ return !1;
13
+ } finally {
14
+ n.remove(), t instanceof HTMLElement && t.focus();
15
+ }
16
+ }
17
+ async function u(e) {
18
+ if (navigator.clipboard?.writeText) try {
19
+ return await navigator.clipboard.writeText(e), !0;
20
+ } catch {}
21
+ return l(e);
22
+ }
23
+ function d({ value: l, label: d = "Copy", copiedLabel: f = "Copied", iconOnly: p = !1, onCopy: m, variant: h, ref: g, ..._ }) {
24
+ let [v, y] = r(null), [b, x] = r(""), S = n(null), C = n(null);
25
+ t(() => () => {
26
+ C.current !== null && clearTimeout(C.current), S.current !== null && clearTimeout(S.current);
27
+ }, []);
28
+ async function w() {
29
+ let e = !1;
30
+ try {
31
+ e = await u(typeof l == "function" ? l() : l);
32
+ } catch {}
33
+ C.current !== null && clearTimeout(C.current), y(e ? "copied" : "failed"), x(""), S.current !== null && clearTimeout(S.current), S.current = setTimeout(() => {
34
+ x(e ? f : "Copy failed"), S.current = null;
35
+ }, 50), C.current = setTimeout(() => {
36
+ y(null), x(""), C.current = null;
37
+ }, 2e3), m?.(e);
38
+ }
39
+ let T = v === "copied" ? f : v === "failed" ? "Copy failed" : d;
40
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(e, {
41
+ ..._,
42
+ ref: g,
43
+ variant: h ?? (p ? "icon" : "secondary"),
44
+ icon: v === "copied" ? s : c,
45
+ "aria-label": p ? T : _["aria-label"],
46
+ title: p ? T : _.title,
47
+ onClick: w,
48
+ children: p ? void 0 : T
49
+ }), /* @__PURE__ */ a("span", {
50
+ className: "sr-only",
51
+ role: "status",
52
+ "aria-live": "polite",
53
+ children: b
54
+ })] });
55
+ }
56
+ //#endregion
57
+ export { d as CopyButton };
@@ -17,8 +17,8 @@
17
17
  * </DangerZone>
18
18
  * ```
19
19
  */
20
- import type { ReactNode } from "react";
21
- interface DangerZoneProps {
20
+ import type { ComponentPropsWithRef, ReactNode } from "react";
21
+ export interface DangerZoneProps extends Omit<ComponentPropsWithRef<"div">, "title" | "children"> {
22
22
  /**
23
23
  * Section heading.
24
24
  * Defaults to "Danger Zone" — the universal convention for destructive
@@ -35,6 +35,4 @@ interface DangerZoneProps {
35
35
  /** Additional utility classes for the root container. */
36
36
  className?: string;
37
37
  }
38
- export declare function DangerZone({ title, description, children, className, }: DangerZoneProps): import("react/jsx-runtime").JSX.Element;
39
- export {};
40
- //# sourceMappingURL=DangerZone.d.ts.map
38
+ export declare function DangerZone({ title, description, children, className, ref, ...rest }: DangerZoneProps): import("react/jsx-runtime").JSX.Element;