@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,267 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { mergeRefs as t } from "../../lib/mergeRefs.js";
3
+ import { clamp as n } from "../../lib/math.js";
4
+ import { useControlSize as r } from "../../providers/ControlSizeContext.js";
5
+ import { useControllableState as i } from "../../hooks/useControllableState.js";
6
+ import { usePopover as a } from "../../hooks/usePopover.js";
7
+ import { calendarDateFromParts as o, calendarDateParts as s } from "../../lib/calendar.js";
8
+ import { MONTHS_SHORT as c } from "../../lib/months.js";
9
+ import { CalendarGrid as l } from "./CalendarGrid.js";
10
+ import { useId as u, useMemo as d, useState as f } from "react";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ import { Calendar as h } from "lucide-react";
13
+ //#region src/components/ui/DateTimePicker.tsx
14
+ function g(e) {
15
+ return e === 0 ? {
16
+ hour12: 12,
17
+ period: "AM"
18
+ } : e < 12 ? {
19
+ hour12: e,
20
+ period: "AM"
21
+ } : e === 12 ? {
22
+ hour12: 12,
23
+ period: "PM"
24
+ } : {
25
+ hour12: e - 12,
26
+ period: "PM"
27
+ };
28
+ }
29
+ function _(e, t) {
30
+ return t === "AM" ? e === 12 ? 0 : e : e === 12 ? 12 : e + 12;
31
+ }
32
+ function v(e, t) {
33
+ if (t) return new Intl.DateTimeFormat("en-GB", {
34
+ timeZone: t,
35
+ day: "numeric",
36
+ month: "short",
37
+ year: "numeric",
38
+ hour: "2-digit",
39
+ minute: "2-digit",
40
+ timeZoneName: "short",
41
+ hourCycle: "h23"
42
+ }).format(e);
43
+ let n = c[e.getMonth()], r = e.getDate(), i = e.getFullYear(), { hour12: a, period: o } = g(e.getHours());
44
+ return `${n} ${r}, ${i} ${a}:${String(e.getMinutes()).padStart(2, "0")} ${o}`;
45
+ }
46
+ function y(e) {
47
+ return String(e).padStart(2, "0");
48
+ }
49
+ function b({ value: e, defaultValue: t = null, onValueChange: n, ...r }) {
50
+ let [a, o] = i({
51
+ value: e,
52
+ defaultValue: t,
53
+ onChange: n
54
+ });
55
+ return /* @__PURE__ */ p(x, {
56
+ ...r,
57
+ value: a,
58
+ onValueChange: o
59
+ }, r.timeZone ?? "browser-local");
60
+ }
61
+ function x({ controlSize: i, label: c, timeZone: b, value: x, onValueChange: S, placeholder: C = "Select date & time...", ref: w, className: T, ...E }) {
62
+ let D = r(i), { open: O, show: k, close: A, rootRef: j, anchorRef: ee, triggerRef: te, popupRef: ne, labelId: re, popupId: ie, triggerAria: ae } = a({
63
+ haspopup: "dialog",
64
+ labelled: !!c
65
+ }), oe = d(() => t(w, j), [w, j]), [M, N] = f(null), [P, F] = f(!1), [I, L] = f("reject"), R = u(), z = s(x ?? /* @__PURE__ */ new Date(), b), B = x ? g(s(x, b).hour) : {
66
+ hour12: 12,
67
+ period: "PM"
68
+ }, [V, H] = f(z.year), [U, W] = f(z.month - 1), [G, K] = f(String(B.hour12)), [q, J] = f(x ? y(s(x, b).minute) : "00"), [Y, X] = f(B.period), [Z, Q] = f(x);
69
+ function se(e) {
70
+ Q(e);
71
+ }
72
+ function ce(e) {
73
+ let t = e.replace(/\D/g, "").slice(0, 2);
74
+ K(t);
75
+ let n = parseInt(t, 10);
76
+ !isNaN(n) && n >= 13 && n <= 23 ? (K(String(n - 12)), X("PM")) : n === 0 && (K("12"), X("AM"));
77
+ }
78
+ function le() {
79
+ if (!Z) return;
80
+ let e = n(parseInt(G, 10) || 12, 1, 12), t = n(parseInt(q, 10) || 0, 0, 59), r = _(e, Y), i = {
81
+ ...s(Z, b),
82
+ hour: r,
83
+ minute: t,
84
+ second: 0,
85
+ millisecond: 0
86
+ }, a = x ? s(x, b) : null, c;
87
+ try {
88
+ c = I === "reject" && x && a && [
89
+ "year",
90
+ "month",
91
+ "day",
92
+ "hour",
93
+ "minute"
94
+ ].every((e) => a[e] === i[e]) ? new Date(x) : o(i, b, I);
95
+ let e = s(c, b);
96
+ if (e.hour !== r || e.minute !== t || e.day !== i.day) throw RangeError("This time does not exist in the selected timezone");
97
+ } catch (e) {
98
+ let t = e instanceof Error ? e.message : "Invalid date and time";
99
+ N(t), F(t.includes("twice"));
100
+ return;
101
+ }
102
+ N(null), S(c), A("select");
103
+ }
104
+ function $() {
105
+ if (O) {
106
+ A("toggle");
107
+ return;
108
+ }
109
+ if (x) {
110
+ H(s(x, b).year), W(s(x, b).month - 1), Q(x);
111
+ let e = g(s(x, b).hour);
112
+ K(String(e.hour12)), X(e.period), J(y(s(x, b).minute));
113
+ }
114
+ N(null);
115
+ let e = !1;
116
+ if (x && b) try {
117
+ o(s(x, b), b, "reject");
118
+ } catch (t) {
119
+ e = t instanceof Error && t.message.includes("twice");
120
+ }
121
+ F(e), L("reject"), k();
122
+ }
123
+ return /* @__PURE__ */ m("div", {
124
+ ...E,
125
+ ref: oe,
126
+ className: e("flex flex-col gap-1.5", T),
127
+ children: [c && /* @__PURE__ */ p("span", {
128
+ id: re,
129
+ className: "ui-field-label text-xs font-medium",
130
+ children: c
131
+ }), /* @__PURE__ */ m("div", {
132
+ className: "relative",
133
+ ref: ee,
134
+ children: [
135
+ /* @__PURE__ */ p("button", {
136
+ type: "button",
137
+ ref: te,
138
+ ...ae,
139
+ onClick: $,
140
+ "data-control-size": D,
141
+ className: e("ui-sized-control flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
142
+ children: x ? v(x, b) : /* @__PURE__ */ p("span", {
143
+ className: "text-text-placeholder",
144
+ children: C
145
+ })
146
+ }),
147
+ /* @__PURE__ */ p(h, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
148
+ O && /* @__PURE__ */ m("div", {
149
+ ref: ne,
150
+ id: ie,
151
+ role: "dialog",
152
+ "aria-label": "Choose date and time",
153
+ 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", "p-3"),
154
+ children: [
155
+ /* @__PURE__ */ p(l, {
156
+ timeZone: b,
157
+ year: V,
158
+ month: U,
159
+ selected: Z,
160
+ onSelect: se,
161
+ onMonthChange: (e, t) => {
162
+ H(e), W(t);
163
+ }
164
+ }),
165
+ b && /* @__PURE__ */ p("p", {
166
+ className: "text-text-tertiary text-2xs",
167
+ children: b
168
+ }),
169
+ M && /* @__PURE__ */ p("p", {
170
+ id: R,
171
+ role: "alert",
172
+ className: "text-danger-fg text-xs",
173
+ children: M
174
+ }),
175
+ P && /* @__PURE__ */ m("select", {
176
+ "aria-label": "Repeated time occurrence",
177
+ value: I,
178
+ onChange: (e) => L(e.target.value),
179
+ className: "bg-bg-secondary text-text-primary border-border rounded-md border text-xs",
180
+ children: [
181
+ /* @__PURE__ */ p("option", {
182
+ value: "reject",
183
+ children: M ? "Choose an occurrence" : "Keep current occurrence"
184
+ }),
185
+ /* @__PURE__ */ p("option", {
186
+ value: "earlier",
187
+ children: "First occurrence (earlier instant)"
188
+ }),
189
+ /* @__PURE__ */ p("option", {
190
+ value: "later",
191
+ children: "Second occurrence (later instant)"
192
+ })
193
+ ]
194
+ }),
195
+ /* @__PURE__ */ m("div", {
196
+ className: "border-border mt-3 flex items-center gap-2 border-t pt-3",
197
+ children: [
198
+ /* @__PURE__ */ p("span", {
199
+ className: "text-text-secondary text-2xs font-medium",
200
+ children: "Time"
201
+ }),
202
+ /* @__PURE__ */ m("div", {
203
+ className: "flex items-center gap-1",
204
+ children: [
205
+ /* @__PURE__ */ p("input", {
206
+ type: "text",
207
+ inputMode: "numeric",
208
+ maxLength: 2,
209
+ value: G,
210
+ onChange: (e) => ce(e.target.value),
211
+ "aria-label": "Hour",
212
+ "aria-invalid": !!M || void 0,
213
+ "aria-describedby": M ? R : void 0,
214
+ className: "bg-bg-secondary border-border text-text-primary focus:border-accent h-6 w-8 rounded-md border text-center text-xs focus:outline-none"
215
+ }),
216
+ /* @__PURE__ */ p("span", {
217
+ className: "text-text-tertiary text-xs",
218
+ children: ":"
219
+ }),
220
+ /* @__PURE__ */ p("input", {
221
+ type: "text",
222
+ inputMode: "numeric",
223
+ maxLength: 2,
224
+ value: q,
225
+ onChange: (e) => J(e.target.value.replace(/\D/g, "").slice(0, 2)),
226
+ "aria-label": "Minute",
227
+ "aria-invalid": !!M || void 0,
228
+ "aria-describedby": M ? R : void 0,
229
+ className: "bg-bg-secondary border-border text-text-primary focus:border-accent h-6 w-8 rounded-md border text-center text-xs focus:outline-none"
230
+ })
231
+ ]
232
+ }),
233
+ /* @__PURE__ */ m("div", {
234
+ className: "border-border inline-flex overflow-hidden rounded-md border",
235
+ role: "group",
236
+ "aria-label": "Time period",
237
+ children: [/* @__PURE__ */ p("button", {
238
+ type: "button",
239
+ onClick: () => X("AM"),
240
+ "aria-pressed": Y === "AM",
241
+ className: e("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", Y === "AM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
242
+ children: "AM"
243
+ }), /* @__PURE__ */ p("button", {
244
+ type: "button",
245
+ onClick: () => X("PM"),
246
+ "aria-pressed": Y === "PM",
247
+ className: e("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", Y === "PM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
248
+ children: "PM"
249
+ })]
250
+ }),
251
+ /* @__PURE__ */ p("button", {
252
+ type: "button",
253
+ onClick: le,
254
+ disabled: !Z,
255
+ className: e("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", Z ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
256
+ children: "Apply"
257
+ })
258
+ ]
259
+ })
260
+ ]
261
+ })
262
+ ]
263
+ })]
264
+ });
265
+ }
266
+ //#endregion
267
+ export { b as DateTimePicker };
@@ -1,5 +1,5 @@
1
- import { type ReactNode } from "react";
2
- export interface DetailPanelProps {
1
+ import { type ComponentPropsWithRef, type ReactNode } from "react";
2
+ export interface DetailPanelProps extends Omit<ComponentPropsWithRef<"section">, "title" | "children"> {
3
3
  /** Content renders only while open. Closing animates the width to zero. */
4
4
  open: boolean;
5
5
  /** Close request from the button or Escape. Consumers may intercept it. */
@@ -40,5 +40,4 @@ export interface DetailPanelProps {
40
40
  /** Focus the heading on opening. Default true. Closing never restores focus. */
41
41
  autoFocus?: boolean;
42
42
  }
43
- export declare function DetailPanel({ open, onClose, title, children, className, headerActions, sticky, resizable, defaultWidth, minWidth, maxWidth, fraction, defaultFraction, minFraction, maxFraction, onFractionChange, collapsed, onCollapsedChange, railIndicator, overlay, autoFocus, }: DetailPanelProps): import("react/jsx-runtime").JSX.Element;
44
- //# sourceMappingURL=DetailPanel.d.ts.map
43
+ export declare function DetailPanel({ open, onClose, title, children, className, headerActions, sticky, resizable, defaultWidth, minWidth, maxWidth, fraction, defaultFraction, minFraction, maxFraction, onFractionChange, collapsed, onCollapsedChange, railIndicator, overlay, autoFocus, ref, id, style, ...rest }: DetailPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,183 @@
1
+ import { cn as e } from "../../lib/cn.js";
2
+ import { mergeRefs as t } from "../../lib/mergeRefs.js";
3
+ import { OverlayContext as n, useOverlayEscape as r } from "../../hooks/useOverlayStack.js";
4
+ import { panelResizeKey as ee } from "../../lib/panelResize.js";
5
+ import { useEffect as i, useId as a, useLayoutEffect as o, useMemo as te, useRef as s, useState as c } from "react";
6
+ import { Fragment as ne, jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ import { GripVertical as d, PanelRightClose as f, PanelRightOpen as p, X as re } from "lucide-react";
8
+ //#region src/components/ui/DetailPanel.tsx
9
+ function m({ open: m, onClose: h, title: g, children: _, className: ie, headerActions: ae, sticky: v = !1, resizable: oe = !0, defaultWidth: y = 360, minWidth: se = 260, maxWidth: ce = 700, fraction: b, defaultFraction: x, minFraction: S, maxFraction: C, onFractionChange: w, collapsed: T = !1, onCollapsedChange: E, railIndicator: le, overlay: D = !1, autoFocus: O = !0, ref: k, id: A, style: ue, ...de }) {
10
+ let j = s(null), fe = te(() => t(k, j), [k]), M = s(null), N = s(null), P = s(null), F = s(null), I = s(!1), L = s(T), R = a(), z = a(), B = a(), V = A ?? B, [H, pe] = c(y), [me, he] = c(x ?? .5), [ge, U] = c(!1), W = s(null), G = b !== void 0 || x !== void 0 || S !== void 0 || C !== void 0 || w !== void 0, K = G ? Math.max(0, Math.min(1, S ?? .3)) : se, q = G ? Math.max(K, Math.min(1, C ?? .7)) : Math.max(K, ce), J = (e) => Math.max(K, Math.min(q, e)), Y = G ? J(b ?? me) : H, X = G ? x ?? .5 : y, _e = G ? `${Y * 100}%` : H, ve = r(m && !T, () => h(), j), Z = s(!1);
11
+ i(() => {
12
+ let e = j.current;
13
+ if (!e) return;
14
+ let t = () => {
15
+ I.current = e.contains(e.ownerDocument.activeElement);
16
+ };
17
+ return t(), e.ownerDocument.addEventListener("focusin", t), () => e.ownerDocument.removeEventListener("focusin", t);
18
+ }, []), o(() => {
19
+ m || (I.current = !1), m && L.current !== T && I.current && (T ? P : F).current?.focus(), L.current = T;
20
+ }, [T, m]), i(() => {
21
+ let e = j.current, t = e?.ownerDocument.activeElement;
22
+ m && !Z.current && O && !e?.contains(t ?? null) && !t?.closest("[role=\"dialog\"][aria-modal=\"true\"], dialog[open]") && M.current?.focus(), Z.current = m;
23
+ }, [m, O]), o(() => {
24
+ if (!m || T || !G) return;
25
+ let e = j.current?.parentElement, t = N.current;
26
+ if (!e || !t) return;
27
+ let n = (e) => {
28
+ t.style.width = `${e * Y}px`;
29
+ };
30
+ n(e.getBoundingClientRect().width);
31
+ let r = new ResizeObserver(([e]) => {
32
+ n(e.contentRect.width);
33
+ });
34
+ return r.observe(e), () => r.disconnect();
35
+ }, [
36
+ m,
37
+ T,
38
+ G,
39
+ Y
40
+ ]), i(() => {
41
+ let e = j.current?.ownerDocument, t = () => {
42
+ W.current = null, U(!1);
43
+ };
44
+ return e?.addEventListener("pointerup", t), e?.addEventListener("pointercancel", t), () => {
45
+ e?.removeEventListener("pointerup", t), e?.removeEventListener("pointercancel", t);
46
+ };
47
+ }, []);
48
+ function Q(e) {
49
+ let t = J(e);
50
+ G ? (b === void 0 && he(t), w?.(t)) : pe(t);
51
+ }
52
+ function $() {
53
+ W.current = null, U(!1);
54
+ }
55
+ return /* @__PURE__ */ l("section", {
56
+ ...de,
57
+ ref: fe,
58
+ id: V,
59
+ role: "region",
60
+ "aria-labelledby": m ? z : void 0,
61
+ "aria-hidden": !m || void 0,
62
+ className: e("border-border relative shrink-0 border-l", D ? "ui-glass ui-glass-popover bg-bg-secondary" : "bg-bg-pinned", !(ge && m && !T) && "transition-[width] duration-[200ms] ease-out", ie),
63
+ style: {
64
+ width: m ? T ? "3rem" : _e : 0,
65
+ position: D ? "absolute" : v ? "sticky" : void 0,
66
+ top: D ? 0 : v ? "var(--detail-panel-top, 0px)" : void 0,
67
+ right: D ? 0 : void 0,
68
+ bottom: D ? 0 : void 0,
69
+ height: v && !D ? "calc(100vh - var(--detail-panel-top, 0px))" : void 0,
70
+ alignSelf: v && !D ? "flex-start" : void 0,
71
+ zIndex: D ? 10 : void 0,
72
+ ...ue
73
+ },
74
+ children: m && /* @__PURE__ */ u(n.Provider, {
75
+ value: ve,
76
+ children: [oe && !T && /* @__PURE__ */ l("div", {
77
+ role: "separator",
78
+ tabIndex: 0,
79
+ "aria-orientation": "vertical",
80
+ "aria-label": "Resize panel",
81
+ "aria-controls": V,
82
+ "aria-valuenow": Math.round(Y * (G ? 100 : 1)),
83
+ "aria-valuemin": Math.round(K * (G ? 100 : 1)),
84
+ "aria-valuemax": Math.round(q * (G ? 100 : 1)),
85
+ "aria-valuetext": `${Math.round(Y * (G ? 100 : 1))}${G ? "%" : "px"}`,
86
+ className: "text-text-tertiary hover:text-text-secondary hover:bg-accent/30 active:bg-accent/40 focus-visible:outline-accent absolute top-0 left-0 z-10 h-full w-1 cursor-col-resize select-none focus-visible:outline-2 focus-visible:outline-offset-0",
87
+ style: { touchAction: "none" },
88
+ onPointerDown: (e) => {
89
+ e.button === 0 && (e.preventDefault(), e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId), W.current = {
90
+ x: e.clientX,
91
+ width: Y,
92
+ pointerId: e.pointerId,
93
+ parentWidth: j.current?.parentElement?.getBoundingClientRect().width ?? 0
94
+ }, U(!0));
95
+ },
96
+ onPointerMove: (e) => {
97
+ let t = W.current;
98
+ !t || t.pointerId !== e.pointerId || G && !t.parentWidth || Q(t.width + (t.x - e.clientX) / (G ? t.parentWidth : 1));
99
+ },
100
+ onPointerUp: $,
101
+ onPointerCancel: $,
102
+ onLostPointerCapture: $,
103
+ onDoubleClick: () => Q(X),
104
+ onKeyDown: (e) => {
105
+ let t = ee(e.key, Y, G ? .02 : 16);
106
+ t !== void 0 && (e.preventDefault(), Q(t ?? X));
107
+ },
108
+ children: /* @__PURE__ */ l("span", {
109
+ "aria-hidden": "true",
110
+ className: "bg-bg-pinned border-border absolute left-0 flex h-8 w-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md border transition-colors duration-[100ms]",
111
+ style: { top: "calc(100% / 3)" },
112
+ children: /* @__PURE__ */ l(d, {
113
+ "aria-hidden": "true",
114
+ className: "h-3.5 w-3.5"
115
+ })
116
+ })
117
+ }), /* @__PURE__ */ l("div", {
118
+ className: "h-full overflow-hidden",
119
+ children: /* @__PURE__ */ u("div", {
120
+ ref: N,
121
+ className: "animate-fade-in flex h-full flex-col",
122
+ style: { width: T ? "3rem" : G ? void 0 : H },
123
+ children: [/* @__PURE__ */ u("div", {
124
+ className: e("border-border flex shrink-0 items-center justify-between border-b px-3", T ? "flex-col gap-2 py-3" : "h-10"),
125
+ children: [/* @__PURE__ */ l("h3", {
126
+ ref: M,
127
+ id: z,
128
+ tabIndex: -1,
129
+ className: "text-text-primary truncate text-xs font-semibold",
130
+ style: T ? {
131
+ writingMode: "vertical-rl",
132
+ maxHeight: "12rem"
133
+ } : void 0,
134
+ children: g
135
+ }), T ? /* @__PURE__ */ u(ne, { children: [le, E && /* @__PURE__ */ u("button", {
136
+ type: "button",
137
+ onClick: () => E(!1),
138
+ ref: P,
139
+ "aria-labelledby": `${R} ${z}`,
140
+ className: "text-text-tertiary hover:text-text-primary flex h-6 w-6 shrink-0 items-center justify-center rounded",
141
+ children: [/* @__PURE__ */ l("span", {
142
+ id: R,
143
+ className: "sr-only",
144
+ children: "Expand"
145
+ }), /* @__PURE__ */ l(p, { className: "h-3.5 w-3.5" })]
146
+ })] }) : /* @__PURE__ */ u("div", {
147
+ className: "flex shrink-0 items-center gap-1",
148
+ children: [
149
+ E && /* @__PURE__ */ u("button", {
150
+ type: "button",
151
+ onClick: () => E(!0),
152
+ ref: F,
153
+ "aria-labelledby": `${R} ${z}`,
154
+ className: "text-text-tertiary hover:text-text-primary flex h-6 w-6 items-center justify-center rounded",
155
+ children: [/* @__PURE__ */ l("span", {
156
+ id: R,
157
+ className: "sr-only",
158
+ children: "Collapse"
159
+ }), /* @__PURE__ */ l(f, { className: "h-3.5 w-3.5" })]
160
+ }),
161
+ ae,
162
+ /* @__PURE__ */ l("button", {
163
+ type: "button",
164
+ onClick: h,
165
+ className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded",
166
+ "aria-label": "Close panel",
167
+ children: /* @__PURE__ */ l(re, { className: "h-3.5 w-3.5" })
168
+ })
169
+ ]
170
+ })]
171
+ }), /* @__PURE__ */ l("div", {
172
+ hidden: T,
173
+ inert: T,
174
+ className: "min-h-0 flex-1 overflow-y-auto p-3",
175
+ children: _
176
+ })]
177
+ })
178
+ })]
179
+ })
180
+ });
181
+ }
182
+ //#endregion
183
+ export { m as DetailPanel };
@@ -1,9 +1,9 @@
1
- import { type ReactNode, type RefObject } from "react";
1
+ import { type ComponentPropsWithRef, type ReactNode, type RefObject } from "react";
2
2
  import { type AnchorPlacement } from "../../lib/anchorPlacement";
3
3
  /** Where a Dialog opens: the centred layout, or beside its anchor. */
4
4
  export type DialogPlacement = "center" | AnchorPlacement;
5
5
  export type DialogSize = "sm" | "md" | "lg" | "xl";
6
- export interface DialogProps {
6
+ export interface DialogProps extends Omit<ComponentPropsWithRef<"div">, "title" | "children" | "role" | "draggable"> {
7
7
  /** Maximum width: sm 400px, md 576px, lg 768px, xl 1024px. Defaults to `sm`. */
8
8
  size?: DialogSize;
9
9
  /** Whether the dialog is shown. It renders nothing when `false`. */
@@ -142,5 +142,4 @@ export interface DialogProps {
142
142
  */
143
143
  hideCloseButton?: boolean;
144
144
  }
145
- export declare function Dialog({ open, onClose, title, children, footer, className, size, draggable, resizable, rememberPosition, placement, anchorRef, role, description, "aria-label": ariaLabel, "aria-describedby": describedBy, initialFocusRef, returnFocusRef, busy, closeOnEscape, closeOnOverlayClick, hideCloseButton, }: DialogProps): import("react").ReactPortal | null;
146
- //# sourceMappingURL=Dialog.d.ts.map
145
+ export declare function Dialog({ open, onClose, title, children, footer, className, size, draggable, resizable, rememberPosition, placement, anchorRef, role, description, "aria-label": ariaLabel, "aria-describedby": describedBy, initialFocusRef, returnFocusRef, busy, closeOnEscape, closeOnOverlayClick, hideCloseButton, ref, ...rest }: DialogProps): import("react").ReactPortal | null;