zabi-components 7.0.2 → 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 (433) hide show
  1. package/CHANGELOG.md +1924 -0
  2. package/README.md +287 -11
  3. package/THEME.md +149 -332
  4. package/THEMING.md +1329 -163
  5. package/dist/atoms/ActionPanel.svelte +24 -9
  6. package/dist/atoms/ActionPanel.svelte.d.ts +2 -0
  7. package/dist/atoms/Avatar.svelte +104 -0
  8. package/dist/atoms/Avatar.svelte.d.ts +34 -0
  9. package/dist/atoms/Badge.svelte +124 -58
  10. package/dist/atoms/Badge.svelte.d.ts +17 -5
  11. package/dist/atoms/Button.svelte +212 -62
  12. package/dist/atoms/Button.svelte.d.ts +33 -2
  13. package/dist/atoms/Card.svelte +31 -28
  14. package/dist/atoms/Card.svelte.d.ts +5 -2
  15. package/dist/atoms/CardContent.svelte +10 -2
  16. package/dist/atoms/CardContent.svelte.d.ts +2 -0
  17. package/dist/atoms/CardFooter.svelte +10 -2
  18. package/dist/atoms/CardFooter.svelte.d.ts +2 -0
  19. package/dist/atoms/CardHeader.svelte +26 -6
  20. package/dist/atoms/CardHeader.svelte.d.ts +2 -0
  21. package/dist/atoms/Checkbox.svelte +52 -21
  22. package/dist/atoms/Checkbox.svelte.d.ts +6 -2
  23. package/dist/atoms/CodeBlock.svelte +35 -9
  24. package/dist/atoms/CodeBlock.svelte.d.ts +13 -3
  25. package/dist/atoms/ColorPicker.svelte +272 -52
  26. package/dist/atoms/ColorPicker.svelte.d.ts +6 -1
  27. package/dist/atoms/Container.svelte +17 -10
  28. package/dist/atoms/DateField.svelte +107 -0
  29. package/dist/atoms/DateField.svelte.d.ts +53 -0
  30. package/dist/atoms/Divider.svelte +4 -4
  31. package/dist/atoms/FeatureCard.svelte +4 -3
  32. package/dist/atoms/FieldMessages.svelte +69 -0
  33. package/dist/atoms/FieldMessages.svelte.d.ts +23 -0
  34. package/dist/atoms/FloatingActionButton.svelte +174 -0
  35. package/dist/atoms/FloatingActionButton.svelte.d.ts +51 -0
  36. package/dist/atoms/Heading.svelte +93 -32
  37. package/dist/atoms/Heading.svelte.d.ts +24 -4
  38. package/dist/atoms/IconButton.svelte +242 -53
  39. package/dist/atoms/IconButton.svelte.d.ts +49 -4
  40. package/dist/atoms/Input.svelte +267 -74
  41. package/dist/atoms/Input.svelte.d.ts +32 -2
  42. package/dist/atoms/List.svelte +13 -2
  43. package/dist/atoms/List.svelte.d.ts +2 -0
  44. package/dist/atoms/ListItem.svelte +44 -11
  45. package/dist/atoms/ListItem.svelte.d.ts +5 -0
  46. package/dist/atoms/ListItemLeading.svelte +4 -2
  47. package/dist/atoms/ListItemLeading.svelte.d.ts +1 -1
  48. package/dist/atoms/OptimizedImage.svelte +11 -2
  49. package/dist/atoms/OptimizedImage.svelte.d.ts +2 -0
  50. package/dist/atoms/Progress.svelte +31 -9
  51. package/dist/atoms/Progress.svelte.d.ts +6 -0
  52. package/dist/atoms/Radio.svelte +23 -3
  53. package/dist/atoms/Radio.svelte.d.ts +6 -2
  54. package/dist/atoms/Rating.svelte +494 -0
  55. package/dist/atoms/Rating.svelte.d.ts +56 -0
  56. package/dist/atoms/Select.svelte +475 -135
  57. package/dist/atoms/Select.svelte.d.ts +52 -2
  58. package/dist/atoms/SelectionControl.svelte +99 -18
  59. package/dist/atoms/SelectionControl.svelte.d.ts +6 -3
  60. package/dist/atoms/Skeleton.svelte +5 -3
  61. package/dist/atoms/Slider.svelte +309 -0
  62. package/dist/atoms/Slider.svelte.d.ts +40 -0
  63. package/dist/atoms/Spinner.svelte +57 -0
  64. package/dist/atoms/Spinner.svelte.d.ts +19 -0
  65. package/dist/atoms/Table.svelte +152 -6
  66. package/dist/atoms/Table.svelte.d.ts +15 -3
  67. package/dist/atoms/TemporalField.svelte +140 -0
  68. package/dist/atoms/TemporalField.svelte.d.ts +32 -0
  69. package/dist/atoms/Text.svelte +56 -15
  70. package/dist/atoms/Text.svelte.d.ts +13 -4
  71. package/dist/atoms/Textarea.svelte +57 -45
  72. package/dist/atoms/Textarea.svelte.d.ts +14 -2
  73. package/dist/atoms/ThemeToggle.svelte +238 -56
  74. package/dist/atoms/ThemeToggle.svelte.d.ts +28 -3
  75. package/dist/atoms/TimeField.svelte +108 -0
  76. package/dist/atoms/TimeField.svelte.d.ts +54 -0
  77. package/dist/atoms/Toast.svelte +25 -10
  78. package/dist/atoms/Toast.svelte.d.ts +2 -0
  79. package/dist/atoms/Toggle.svelte +60 -19
  80. package/dist/atoms/Toggle.svelte.d.ts +18 -2
  81. package/dist/atoms/Tooltip.svelte +583 -40
  82. package/dist/atoms/Tooltip.svelte.d.ts +26 -0
  83. package/dist/atoms/ZabiStringsProvider.svelte +45 -0
  84. package/dist/atoms/ZabiStringsProvider.svelte.d.ts +27 -0
  85. package/dist/atoms/index.d.ts +17 -0
  86. package/dist/atoms/index.js +12 -0
  87. package/dist/atoms/selection-control.styles.d.ts +36 -5
  88. package/dist/atoms/selection-control.styles.js +40 -9
  89. package/dist/components/atoms/index.d.ts +17 -0
  90. package/dist/components/atoms/index.d.ts.map +1 -1
  91. package/dist/components/atoms/selection-control.styles.d.ts +36 -5
  92. package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
  93. package/dist/components/index.d.ts +83 -3
  94. package/dist/components/index.d.ts.map +1 -1
  95. package/dist/components/molecules/index.d.ts +46 -0
  96. package/dist/components/molecules/index.d.ts.map +1 -1
  97. package/dist/components/molecules/toast-store.d.ts +53 -7
  98. package/dist/components/molecules/toast-store.d.ts.map +1 -1
  99. package/dist/components/organisms/index.d.ts +6 -0
  100. package/dist/components/organisms/index.d.ts.map +1 -1
  101. package/dist/components/types/variants.d.ts +15 -1
  102. package/dist/components/types/variants.d.ts.map +1 -1
  103. package/dist/components/util/app-shell.d.ts +28 -0
  104. package/dist/components/util/app-shell.d.ts.map +1 -0
  105. package/dist/components/util/avatar.d.ts +36 -0
  106. package/dist/components/util/avatar.d.ts.map +1 -0
  107. package/dist/components/util/bottom-sheet.d.ts +30 -0
  108. package/dist/components/util/bottom-sheet.d.ts.map +1 -0
  109. package/dist/components/util/bottom-tab-bar.d.ts +35 -0
  110. package/dist/components/util/bottom-tab-bar.d.ts.map +1 -0
  111. package/dist/components/util/calendar.d.ts +56 -0
  112. package/dist/components/util/calendar.d.ts.map +1 -0
  113. package/dist/components/util/cn.d.ts +8 -0
  114. package/dist/components/util/cn.d.ts.map +1 -0
  115. package/dist/components/util/collapsible.d.ts +58 -0
  116. package/dist/components/util/collapsible.d.ts.map +1 -0
  117. package/dist/components/util/confirm-dialog.d.ts +12 -0
  118. package/dist/components/util/confirm-dialog.d.ts.map +1 -0
  119. package/dist/components/util/date.d.ts +96 -0
  120. package/dist/components/util/date.d.ts.map +1 -0
  121. package/dist/components/util/drawer.d.ts +13 -0
  122. package/dist/components/util/drawer.d.ts.map +1 -0
  123. package/dist/components/util/dropdown.d.ts +47 -0
  124. package/dist/components/util/dropdown.d.ts.map +1 -0
  125. package/dist/components/util/field.d.ts +39 -0
  126. package/dist/components/util/field.d.ts.map +1 -0
  127. package/dist/components/util/fit-in-viewport.d.ts +201 -0
  128. package/dist/components/util/fit-in-viewport.d.ts.map +1 -0
  129. package/dist/components/util/focus-utils.d.ts +75 -2
  130. package/dist/components/util/focus-utils.d.ts.map +1 -1
  131. package/dist/components/util/hydration.d.ts +45 -0
  132. package/dist/components/util/hydration.d.ts.map +1 -0
  133. package/dist/components/util/keyboard-inset.d.ts +18 -0
  134. package/dist/components/util/keyboard-inset.d.ts.map +1 -0
  135. package/dist/components/util/media-grid.d.ts +51 -0
  136. package/dist/components/util/media-grid.d.ts.map +1 -0
  137. package/dist/components/util/media.d.ts +6 -0
  138. package/dist/components/util/media.d.ts.map +1 -0
  139. package/dist/components/util/overlay-chrome.d.ts +53 -0
  140. package/dist/components/util/overlay-chrome.d.ts.map +1 -0
  141. package/dist/components/util/overlay.d.ts +72 -0
  142. package/dist/components/util/overlay.d.ts.map +1 -0
  143. package/dist/components/util/photo.d.ts +215 -0
  144. package/dist/components/util/photo.d.ts.map +1 -0
  145. package/dist/components/util/portal.d.ts +23 -0
  146. package/dist/components/util/portal.d.ts.map +1 -0
  147. package/dist/components/util/pull-to-refresh.d.ts +27 -0
  148. package/dist/components/util/pull-to-refresh.d.ts.map +1 -0
  149. package/dist/components/util/radio-keys.d.ts +25 -0
  150. package/dist/components/util/radio-keys.d.ts.map +1 -0
  151. package/dist/components/util/rating.d.ts +23 -0
  152. package/dist/components/util/rating.d.ts.map +1 -0
  153. package/dist/components/util/ready-made-strings.d.ts +77 -0
  154. package/dist/components/util/ready-made-strings.d.ts.map +1 -0
  155. package/dist/components/util/scroll-padding.d.ts +20 -0
  156. package/dist/components/util/scroll-padding.d.ts.map +1 -0
  157. package/dist/components/util/segmented-control.d.ts +16 -0
  158. package/dist/components/util/segmented-control.d.ts.map +1 -0
  159. package/dist/components/util/select.d.ts +41 -0
  160. package/dist/components/util/select.d.ts.map +1 -0
  161. package/dist/components/util/sheet-drag.d.ts +60 -0
  162. package/dist/components/util/sheet-drag.d.ts.map +1 -0
  163. package/dist/components/util/sidebar.d.ts +63 -0
  164. package/dist/components/util/sidebar.d.ts.map +1 -0
  165. package/dist/components/util/sortable-list.d.ts +65 -0
  166. package/dist/components/util/sortable-list.d.ts.map +1 -0
  167. package/dist/components/util/ssr-safe.d.ts +4 -4
  168. package/dist/components/util/ssr-safe.d.ts.map +1 -1
  169. package/dist/components/util/stepper.d.ts +40 -0
  170. package/dist/components/util/stepper.d.ts.map +1 -0
  171. package/dist/components/util/swipeable-list-item.d.ts +36 -0
  172. package/dist/components/util/swipeable-list-item.d.ts.map +1 -0
  173. package/dist/components/util/theme-mode.d.ts +80 -0
  174. package/dist/components/util/theme-mode.d.ts.map +1 -0
  175. package/dist/components/util/toaster.d.ts +93 -0
  176. package/dist/components/util/toaster.d.ts.map +1 -0
  177. package/dist/components/util/tooltip.d.ts +10 -0
  178. package/dist/components/util/tooltip.d.ts.map +1 -0
  179. package/dist/components/util/top-navbar.d.ts +11 -0
  180. package/dist/components/util/top-navbar.d.ts.map +1 -0
  181. package/dist/components/util/touch-target.d.ts +31 -0
  182. package/dist/components/util/touch-target.d.ts.map +1 -0
  183. package/dist/components/util/zabi-strings.d.ts +133 -0
  184. package/dist/components/util/zabi-strings.d.ts.map +1 -0
  185. package/dist/create-theme/cli.js +169 -0
  186. package/dist/create-theme/index.d.ts +176 -0
  187. package/dist/create-theme/index.js +817 -0
  188. package/dist/create-theme/lib/ramp-math.js +128 -0
  189. package/dist/create-theme/lib/resolve.js +141 -0
  190. package/dist/create-theme/theme-data.js +1116 -0
  191. package/dist/index.d.ts +83 -3
  192. package/dist/index.js +60 -8
  193. package/dist/molecules/Alert.svelte +73 -66
  194. package/dist/molecules/Alert.svelte.d.ts +9 -1
  195. package/dist/molecules/AppBar.svelte +415 -0
  196. package/dist/molecules/AppBar.svelte.d.ts +69 -0
  197. package/dist/molecules/AvatarGroup.svelte +116 -0
  198. package/dist/molecules/AvatarGroup.svelte.d.ts +40 -0
  199. package/dist/molecules/BottomSheet.svelte +540 -0
  200. package/dist/molecules/BottomSheet.svelte.d.ts +93 -0
  201. package/dist/molecules/BottomTabBar.svelte +297 -0
  202. package/dist/molecules/BottomTabBar.svelte.d.ts +64 -0
  203. package/dist/molecules/Calendar.svelte +597 -0
  204. package/dist/molecules/Calendar.svelte.d.ts +72 -0
  205. package/dist/molecules/Collapsible.svelte +243 -0
  206. package/dist/molecules/Collapsible.svelte.d.ts +44 -0
  207. package/dist/molecules/CollapsibleGroup.svelte +126 -0
  208. package/dist/molecules/CollapsibleGroup.svelte.d.ts +14 -0
  209. package/dist/molecules/ComponentDemo.svelte +25 -5
  210. package/dist/molecules/ComponentDemo.svelte.d.ts +5 -0
  211. package/dist/molecules/ConfirmDialog.svelte +253 -0
  212. package/dist/molecules/ConfirmDialog.svelte.d.ts +55 -0
  213. package/dist/molecules/ContactForm.svelte +46 -19
  214. package/dist/molecules/ContactForm.svelte.d.ts +10 -0
  215. package/dist/molecules/Drawer.svelte +394 -0
  216. package/dist/molecules/Drawer.svelte.d.ts +55 -0
  217. package/dist/molecules/Dropdown.svelte +540 -50
  218. package/dist/molecules/Dropdown.svelte.d.ts +49 -6
  219. package/dist/molecules/DropdownItem.svelte +122 -0
  220. package/dist/molecules/DropdownItem.svelte.d.ts +28 -0
  221. package/dist/molecules/EmptyState.svelte +56 -10
  222. package/dist/molecules/EmptyState.svelte.d.ts +8 -0
  223. package/dist/molecules/Form.svelte +25 -14
  224. package/dist/molecules/Form.svelte.d.ts +13 -5
  225. package/dist/molecules/FormField.svelte +11 -2
  226. package/dist/molecules/FormField.svelte.d.ts +2 -0
  227. package/dist/molecules/Header.svelte +13 -3
  228. package/dist/molecules/Header.svelte.d.ts +2 -0
  229. package/dist/molecules/ImageUpload.svelte +422 -70
  230. package/dist/molecules/ImageUpload.svelte.d.ts +61 -5
  231. package/dist/molecules/MediaGrid.svelte +527 -0
  232. package/dist/molecules/MediaGrid.svelte.d.ts +77 -0
  233. package/dist/molecules/Modal.svelte +340 -45
  234. package/dist/molecules/Modal.svelte.d.ts +59 -7
  235. package/dist/molecules/NavigationMenu.svelte +15 -3
  236. package/dist/molecules/NavigationMenu.svelte.d.ts +4 -0
  237. package/dist/molecules/NavigationMenuContent.svelte +91 -36
  238. package/dist/molecules/NavigationMenuContent.svelte.d.ts +2 -0
  239. package/dist/molecules/NavigationMenuItem.svelte +10 -3
  240. package/dist/molecules/NavigationMenuItem.svelte.d.ts +2 -0
  241. package/dist/molecules/NavigationMenuLink.svelte +10 -2
  242. package/dist/molecules/NavigationMenuLink.svelte.d.ts +2 -0
  243. package/dist/molecules/NavigationMenuList.svelte +19 -4
  244. package/dist/molecules/NavigationMenuList.svelte.d.ts +2 -0
  245. package/dist/molecules/NavigationMenuTrigger.svelte +16 -3
  246. package/dist/molecules/NavigationMenuTrigger.svelte.d.ts +2 -0
  247. package/dist/molecules/Page.svelte +38 -2
  248. package/dist/molecules/Page.svelte.d.ts +13 -0
  249. package/dist/molecules/PhotoGrid.svelte +433 -0
  250. package/dist/molecules/PhotoGrid.svelte.d.ts +62 -0
  251. package/dist/molecules/PhotoViewer.svelte +1116 -0
  252. package/dist/molecules/PhotoViewer.svelte.d.ts +56 -0
  253. package/dist/molecules/PropsTable.svelte +26 -11
  254. package/dist/molecules/PropsTable.svelte.d.ts +5 -0
  255. package/dist/molecules/PullToRefresh.svelte +263 -0
  256. package/dist/molecules/PullToRefresh.svelte.d.ts +52 -0
  257. package/dist/molecules/RadioGroup.svelte +57 -15
  258. package/dist/molecules/RadioGroup.svelte.d.ts +16 -3
  259. package/dist/molecules/Section.svelte +13 -5
  260. package/dist/molecules/Section.svelte.d.ts +3 -1
  261. package/dist/molecules/SegmentedControl.svelte +323 -0
  262. package/dist/molecules/SegmentedControl.svelte.d.ts +34 -0
  263. package/dist/molecules/SidebarBrandHeader.svelte +24 -5
  264. package/dist/molecules/SidebarBrandHeader.svelte.d.ts +5 -0
  265. package/dist/molecules/SidebarFooter.svelte +39 -8
  266. package/dist/molecules/SidebarFooter.svelte.d.ts +5 -0
  267. package/dist/molecules/SidebarNavSection.svelte +12 -4
  268. package/dist/molecules/SidebarNavSection.svelte.d.ts +2 -0
  269. package/dist/molecules/SlideUp.svelte +253 -30
  270. package/dist/molecules/SlideUp.svelte.d.ts +31 -4
  271. package/dist/molecules/SortableList.svelte +632 -0
  272. package/dist/molecules/SortableList.svelte.d.ts +69 -0
  273. package/dist/molecules/Stepper.svelte +548 -0
  274. package/dist/molecules/Stepper.svelte.d.ts +39 -0
  275. package/dist/molecules/StickyActionBar.svelte +191 -0
  276. package/dist/molecules/StickyActionBar.svelte.d.ts +65 -0
  277. package/dist/molecules/SwipeableListItem.svelte +334 -0
  278. package/dist/molecules/SwipeableListItem.svelte.d.ts +54 -0
  279. package/dist/molecules/Tabs.svelte +254 -24
  280. package/dist/molecules/Tabs.svelte.d.ts +15 -4
  281. package/dist/molecules/Toaster.svelte +352 -6
  282. package/dist/molecules/Toaster.svelte.d.ts +95 -2
  283. package/dist/molecules/ToasterToast.svelte +279 -62
  284. package/dist/molecules/ToasterToast.svelte.d.ts +11 -0
  285. package/dist/molecules/UnsavedChangesBar.svelte +212 -0
  286. package/dist/molecules/UnsavedChangesBar.svelte.d.ts +43 -0
  287. package/dist/molecules/index.d.ts +46 -0
  288. package/dist/molecules/index.js +27 -0
  289. package/dist/molecules/toast-store.d.ts +53 -7
  290. package/dist/molecules/toast-store.js +21 -0
  291. package/dist/organisms/AppShell.svelte +196 -0
  292. package/dist/organisms/AppShell.svelte.d.ts +61 -0
  293. package/dist/organisms/SidebarAccountPanel.svelte +111 -12
  294. package/dist/organisms/SidebarAccountPanel.svelte.d.ts +21 -0
  295. package/dist/organisms/SidebarNavigation.svelte +193 -69
  296. package/dist/organisms/SidebarNavigation.svelte.d.ts +31 -1
  297. package/dist/organisms/SidebarPanel.svelte +45 -16
  298. package/dist/organisms/SidebarPanel.svelte.d.ts +2 -0
  299. package/dist/organisms/SidebarShell.svelte +263 -0
  300. package/dist/organisms/SidebarShell.svelte.d.ts +106 -0
  301. package/dist/organisms/TopNavbar.svelte +329 -33
  302. package/dist/organisms/TopNavbar.svelte.d.ts +28 -0
  303. package/dist/organisms/index.d.ts +6 -0
  304. package/dist/organisms/index.js +4 -0
  305. package/dist/routes/lib/variant-utils.d.ts +26 -0
  306. package/dist/routes/lib/{variant-utils.ts → variant-utils.js} +15 -46
  307. package/dist/types/components.d.ts +4 -0
  308. package/dist/types/components.d.ts.map +1 -1
  309. package/dist/types/events.js +1 -0
  310. package/dist/types/index.d.ts +605 -25
  311. package/dist/types/index.d.ts.map +1 -1
  312. package/dist/types/index.js +3 -0
  313. package/dist/types/variants.ts +17 -1
  314. package/dist/util/app-shell.d.ts +27 -0
  315. package/dist/util/app-shell.js +72 -0
  316. package/dist/util/avatar.d.ts +35 -0
  317. package/dist/util/avatar.js +52 -0
  318. package/dist/util/bottom-sheet.d.ts +29 -0
  319. package/dist/util/bottom-sheet.js +43 -0
  320. package/dist/util/bottom-tab-bar.d.ts +34 -0
  321. package/dist/util/bottom-tab-bar.js +54 -0
  322. package/dist/util/calendar.d.ts +55 -0
  323. package/dist/util/calendar.js +74 -0
  324. package/dist/util/cn.d.ts +7 -0
  325. package/dist/util/cn.js +48 -0
  326. package/dist/util/collapsible.d.ts +57 -0
  327. package/dist/util/collapsible.js +23 -0
  328. package/dist/util/confirm-dialog.d.ts +11 -0
  329. package/dist/util/confirm-dialog.js +2 -0
  330. package/dist/util/date.d.ts +95 -0
  331. package/dist/util/date.js +237 -0
  332. package/dist/util/drawer.d.ts +12 -0
  333. package/dist/util/drawer.js +7 -0
  334. package/dist/util/dropdown.d.ts +46 -0
  335. package/dist/util/dropdown.js +21 -0
  336. package/dist/util/field.d.ts +38 -0
  337. package/dist/util/field.js +38 -0
  338. package/dist/util/fit-in-viewport.d.ts +200 -0
  339. package/dist/util/fit-in-viewport.js +399 -0
  340. package/dist/util/focus-utils.d.ts +75 -2
  341. package/dist/util/focus-utils.js +182 -9
  342. package/dist/util/hydration.d.ts +44 -0
  343. package/dist/util/hydration.js +58 -0
  344. package/dist/util/keyboard-inset.d.ts +17 -0
  345. package/dist/util/keyboard-inset.js +53 -0
  346. package/dist/util/media-grid.d.ts +50 -0
  347. package/dist/util/media-grid.js +81 -0
  348. package/dist/util/media.d.ts +5 -0
  349. package/dist/util/media.js +10 -0
  350. package/dist/util/overlay-chrome.d.ts +52 -0
  351. package/dist/util/overlay-chrome.js +56 -0
  352. package/dist/util/overlay.d.ts +71 -0
  353. package/dist/util/overlay.js +240 -0
  354. package/dist/util/photo.d.ts +214 -0
  355. package/dist/util/photo.js +206 -0
  356. package/dist/util/portal.d.ts +22 -0
  357. package/dist/util/portal.js +50 -0
  358. package/dist/util/pull-to-refresh.d.ts +26 -0
  359. package/dist/util/pull-to-refresh.js +30 -0
  360. package/dist/util/radio-keys.d.ts +24 -0
  361. package/dist/util/radio-keys.js +49 -0
  362. package/dist/util/rating.d.ts +22 -0
  363. package/dist/util/rating.js +26 -0
  364. package/dist/util/ready-made-strings.d.ts +76 -0
  365. package/dist/util/ready-made-strings.js +67 -0
  366. package/dist/util/scroll-padding.d.ts +19 -0
  367. package/dist/util/scroll-padding.js +44 -0
  368. package/dist/util/segmented-control.d.ts +15 -0
  369. package/dist/util/segmented-control.js +1 -0
  370. package/dist/util/select.d.ts +40 -0
  371. package/dist/util/select.js +63 -0
  372. package/dist/util/sheet-drag.d.ts +59 -0
  373. package/dist/util/sheet-drag.js +241 -0
  374. package/dist/util/sidebar.d.ts +62 -0
  375. package/dist/util/sidebar.js +38 -0
  376. package/dist/util/sortable-list.d.ts +64 -0
  377. package/dist/util/sortable-list.js +53 -0
  378. package/dist/util/ssr-safe.d.ts +4 -4
  379. package/dist/util/stepper.d.ts +39 -0
  380. package/dist/util/stepper.js +38 -0
  381. package/dist/util/swipeable-list-item.d.ts +35 -0
  382. package/dist/util/swipeable-list-item.js +32 -0
  383. package/dist/util/theme-mode.d.ts +79 -0
  384. package/dist/util/theme-mode.js +121 -0
  385. package/dist/util/toaster.d.ts +92 -0
  386. package/dist/util/toaster.js +75 -0
  387. package/dist/util/tooltip.d.ts +9 -0
  388. package/dist/util/tooltip.js +18 -0
  389. package/dist/util/top-navbar.d.ts +10 -0
  390. package/dist/util/top-navbar.js +5 -0
  391. package/dist/util/touch-target.d.ts +30 -0
  392. package/dist/util/touch-target.js +30 -0
  393. package/dist/util/zabi-strings.d.ts +132 -0
  394. package/dist/util/zabi-strings.js +105 -0
  395. package/dist/zabi-components-colors.css +5 -2
  396. package/dist/zabi-components-theme-dark-only.css +574 -225
  397. package/dist/zabi-components-theme-dark.css +574 -225
  398. package/dist/zabi-components-theme-only.css +1680 -317
  399. package/dist/zabi-components-theme.css +1680 -317
  400. package/dist/zabi-components.css +4473 -1158
  401. package/docs/lucide-icons.md +41 -16
  402. package/docs/theme-imports.md +81 -11
  403. package/package.json +51 -29
  404. package/dist/lib/layout-width-tokens.d.ts +0 -17
  405. package/dist/lib/layout-width-tokens.d.ts.map +0 -1
  406. package/dist/lib/showcase/component-docs/Button.d.ts +0 -3
  407. package/dist/lib/showcase/component-docs/Button.d.ts.map +0 -1
  408. package/dist/lib/showcase/component-docs/Input.d.ts +0 -3
  409. package/dist/lib/showcase/component-docs/Input.d.ts.map +0 -1
  410. package/dist/lib/showcase/component-docs/List.d.ts +0 -3
  411. package/dist/lib/showcase/component-docs/List.d.ts.map +0 -1
  412. package/dist/lib/showcase/component-docs/Modal.d.ts +0 -3
  413. package/dist/lib/showcase/component-docs/Modal.d.ts.map +0 -1
  414. package/dist/lib/showcase/component-docs/Radio.d.ts +0 -3
  415. package/dist/lib/showcase/component-docs/Radio.d.ts.map +0 -1
  416. package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts +0 -3
  417. package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts.map +0 -1
  418. package/dist/lib/showcase/component-docs/Skeleton.d.ts +0 -3
  419. package/dist/lib/showcase/component-docs/Skeleton.d.ts.map +0 -1
  420. package/dist/lib/showcase/component-docs/_shared.d.ts +0 -12
  421. package/dist/lib/showcase/component-docs/_shared.d.ts.map +0 -1
  422. package/dist/lib/showcase/component-docs/index.d.ts +0 -4
  423. package/dist/lib/showcase/component-docs/index.d.ts.map +0 -1
  424. package/dist/lib/showcase/components-catalog.d.ts +0 -3
  425. package/dist/lib/showcase/components-catalog.d.ts.map +0 -1
  426. package/dist/lib/showcase/components-showcase-constants.d.ts +0 -89
  427. package/dist/lib/showcase/components-showcase-constants.d.ts.map +0 -1
  428. package/dist/lib/showcase/docs-sidebar-helpers.d.ts +0 -15
  429. package/dist/lib/showcase/docs-sidebar-helpers.d.ts.map +0 -1
  430. package/dist/routes/lib/focus-utils.d.ts +0 -12
  431. package/dist/routes/lib/focus-utils.ts +0 -110
  432. package/dist/routes/lib/ssr-safe.ts +0 -58
  433. package/scripts/fix-lucide-svelte-icon-dts.js +0 -35
@@ -1,22 +1,64 @@
1
1
  export * from './events.js';
2
2
  export * from './variants.js';
3
3
  export * from './page.types.js';
4
- import type { Component } from 'svelte';
4
+ import type { Component, Snippet } from 'svelte';
5
+ import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
6
+ import type { BottomTabBarItem } from '../components/util/bottom-tab-bar.js';
7
+ import type { CalendarEvent, CalendarStrings } from '../components/util/calendar.js';
8
+ import type { Photo, PhotoGridSelectDetail, PhotoGridStrings, PhotoKey, PhotoViewerAction, PhotoViewerCloseReason, PhotoViewerStrings } from '../components/util/photo.js';
9
+ import type { BottomSheetCloseReason, BottomSheetSnap } from '../components/util/bottom-sheet.js';
10
+ import type { BadgeVariant, ButtonVariant, CardVariant, OnFillTone, ExtendedSemanticVariant, SemanticVariant, SizeVariant } from './variants.js';
11
+ import type { AvatarGroupStrings, AvatarPerson, AvatarSize } from '../components/util/avatar.js';
12
+ import type { RatingStrings } from '../components/util/rating.js';
13
+ import type { StepperItem, StepperLayout, StepperStrings } from '../components/util/stepper.js';
14
+ import type { SegmentedControlOption } from '../components/util/segmented-control.js';
5
15
  export type ZabiComponent<T extends Record<string, any> = Record<string, any>, E extends Record<string, any> = Record<string, any>> = Component<T, E>;
6
- export interface ButtonProps {
7
- variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'info' | 'ghost' | 'link' | 'neutral';
8
- size?: 'sm' | 'md' | 'lg';
16
+ export interface ButtonProps extends Omit<HTMLButtonAttributes, 'class'> {
17
+ /**
18
+ * `success`, `warning`, `info` and `neutral` are deprecated: Button never
19
+ * styled them, and they render as `primary`.
20
+ */
21
+ variant?: ButtonVariant | 'success' | 'warning' | 'info' | 'neutral';
22
+ size?: SizeVariant;
9
23
  disabled?: boolean;
10
24
  loading?: boolean;
11
25
  type?: 'button' | 'submit' | 'reset';
12
- className?: string;
26
+ /**
27
+ * Where the link goes. Makes this an `<a>` that looks the same. While
28
+ * `disabled` or `loading` it has no `href` and is `aria-disabled`.
29
+ */
30
+ href?: string;
31
+ /** With `href`: where the link opens. */
32
+ target?: HTMLAnchorAttributes['target'];
33
+ /** With `href`: the link's relationship, such as `noopener`. */
34
+ rel?: HTMLAnchorAttributes['rel'];
35
+ /** With `href`: download the address instead of opening it. */
36
+ download?: HTMLAnchorAttributes['download'];
37
+ hreflang?: HTMLAnchorAttributes['hreflang'];
38
+ referrerpolicy?: HTMLAnchorAttributes['referrerpolicy'];
39
+ ping?: HTMLAnchorAttributes['ping'];
13
40
  text?: string;
41
+ /** Stretch to the width of the container. */
42
+ fullWidth?: boolean;
43
+ /** @deprecated use `fullWidth`. */
44
+ isFullWidth?: boolean;
45
+ class?: string;
46
+ children?: Snippet;
47
+ /** @deprecated never accepted by the component; use `class`. */
48
+ className?: string;
49
+ /** @deprecated never accepted by the component; render the icon in `children`. */
14
50
  iconLeft?: string | any;
51
+ /** @deprecated never accepted by the component; render the icon in `children`. */
15
52
  iconRight?: string | any;
53
+ /** @deprecated never accepted by the component; use `aria-label`. */
16
54
  ariaLabel?: string;
55
+ /** @deprecated never accepted by the component; use `aria-describedby`. */
17
56
  ariaDescribedBy?: string;
57
+ /** @deprecated never accepted by the component; use `aria-expanded`. */
18
58
  ariaExpanded?: boolean;
59
+ /** @deprecated never accepted by the component; use `aria-controls`. */
19
60
  ariaControls?: string;
61
+ /** @deprecated never accepted by the component; use `aria-pressed`. */
20
62
  ariaPressed?: boolean;
21
63
  }
22
64
  export interface ButtonEvents {
@@ -25,24 +67,67 @@ export interface ButtonEvents {
25
67
  event: MouseEvent;
26
68
  };
27
69
  }
28
- export interface HeadingProps {
70
+ export interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, 'class'> {
29
71
  level?: 1 | 2 | 3 | 4 | 5 | 6;
72
+ /** Visual size, when it should differ from the semantic level. */
73
+ size?: 1 | 2 | 3 | 4 | 5 | 6;
74
+ /** Heading text. Ignored when `children` is provided. */
75
+ text?: string;
76
+ /** Text colour: `headline` by default; `inherit`, `on-brand` or `on-accent` on a filled block. */
77
+ tone?: 'headline' | OnFillTone;
78
+ class?: string;
79
+ children?: Snippet;
80
+ /** @deprecated never accepted by the component; use `class`. */
30
81
  className?: string;
31
82
  }
32
- export interface CardProps {
33
- variant?: 'default' | 'elevated' | 'outlined' | 'flat';
34
- size?: 'sm' | 'md' | 'lg';
83
+ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
84
+ variant?: CardVariant;
85
+ size?: SizeVariant;
35
86
  fullWidth?: boolean;
87
+ class?: string;
88
+ /** @deprecated use `class`. */
36
89
  className?: string;
37
90
  onclick?: (event: MouseEvent) => void | Promise<void>;
38
91
  /** Required when card is interactive (has onclick) for accessibility */
39
92
  ariaLabel?: string;
93
+ children?: Snippet;
40
94
  }
41
- export interface InputProps {
95
+ export interface InputProps extends Omit<HTMLInputAttributes, 'class' | 'size' | 'value' | 'type' | 'id' | 'name' | 'placeholder' | 'required' | 'disabled' | 'oninput' | 'onblur' | 'aria-label' | 'aria-describedby'> {
96
+ /** Omit to auto-generate. */
97
+ id?: string;
42
98
  type?: string;
43
99
  value?: string;
100
+ name?: string;
101
+ label?: string;
102
+ /** True when a FormField supplies the visible label. */
103
+ hideLabel?: boolean;
44
104
  placeholder?: string;
105
+ required?: boolean;
45
106
  disabled?: boolean;
107
+ loading?: boolean;
108
+ size?: SizeVariant;
109
+ variant?: SemanticVariant;
110
+ /** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
111
+ message?: string;
112
+ /** Help text under the field, read out with it. */
113
+ hint?: string;
114
+ /** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
115
+ error?: string;
116
+ /** Ids of other elements that describe the field. The hint and the message are added after them. */
117
+ 'aria-describedby'?: string | null;
118
+ /** Drawn inside the field, before the text. */
119
+ leading?: Snippet;
120
+ /** Drawn inside the field, after the text. */
121
+ trailing?: Snippet;
122
+ /** With `type="password"`: adds a button that shows the password as text, and hides it again. */
123
+ revealable?: boolean;
124
+ /** Accessible name of that button, the same in both states. */
125
+ revealLabel?: string;
126
+ oninput?: (event: Event) => void;
127
+ onblur?: (event: Event) => void;
128
+ 'aria-label'?: string;
129
+ class?: string;
130
+ /** @deprecated never accepted by the component; use `class`. */
46
131
  className?: string;
47
132
  }
48
133
  export interface InputEvents {
@@ -61,9 +146,20 @@ export interface InputEvents {
61
146
  event: FocusEvent;
62
147
  };
63
148
  }
64
- export interface CheckboxProps {
149
+ export interface CheckboxProps extends Omit<HTMLInputAttributes, 'class' | 'id' | 'name' | 'value' | 'disabled' | 'checked' | 'type' | 'onchange'> {
150
+ id?: string;
151
+ name?: string;
152
+ value?: string;
65
153
  checked?: boolean;
154
+ defaultChecked?: boolean;
66
155
  disabled?: boolean;
156
+ loading?: boolean;
157
+ label?: string;
158
+ onchange?: (event: Event) => void;
159
+ /** Same as `onchange`; both are called. */
160
+ onChange?: (event: Event) => void;
161
+ class?: string;
162
+ /** @deprecated never accepted by the component; use `class`. */
67
163
  className?: string;
68
164
  }
69
165
  export interface CheckboxEvents {
@@ -72,18 +168,49 @@ export interface CheckboxEvents {
72
168
  event: Event;
73
169
  };
74
170
  }
75
- export interface SelectProps {
76
- options: Array<{
77
- value: string;
171
+ export interface SelectProps extends Omit<HTMLButtonAttributes, 'class' | 'value' | 'name' | 'disabled' | 'type' | 'onchange' | 'onclick' | 'aria-describedby' | 'children'> {
172
+ /** Id of the trigger. Omit to auto-generate. */
173
+ id?: string;
174
+ options?: Array<{
175
+ value: string | number;
78
176
  label: string;
177
+ disabled?: boolean;
79
178
  }>;
80
- value?: string;
179
+ value?: string | number | undefined;
81
180
  searchable?: boolean;
82
181
  searchPlaceholder?: string;
83
182
  maxMenuHeight?: string;
84
183
  menuWidth?: string;
184
+ /** `auto` (the default): a BottomSheet on a phone, under the field elsewhere. */
185
+ presentation?: "auto" | "popover" | "sheet" | "native";
186
+ /** The component's own texts; see `SelectStrings`. The single-text props win over it. */
187
+ strings?: Partial<import("../components/util/select.js").SelectStrings>;
85
188
  noResultsText?: string;
189
+ isLoading?: boolean;
190
+ loadingText?: string;
191
+ emptyStateTitle?: string;
192
+ emptyStateDescription?: string;
193
+ emptyStateActionLabel?: string;
194
+ onEmptyStateAction?: () => void;
195
+ placeholder?: string;
196
+ label?: string;
197
+ /** When set, a hidden input submits the selected value with native forms. */
198
+ name?: string;
199
+ required?: boolean;
86
200
  disabled?: boolean;
201
+ size?: SizeVariant;
202
+ variant?: 'default' | 'success' | 'warning' | 'error';
203
+ /** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
204
+ message?: string;
205
+ /** Help text under the field, read out with it. */
206
+ hint?: string;
207
+ /** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
208
+ error?: string;
209
+ /** Ids of other elements that describe the field. The hint and the message are added after them. */
210
+ 'aria-describedby'?: string | null;
211
+ onchange?: (event: Event) => void;
212
+ class?: string;
213
+ /** @deprecated never accepted by the component; use `class`. */
87
214
  className?: string;
88
215
  }
89
216
  export interface SelectEvents {
@@ -92,11 +219,30 @@ export interface SelectEvents {
92
219
  event: Event;
93
220
  };
94
221
  }
95
- export interface TextareaProps {
222
+ export interface TextareaProps extends Omit<HTMLTextareaAttributes, 'class' | 'value' | 'id' | 'name' | 'placeholder' | 'required' | 'disabled' | 'rows' | 'oninput' | 'aria-describedby'> {
223
+ id?: string;
96
224
  value?: string;
225
+ name?: string;
226
+ label?: string;
227
+ hideLabel?: boolean;
97
228
  placeholder?: string;
229
+ required?: boolean;
98
230
  rows?: number;
99
231
  disabled?: boolean;
232
+ loading?: boolean;
233
+ size?: SizeVariant;
234
+ variant?: SemanticVariant;
235
+ /** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
236
+ message?: string;
237
+ /** Help text under the field, read out with it. */
238
+ hint?: string;
239
+ /** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
240
+ error?: string;
241
+ /** Ids of other elements that describe the field. The hint and the message are added after them. */
242
+ 'aria-describedby'?: string | null;
243
+ oninput?: (event: Event) => void;
244
+ class?: string;
245
+ /** @deprecated never accepted by the component; use `class`. */
100
246
  className?: string;
101
247
  }
102
248
  export interface TextareaEvents {
@@ -109,26 +255,82 @@ export interface TextareaEvents {
109
255
  event: Event;
110
256
  };
111
257
  }
112
- export interface ModalProps {
113
- open?: boolean;
258
+ export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'title' | 'role' | 'onclick' | 'onkeydown' | 'onclose' | 'children'> {
259
+ /** Open state. Bindable. */
260
+ isOpen?: boolean;
114
261
  title?: string;
262
+ description?: string;
263
+ size?: 'sm' | 'md' | 'lg';
264
+ role?: 'dialog' | 'alertdialog';
265
+ showClose?: boolean;
266
+ closeLabel?: string;
267
+ /** CSS selector, inside the panel, of the control that takes focus on open. */
268
+ initialFocus?: string;
269
+ /** Render the overlay in `document.body`. */
270
+ portal?: boolean;
271
+ /** When false, Escape, a backdrop click and the close button do not close the modal. */
272
+ dismissible?: boolean;
273
+ /** Fills the screen: `true` at every width, `'mobile'` below 768px only. */
274
+ fullScreen?: boolean | 'mobile';
275
+ onclose?: (detail: {
276
+ reason: 'escape' | 'backdrop' | 'close-button';
277
+ }) => void;
278
+ /** @deprecated for close reporting: use `onclose`. Still called on close. */
279
+ onclick?: (event: Event) => void;
280
+ onkeydown?: (event: Event) => void;
281
+ 'data-testid'?: string;
282
+ class?: string;
283
+ children?: Snippet;
284
+ footer?: Snippet;
285
+ /** @deprecated never accepted by the component; use `isOpen`. */
286
+ open?: boolean;
287
+ /** @deprecated never accepted by the component; use `class`. */
115
288
  className?: string;
116
289
  }
117
290
  export interface ModalEvents {
118
291
  }
119
292
  export interface AlertProps {
120
- type?: 'success' | 'error' | 'warning' | 'info';
121
- message: string;
293
+ variant?: ExtendedSemanticVariant;
294
+ title?: string;
295
+ message?: string;
296
+ closable?: boolean;
297
+ /** Accessible name of the dismiss button a `closable` alert has. */
298
+ closeLabel?: string;
299
+ /** Visible state. Bindable. */
300
+ open?: boolean;
301
+ /** Shrink to content instead of filling the container. */
302
+ inline?: boolean;
303
+ onclick?: (event: Event) => void;
304
+ class?: string;
305
+ /** @deprecated use `class`. */
122
306
  className?: string;
307
+ children?: Snippet;
308
+ /** @deprecated never accepted by the component; use `variant`. */
309
+ type?: 'success' | 'error' | 'warning' | 'info';
123
310
  }
124
- export interface BadgeProps {
125
- variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
311
+ export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class'> {
312
+ variant?: BadgeVariant;
313
+ size?: SizeVariant;
314
+ emphasis?: 'subtle' | 'solid';
315
+ /** Label text. Ignored when `children` is provided. */
126
316
  text?: string;
317
+ showIcon?: boolean;
318
+ class?: string;
319
+ children?: Snippet;
320
+ /** @deprecated never accepted by the component; use `class`. */
127
321
  className?: string;
128
322
  }
129
323
  export interface ProgressProps {
130
324
  value?: number;
131
325
  max?: number;
326
+ size?: SizeVariant;
327
+ label?: string;
328
+ /** Names the progressbar when there is no visible `label`. */
329
+ 'aria-label'?: string;
330
+ /** Points the progressbar at another element's id for its name. */
331
+ 'aria-labelledby'?: string;
332
+ class?: string;
333
+ /** @deprecated never accepted by the component; use `class`. */
132
334
  className?: string;
133
335
  }
134
336
  export interface SkeletonProps {
@@ -138,9 +340,26 @@ export interface SkeletonProps {
138
340
  class?: string;
139
341
  'aria-label'?: string;
140
342
  }
141
- export interface ToggleProps {
343
+ export interface ToggleProps extends Omit<HTMLButtonAttributes, 'class' | 'id' | 'name' | 'value' | 'disabled' | 'type' | 'role' | 'onclick' | 'onchange' | 'children'> {
344
+ /** Omit to auto-generate. */
345
+ id?: string;
346
+ /** When set, a hidden input submits `value` with native forms while checked. */
347
+ name?: string;
348
+ value?: string;
142
349
  checked?: boolean;
143
350
  disabled?: boolean;
351
+ loading?: boolean;
352
+ label?: string;
353
+ /** The switch's accessible name when there is no visible `label`. */
354
+ 'aria-label'?: string;
355
+ /** The id of an element of the page that names the switch. */
356
+ 'aria-labelledby'?: string;
357
+ onclick?: (event: MouseEvent) => void;
358
+ onchange?: (event: {
359
+ checked: boolean;
360
+ }) => void;
361
+ class?: string;
362
+ /** @deprecated never accepted by the component; use `class`. */
144
363
  className?: string;
145
364
  }
146
365
  export interface ToggleEvents {
@@ -149,11 +368,356 @@ export interface ToggleEvents {
149
368
  event: Event;
150
369
  };
151
370
  }
152
- export interface TooltipProps {
153
- content: string;
371
+ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
372
+ content?: string;
373
+ placement?: 'top' | 'bottom' | 'left' | 'right';
374
+ delay?: number;
375
+ disabled?: boolean;
376
+ /** Lay the trigger out as a full-width block. */
377
+ block?: boolean;
378
+ /** Position the bubble against the viewport, so a scrolling ancestor cannot clip it. */
379
+ fixed?: boolean;
380
+ /** Milliseconds a tooltip opened by a tap stays; `0` keeps it until it is dismissed. */
381
+ touchDuration?: number;
382
+ class?: string;
383
+ children?: Snippet;
384
+ /** @deprecated never accepted by the component; use `placement`. */
154
385
  position?: 'top' | 'bottom' | 'left' | 'right';
386
+ /** @deprecated never accepted by the component; use `class`. */
155
387
  className?: string;
156
388
  }
389
+ export interface BottomTabBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
390
+ /** Three to five destinations. */
391
+ items: BottomTabBarItem[];
392
+ /** The href of the active tab, or the path of the current page. Defaults to the current page. */
393
+ active?: string;
394
+ /** Accessible name of the navigation landmark. */
395
+ label?: string;
396
+ /** What a badge adds to the tab's accessible name, after the label and a comma. */
397
+ badgeLabel?: (count: number, item: BottomTabBarItem) => string;
398
+ /** Counts above this show as `99+`. */
399
+ badgeMax?: number;
400
+ /** Defaults to `fixed`, or to `static` inside an `AppShell`. */
401
+ position?: 'fixed' | 'static';
402
+ class?: string;
403
+ }
404
+ export interface AppBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class' | 'title'> {
405
+ /** The name of the screen, as a heading. */
406
+ title?: string;
407
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
408
+ /** Shows the back control as a link to this address. */
409
+ backHref?: string;
410
+ /** Called when the back control is activated; on its own it makes the control a button. */
411
+ onback?: (event: MouseEvent) => void;
412
+ /** Accessible name of the back control. */
413
+ backLabel?: string;
414
+ /**
415
+ * Hides the bar while the page scrolls down and brings it back when it scrolls up.
416
+ * Keyboard focus inside the bar holds it and brings it back; focus left by a tap does not.
417
+ */
418
+ collapseOnScroll?: boolean;
419
+ /** How many lines the title may take before it is cut. Default 1. */
420
+ titleLines?: 1 | 2;
421
+ /** Before the title, after the back control. */
422
+ leading?: Snippet;
423
+ /** After the title. At most two icon buttons. */
424
+ actions?: Snippet;
425
+ class?: string;
426
+ }
427
+ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
428
+ /** The top bar, an `AppBar`. */
429
+ header?: Snippet;
430
+ /** The scrolling content, rendered in the element `contentElement` names. */
431
+ children?: Snippet;
432
+ /** The element around the content. Use `div` for a shell inside another `<main>`. */
433
+ contentElement?: 'main' | 'div';
434
+ /** The bottom bar, a `BottomTabBar`. */
435
+ footer?: Snippet;
436
+ class?: string;
437
+ /** Added after the two custom properties the shell sets. */
438
+ style?: string;
439
+ }
440
+ export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'aria-label' | 'aria-labelledby'> {
441
+ class?: string;
442
+ /** Stars given, or `null` for no rating. Bindable. */
443
+ value?: number | null;
444
+ max?: number;
445
+ /** Names the rating. Shown above the stars unless `hideLabel`. */
446
+ label?: string;
447
+ hideLabel?: boolean;
448
+ 'aria-label'?: string;
449
+ 'aria-labelledby'?: string;
450
+ size?: SizeVariant;
451
+ /** Colour of a filled star: the primary action colour, or the app's accent. */
452
+ tone?: 'primary' | 'accent';
453
+ /** Shows a score: one image with one name, and stars can be partly filled. */
454
+ readonly?: boolean;
455
+ /** Adds a clear button; pressing the selected star again never clears. */
456
+ clearable?: boolean;
457
+ disabled?: boolean;
458
+ name?: string;
459
+ /** On by default when `readonly`. */
460
+ showValue?: boolean;
461
+ formatValue?: (value: number) => string;
462
+ strings?: Partial<RatingStrings>;
463
+ onchange?: (value: number | null) => void;
464
+ }
465
+ export interface SegmentedControlProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'aria-label' | 'aria-labelledby'> {
466
+ class?: string;
467
+ /** Two to four choices. */
468
+ options: SegmentedControlOption[];
469
+ /** Selected value. Bindable. */
470
+ value?: string | undefined;
471
+ /** Accessible name of the group. Not shown. */
472
+ label?: string;
473
+ 'aria-label'?: string;
474
+ 'aria-labelledby'?: string;
475
+ size?: SizeVariant;
476
+ /** Equal-width segments that fill the row. */
477
+ fullWidth?: boolean;
478
+ name?: string;
479
+ disabled?: boolean;
480
+ onchange?: (value: string) => void;
481
+ }
482
+ export interface FloatingActionButtonProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
483
+ /** What the button does. Its accessible name, and its text when `extended`. */
484
+ label: string;
485
+ /** An icon component, as `@lucide/svelte` icons are. A plus sign by default. */
486
+ icon?: Component<{
487
+ size?: number;
488
+ class?: string;
489
+ }>;
490
+ /** Shows the label as text beside the icon. */
491
+ extended?: boolean;
492
+ /** Makes it a link to this address. Without it, it is a button. */
493
+ href?: string;
494
+ /** The bottom corner it sits in. `bottom-end` follows the writing direction. */
495
+ position?: 'bottom-end' | 'bottom-start' | 'bottom-center';
496
+ class?: string;
497
+ }
498
+ export interface StickyActionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
499
+ /** Accessible name. With it the bar is a group. */
500
+ label?: string;
501
+ class?: string;
502
+ /** Added after the offset and margin the bar sets while the keyboard is up. */
503
+ style?: string;
504
+ /** The main action, and at most one or two beside it. */
505
+ children?: Snippet;
506
+ }
507
+ export interface BottomSheetProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'title' | 'onclose' | 'onkeydown'> {
508
+ isOpen?: boolean;
509
+ /** Heading of the sheet, and its accessible name. */
510
+ title: string;
511
+ description?: string;
512
+ /** The heights the sheet can rest at. */
513
+ snapPoints?: BottomSheetSnap[];
514
+ /** The snap point the sheet is at. Bindable. */
515
+ snap?: BottomSheetSnap;
516
+ /** Render the overlay in `document.body`; `false` renders in place. */
517
+ portal?: boolean;
518
+ /** When false, Escape, the backdrop, the close button and a swipe down do not close it. */
519
+ dismissible?: boolean;
520
+ /** Fired when the sheet closes itself, with what the user did. */
521
+ onclose?: (detail: {
522
+ reason: BottomSheetCloseReason;
523
+ }) => void;
524
+ /** Hears every keydown in the sheet, after the sheet has handled Escape. */
525
+ onkeydown?: (event: KeyboardEvent) => void;
526
+ /** Accessible name of the close button. */
527
+ closeLabel?: string;
528
+ /** Accessible name of the grip while its button takes the sheet up a step. */
529
+ expandLabel?: string;
530
+ /** Accessible name of the grip while its button takes the sheet down a step. */
531
+ collapseLabel?: string;
532
+ /** CSS selector of the control that takes focus when the sheet opens. */
533
+ initialFocus?: string;
534
+ class?: string;
535
+ children?: Snippet;
536
+ /** Pinned to the bottom of the panel, below the scrolling content. */
537
+ footer?: Snippet;
538
+ }
539
+ export interface DateFieldProps extends Omit<HTMLInputAttributes, 'class' | 'type' | 'value' | 'size' | 'min' | 'max' | 'step' | 'required' | 'disabled' | 'readonly' | 'id' | 'name'> {
540
+ /** Omit to auto-generate; pair with FormField's `id` when used inside FormField. */
541
+ id?: string;
542
+ /** The date as `YYYY-MM-DD`, or `""` while empty. Supports `bind:value`. */
543
+ value?: string;
544
+ /** Name the value is submitted under in a form. */
545
+ name?: string;
546
+ label?: string;
547
+ /** True when FormField supplies the visible `<label>`. */
548
+ hideLabel?: boolean;
549
+ /** Help text under the field, read out with it. */
550
+ hint?: string;
551
+ /** An error under the field. It marks the field invalid and is announced. */
552
+ error?: string;
553
+ /** Earliest value that can be picked, in the format of `value`. */
554
+ min?: string;
555
+ /** Latest value that can be picked, in the format of `value`. */
556
+ max?: string;
557
+ /** Steps between dates that can be picked, in days. */
558
+ step?: number | 'any';
559
+ required?: boolean;
560
+ disabled?: boolean;
561
+ /** Shows the value without letting it be changed; it is still submitted. */
562
+ readonly?: boolean;
563
+ /** Height, on the scale Input and Button use. At least 44px on a touch screen. */
564
+ size?: SizeVariant;
565
+ /** Extra classes for the `<input>`. */
566
+ class?: string;
567
+ }
568
+ export interface TimeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'type' | 'value' | 'size' | 'min' | 'max' | 'step' | 'required' | 'disabled' | 'readonly' | 'id' | 'name'> {
569
+ /** Omit to auto-generate; pair with FormField's `id` when used inside FormField. */
570
+ id?: string;
571
+ /** The time as 24-hour `HH:mm`, or `""` while empty. Supports `bind:value`. */
572
+ value?: string;
573
+ /** Name the value is submitted under in a form. */
574
+ name?: string;
575
+ label?: string;
576
+ /** True when FormField supplies the visible `<label>`. */
577
+ hideLabel?: boolean;
578
+ /** Help text under the field, read out with it. */
579
+ hint?: string;
580
+ /** An error under the field. It marks the field invalid and is announced. */
581
+ error?: string;
582
+ /** Earliest value that can be picked, in the format of `value`. */
583
+ min?: string;
584
+ /** Latest value that can be picked, in the format of `value`. */
585
+ max?: string;
586
+ /** Steps between times that can be picked, in seconds. */
587
+ step?: number | 'any';
588
+ required?: boolean;
589
+ disabled?: boolean;
590
+ /** Shows the value without letting it be changed; it is still submitted. */
591
+ readonly?: boolean;
592
+ /** Height, on the scale Input and Button use. At least 44px on a touch screen. */
593
+ size?: SizeVariant;
594
+ /** Extra classes for the `<input>`. */
595
+ class?: string;
596
+ }
597
+ export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onselect'> {
598
+ /** The month shown, as `YYYY-MM`. Supports `bind:month`. */
599
+ month?: string;
600
+ /** The selected day, as `YYYY-MM-DD`, or null. Supports `bind:selected`. */
601
+ selected?: string | null;
602
+ /** What happens on which day. A day shows a dot per event, three at most. */
603
+ events?: CalendarEvent[];
604
+ /** First day of the week: 0 for Sunday to 6 for Saturday. */
605
+ weekStartsOn?: number;
606
+ /**
607
+ * Language of the month and day names, as a BCP 47 tag. It does not translate the
608
+ * words the component adds ("today", "selected", ...): pass those in `strings` too.
609
+ */
610
+ locale?: string;
611
+ /** Earliest day that can be selected, as `YYYY-MM-DD`. */
612
+ min?: string;
613
+ /** Latest day that can be selected, as `YYYY-MM-DD`. */
614
+ max?: string;
615
+ /** Return true for a day that cannot be selected. */
616
+ isDateDisabled?: (date: string) => boolean;
617
+ /** The words the calendar says; replace any of them to translate. */
618
+ strings?: Partial<CalendarStrings>;
619
+ /** Called with the day when the user selects another one. */
620
+ onselect?: (date: string) => void;
621
+ /** Called with the month when the user moves to another one. */
622
+ onmonthchange?: (month: string) => void;
623
+ /** Extra classes for the host element. */
624
+ class?: string;
625
+ }
626
+ export interface PhotoGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'aria-label' | 'aria-labelledby' | 'onselect'> {
627
+ photos: Photo[];
628
+ /** How many columns. Left out, it follows the width of the grid: 3, 4 from 480px, 5 from 768px. */
629
+ columns?: number;
630
+ /** Shows no more than this many photos; the last tile then says how many more there are. */
631
+ max?: number;
632
+ /** Called with the photo's place in `photos` when one is opened. */
633
+ onopen?: (index: number) => void;
634
+ /** Makes a press select: `single` for one photo, `multiple` for any number. */
635
+ selectable?: 'single' | 'multiple';
636
+ /** Key of the selected photo, or `null`. Supports `bind:selected`. */
637
+ selected?: PhotoKey | null;
638
+ /** Keys of the selected photos. Supports `bind:selectedKeys`. */
639
+ selectedKeys?: PhotoKey[];
640
+ /** Called when a photo is selected or, in `multiple`, its selection is cleared. */
641
+ onselect?: (detail: PhotoGridSelectDetail) => void;
642
+ /** Puts an "Add photo" tile first and is called when it is pressed. */
643
+ onadd?: () => void;
644
+ /** Overrides for the built-in strings. */
645
+ strings?: Partial<PhotoGridStrings>;
646
+ /** Extra classes for the host element. */
647
+ class?: string;
648
+ 'aria-label'?: string;
649
+ 'aria-labelledby'?: string;
650
+ }
651
+ export interface PhotoViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onclose' | 'aria-label'> {
652
+ photos: Photo[];
653
+ /** Place in `photos` of the photo that is showing. Supports `bind:index`. */
654
+ index?: number;
655
+ isOpen?: boolean;
656
+ /** Things to do with the photo that is showing. */
657
+ actions?: PhotoViewerAction[];
658
+ /** Render the overlay in `document.body`; `false` renders in place. */
659
+ portal?: boolean;
660
+ /** Fired when the viewer closes itself, with what the user did. */
661
+ onclose?: (detail: {
662
+ reason: PhotoViewerCloseReason;
663
+ }) => void;
664
+ /** Accessible name of the dialog. */
665
+ label?: string;
666
+ /** Overrides for the built-in strings. */
667
+ strings?: Partial<PhotoViewerStrings>;
668
+ /** Extra classes for the dialog panel. */
669
+ class?: string;
670
+ }
671
+ export interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
672
+ class?: string;
673
+ /** The steps, in order: labels, or objects with a label and a description. */
674
+ steps: StepperItem[];
675
+ /**
676
+ * Index of the current step, counted from 0. Bindable. A value outside
677
+ * the steps is shown as the nearest step; the bound value is left as given.
678
+ */
679
+ current?: number;
680
+ /** Size of the markers and the text. */
681
+ size?: SizeVariant;
682
+ /** `auto` is compact while the Stepper itself is narrower than 30rem. */
683
+ layout?: StepperLayout;
684
+ /** Makes the completed steps buttons that go back to that step. */
685
+ interactive?: boolean;
686
+ /** Accessible name of the navigation landmark. */
687
+ label?: string;
688
+ /** Overrides for the built-in strings. */
689
+ strings?: Partial<StepperStrings>;
690
+ /** Called with the index of the step a press went back to. Only with `interactive`. */
691
+ onstepchange?: (index: number) => void;
692
+ }
693
+ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'role' | 'aria-label'> {
694
+ /** The person's name: the accessible name, and where the initials come from. */
695
+ name: string;
696
+ /** Address of the picture. Without it, or when it fails to load, the initials show. */
697
+ src?: string;
698
+ /** Diameter: 24, 32 and 48px. */
699
+ size?: AvatarSize;
700
+ /** Accessible name, when it should differ from `name`. `alt=""` makes the avatar decorative. */
701
+ alt?: string;
702
+ /** Language the initials are upper-cased in. The page's own by default. */
703
+ locale?: string;
704
+ class?: string;
705
+ }
706
+ export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLUListElement>, 'class' | 'aria-label'> {
707
+ /** The people, in the order they are shown. */
708
+ people: AvatarPerson[];
709
+ /** How many are shown before the rest become "+N". */
710
+ max?: number;
711
+ /** Diameter of each avatar: 24, 32 and 48px. */
712
+ size?: AvatarSize;
713
+ /** Accessible name of the list. */
714
+ label?: string;
715
+ /** Overrides for the built-in strings. */
716
+ strings?: Partial<AvatarGroupStrings>;
717
+ /** The language the initials are worked out in; passed to each Avatar. */
718
+ locale?: string;
719
+ class?: string;
720
+ }
157
721
  export type Button = ZabiComponent<ButtonProps, ButtonEvents>;
158
722
  export type Heading = ZabiComponent<HeadingProps>;
159
723
  export type Card = ZabiComponent<CardProps>;
@@ -168,4 +732,20 @@ export type Progress = ZabiComponent<ProgressProps>;
168
732
  export type Skeleton = ZabiComponent<SkeletonProps>;
169
733
  export type Toggle = ZabiComponent<ToggleProps, ToggleEvents>;
170
734
  export type Tooltip = ZabiComponent<TooltipProps>;
735
+ export type BottomTabBar = ZabiComponent<BottomTabBarProps>;
736
+ export type AppBar = ZabiComponent<AppBarProps>;
737
+ export type AppShell = ZabiComponent<AppShellProps>;
738
+ export type Rating = ZabiComponent<RatingProps>;
739
+ export type SegmentedControl = ZabiComponent<SegmentedControlProps>;
740
+ export type FloatingActionButton = ZabiComponent<FloatingActionButtonProps>;
741
+ export type StickyActionBar = ZabiComponent<StickyActionBarProps>;
742
+ export type BottomSheet = ZabiComponent<BottomSheetProps>;
743
+ export type DateField = ZabiComponent<DateFieldProps>;
744
+ export type TimeField = ZabiComponent<TimeFieldProps>;
745
+ export type Calendar = ZabiComponent<CalendarProps>;
746
+ export type PhotoGrid = ZabiComponent<PhotoGridProps>;
747
+ export type PhotoViewer = ZabiComponent<PhotoViewerProps>;
748
+ export type Avatar = ZabiComponent<AvatarProps>;
749
+ export type AvatarGroup = ZabiComponent<AvatarGroupProps>;
750
+ export type Stepper = ZabiComponent<StepperProps>;
171
751
  //# sourceMappingURL=index.d.ts.map