zabi-components 8.0.0 → 8.1.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 (364) hide show
  1. package/CHANGELOG.md +1924 -0
  2. package/README.md +243 -10
  3. package/THEME.md +149 -332
  4. package/THEMING.md +1192 -266
  5. package/dist/atoms/ActionPanel.svelte +15 -5
  6. package/dist/atoms/Avatar.svelte +104 -0
  7. package/dist/atoms/Avatar.svelte.d.ts +34 -0
  8. package/dist/atoms/Badge.svelte +36 -7
  9. package/dist/atoms/Badge.svelte.d.ts +2 -2
  10. package/dist/atoms/Button.svelte +177 -27
  11. package/dist/atoms/Button.svelte.d.ts +30 -2
  12. package/dist/atoms/Card.svelte +4 -4
  13. package/dist/atoms/CardHeader.svelte +16 -4
  14. package/dist/atoms/Checkbox.svelte +48 -21
  15. package/dist/atoms/Checkbox.svelte.d.ts +4 -2
  16. package/dist/atoms/CodeBlock.svelte +20 -2
  17. package/dist/atoms/CodeBlock.svelte.d.ts +4 -0
  18. package/dist/atoms/ColorPicker.svelte +259 -49
  19. package/dist/atoms/ColorPicker.svelte.d.ts +3 -0
  20. package/dist/atoms/Container.svelte +16 -8
  21. package/dist/atoms/DateField.svelte +107 -0
  22. package/dist/atoms/DateField.svelte.d.ts +53 -0
  23. package/dist/atoms/FieldMessages.svelte +69 -0
  24. package/dist/atoms/FieldMessages.svelte.d.ts +23 -0
  25. package/dist/atoms/FloatingActionButton.svelte +174 -0
  26. package/dist/atoms/FloatingActionButton.svelte.d.ts +51 -0
  27. package/dist/atoms/Heading.svelte +37 -5
  28. package/dist/atoms/Heading.svelte.d.ts +7 -0
  29. package/dist/atoms/IconButton.svelte +220 -24
  30. package/dist/atoms/IconButton.svelte.d.ts +49 -4
  31. package/dist/atoms/Input.svelte +253 -52
  32. package/dist/atoms/Input.svelte.d.ts +32 -2
  33. package/dist/atoms/List.svelte +4 -1
  34. package/dist/atoms/ListItem.svelte +44 -11
  35. package/dist/atoms/ListItem.svelte.d.ts +5 -0
  36. package/dist/atoms/Progress.svelte +27 -8
  37. package/dist/atoms/Progress.svelte.d.ts +4 -0
  38. package/dist/atoms/Radio.svelte +19 -3
  39. package/dist/atoms/Radio.svelte.d.ts +4 -2
  40. package/dist/atoms/Rating.svelte +494 -0
  41. package/dist/atoms/Rating.svelte.d.ts +56 -0
  42. package/dist/atoms/Select.svelte +433 -91
  43. package/dist/atoms/Select.svelte.d.ts +49 -3
  44. package/dist/atoms/SelectionControl.svelte +94 -17
  45. package/dist/atoms/SelectionControl.svelte.d.ts +4 -3
  46. package/dist/atoms/Skeleton.svelte +1 -1
  47. package/dist/atoms/Slider.svelte +309 -0
  48. package/dist/atoms/Slider.svelte.d.ts +40 -0
  49. package/dist/atoms/Spinner.svelte +57 -0
  50. package/dist/atoms/Spinner.svelte.d.ts +19 -0
  51. package/dist/atoms/Table.svelte +151 -6
  52. package/dist/atoms/Table.svelte.d.ts +15 -3
  53. package/dist/atoms/TemporalField.svelte +140 -0
  54. package/dist/atoms/TemporalField.svelte.d.ts +32 -0
  55. package/dist/atoms/Text.svelte +23 -11
  56. package/dist/atoms/Text.svelte.d.ts +6 -3
  57. package/dist/atoms/Textarea.svelte +55 -44
  58. package/dist/atoms/Textarea.svelte.d.ts +14 -2
  59. package/dist/atoms/ThemeToggle.svelte +223 -44
  60. package/dist/atoms/ThemeToggle.svelte.d.ts +26 -3
  61. package/dist/atoms/TimeField.svelte +108 -0
  62. package/dist/atoms/TimeField.svelte.d.ts +54 -0
  63. package/dist/atoms/Toast.svelte +17 -4
  64. package/dist/atoms/Toast.svelte.d.ts +2 -0
  65. package/dist/atoms/Toggle.svelte +41 -8
  66. package/dist/atoms/Toggle.svelte.d.ts +11 -2
  67. package/dist/atoms/Tooltip.svelte +508 -23
  68. package/dist/atoms/Tooltip.svelte.d.ts +11 -0
  69. package/dist/atoms/ZabiStringsProvider.svelte +45 -0
  70. package/dist/atoms/ZabiStringsProvider.svelte.d.ts +27 -0
  71. package/dist/atoms/index.d.ts +17 -0
  72. package/dist/atoms/index.js +12 -0
  73. package/dist/atoms/selection-control.styles.d.ts +36 -5
  74. package/dist/atoms/selection-control.styles.js +40 -9
  75. package/dist/components/atoms/index.d.ts +17 -0
  76. package/dist/components/atoms/index.d.ts.map +1 -1
  77. package/dist/components/atoms/selection-control.styles.d.ts +36 -5
  78. package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
  79. package/dist/components/index.d.ts +80 -2
  80. package/dist/components/index.d.ts.map +1 -1
  81. package/dist/components/molecules/index.d.ts +46 -0
  82. package/dist/components/molecules/index.d.ts.map +1 -1
  83. package/dist/components/molecules/toast-store.d.ts +53 -7
  84. package/dist/components/molecules/toast-store.d.ts.map +1 -1
  85. package/dist/components/organisms/index.d.ts +5 -0
  86. package/dist/components/organisms/index.d.ts.map +1 -1
  87. package/dist/components/types/variants.d.ts +15 -1
  88. package/dist/components/types/variants.d.ts.map +1 -1
  89. package/dist/components/util/app-shell.d.ts +28 -0
  90. package/dist/components/util/app-shell.d.ts.map +1 -0
  91. package/dist/components/util/avatar.d.ts +36 -0
  92. package/dist/components/util/avatar.d.ts.map +1 -0
  93. package/dist/components/util/bottom-sheet.d.ts +30 -0
  94. package/dist/components/util/bottom-sheet.d.ts.map +1 -0
  95. package/dist/components/util/bottom-tab-bar.d.ts +35 -0
  96. package/dist/components/util/bottom-tab-bar.d.ts.map +1 -0
  97. package/dist/components/util/calendar.d.ts +56 -0
  98. package/dist/components/util/calendar.d.ts.map +1 -0
  99. package/dist/components/util/collapsible.d.ts +58 -0
  100. package/dist/components/util/collapsible.d.ts.map +1 -0
  101. package/dist/components/util/confirm-dialog.d.ts +12 -0
  102. package/dist/components/util/confirm-dialog.d.ts.map +1 -0
  103. package/dist/components/util/date.d.ts +96 -0
  104. package/dist/components/util/date.d.ts.map +1 -0
  105. package/dist/components/util/drawer.d.ts +13 -0
  106. package/dist/components/util/drawer.d.ts.map +1 -0
  107. package/dist/components/util/dropdown.d.ts +47 -0
  108. package/dist/components/util/dropdown.d.ts.map +1 -0
  109. package/dist/components/util/field.d.ts +39 -0
  110. package/dist/components/util/field.d.ts.map +1 -0
  111. package/dist/components/util/fit-in-viewport.d.ts +201 -0
  112. package/dist/components/util/fit-in-viewport.d.ts.map +1 -0
  113. package/dist/components/util/focus-utils.d.ts +75 -2
  114. package/dist/components/util/focus-utils.d.ts.map +1 -1
  115. package/dist/components/util/hydration.d.ts +45 -0
  116. package/dist/components/util/hydration.d.ts.map +1 -0
  117. package/dist/components/util/keyboard-inset.d.ts +18 -0
  118. package/dist/components/util/keyboard-inset.d.ts.map +1 -0
  119. package/dist/components/util/media-grid.d.ts +51 -0
  120. package/dist/components/util/media-grid.d.ts.map +1 -0
  121. package/dist/components/util/media.d.ts +6 -0
  122. package/dist/components/util/media.d.ts.map +1 -0
  123. package/dist/components/util/overlay-chrome.d.ts +53 -0
  124. package/dist/components/util/overlay-chrome.d.ts.map +1 -0
  125. package/dist/components/util/overlay.d.ts +72 -0
  126. package/dist/components/util/overlay.d.ts.map +1 -0
  127. package/dist/components/util/photo.d.ts +215 -0
  128. package/dist/components/util/photo.d.ts.map +1 -0
  129. package/dist/components/util/portal.d.ts +23 -0
  130. package/dist/components/util/portal.d.ts.map +1 -0
  131. package/dist/components/util/pull-to-refresh.d.ts +27 -0
  132. package/dist/components/util/pull-to-refresh.d.ts.map +1 -0
  133. package/dist/components/util/radio-keys.d.ts +25 -0
  134. package/dist/components/util/radio-keys.d.ts.map +1 -0
  135. package/dist/components/util/rating.d.ts +23 -0
  136. package/dist/components/util/rating.d.ts.map +1 -0
  137. package/dist/components/util/ready-made-strings.d.ts +77 -0
  138. package/dist/components/util/ready-made-strings.d.ts.map +1 -0
  139. package/dist/components/util/scroll-padding.d.ts +20 -0
  140. package/dist/components/util/scroll-padding.d.ts.map +1 -0
  141. package/dist/components/util/segmented-control.d.ts +16 -0
  142. package/dist/components/util/segmented-control.d.ts.map +1 -0
  143. package/dist/components/util/select.d.ts +41 -0
  144. package/dist/components/util/select.d.ts.map +1 -0
  145. package/dist/components/util/sheet-drag.d.ts +60 -0
  146. package/dist/components/util/sheet-drag.d.ts.map +1 -0
  147. package/dist/components/util/sidebar.d.ts +63 -0
  148. package/dist/components/util/sidebar.d.ts.map +1 -0
  149. package/dist/components/util/sortable-list.d.ts +65 -0
  150. package/dist/components/util/sortable-list.d.ts.map +1 -0
  151. package/dist/components/util/stepper.d.ts +40 -0
  152. package/dist/components/util/stepper.d.ts.map +1 -0
  153. package/dist/components/util/swipeable-list-item.d.ts +36 -0
  154. package/dist/components/util/swipeable-list-item.d.ts.map +1 -0
  155. package/dist/components/util/theme-mode.d.ts +80 -0
  156. package/dist/components/util/theme-mode.d.ts.map +1 -0
  157. package/dist/components/util/toaster.d.ts +93 -0
  158. package/dist/components/util/toaster.d.ts.map +1 -0
  159. package/dist/components/util/tooltip.d.ts +10 -0
  160. package/dist/components/util/tooltip.d.ts.map +1 -0
  161. package/dist/components/util/top-navbar.d.ts +11 -0
  162. package/dist/components/util/top-navbar.d.ts.map +1 -0
  163. package/dist/components/util/touch-target.d.ts +31 -0
  164. package/dist/components/util/touch-target.d.ts.map +1 -0
  165. package/dist/components/util/zabi-strings.d.ts +133 -0
  166. package/dist/components/util/zabi-strings.d.ts.map +1 -0
  167. package/dist/create-theme/cli.js +169 -0
  168. package/dist/create-theme/index.d.ts +176 -0
  169. package/dist/create-theme/index.js +817 -0
  170. package/dist/create-theme/lib/ramp-math.js +128 -0
  171. package/dist/create-theme/lib/resolve.js +141 -0
  172. package/dist/create-theme/theme-data.js +1116 -0
  173. package/dist/index.d.ts +80 -2
  174. package/dist/index.js +57 -2
  175. package/dist/molecules/Alert.svelte +33 -5
  176. package/dist/molecules/Alert.svelte.d.ts +2 -0
  177. package/dist/molecules/AppBar.svelte +415 -0
  178. package/dist/molecules/AppBar.svelte.d.ts +69 -0
  179. package/dist/molecules/AvatarGroup.svelte +116 -0
  180. package/dist/molecules/AvatarGroup.svelte.d.ts +40 -0
  181. package/dist/molecules/BottomSheet.svelte +540 -0
  182. package/dist/molecules/BottomSheet.svelte.d.ts +93 -0
  183. package/dist/molecules/BottomTabBar.svelte +297 -0
  184. package/dist/molecules/BottomTabBar.svelte.d.ts +64 -0
  185. package/dist/molecules/Calendar.svelte +597 -0
  186. package/dist/molecules/Calendar.svelte.d.ts +72 -0
  187. package/dist/molecules/Collapsible.svelte +243 -0
  188. package/dist/molecules/Collapsible.svelte.d.ts +44 -0
  189. package/dist/molecules/CollapsibleGroup.svelte +126 -0
  190. package/dist/molecules/CollapsibleGroup.svelte.d.ts +14 -0
  191. package/dist/molecules/ComponentDemo.svelte +16 -4
  192. package/dist/molecules/ComponentDemo.svelte.d.ts +3 -0
  193. package/dist/molecules/ConfirmDialog.svelte +253 -0
  194. package/dist/molecules/ConfirmDialog.svelte.d.ts +55 -0
  195. package/dist/molecules/ContactForm.svelte +34 -17
  196. package/dist/molecules/ContactForm.svelte.d.ts +8 -0
  197. package/dist/molecules/Drawer.svelte +394 -0
  198. package/dist/molecules/Drawer.svelte.d.ts +55 -0
  199. package/dist/molecules/Dropdown.svelte +509 -48
  200. package/dist/molecules/Dropdown.svelte.d.ts +45 -6
  201. package/dist/molecules/DropdownItem.svelte +122 -0
  202. package/dist/molecules/DropdownItem.svelte.d.ts +28 -0
  203. package/dist/molecules/EmptyState.svelte +55 -10
  204. package/dist/molecules/EmptyState.svelte.d.ts +8 -0
  205. package/dist/molecules/FormField.svelte +9 -1
  206. package/dist/molecules/FormField.svelte.d.ts +2 -0
  207. package/dist/molecules/Header.svelte +1 -1
  208. package/dist/molecules/ImageUpload.svelte +383 -70
  209. package/dist/molecules/ImageUpload.svelte.d.ts +47 -2
  210. package/dist/molecules/MediaGrid.svelte +527 -0
  211. package/dist/molecules/MediaGrid.svelte.d.ts +77 -0
  212. package/dist/molecules/Modal.svelte +288 -72
  213. package/dist/molecules/Modal.svelte.d.ts +51 -2
  214. package/dist/molecules/NavigationMenuContent.svelte +58 -1
  215. package/dist/molecules/NavigationMenuItem.svelte +0 -1
  216. package/dist/molecules/NavigationMenuLink.svelte +1 -1
  217. package/dist/molecules/NavigationMenuList.svelte +10 -3
  218. package/dist/molecules/NavigationMenuTrigger.svelte +2 -2
  219. package/dist/molecules/Page.svelte +32 -2
  220. package/dist/molecules/Page.svelte.d.ts +11 -0
  221. package/dist/molecules/PhotoGrid.svelte +433 -0
  222. package/dist/molecules/PhotoGrid.svelte.d.ts +62 -0
  223. package/dist/molecules/PhotoViewer.svelte +1116 -0
  224. package/dist/molecules/PhotoViewer.svelte.d.ts +56 -0
  225. package/dist/molecules/PropsTable.svelte +22 -10
  226. package/dist/molecules/PropsTable.svelte.d.ts +3 -0
  227. package/dist/molecules/PullToRefresh.svelte +263 -0
  228. package/dist/molecules/PullToRefresh.svelte.d.ts +52 -0
  229. package/dist/molecules/RadioGroup.svelte +52 -14
  230. package/dist/molecules/RadioGroup.svelte.d.ts +14 -3
  231. package/dist/molecules/Section.svelte +1 -1
  232. package/dist/molecules/SegmentedControl.svelte +323 -0
  233. package/dist/molecules/SegmentedControl.svelte.d.ts +34 -0
  234. package/dist/molecules/SidebarBrandHeader.svelte +11 -1
  235. package/dist/molecules/SidebarBrandHeader.svelte.d.ts +3 -0
  236. package/dist/molecules/SidebarFooter.svelte +29 -6
  237. package/dist/molecules/SidebarFooter.svelte.d.ts +3 -0
  238. package/dist/molecules/SlideUp.svelte +220 -61
  239. package/dist/molecules/SlideUp.svelte.d.ts +26 -0
  240. package/dist/molecules/SortableList.svelte +632 -0
  241. package/dist/molecules/SortableList.svelte.d.ts +69 -0
  242. package/dist/molecules/Stepper.svelte +548 -0
  243. package/dist/molecules/Stepper.svelte.d.ts +39 -0
  244. package/dist/molecules/StickyActionBar.svelte +191 -0
  245. package/dist/molecules/StickyActionBar.svelte.d.ts +65 -0
  246. package/dist/molecules/SwipeableListItem.svelte +334 -0
  247. package/dist/molecules/SwipeableListItem.svelte.d.ts +54 -0
  248. package/dist/molecules/Tabs.svelte +233 -9
  249. package/dist/molecules/Tabs.svelte.d.ts +7 -0
  250. package/dist/molecules/Toaster.svelte +350 -5
  251. package/dist/molecules/Toaster.svelte.d.ts +95 -2
  252. package/dist/molecules/ToasterToast.svelte +253 -67
  253. package/dist/molecules/ToasterToast.svelte.d.ts +9 -0
  254. package/dist/molecules/UnsavedChangesBar.svelte +212 -0
  255. package/dist/molecules/UnsavedChangesBar.svelte.d.ts +43 -0
  256. package/dist/molecules/index.d.ts +46 -0
  257. package/dist/molecules/index.js +27 -0
  258. package/dist/molecules/toast-store.d.ts +53 -7
  259. package/dist/molecules/toast-store.js +21 -0
  260. package/dist/organisms/AppShell.svelte +196 -0
  261. package/dist/organisms/AppShell.svelte.d.ts +61 -0
  262. package/dist/organisms/SidebarAccountPanel.svelte +107 -12
  263. package/dist/organisms/SidebarAccountPanel.svelte.d.ts +19 -0
  264. package/dist/organisms/SidebarNavigation.svelte +96 -15
  265. package/dist/organisms/SidebarNavigation.svelte.d.ts +29 -1
  266. package/dist/organisms/SidebarPanel.svelte +31 -10
  267. package/dist/organisms/SidebarShell.svelte +162 -11
  268. package/dist/organisms/SidebarShell.svelte.d.ts +56 -2
  269. package/dist/organisms/TopNavbar.svelte +256 -31
  270. package/dist/organisms/TopNavbar.svelte.d.ts +26 -0
  271. package/dist/organisms/index.d.ts +5 -0
  272. package/dist/organisms/index.js +3 -0
  273. package/dist/types/components.d.ts +4 -0
  274. package/dist/types/components.d.ts.map +1 -1
  275. package/dist/types/index.d.ts +605 -25
  276. package/dist/types/index.d.ts.map +1 -1
  277. package/dist/types/variants.ts +17 -1
  278. package/dist/util/app-shell.d.ts +27 -0
  279. package/dist/util/app-shell.js +72 -0
  280. package/dist/util/avatar.d.ts +35 -0
  281. package/dist/util/avatar.js +52 -0
  282. package/dist/util/bottom-sheet.d.ts +29 -0
  283. package/dist/util/bottom-sheet.js +43 -0
  284. package/dist/util/bottom-tab-bar.d.ts +34 -0
  285. package/dist/util/bottom-tab-bar.js +54 -0
  286. package/dist/util/calendar.d.ts +55 -0
  287. package/dist/util/calendar.js +74 -0
  288. package/dist/util/collapsible.d.ts +57 -0
  289. package/dist/util/collapsible.js +23 -0
  290. package/dist/util/confirm-dialog.d.ts +11 -0
  291. package/dist/util/confirm-dialog.js +2 -0
  292. package/dist/util/date.d.ts +95 -0
  293. package/dist/util/date.js +237 -0
  294. package/dist/util/drawer.d.ts +12 -0
  295. package/dist/util/drawer.js +7 -0
  296. package/dist/util/dropdown.d.ts +46 -0
  297. package/dist/util/dropdown.js +21 -0
  298. package/dist/util/field.d.ts +38 -0
  299. package/dist/util/field.js +38 -0
  300. package/dist/util/fit-in-viewport.d.ts +200 -0
  301. package/dist/util/fit-in-viewport.js +399 -0
  302. package/dist/util/focus-utils.d.ts +75 -2
  303. package/dist/util/focus-utils.js +182 -9
  304. package/dist/util/hydration.d.ts +44 -0
  305. package/dist/util/hydration.js +58 -0
  306. package/dist/util/keyboard-inset.d.ts +17 -0
  307. package/dist/util/keyboard-inset.js +53 -0
  308. package/dist/util/media-grid.d.ts +50 -0
  309. package/dist/util/media-grid.js +81 -0
  310. package/dist/util/media.d.ts +5 -0
  311. package/dist/util/media.js +10 -0
  312. package/dist/util/overlay-chrome.d.ts +52 -0
  313. package/dist/util/overlay-chrome.js +56 -0
  314. package/dist/util/overlay.d.ts +71 -0
  315. package/dist/util/overlay.js +240 -0
  316. package/dist/util/photo.d.ts +214 -0
  317. package/dist/util/photo.js +206 -0
  318. package/dist/util/portal.d.ts +22 -0
  319. package/dist/util/portal.js +50 -0
  320. package/dist/util/pull-to-refresh.d.ts +26 -0
  321. package/dist/util/pull-to-refresh.js +30 -0
  322. package/dist/util/radio-keys.d.ts +24 -0
  323. package/dist/util/radio-keys.js +49 -0
  324. package/dist/util/rating.d.ts +22 -0
  325. package/dist/util/rating.js +26 -0
  326. package/dist/util/ready-made-strings.d.ts +76 -0
  327. package/dist/util/ready-made-strings.js +67 -0
  328. package/dist/util/scroll-padding.d.ts +19 -0
  329. package/dist/util/scroll-padding.js +44 -0
  330. package/dist/util/segmented-control.d.ts +15 -0
  331. package/dist/util/segmented-control.js +1 -0
  332. package/dist/util/select.d.ts +40 -0
  333. package/dist/util/select.js +63 -0
  334. package/dist/util/sheet-drag.d.ts +59 -0
  335. package/dist/util/sheet-drag.js +241 -0
  336. package/dist/util/sidebar.d.ts +62 -0
  337. package/dist/util/sidebar.js +38 -0
  338. package/dist/util/sortable-list.d.ts +64 -0
  339. package/dist/util/sortable-list.js +53 -0
  340. package/dist/util/stepper.d.ts +39 -0
  341. package/dist/util/stepper.js +38 -0
  342. package/dist/util/swipeable-list-item.d.ts +35 -0
  343. package/dist/util/swipeable-list-item.js +32 -0
  344. package/dist/util/theme-mode.d.ts +79 -0
  345. package/dist/util/theme-mode.js +121 -0
  346. package/dist/util/toaster.d.ts +92 -0
  347. package/dist/util/toaster.js +75 -0
  348. package/dist/util/tooltip.d.ts +9 -0
  349. package/dist/util/tooltip.js +18 -0
  350. package/dist/util/top-navbar.d.ts +10 -0
  351. package/dist/util/top-navbar.js +5 -0
  352. package/dist/util/touch-target.d.ts +30 -0
  353. package/dist/util/touch-target.js +30 -0
  354. package/dist/util/zabi-strings.d.ts +132 -0
  355. package/dist/util/zabi-strings.js +105 -0
  356. package/dist/zabi-components-colors.css +5 -2
  357. package/dist/zabi-components-theme-dark-only.css +543 -241
  358. package/dist/zabi-components-theme-dark.css +543 -241
  359. package/dist/zabi-components-theme-only.css +1584 -367
  360. package/dist/zabi-components-theme.css +1584 -367
  361. package/dist/zabi-components.css +3885 -518
  362. package/docs/lucide-icons.md +40 -17
  363. package/docs/theme-imports.md +81 -11
  364. package/package.json +35 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAA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AE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EACH,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACR,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,+BAA+B,CAAC"}
@@ -1,17 +1,52 @@
1
+ import type { ToastDuration } from '../util/toaster.js';
1
2
  export type ToastLevel = 'success' | 'error' | 'warning' | 'info';
3
+ /**
4
+ * One action offered inside a toast, such as Undo.
5
+ *
6
+ * A toast with an action stays until it is dismissed, unless you give it a
7
+ * `duration` (a named length or milliseconds): a keyboard user has to reach the button first, and the toaster
8
+ * may be far away in the tab order (WCAG 2.2.1). `focusToasts()` moves focus
9
+ * there. The action must still not be the only way to do the thing: offer it
10
+ * elsewhere in the page as well.
11
+ */
12
+ export interface ToastAction {
13
+ /** Button text, and its accessible name. */
14
+ label: string;
15
+ onclick: () => void;
16
+ /** Close the toast after the handler runs. Defaults to `true`. */
17
+ dismissOnClick?: boolean;
18
+ }
2
19
  export interface ToastItem {
3
20
  id: string;
4
- /** Primary line (always shown). */
21
+ /**
22
+ * What the toast says. Always shown: as its one line, or under `title`
23
+ * when it has one.
24
+ */
5
25
  message: string;
6
26
  type: ToastLevel;
27
+ /** A heading over the message. Without it the message stands alone. */
7
28
  title?: string;
8
- /** Expandable body; UI can fall back to `message`. */
29
+ /**
30
+ * The long version, kept behind a button that opens it. Only a toast
31
+ * with `detail` has that button.
32
+ */
9
33
  detail?: string;
10
34
  /**
11
- * Auto-dismiss duration in milliseconds.
12
- * When omitted, the toaster uses 14s. Use `0` to keep the toast until dismissed manually.
35
+ * How long the toast stays: `"short"` (3 s, a few words that need no
36
+ * reading time), `"medium"` (7 s), `"long"` (14 s), `"persistent"`
37
+ * (until it is dismissed: what the user has to act on, and errors), or
38
+ * a number of milliseconds, where `0` is persistent too. What is given
39
+ * here always wins.
40
+ *
41
+ * When omitted, the toaster decides: an error and a toast with an
42
+ * `action` stay until dismissed. Everything else goes by its title and
43
+ * message together: up to 120 characters gets `medium` (or the
44
+ * Toaster's `defaultDuration`), 121 to 240 gets `long`, and more than
45
+ * 240 stays until dismissed.
13
46
  */
14
- duration?: number;
47
+ duration?: ToastDuration;
48
+ /** An action button in the toast, such as Undo. */
49
+ action?: ToastAction;
15
50
  }
16
51
  export declare const toastStore: {
17
52
  subscribe: (this: void, run: import("svelte/store").Subscriber<ToastItem[]>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
@@ -19,10 +54,11 @@ export declare const toastStore: {
19
54
  message: string;
20
55
  type?: ToastLevel;
21
56
  /** Same semantics as {@link ToastItem.duration}. */
22
- duration?: number;
57
+ duration?: ToastDuration;
23
58
  id?: string;
24
59
  title?: string;
25
60
  detail?: string;
61
+ action?: ToastAction;
26
62
  }): string;
27
63
  dismiss: (id: string) => void;
28
64
  clear(): void;
@@ -31,9 +67,19 @@ export declare function pushToast(options: {
31
67
  message: string;
32
68
  type?: ToastLevel;
33
69
  /** Same semantics as {@link ToastItem.duration}. */
34
- duration?: number;
70
+ duration?: ToastDuration;
35
71
  title?: string;
36
72
  detail?: string;
73
+ /** An action button in the toast, such as Undo. See {@link ToastAction}. */
74
+ action?: ToastAction;
37
75
  }): string;
38
76
  export declare function dismissToast(id: string): void;
77
+ /**
78
+ * Moves keyboard focus to the newest toast, so its action can be reached
79
+ * without tabbing through the page. Bind it to a shortcut of your own; the
80
+ * library registers none. Returns false when there is no toast to focus.
81
+ *
82
+ * Focus returns to where it was when that toast is dismissed.
83
+ */
84
+ export declare function focusToasts(): boolean;
39
85
  //# sourceMappingURL=toast-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast-store.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/toast-store.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAwCD,eAAO,MAAM,UAAU;;kBA7BD;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB,oDAAoD;QACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,MAAM;kBAdO,MAAM;;CAmCa,CAAC;AAE7C,wBAAgB,SAAS,CAAC,OAAO,EAAE;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAET;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7C"}
1
+ {"version":3,"file":"toast-store.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/toast-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IACxB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kEAAkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,mDAAmD;IACnD,MAAM,CAAC,EAAE,WAAW,CAAC;CACxB;AA0CD,eAAO,MAAM,UAAU;;kBA/BD;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB,oDAAoD;QACpD,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,WAAW,CAAC;KACxB,GAAG,MAAM;kBAfO,MAAM;;CAqCa,CAAC;AAE7C,wBAAgB,SAAS,CAAC,OAAO,EAAE;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,WAAW,CAAC;CACxB,GAAG,MAAM,CAET;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAWrC"}
@@ -3,4 +3,9 @@ export { default as SidebarNavigation } from './SidebarNavigation.svelte';
3
3
  export { default as SidebarShell } from './SidebarShell.svelte';
4
4
  export { default as SidebarAccountPanel } from './SidebarAccountPanel.svelte';
5
5
  export { default as SidebarPanel } from './SidebarPanel.svelte';
6
+ export { default as AppShell } from './AppShell.svelte';
7
+ export { DEFAULT_TOP_NAVBAR_STRINGS } from '../util/top-navbar.js';
8
+ export type { TopNavbarStrings } from '../util/top-navbar.js';
9
+ export { DEFAULT_SIDEBAR_ACCOUNT_PANEL_STRINGS, DEFAULT_SIDEBAR_NAVIGATION_STRINGS, } from '../util/sidebar.js';
10
+ export type { SidebarAccountPanelStrings, SidebarNavigationStrings } from '../util/sidebar.js';
6
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACH,qCAAqC,EACrC,kCAAkC,GACrC,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -18,7 +18,21 @@ export type ExtendedSemanticVariant = SemanticVariant | 'neutral' | 'energetic';
18
18
  * Button style variants - used for different button styles
19
19
  * These are style-based variants, not semantic color variants
20
20
  */
21
- export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline' | 'link';
21
+ export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline' | 'link' | 'accent';
22
+ /**
23
+ * Badge variants: the semantic families, and `accent`, the app's second brand
24
+ * colour (`--color-accent`). `energetic` is a family of its own and stays on
25
+ * the library's citron when an app changes its accent.
26
+ */
27
+ export type BadgeVariant = ExtendedSemanticVariant | 'accent';
28
+ /**
29
+ * Text colour of a Heading or Text that sits on a filled block.
30
+ * - `inherit`: the block's own text colour (`currentColor`), for a block that
31
+ * sets one, such as `class="bg-action-primary text-on-brand"`.
32
+ * - `on-brand` / `on-accent`: the label colour of the primary and of the solid
33
+ * accent fill (`--color-on-brand`, `--color-on-accent`).
34
+ */
35
+ export type OnFillTone = 'inherit' | 'on-brand' | 'on-accent';
22
36
  /**
23
37
  * Card style variants - used for different card appearances
24
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/types/variants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG,SAAS,GAAG,W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,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,eAAe,CAE7E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,uBAAuB,CAE7F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
@@ -0,0 +1,28 @@
1
+ /** Shared by `AppShell` and the bars that go in it (`AppBar`, `BottomTabBar`). */
2
+ /** Called by `AppShell`, so the bars inside it know the shell lays them out. */
3
+ export declare function markAppShell(): void;
4
+ /** True for a component rendered inside an `AppShell`. */
5
+ export declare function isInsideAppShell(): boolean;
6
+ /**
7
+ * The nearest ancestor that scrolls vertically, or null when that is the
8
+ * window. `AppShell` scrolls a container of its own; a page without it
9
+ * scrolls the window.
10
+ */
11
+ export declare function findScrollParent(element: HTMLElement): HTMLElement | null;
12
+ /** True in a development build of a Vite app; false wherever that cannot be told. */
13
+ export declare function isDevBuild(): boolean;
14
+ /**
15
+ * Mirrors a shell's two inset properties onto `<html>` while it is mounted,
16
+ * so what is rendered outside the shell (an overlay moved to `document.body`,
17
+ * a toast) can stay clear of its bars too. With several shells mounted the
18
+ * one mounted last is the one mirrored; when it goes, the one before it is
19
+ * again, and with none left the properties are removed.
20
+ *
21
+ * Call it in the browser when the shell mounts. `update` reports new values;
22
+ * `leave` is for when the shell is destroyed.
23
+ */
24
+ export declare function publishAppShellInsets(top: string, bottom: string): {
25
+ update: (top: string, bottom: string) => void;
26
+ leave: () => void;
27
+ };
28
+ //# sourceMappingURL=app-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../src/components/util/app-shell.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAMlF,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,0DAA0D;AAC1D,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAOzE;AAED,qFAAqF;AACrF,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAiBD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACjC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACf;IAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAgBtE"}
@@ -0,0 +1,36 @@
1
+ /** Types and pure helpers for `Avatar` and `AvatarGroup`. Kept out of the components so they can be tested without a DOM. */
2
+ /** Diameter of the circle: 24, 32 and 48px. */
3
+ export type AvatarSize = "sm" | "md" | "lg";
4
+ /** One person in an `AvatarGroup`. */
5
+ export interface AvatarPerson {
6
+ name: string;
7
+ /** Address of the picture. Without it, or when it fails to load, the initials show. */
8
+ src?: string;
9
+ }
10
+ /** Every built-in string of `AvatarGroup`. Pass a partial object to `strings` to translate. */
11
+ export interface AvatarGroupStrings {
12
+ /**
13
+ * Accessible name of the "+3" at the end: how many people are not shown,
14
+ * and their names, for an app that wants to read them out.
15
+ */
16
+ more: (count: number, names: string[]) => string;
17
+ }
18
+ export declare const DEFAULT_AVATAR_GROUP_STRINGS: AvatarGroupStrings;
19
+ /**
20
+ * The initials shown for `name`: the first letter of its first word and of
21
+ * its last, upper-cased for `locale`; one letter for a name of one word; `""`
22
+ * for a name with no words, which is drawn as an icon and never as "?".
23
+ */
24
+ export declare function initialsOf(name: string | null | undefined, locale?: string): string;
25
+ /**
26
+ * How an `AvatarGroup` of `total` people splits at `max`: how many are
27
+ * shown, and how many stand behind the "+N".
28
+ *
29
+ * `max` below 1 is 1. One person too many is shown and not counted: a "+1"
30
+ * takes the room of the person it hides.
31
+ */
32
+ export declare function splitGroup(total: number, max: number): {
33
+ shown: number;
34
+ hidden: number;
35
+ };
36
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/util/avatar.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAE7H,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,sCAAsC;AACtC,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+FAA+F;AAC/F,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CACpD;AAED,eAAO,MAAM,4BAA4B,EAAE,kBAE1C,CAAC;AAuBF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAMnF;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAIxF"}
@@ -0,0 +1,30 @@
1
+ /** Public types and pure helpers for `BottomSheet`. */
2
+ /** A height the sheet rests at: half the screen, or all of it below the status bar. */
3
+ export type BottomSheetSnap = "half" | "full";
4
+ /** What the user did to close the sheet. `swipe` is a drag or flick downwards. */
5
+ export type BottomSheetCloseReason = "escape" | "backdrop" | "close-button" | "swipe";
6
+ /** The snap points in use, lowest first, without repeats or unknown values. */
7
+ export declare function normaliseSnapPoints(points: readonly BottomSheetSnap[] | undefined): BottomSheetSnap[];
8
+ /**
9
+ * Where the grip's button takes the sheet: up a step, and from the top back
10
+ * down. Null when there is only one snap point, so nowhere to go.
11
+ */
12
+ export declare function nextSnap(points: readonly BottomSheetSnap[], current: BottomSheetSnap): BottomSheetSnap | null;
13
+ /**
14
+ * Where a released sheet settles. `heights` are the px heights of the snap
15
+ * points, lowest first; `height` is how much of the sheet shows at release.
16
+ * A flick goes one step in its direction from where the drag began; a slow
17
+ * release goes to whatever is nearest, with "closed" at height 0.
18
+ *
19
+ * Returns the index into `heights`, or -1 for closed.
20
+ */
21
+ export declare function settleSnap(options: {
22
+ heights: readonly number[];
23
+ startIndex: number;
24
+ height: number;
25
+ /** px per ms, positive is down. */
26
+ velocity: number;
27
+ flick: number;
28
+ canClose: boolean;
29
+ }): number;
30
+ //# sourceMappingURL=bottom-sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottom-sheet.d.ts","sourceRoot":"","sources":["../../../src/components/util/bottom-sheet.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,uFAAuF;AACvF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC;AAItF,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,GAAG,eAAe,EAAE,CAGrG;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACpB,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,OAAO,EAAE,eAAe,GACzB,eAAe,GAAG,IAAI,CAIxB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE;IAChC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACrB,GAAG,MAAM,CAgBT"}
@@ -0,0 +1,35 @@
1
+ /** Public types and pure helpers for `BottomTabBar`. */
2
+ import type { Component } from "svelte";
3
+ /** An icon component, as `@lucide/svelte` icons are. */
4
+ export type BottomTabBarIcon = Component<{
5
+ size?: number;
6
+ class?: string;
7
+ }>;
8
+ /** One destination in the bar. */
9
+ export interface BottomTabBarItem {
10
+ /** Where the tab goes. Also its identity: `active` is compared with it. */
11
+ href: string;
12
+ /** Shown under the icon. Keep it to one short word. */
13
+ label: string;
14
+ /** Rendered above the label, at 24px. Decorative: the label names the tab. */
15
+ icon: BottomTabBarIcon;
16
+ /** A count shown on the icon. Nothing is shown for 0 or when it is left out. */
17
+ badge?: number;
18
+ }
19
+ /**
20
+ * Whether `current` is the tab's page or a page under it. The same rule as
21
+ * `TopNavbar`: a prefix match on whole path segments, except that `/` and
22
+ * absolute URLs only match exactly.
23
+ */
24
+ export declare function tabMatchesPath(href: string, current: string): boolean;
25
+ /**
26
+ * The href of the one active tab, or undefined when none matches. When
27
+ * several match (`/quiz` and `/quiz/live` on `/quiz/live/3`), the most
28
+ * specific wins, so there is never more than one current page.
29
+ */
30
+ export declare function activeTabHref(items: readonly BottomTabBarItem[], current: string | undefined): string | undefined;
31
+ /** How a badge is read out after the tab's label: "Notifications, 3 new". */
32
+ export declare function defaultBadgeLabel(count: number): string;
33
+ /** The number as shown on the badge: `99+` above the cap. */
34
+ export declare function badgeText(count: number, max: number): string;
35
+ //# sourceMappingURL=bottom-tab-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottom-tab-bar.d.ts","sourceRoot":"","sources":["../../../src/components/util/bottom-tab-bar.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5E,kCAAkC;AAClC,MAAM,WAAW,gBAAgB;IAC7B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,EAAE,gBAAgB,CAAC;IACvB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAUrE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CACzB,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,OAAO,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CASpB;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,56 @@
1
+ /** Public types and pure helpers for `Calendar`. */
2
+ /** The colour of an event's dot. `default` is the primary action colour. */
3
+ export type CalendarTone = "default" | "success" | "warning" | "danger" | "accent";
4
+ /** Something that happens on a day. */
5
+ export interface CalendarEvent {
6
+ /** The day, as `YYYY-MM-DD`. */
7
+ date: string;
8
+ /** What it is. Not shown in the grid; read out with the day. */
9
+ label: string;
10
+ tone?: CalendarTone;
11
+ }
12
+ /** The words the calendar says. Replace any of them to translate. */
13
+ export interface CalendarStrings {
14
+ /** Accessible name of the button that goes a month back. */
15
+ previousMonth: string;
16
+ /** Accessible name of the button that goes a month forward. */
17
+ nextMonth: string;
18
+ /** Added to the name of today's date. */
19
+ today: string;
20
+ /** Added to the name of the selected date. */
21
+ selected: string;
22
+ /** Added to the name of a date that cannot be selected. */
23
+ unavailable: string;
24
+ /** The events part of a day's name. Called only for a day that has events. */
25
+ events: (events: CalendarEvent[]) => string;
26
+ }
27
+ export declare const DEFAULT_CALENDAR_STRINGS: CalendarStrings;
28
+ /** How many dots a day shows at most. The name of the day still counts every event. */
29
+ export declare const MAX_EVENT_DOTS = 3;
30
+ /**
31
+ * The accessible name of a day: the full date, then what is true of it, then
32
+ * its events. "Tuesday 6 October 2026, today, selected, 2 events: Quiz at The
33
+ * Crown, Music quiz".
34
+ */
35
+ export declare function calendarDayName(fullDate: string, state: {
36
+ today: boolean;
37
+ selected: boolean;
38
+ disabled: boolean;
39
+ events: CalendarEvent[];
40
+ }, strings: CalendarStrings): string;
41
+ /**
42
+ * Where a key takes focus from `date`, by the date-grid pattern: the arrows by
43
+ * a day and a week, Home and End to the ends of the week, Page Up and Page
44
+ * Down by a month, and by a year with Shift. Left and Right swap in a
45
+ * right-to-left layout, where the next day is on the left.
46
+ *
47
+ * Returns null for a key that does not move, or a move past year 1 or 9999.
48
+ */
49
+ export declare function calendarKeyTarget(key: string, date: string, options?: {
50
+ shift?: boolean;
51
+ rtl?: boolean;
52
+ weekStartsOn?: number;
53
+ }): string | null;
54
+ /** The events of each day, in the order given. */
55
+ export declare function groupEventsByDate(events: readonly CalendarEvent[]): Map<string, CalendarEvent[]>;
56
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/util/calendar.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAIpD,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEnF,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC5B,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,MAAM,CAAC;CAC/C;AAED,eAAO,MAAM,wBAAwB,EAAE,eAUtC,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,EACxF,OAAO,EAAE,eAAe,GACzB,MAAM,CAOR;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GACxE,MAAM,GAAG,IAAI,CAsBf;AAED,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAQhG"}
@@ -0,0 +1,58 @@
1
+ /** Types and pure helpers for `Collapsible` and `CollapsibleGroup`. Kept out of the components so they can be tested without a DOM. */
2
+ /** Heading element the default trigger is wrapped in. */
3
+ export type CollapsibleHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
4
+ /**
5
+ * First argument of the `trigger` snippet. Spread it on your own `<button>`:
6
+ * it carries the whole wiring, so the button needs nothing else to work.
7
+ */
8
+ export type CollapsibleTriggerProps = {
9
+ id: string;
10
+ /** Keeps a trigger inside a `<form>` from submitting it. */
11
+ type: "button";
12
+ "aria-expanded": boolean;
13
+ "aria-controls": string;
14
+ disabled: boolean;
15
+ onclick: (event: MouseEvent) => void;
16
+ /** How a `CollapsibleGroup` finds its header buttons for the arrow keys. */
17
+ "data-collapsible-trigger": "";
18
+ };
19
+ /** Second argument of the `trigger` snippet. */
20
+ export interface CollapsibleTriggerState {
21
+ open: boolean;
22
+ disabled: boolean;
23
+ }
24
+ /** What a `Collapsible` hands its group. */
25
+ export interface CollapsibleGroupMember {
26
+ triggerId: string;
27
+ isOpen: () => boolean;
28
+ /** A disabled member keeps its state: the group neither closes it nor counts it. */
29
+ isDisabled: () => boolean;
30
+ close: () => void;
31
+ }
32
+ /** What a member gets back when it joins a group. */
33
+ export interface CollapsibleGroupRegistration {
34
+ /** Removes the member again. */
35
+ unregister: () => void;
36
+ /**
37
+ * True when the member asked to start open in a single-open group that
38
+ * already has an open panel. The member then renders closed from the
39
+ * start, on the server too, instead of opening and being closed again.
40
+ */
41
+ startClosed: boolean;
42
+ }
43
+ /** What a `CollapsibleGroup` offers the Collapsibles inside it, through context. */
44
+ export interface CollapsibleGroupContext {
45
+ /** False when opening one panel closes the others. */
46
+ readonly multiple: boolean;
47
+ register: (member: CollapsibleGroupMember) => CollapsibleGroupRegistration;
48
+ /** Called whenever a member is open, however it got there. */
49
+ opened: (member: CollapsibleGroupMember) => void;
50
+ }
51
+ /** Context key shared by the two components. */
52
+ export declare const COLLAPSIBLE_GROUP: unique symbol;
53
+ /**
54
+ * Index of the header button an accordion key moves focus to, or `null` when
55
+ * the key is not one of them. Arrow keys wrap, as they do in Tabs and Dropdown.
56
+ */
57
+ export declare function nextTriggerIndex(key: string, current: number, count: number): number | null;
58
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/util/collapsible.ts"],"names":[],"mappings":"AAAA,uIAAuI;AAEvI,yDAAyD;AACzD,MAAM,MAAM,uBAAuB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,4EAA4E;IAC5E,0BAA0B,EAAE,EAAE,CAAC;CAClC,CAAC;AAEF,gDAAgD;AAChD,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,oFAAoF;IACpF,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qDAAqD;AACrD,MAAM,WAAW,4BAA4B;IACzC,gCAAgC;IAChC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,oFAAoF;AACpF,MAAM,WAAW,uBAAuB;IACpC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,4BAA4B,CAAC;IAC3E,8DAA8D;IAC9D,MAAM,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACpD;AAED,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,eAAmC,CAAC;AAElE;;;GAGG;AACH,wBAAgB,gBAAgB,CAC5B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAcf"}
@@ -0,0 +1,12 @@
1
+ /** Public types for `ConfirmDialog`. */
2
+ /** Sets the confirm button's style and the icon beside the message. */
3
+ export type ConfirmDialogVariant = "danger" | "warning" | "info";
4
+ /** How the user backed out: the cancel button, or one of Modal's own ways to close. */
5
+ export type ConfirmDialogCancelReason = "cancel-button" | "escape" | "backdrop" | "close-button";
6
+ /**
7
+ * What `onconfirm` may return. `false`, returned or resolved, keeps the dialog
8
+ * open; anything else closes it. A promise puts the dialog in its loading
9
+ * state until it settles.
10
+ */
11
+ export type ConfirmDialogResult = void | boolean | Promise<void | boolean>;
12
+ //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/util/confirm-dialog.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAExC,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjE,uFAAuF;AACvF,MAAM,MAAM,yBAAyB,GAC/B,eAAe,GACf,QAAQ,GACR,UAAU,GACV,cAAc,CAAC;AAErB;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Calendar dates as strings: `YYYY-MM-DD` for a day, `YYYY-MM` for a month,
3
+ * `HH:mm` (or `HH:mm:ss`) for a time of day. The formats a native date or
4
+ * time input reads and writes.
5
+ *
6
+ * A date here is a day on the calendar, not a moment. Nothing in this file
7
+ * goes through a local `Date`: the arithmetic is on the numbers, or on UTC,
8
+ * where every day has 24 hours. So a date never moves to the day before or
9
+ * after because of a time zone, and a day on which the clocks change is a day
10
+ * like any other.
11
+ *
12
+ * Years 0001 to 9999, four digits: within that, two dates compare as strings.
13
+ */
14
+ export interface DateParts {
15
+ year: number;
16
+ /** 1 to 12. */
17
+ month: number;
18
+ day: number;
19
+ }
20
+ export declare function isLeapYear(year: number): boolean;
21
+ /** Days in a month; `month` is 1 to 12. */
22
+ export declare function daysInMonth(year: number, month: number): number;
23
+ /** The parts of a `YYYY-MM-DD` string, or null when it is not a real date. */
24
+ export declare function parseIsoDate(value: string | null | undefined): DateParts | null;
25
+ export declare function isIsoDate(value: string | null | undefined): value is string;
26
+ /** The parts of a `YYYY-MM` string, or null when it is not a real month. */
27
+ export declare function parseIsoMonth(value: string | null | undefined): {
28
+ year: number;
29
+ month: number;
30
+ } | null;
31
+ export declare function toIsoDate(year: number, month: number, day: number): string;
32
+ export declare function toIsoMonth(year: number, month: number): string;
33
+ /** The month a date is in: `2026-10-06` gives `2026-10`. Null for a string that is not a date. */
34
+ export declare function monthOf(date: string | null | undefined): string | null;
35
+ /** The date `count` days later (earlier when negative), or null outside years 1 to 9999. */
36
+ export declare function addDays(date: string, count: number): string | null;
37
+ /** The month `count` months later (earlier when negative), or null outside years 1 to 9999. */
38
+ export declare function addMonthsToMonth(month: string, count: number): string | null;
39
+ /**
40
+ * The same day of the month `count` months later. A day the target month does
41
+ * not have becomes its last one: 31 January plus a month is 28 or 29 February.
42
+ */
43
+ export declare function addMonths(date: string, count: number): string | null;
44
+ /** Day of the week, 0 for Sunday to 6 for Saturday. -1 for a string that is not a date. */
45
+ export declare function weekdayOf(date: string): number;
46
+ /** A whole number from 0 to 6 for the first day of the week; anything else is Monday. */
47
+ export declare function normaliseWeekStart(weekStartsOn: number | undefined): number;
48
+ /** The first day of the week a date is in. */
49
+ export declare function startOfWeek(date: string, weekStartsOn?: number): string | null;
50
+ /** The last day of the week a date is in. */
51
+ export declare function endOfWeek(date: string, weekStartsOn?: number): string | null;
52
+ /**
53
+ * The weeks of a month, each seven entries from the first day of the week. A
54
+ * day of the month is its ISO date; a place before the 1st or after the last
55
+ * day is null. There are as many weeks as the month touches: four (a
56
+ * 28-day February that starts on the first day of the week), five or six.
57
+ */
58
+ export declare function monthGrid(month: string, weekStartsOn?: number): (string | null)[][];
59
+ /** The seven days of the week as numbers (0 for Sunday), from the first day of the week. */
60
+ export declare function weekdayOrder(weekStartsOn?: number): number[];
61
+ /**
62
+ * Today where the user is, as `YYYY-MM-DD`. This is the one place that reads
63
+ * the local clock: "today" is a local idea. Call it in the browser; on a
64
+ * server it is the server's day.
65
+ */
66
+ export declare function todayIso(now?: Date): string;
67
+ /** Today in UTC: the same on a server and in a browser at the same moment. */
68
+ export declare function todayIsoUtc(now?: Date): string;
69
+ /** A date held between `min` and `max`, either of which may be missing or invalid. */
70
+ export declare function clampDate(date: string, min?: string | null, max?: string | null): string;
71
+ /**
72
+ * A date for reading: `formatDate("2026-10-06", "sv")` is "6 okt. 2026",
73
+ * `formatDate("2026-10-06", "en-GB")` is "6 Oct 2026".
74
+ *
75
+ * `value` is `YYYY-MM-DD`, what a DateField holds. The day shown is always
76
+ * the day in the string: it does not depend on the time zone of the browser
77
+ * or the server. An empty or invalid value gives an empty string.
78
+ *
79
+ * Pass the `locale` of the page. Without it the runtime's own is used, which
80
+ * on a server is the server's and may differ from the reader's, so text
81
+ * rendered on the server and again in the browser may not match.
82
+ *
83
+ * `options` are those of `Intl.DateTimeFormat`; `timeZone` is not one you can
84
+ * set here.
85
+ */
86
+ export declare function formatDate(value: string | null | undefined, locale?: string | string[], options?: Intl.DateTimeFormatOptions): string;
87
+ /**
88
+ * A time of day for reading: `formatTime("19:00", "sv")` is "19:00",
89
+ * `formatTime("19:00", "en-US")` is "7:00 PM".
90
+ *
91
+ * `value` is `HH:mm` or `HH:mm:ss`, what a TimeField holds. It is a time on
92
+ * the clock, with no zone: nothing shifts it. An empty or invalid value gives
93
+ * an empty string. `locale` and `options` as for `formatDate`.
94
+ */
95
+ export declare function formatTime(value: string | null | undefined, locale?: string | string[], options?: Intl.DateTimeFormatOptions): string;
96
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/components/util/date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACf;AAID,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAQ/E;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAE3E;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOtG;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,kGAAkG;AAClG,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAA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G,IAAI,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAIxF;AAmBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CACtB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,GAAE,IAAI,CAAC,qBAA2E,GAC1F,MAAM,CAIR;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACtB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAE1B,OAAO,GAAE,IAAI,CAAC,qBAA8C,GAC7D,MAAM,CASR"}
@@ -0,0 +1,13 @@
1
+ /** Public types and pure helpers for `Drawer`. */
2
+ /**
3
+ * The edge the drawer is anchored to. `left` and `right` are physical and stay
4
+ * put in a right-to-left page; `start` and `end` follow the writing direction.
5
+ */
6
+ export type DrawerSide = "left" | "right" | "start" | "end";
7
+ /** Panel width on wide screens. On a phone the panel is never wider than the screen. */
8
+ export type DrawerSize = "sm" | "md" | "lg";
9
+ /** What the user did to close the drawer. The same values Modal reports. */
10
+ export type DrawerCloseReason = "escape" | "backdrop" | "close-button";
11
+ /** The physical edge a side resolves to, given the writing direction. */
12
+ export declare function resolveDrawerEdge(side: DrawerSide, rtl: boolean): "left" | "right";
13
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/util/drawer.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAE5D,wFAAwF;AACxF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,CAAC;AAEvE,yEAAyE;AACzE,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,OAAO,GACb,MAAM,GAAG,OAAO,CAGlB"}
@@ -0,0 +1,47 @@
1
+ import type { Component } from "svelte";
2
+ /** An icon component, as `@lucide/svelte` icons are. */
3
+ export type DropdownItemIcon = Component<{
4
+ size?: number;
5
+ class?: string;
6
+ }>;
7
+ export type DropdownItemTone = "default" | "danger";
8
+ /** One entry of Dropdown's `options`. */
9
+ export interface DropdownOption {
10
+ value: string | number;
11
+ label: string;
12
+ /**
13
+ * A disabled item stays focusable, so the arrow keys still reach it and a
14
+ * screen reader can read why it is unavailable; it cannot be chosen.
15
+ */
16
+ disabled?: boolean;
17
+ /** Rendered before the label, at 16px. Decorative: the label names the item. */
18
+ icon?: DropdownItemIcon;
19
+ /** `danger` for a destructive action such as Delete. */
20
+ tone?: DropdownItemTone;
21
+ /** Second line under the label, e.g. why the item is disabled. */
22
+ description?: string;
23
+ }
24
+ /**
25
+ * How a Dropdown's menu is shown: `popover` under its trigger, `sheet` in a
26
+ * BottomSheet, or `auto`: a sheet on a phone, the pop-over everywhere else.
27
+ */
28
+ export type DropdownPresentation = "auto" | "popover" | "sheet";
29
+ /**
30
+ * A phone, for `auto`: a touch screen (`pointer: coarse`) narrower than the
31
+ * `sm` breakpoint. A tablet has the room for a pop-over under its trigger,
32
+ * and a narrow window with a mouse has the precision for one.
33
+ */
34
+ export declare const SHEET_MEDIA_QUERY = "(pointer: coarse) and (max-width: 639.98px)";
35
+ /**
36
+ * Whether a menu asked for as `presentation` opens in a sheet right now.
37
+ * Read when the menu opens, in the browser: on the server it is never a sheet,
38
+ * so what is rendered before anyone touches the control is the same everywhere.
39
+ */
40
+ export declare function opensAsSheet(presentation: DropdownPresentation): boolean;
41
+ /** What a Dropdown tells the items inside it. */
42
+ export interface DropdownContext {
43
+ /** `option` inside a listbox, `menuitem` inside a menu. */
44
+ readonly itemRole: "menuitem" | "option";
45
+ }
46
+ export declare const DROPDOWN_CONTEXT_KEY: unique symbol;
47
+ //# sourceMappingURL=dropdown.d.ts.map