zabi-components 8.1.0 → 9.0.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 (273) hide show
  1. package/CHANGELOG.md +1011 -0
  2. package/README.md +1 -1
  3. package/THEME.md +18 -5
  4. package/THEMING.md +308 -74
  5. package/dist/atoms/ActionPanel.svelte +1 -1
  6. package/dist/atoms/Avatar.svelte +19 -3
  7. package/dist/atoms/Avatar.svelte.d.ts +12 -0
  8. package/dist/atoms/Badge.svelte +37 -8
  9. package/dist/atoms/Badge.svelte.d.ts +6 -0
  10. package/dist/atoms/Block.svelte +74 -0
  11. package/dist/atoms/Block.svelte.d.ts +29 -0
  12. package/dist/atoms/Button.svelte +52 -15
  13. package/dist/atoms/Button.svelte.d.ts +3 -2
  14. package/dist/atoms/Card.svelte +181 -25
  15. package/dist/atoms/Card.svelte.d.ts +55 -3
  16. package/dist/atoms/Checkbox.svelte +33 -0
  17. package/dist/atoms/Checkbox.svelte.d.ts +27 -0
  18. package/dist/atoms/Chip.svelte +351 -0
  19. package/dist/atoms/Chip.svelte.d.ts +57 -0
  20. package/dist/atoms/CodeField.svelte +385 -0
  21. package/dist/atoms/CodeField.svelte.d.ts +61 -0
  22. package/dist/atoms/ColorPicker.svelte +1 -0
  23. package/dist/atoms/DateField.svelte +41 -3
  24. package/dist/atoms/DateField.svelte.d.ts +31 -3
  25. package/dist/atoms/FloatingActionButton.svelte +5 -3
  26. package/dist/atoms/FloatingActionButton.svelte.d.ts +1 -1
  27. package/dist/atoms/Heading.svelte +27 -1
  28. package/dist/atoms/Heading.svelte.d.ts +7 -0
  29. package/dist/atoms/IconButton.svelte +81 -9
  30. package/dist/atoms/IconButton.svelte.d.ts +13 -0
  31. package/dist/atoms/Input.svelte +10 -5
  32. package/dist/atoms/Input.svelte.d.ts +3 -2
  33. package/dist/atoms/List.svelte +3 -2
  34. package/dist/atoms/ListItem.svelte +31 -7
  35. package/dist/atoms/ListItem.svelte.d.ts +6 -0
  36. package/dist/atoms/PickerField.svelte +239 -0
  37. package/dist/atoms/PickerField.svelte.d.ts +67 -0
  38. package/dist/atoms/Progress.svelte +78 -17
  39. package/dist/atoms/Progress.svelte.d.ts +11 -1
  40. package/dist/atoms/Radio.svelte +32 -0
  41. package/dist/atoms/Radio.svelte.d.ts +26 -0
  42. package/dist/atoms/Rating.svelte +132 -6
  43. package/dist/atoms/Rating.svelte.d.ts +24 -3
  44. package/dist/atoms/Select.svelte +24 -26
  45. package/dist/atoms/Select.svelte.d.ts +12 -0
  46. package/dist/atoms/SelectionControl.svelte +99 -6
  47. package/dist/atoms/SelectionControl.svelte.d.ts +25 -0
  48. package/dist/atoms/Skeleton.svelte +114 -18
  49. package/dist/atoms/Skeleton.svelte.d.ts +30 -3
  50. package/dist/atoms/SkeletonGroup.svelte +43 -0
  51. package/dist/atoms/SkeletonGroup.svelte.d.ts +20 -0
  52. package/dist/atoms/Slider.svelte +35 -0
  53. package/dist/atoms/Sparkline.svelte +109 -0
  54. package/dist/atoms/Sparkline.svelte.d.ts +27 -0
  55. package/dist/atoms/SpeechBubble.svelte +187 -0
  56. package/dist/atoms/SpeechBubble.svelte.d.ts +33 -0
  57. package/dist/atoms/Stat.svelte +72 -0
  58. package/dist/atoms/Stat.svelte.d.ts +19 -0
  59. package/dist/atoms/TemporalField.svelte +342 -10
  60. package/dist/atoms/TemporalField.svelte.d.ts +20 -4
  61. package/dist/atoms/Textarea.svelte +100 -5
  62. package/dist/atoms/Textarea.svelte.d.ts +21 -0
  63. package/dist/atoms/TimeColumn.svelte +150 -0
  64. package/dist/atoms/TimeColumn.svelte.d.ts +25 -0
  65. package/dist/atoms/TimeField.svelte +46 -3
  66. package/dist/atoms/TimeField.svelte.d.ts +34 -3
  67. package/dist/atoms/Toast.svelte +6 -5
  68. package/dist/atoms/Toggle.svelte +61 -10
  69. package/dist/atoms/Toggle.svelte.d.ts +15 -0
  70. package/dist/atoms/Tooltip.svelte +20 -1
  71. package/dist/atoms/Tooltip.svelte.d.ts +7 -0
  72. package/dist/atoms/index.d.ts +21 -0
  73. package/dist/atoms/index.js +17 -0
  74. package/dist/atoms/selection-control.styles.d.ts +15 -4
  75. package/dist/atoms/selection-control.styles.js +16 -5
  76. package/dist/components/atoms/index.d.ts +21 -0
  77. package/dist/components/atoms/index.d.ts.map +1 -1
  78. package/dist/components/atoms/selection-control.styles.d.ts +15 -4
  79. package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
  80. package/dist/components/index.d.ts +27 -3
  81. package/dist/components/index.d.ts.map +1 -1
  82. package/dist/components/map.d.ts +11 -0
  83. package/dist/components/map.d.ts.map +1 -0
  84. package/dist/components/molecules/index.d.ts +7 -2
  85. package/dist/components/molecules/index.d.ts.map +1 -1
  86. package/dist/components/molecules/toast-store.d.ts +30 -0
  87. package/dist/components/molecules/toast-store.d.ts.map +1 -1
  88. package/dist/components/organisms/index.d.ts +6 -1
  89. package/dist/components/organisms/index.d.ts.map +1 -1
  90. package/dist/components/types/variants.d.ts +12 -3
  91. package/dist/components/types/variants.d.ts.map +1 -1
  92. package/dist/components/util/app-shell.d.ts +55 -4
  93. package/dist/components/util/app-shell.d.ts.map +1 -1
  94. package/dist/components/util/avatar.d.ts +3 -0
  95. package/dist/components/util/avatar.d.ts.map +1 -1
  96. package/dist/components/util/bottom-tab-bar.d.ts +6 -0
  97. package/dist/components/util/bottom-tab-bar.d.ts.map +1 -1
  98. package/dist/components/util/chart.d.ts +140 -0
  99. package/dist/components/util/chart.d.ts.map +1 -0
  100. package/dist/components/util/chip.d.ts +66 -0
  101. package/dist/components/util/chip.d.ts.map +1 -0
  102. package/dist/components/util/cn.d.ts.map +1 -1
  103. package/dist/components/util/code-field.d.ts +63 -0
  104. package/dist/components/util/code-field.d.ts.map +1 -0
  105. package/dist/components/util/collapsible.d.ts +6 -0
  106. package/dist/components/util/collapsible.d.ts.map +1 -1
  107. package/dist/components/util/display-voice.d.ts +10 -0
  108. package/dist/components/util/display-voice.d.ts.map +1 -0
  109. package/dist/components/util/field-control.d.ts +30 -0
  110. package/dist/components/util/field-control.d.ts.map +1 -0
  111. package/dist/components/util/field.d.ts +6 -0
  112. package/dist/components/util/field.d.ts.map +1 -1
  113. package/dist/components/util/focus-utils.d.ts +2 -0
  114. package/dist/components/util/focus-utils.d.ts.map +1 -1
  115. package/dist/components/util/map-view.d.ts +144 -0
  116. package/dist/components/util/map-view.d.ts.map +1 -0
  117. package/dist/components/util/photo.d.ts +19 -0
  118. package/dist/components/util/photo.d.ts.map +1 -1
  119. package/dist/components/util/progress.d.ts +19 -0
  120. package/dist/components/util/progress.d.ts.map +1 -0
  121. package/dist/components/util/scroll-edge.d.ts +33 -0
  122. package/dist/components/util/scroll-edge.d.ts.map +1 -0
  123. package/dist/components/util/sheet-drag.d.ts +25 -1
  124. package/dist/components/util/sheet-drag.d.ts.map +1 -1
  125. package/dist/components/util/skeleton.d.ts +15 -0
  126. package/dist/components/util/skeleton.d.ts.map +1 -0
  127. package/dist/components/util/sliding-indicator.d.ts +25 -0
  128. package/dist/components/util/sliding-indicator.d.ts.map +1 -0
  129. package/dist/components/util/temporal-field.d.ts +89 -0
  130. package/dist/components/util/temporal-field.d.ts.map +1 -0
  131. package/dist/components/util/toaster.d.ts +40 -0
  132. package/dist/components/util/toaster.d.ts.map +1 -1
  133. package/dist/components/util/tone-surface.d.ts +34 -0
  134. package/dist/components/util/tone-surface.d.ts.map +1 -0
  135. package/dist/components/util/top-navbar.d.ts +26 -2
  136. package/dist/components/util/top-navbar.d.ts.map +1 -1
  137. package/dist/components/util/zabi-strings.d.ts +9 -0
  138. package/dist/components/util/zabi-strings.d.ts.map +1 -1
  139. package/dist/create-theme/cli.js +6 -2
  140. package/dist/create-theme/index.d.ts +17 -3
  141. package/dist/create-theme/index.js +252 -35
  142. package/dist/create-theme/lib/resolve.js +97 -0
  143. package/dist/create-theme/theme-data.js +1618 -90
  144. package/dist/index.d.ts +27 -3
  145. package/dist/index.js +18 -0
  146. package/dist/map.d.ts +10 -0
  147. package/dist/map.js +9 -0
  148. package/dist/molecules/Alert.svelte +31 -12
  149. package/dist/molecules/Alert.svelte.d.ts +12 -1
  150. package/dist/molecules/AppBar.svelte +287 -28
  151. package/dist/molecules/AppBar.svelte.d.ts +62 -0
  152. package/dist/molecules/AvatarGroup.svelte +1 -1
  153. package/dist/molecules/BarChart.svelte +381 -0
  154. package/dist/molecules/BarChart.svelte.d.ts +45 -0
  155. package/dist/molecules/BottomSheet.svelte +88 -20
  156. package/dist/molecules/BottomSheet.svelte.d.ts +17 -1
  157. package/dist/molecules/BottomTabBar.svelte +134 -28
  158. package/dist/molecules/BottomTabBar.svelte.d.ts +36 -2
  159. package/dist/molecules/Calendar.svelte.d.ts +1 -1
  160. package/dist/molecules/ChipGroup.svelte +325 -0
  161. package/dist/molecules/ChipGroup.svelte.d.ts +41 -0
  162. package/dist/molecules/Collapsible.svelte +158 -54
  163. package/dist/molecules/Collapsible.svelte.d.ts +23 -6
  164. package/dist/molecules/CollapsibleGroup.svelte +16 -6
  165. package/dist/molecules/ConfirmDialog.svelte +5 -1
  166. package/dist/molecules/ConfirmDialog.svelte.d.ts +3 -0
  167. package/dist/molecules/Drawer.svelte +33 -12
  168. package/dist/molecules/Dropdown.svelte +9 -1
  169. package/dist/molecules/Dropdown.svelte.d.ts +2 -0
  170. package/dist/molecules/DropdownItem.svelte +1 -1
  171. package/dist/molecules/ImageUpload.svelte +230 -120
  172. package/dist/molecules/ImageUpload.svelte.d.ts +38 -3
  173. package/dist/molecules/LineChart.svelte +459 -0
  174. package/dist/molecules/LineChart.svelte.d.ts +53 -0
  175. package/dist/molecules/MapView.svelte +565 -0
  176. package/dist/molecules/MapView.svelte.d.ts +88 -0
  177. package/dist/molecules/Modal.svelte +11 -6
  178. package/dist/molecules/PhotoGrid.svelte +100 -10
  179. package/dist/molecules/PhotoGrid.svelte.d.ts +11 -0
  180. package/dist/molecules/PhotoViewer.svelte +121 -24
  181. package/dist/molecules/PhotoViewer.svelte.d.ts +18 -0
  182. package/dist/molecules/PieChart.svelte +421 -0
  183. package/dist/molecules/PieChart.svelte.d.ts +51 -0
  184. package/dist/molecules/RadioGroup.svelte +20 -4
  185. package/dist/molecules/RadioGroup.svelte.d.ts +5 -0
  186. package/dist/molecules/SegmentedControl.svelte +136 -3
  187. package/dist/molecules/SegmentedControl.svelte.d.ts +6 -0
  188. package/dist/molecules/SidebarFooter.svelte +1 -1
  189. package/dist/molecules/SidebarNavSection.svelte +1 -1
  190. package/dist/molecules/SortableList.svelte +1 -0
  191. package/dist/molecules/Stepper.svelte +21 -7
  192. package/dist/molecules/StickyActionBar.svelte +67 -8
  193. package/dist/molecules/StickyActionBar.svelte.d.ts +14 -1
  194. package/dist/molecules/Tabs.svelte +79 -2
  195. package/dist/molecules/Toaster.svelte +171 -7
  196. package/dist/molecules/Toaster.svelte.d.ts +60 -2
  197. package/dist/molecules/ToasterToast.svelte +292 -60
  198. package/dist/molecules/ToasterToast.svelte.d.ts +6 -0
  199. package/dist/molecules/UnsavedChangesBar.svelte +13 -2
  200. package/dist/molecules/index.d.ts +7 -2
  201. package/dist/molecules/index.js +4 -0
  202. package/dist/molecules/toast-store.d.ts +30 -0
  203. package/dist/molecules/toast-store.js +4 -1
  204. package/dist/organisms/AppNavigation.svelte +440 -0
  205. package/dist/organisms/AppNavigation.svelte.d.ts +72 -0
  206. package/dist/organisms/AppShell.svelte +539 -39
  207. package/dist/organisms/AppShell.svelte.d.ts +102 -6
  208. package/dist/organisms/AppShellHeaderPart.svelte +163 -0
  209. package/dist/organisms/AppShellHeaderPart.svelte.d.ts +57 -0
  210. package/dist/organisms/SidebarNavigation.svelte +23 -36
  211. package/dist/organisms/SidebarPanel.svelte +10 -14
  212. package/dist/organisms/SidebarPanel.svelte.d.ts +1 -0
  213. package/dist/organisms/SidebarShell.svelte +2 -3
  214. package/dist/organisms/TopNavbar.svelte +117 -28
  215. package/dist/organisms/TopNavbar.svelte.d.ts +22 -1
  216. package/dist/organisms/TopNavbarSheetContent.svelte +145 -0
  217. package/dist/organisms/TopNavbarSheetContent.svelte.d.ts +24 -0
  218. package/dist/organisms/index.d.ts +6 -1
  219. package/dist/organisms/index.js +4 -0
  220. package/dist/types/components.d.ts +17 -1
  221. package/dist/types/components.d.ts.map +1 -1
  222. package/dist/types/index.d.ts +497 -10
  223. package/dist/types/index.d.ts.map +1 -1
  224. package/dist/types/variants.ts +14 -3
  225. package/dist/util/app-shell.d.ts +55 -4
  226. package/dist/util/app-shell.js +32 -7
  227. package/dist/util/avatar.d.ts +3 -0
  228. package/dist/util/bottom-tab-bar.d.ts +6 -0
  229. package/dist/util/chart.d.ts +139 -0
  230. package/dist/util/chart.js +305 -0
  231. package/dist/util/chip.d.ts +65 -0
  232. package/dist/util/chip.js +58 -0
  233. package/dist/util/cn.js +28 -2
  234. package/dist/util/code-field.d.ts +62 -0
  235. package/dist/util/code-field.js +112 -0
  236. package/dist/util/collapsible.d.ts +6 -0
  237. package/dist/util/display-voice.d.ts +9 -0
  238. package/dist/util/display-voice.js +9 -0
  239. package/dist/util/field-control.d.ts +29 -0
  240. package/dist/util/field-control.js +32 -0
  241. package/dist/util/field.d.ts +6 -0
  242. package/dist/util/focus-utils.d.ts +2 -0
  243. package/dist/util/focus-utils.js +4 -0
  244. package/dist/util/map-view.d.ts +143 -0
  245. package/dist/util/map-view.js +121 -0
  246. package/dist/util/photo.d.ts +19 -0
  247. package/dist/util/photo.js +3 -0
  248. package/dist/util/progress.d.ts +18 -0
  249. package/dist/util/progress.js +17 -0
  250. package/dist/util/scroll-edge.d.ts +32 -0
  251. package/dist/util/scroll-edge.js +87 -0
  252. package/dist/util/sheet-drag.d.ts +25 -1
  253. package/dist/util/sheet-drag.js +71 -1
  254. package/dist/util/skeleton.d.ts +14 -0
  255. package/dist/util/skeleton.js +22 -0
  256. package/dist/util/sliding-indicator.d.ts +24 -0
  257. package/dist/util/sliding-indicator.js +44 -0
  258. package/dist/util/temporal-field.d.ts +88 -0
  259. package/dist/util/temporal-field.js +136 -0
  260. package/dist/util/toaster.d.ts +40 -0
  261. package/dist/util/toaster.js +55 -0
  262. package/dist/util/tone-surface.d.ts +33 -0
  263. package/dist/util/tone-surface.js +35 -0
  264. package/dist/util/top-navbar.d.ts +26 -2
  265. package/dist/util/top-navbar.js +23 -0
  266. package/dist/util/zabi-strings.d.ts +9 -0
  267. package/dist/zabi-components-colors.css +9 -3
  268. package/dist/zabi-components-theme-dark-only.css +474 -164
  269. package/dist/zabi-components-theme-dark.css +474 -164
  270. package/dist/zabi-components-theme-only.css +933 -99
  271. package/dist/zabi-components-theme.css +933 -99
  272. package/dist/zabi-components.css +2275 -321
  273. package/package.json +11 -1
@@ -2,13 +2,18 @@ export * from './events.js';
2
2
  export * from './variants.js';
3
3
  export * from './page.types.js';
4
4
  import type { Component, Snippet } from 'svelte';
5
- import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
5
+ import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes, SVGAttributes } from 'svelte/elements';
6
6
  import type { BottomTabBarItem } from '../components/util/bottom-tab-bar.js';
7
+ import type { AppShellNavigationContext, AppShellNavigationMode } from '../components/util/app-shell.js';
7
8
  import type { CalendarEvent, CalendarStrings } from '../components/util/calendar.js';
8
9
  import type { Photo, PhotoGridSelectDetail, PhotoGridStrings, PhotoKey, PhotoViewerAction, PhotoViewerCloseReason, PhotoViewerStrings } from '../components/util/photo.js';
9
10
  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 { BadgeVariant, ButtonSize, ButtonVariant, CardVariant, OnFillTone, SurfaceTone, ExtendedSemanticVariant, SemanticVariant, SizeVariant } from './variants.js';
11
12
  import type { AvatarGroupStrings, AvatarPerson, AvatarSize } from '../components/util/avatar.js';
13
+ import type { ChartColor, ChartDatum, ChartFormat, ChartSeries } from '../components/util/chart.js';
14
+ import type { ProgressStrings } from '../components/util/progress.js';
15
+ import type { SkeletonStrings } from '../components/util/skeleton.js';
16
+ import type { CodeFieldMode, CodeFieldStrings } from '../components/util/code-field.js';
12
17
  import type { RatingStrings } from '../components/util/rating.js';
13
18
  import type { StepperItem, StepperLayout, StepperStrings } from '../components/util/stepper.js';
14
19
  import type { SegmentedControlOption } from '../components/util/segmented-control.js';
@@ -19,7 +24,7 @@ export interface ButtonProps extends Omit<HTMLButtonAttributes, 'class'> {
19
24
  * styled them, and they render as `primary`.
20
25
  */
21
26
  variant?: ButtonVariant | 'success' | 'warning' | 'info' | 'neutral';
22
- size?: SizeVariant;
27
+ size?: ButtonSize;
23
28
  disabled?: boolean;
24
29
  loading?: boolean;
25
30
  type?: 'button' | 'submit' | 'reset';
@@ -75,13 +80,52 @@ export interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, '
75
80
  text?: string;
76
81
  /** Text colour: `headline` by default; `inherit`, `on-brand` or `on-accent` on a filled block. */
77
82
  tone?: 'headline' | OnFillTone;
83
+ /** `heading` (default) or `display`: the second face and larger steps. */
84
+ variant?: 'heading' | 'display';
78
85
  class?: string;
79
86
  children?: Snippet;
80
87
  /** @deprecated never accepted by the component; use `class`. */
81
88
  className?: string;
82
89
  }
90
+ export interface BlockProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
91
+ /** `neutral` (the card surface), `tint`, `brand` or `accent`. */
92
+ tone?: SurfaceTone;
93
+ /** A fill the app chooses, any CSS colour. Wins over `tone`; the app checks the contrast of the pair. */
94
+ fill?: string;
95
+ /** The label colour on `fill`. */
96
+ onFill?: string;
97
+ /** Inner space: `none`, `sm`, `md` (default) or `lg`. */
98
+ padding?: 'none' | 'sm' | 'md' | 'lg';
99
+ /** The element, `div` by default. */
100
+ as?: 'div' | 'section' | 'header' | 'footer' | 'article' | 'aside';
101
+ /** A Block does not break out of a padded parent: put it outside, or pass a negative inline margin (`-mx-4`). */
102
+ class?: string;
103
+ children?: Snippet;
104
+ }
83
105
  export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
84
106
  variant?: CardVariant;
107
+ /** `neutral` (default), `tint`, `brand` or `accent`; brand and accent re-point text, links and controls inside. */
108
+ tone?: SurfaceTone;
109
+ /** A fill the app chooses, any CSS colour. Wins over `tone`; the app checks the contrast of the pair. */
110
+ fill?: string;
111
+ /** The label colour on `fill`. */
112
+ onFill?: string;
113
+ /** The card is an `<a>`. A link card must not contain other interactive elements. */
114
+ href?: string;
115
+ target?: HTMLAnchorAttributes['target'];
116
+ rel?: string;
117
+ /** The card is a `<button>` (ignored with `href`): `submit` posts the form around it. Like a link card it must not contain other interactive elements. */
118
+ type?: 'submit' | 'button' | 'reset';
119
+ /** With `type`: the name the button submits under. */
120
+ name?: string;
121
+ /** With `type`: what the button submits. */
122
+ value?: string;
123
+ /** With `type`: the id of the form it belongs to. */
124
+ form?: string;
125
+ /** With `type`: the card cannot be pressed. */
126
+ disabled?: boolean;
127
+ /** With `type`: the action is on its way (`aria-busy`, `aria-disabled`); the press is swallowed and the card stays a Tab stop. */
128
+ loading?: boolean;
85
129
  size?: SizeVariant;
86
130
  fullWidth?: boolean;
87
131
  class?: string;
@@ -119,7 +163,7 @@ export interface InputProps extends Omit<HTMLInputAttributes, 'class' | 'size' |
119
163
  leading?: Snippet;
120
164
  /** Drawn inside the field, after the text. */
121
165
  trailing?: Snippet;
122
- /** With `type="password"`: adds a button that shows the password as text, and hides it again. */
166
+ /** With `type="password"`: a button that shows the password as text, and hides it again. On by default; `false` leaves it out. */
123
167
  revealable?: boolean;
124
168
  /** Accessible name of that button, the same in both states. */
125
169
  revealLabel?: string;
@@ -155,6 +199,22 @@ export interface CheckboxProps extends Omit<HTMLInputAttributes, 'class' | 'id'
155
199
  disabled?: boolean;
156
200
  loading?: boolean;
157
201
  label?: string;
202
+ /**
203
+ * Drawn inside the one label, between the box and the label text. A
204
+ * leading image should have an empty alt: the label names the row.
205
+ */
206
+ leading?: Snippet;
207
+ /** A line under the label, inside it, tied to the box with `aria-describedby`; not part of the name. */
208
+ description?: string;
209
+ /** Where the box sits in the row: `end` puts it last, at the far edge. */
210
+ controlPosition?: 'start' | 'end';
211
+ variant?: SemanticVariant;
212
+ /** Status text under the control. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
213
+ message?: string;
214
+ /** Help text under the control, read out with it. */
215
+ hint?: string;
216
+ /** An error under the control: an alert, tied to the input; a checkbox also gets `aria-invalid`. It wins over `variant` and `message`. */
217
+ error?: string;
158
218
  onchange?: (event: Event) => void;
159
219
  /** Same as `onchange`; both are called. */
160
220
  onChange?: (event: Event) => void;
@@ -175,6 +235,7 @@ export interface SelectProps extends Omit<HTMLButtonAttributes, 'class' | 'value
175
235
  value: string | number;
176
236
  label: string;
177
237
  disabled?: boolean;
238
+ lang?: string;
178
239
  }>;
179
240
  value?: string | number | undefined;
180
241
  searchable?: boolean;
@@ -183,6 +244,8 @@ export interface SelectProps extends Omit<HTMLButtonAttributes, 'class' | 'value
183
244
  menuWidth?: string;
184
245
  /** `auto` (the default): a BottomSheet on a phone, under the field elsewhere. */
185
246
  presentation?: "auto" | "popover" | "sheet" | "native";
247
+ /** In a sheet, a short list (up to six options) without a search field gets a sheet as tall as the list. Default `true`; `false` keeps the half-height sheet. */
248
+ sheetFit?: boolean;
186
249
  /** The component's own texts; see `SelectStrings`. The single-text props win over it. */
187
250
  strings?: Partial<import("../components/util/select.js").SelectStrings>;
188
251
  noResultsText?: string;
@@ -213,6 +276,53 @@ export interface SelectProps extends Omit<HTMLButtonAttributes, 'class' | 'value
213
276
  /** @deprecated never accepted by the component; use `class`. */
214
277
  className?: string;
215
278
  }
279
+ export interface PickerFieldProps extends Omit<HTMLButtonAttributes, 'class' | 'value' | 'name' | 'disabled' | 'type' | 'onclick' | 'aria-describedby' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls' | 'children'> {
280
+ /** Id of the control. Omit to auto-generate. */
281
+ id?: string;
282
+ /** The label above the field. It is part of the control's name. */
283
+ label?: string;
284
+ /** The text of what is chosen. It is display text; `formValue` is what a form sends. */
285
+ value?: string;
286
+ /** Shown in the placeholder colour while there is no `value`. */
287
+ placeholder?: string;
288
+ /** An icon or an avatar before the text. */
289
+ leading?: Snippet;
290
+ /** Replaces the chevron at the end: a calendar or a clock, say. It is decoration, so it should be `aria-hidden`. */
291
+ trailing?: Snippet;
292
+ /** Replaces the value text, for rich content. The control is still named by `value`, so give that too. */
293
+ children?: Snippet;
294
+ size?: 'sm' | 'md' | 'lg';
295
+ disabled?: boolean;
296
+ /** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
297
+ message?: string;
298
+ variant?: 'default' | 'success' | 'warning' | 'error';
299
+ /** Help text under the field, read out with it. */
300
+ hint?: string;
301
+ /** An error under the field, announced. A button cannot take `aria-invalid`, so the error is the error edge colour and the described-by message; it wins over `variant` and `message`. */
302
+ error?: string;
303
+ /** What the control opens: `aria-haspopup`. Default `"dialog"`. Not put on a link. */
304
+ haspopup?: 'dialog' | 'listbox' | 'menu' | 'true';
305
+ /** Whether what it opens is open now: `aria-expanded`, and the chevron turns. Leave it out and neither is set. Not put on a link. */
306
+ expanded?: boolean;
307
+ /** Id of what it opens: `aria-controls`. */
308
+ controls?: string;
309
+ /** Makes the control a link to this address, which works without scripts: a page that does the picking. With scripts, `onclick` may call `preventDefault()` and open a sheet instead. */
310
+ href?: string;
311
+ /** With `href`: where the link opens. */
312
+ target?: HTMLAnchorAttributes['target'];
313
+ /** With `href`: the link's relationship, such as `noopener`. */
314
+ rel?: HTMLAnchorAttributes['rel'];
315
+ /** The name a hidden input submits `formValue` under. Without it there is no hidden input. */
316
+ name?: string;
317
+ /** What the form submits for the choice, such as an id. */
318
+ formValue?: string;
319
+ /** The inner `<button>` (or `<a>`). Bindable: the app focuses it when its sheet closes, so a keyboard user is back where they were. */
320
+ element?: HTMLButtonElement | HTMLAnchorElement | null;
321
+ /** Ids of other elements that describe the field. The hint and the message are added after them. */
322
+ 'aria-describedby'?: string | null;
323
+ onclick?: (event: MouseEvent) => void;
324
+ class?: string;
325
+ }
216
326
  export interface SelectEvents {
217
327
  change: {
218
328
  value: string;
@@ -228,6 +338,12 @@ export interface TextareaProps extends Omit<HTMLTextareaAttributes, 'class' | 'v
228
338
  placeholder?: string;
229
339
  required?: boolean;
230
340
  rows?: number;
341
+ /** The resize grip: `auto` (default) is vertical with a mouse and none on a touch screen. */
342
+ resize?: 'auto' | 'none' | 'vertical';
343
+ /** The field grows with its content, from `rows` up to `maxRows`. */
344
+ autogrow?: boolean;
345
+ /** The tallest an `autogrow` field gets, in rows. */
346
+ maxRows?: number;
231
347
  disabled?: boolean;
232
348
  loading?: boolean;
233
349
  size?: SizeVariant;
@@ -238,6 +354,16 @@ export interface TextareaProps extends Omit<HTMLTextareaAttributes, 'class' | 'v
238
354
  hint?: string;
239
355
  /** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
240
356
  error?: string;
357
+ /** A character count under the field. It needs `maxlength`, and is part of the field's description. */
358
+ count?: boolean;
359
+ /** The count is shown from this many characters on. `0` (default): always. */
360
+ countFrom?: number;
361
+ /** The words of the count. Default: "12 / 2000". */
362
+ countText?: (count: {
363
+ length: number;
364
+ max: number;
365
+ remaining: number;
366
+ }) => string;
241
367
  /** Ids of other elements that describe the field. The hint and the message are added after them. */
242
368
  'aria-describedby'?: string | null;
243
369
  oninput?: (event: Event) => void;
@@ -290,7 +416,7 @@ export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'
290
416
  export interface ModalEvents {
291
417
  }
292
418
  export interface AlertProps {
293
- variant?: ExtendedSemanticVariant;
419
+ variant?: ExtendedSemanticVariant | 'brand';
294
420
  title?: string;
295
421
  message?: string;
296
422
  closable?: boolean;
@@ -300,6 +426,8 @@ export interface AlertProps {
300
426
  open?: boolean;
301
427
  /** Shrink to content instead of filling the container. */
302
428
  inline?: boolean;
429
+ /** Draws the tinted edge (default `true`). `false` keeps the 1px and makes it transparent; `--zabi-alert-border-width: 0px` on any ancestor removes it for every alert under it. */
430
+ bordered?: boolean;
303
431
  onclick?: (event: Event) => void;
304
432
  class?: string;
305
433
  /** @deprecated use `class`. */
@@ -308,10 +436,40 @@ export interface AlertProps {
308
436
  /** @deprecated never accepted by the component; use `variant`. */
309
437
  type?: 'success' | 'error' | 'warning' | 'info';
310
438
  }
439
+ export interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
440
+ /** The figure, shown as given. */
441
+ value: string | number;
442
+ label?: string;
443
+ /** Drawn after the value, smaller, on the same baseline. */
444
+ unit?: string;
445
+ size?: 'sm' | 'md' | 'lg';
446
+ align?: 'start' | 'center' | 'end';
447
+ labelPosition?: 'below' | 'above';
448
+ class?: string;
449
+ /** Replaces `value` for a figure that needs markup. */
450
+ children?: Snippet;
451
+ }
452
+ export interface SpeechBubbleProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
453
+ /** The caption that names the quotation; a `figcaption`. A snippet for the app's own text style. */
454
+ label?: string | Snippet;
455
+ /** Keeps the caption for assistive technology and takes it off the screen. */
456
+ labelHidden?: boolean;
457
+ /** The side the tail is on; follows the text direction. */
458
+ side?: 'end' | 'start';
459
+ /** `ink` (default) or `paper`; `--zabi-bubble-fill` and `--zabi-bubble-text` win over both. */
460
+ tone?: 'ink' | 'paper';
461
+ /** A drawing on the top corner of the tail's side, hidden from assistive technology. */
462
+ decoration?: Snippet;
463
+ class?: string;
464
+ /** The quoted text. */
465
+ children?: Snippet;
466
+ }
311
467
  export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class'> {
312
468
  variant?: BadgeVariant;
313
469
  size?: SizeVariant;
314
470
  emphasis?: 'subtle' | 'solid';
471
+ /** Draws the family's edge on a subtle badge. Default `false`. */
472
+ bordered?: boolean;
315
473
  /** Label text. Ignored when `children` is provided. */
316
474
  text?: string;
317
475
  showIcon?: boolean;
@@ -320,10 +478,65 @@ export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class
320
478
  /** @deprecated never accepted by the component; use `class`. */
321
479
  className?: string;
322
480
  }
481
+ export interface ChipProps extends Omit<HTMLButtonAttributes, 'class' | 'type' | 'value' | 'onchange' | 'children'> {
482
+ /** Makes the chip a link to this address, which works without scripts. */
483
+ href?: string;
484
+ target?: HTMLAnchorAttributes['target'];
485
+ rel?: HTMLAnchorAttributes['rel'];
486
+ download?: HTMLAnchorAttributes['download'];
487
+ hreflang?: HTMLAnchorAttributes['hreflang'];
488
+ /** With `href`: what `aria-current` says while `selected`. Default `"true"`. */
489
+ current?: 'page' | 'true' | 'step' | 'location' | 'date' | 'time';
490
+ /** `checkbox` or `radio`: a real input under the chip. `submit` or `button`: a button that does not toggle (`selected` is drawn and said with `aria-pressed`, the app decides it). Without it (and without `href`) the chip is a toggle button. */
491
+ type?: 'checkbox' | 'radio' | 'submit' | 'button';
492
+ name?: string;
493
+ value?: string;
494
+ /** The chip is chosen. Bindable. */
495
+ selected?: boolean;
496
+ required?: boolean;
497
+ form?: string;
498
+ /** 28, 32 or 40px tall. Default `md`. */
499
+ size?: 'sm' | 'md' | 'lg';
500
+ /** An icon or an avatar before the label. */
501
+ leading?: Snippet;
502
+ /** A check icon before the label while selected. On for a checkbox and a toggle button, off for a link and a radio. */
503
+ checkmark?: boolean;
504
+ /** A button chip (`submit`, `button` or the toggle) while its action is on its way: `aria-busy` and `aria-disabled`, a spinner, the press swallowed, width and focus kept. Ignored by a link and by `checkbox` / `radio`. */
505
+ loading?: boolean;
506
+ /** Called with the new `selected` when a person changes it. */
507
+ onchange?: (selected: boolean) => void;
508
+ class?: string;
509
+ children?: Snippet;
510
+ }
511
+ export interface ChipGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'children'> {
512
+ class?: string;
513
+ /** `wrap` (default) or `row`: one line that scrolls sideways. */
514
+ layout?: 'wrap' | 'row';
515
+ /** The group's accessible name. Not shown unless `showLabel`. */
516
+ label?: string;
517
+ showLabel?: boolean;
518
+ /** `radio` or `checkbox`: the chips are inputs sharing this group's `name` and `value`. */
519
+ type?: 'radio' | 'checkbox';
520
+ name?: string;
521
+ /** Bindable: a string (or `undefined`) for `radio`, an array of strings for `checkbox`. */
522
+ value?: string | string[] | undefined;
523
+ disabled?: boolean;
524
+ /** With `layout="row"`: `fade` (default) or `none`. */
525
+ edge?: 'fade' | 'none';
526
+ /** With `layout="row"`: bring the chosen chip into view on load. Default `true`. */
527
+ scrollSelectedIntoView?: boolean;
528
+ onchange?: (value: string | string[] | undefined) => void;
529
+ children?: Snippet;
530
+ }
323
531
  export interface ProgressProps {
324
532
  value?: number;
325
533
  max?: number;
326
- size?: SizeVariant;
534
+ /** Bar height: 4, 8, 12 and 16px. */
535
+ size?: 'sm' | 'md' | 'lg' | 'xl';
536
+ /** Draws `max` separate segments (a whole number from 2 to 24), `value` of them filled; any other `max` draws the continuous bar. */
537
+ segmented?: boolean;
538
+ /** Overrides for the built-in strings. */
539
+ strings?: Partial<ProgressStrings>;
327
540
  label?: string;
328
541
  /** Names the progressbar when there is no visible `label`. */
329
542
  'aria-label'?: string;
@@ -333,12 +546,26 @@ export interface ProgressProps {
333
546
  /** @deprecated never accepted by the component; use `class`. */
334
547
  className?: string;
335
548
  }
336
- export interface SkeletonProps {
549
+ export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'role' | 'aria-busy' | 'aria-hidden'> {
337
550
  variant?: 'text' | 'circle' | 'block';
338
551
  width?: string | number;
339
552
  height?: string | number;
340
553
  class?: string;
341
554
  'aria-label'?: string;
555
+ /** Overrides for the built-in strings. */
556
+ strings?: Partial<SkeletonStrings>;
557
+ /** No role, no label, hidden from assistive tech. */
558
+ decorative?: boolean;
559
+ /** "on-color" is for a brand, accent or fill block. */
560
+ tone?: 'neutral' | 'on-color';
561
+ /** Text variant only: this many lines (1 to 20), the last one shorter. */
562
+ lines?: number;
563
+ }
564
+ export interface SkeletonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'role' | 'aria-busy'> {
565
+ 'aria-label'?: string;
566
+ strings?: Partial<SkeletonStrings>;
567
+ class?: string;
568
+ children?: Snippet;
342
569
  }
343
570
  export interface ToggleProps extends Omit<HTMLButtonAttributes, 'class' | 'id' | 'name' | 'value' | 'disabled' | 'type' | 'role' | 'onclick' | 'onchange' | 'children'> {
344
571
  /** Omit to auto-generate. */
@@ -350,6 +577,15 @@ export interface ToggleProps extends Omit<HTMLButtonAttributes, 'class' | 'id' |
350
577
  disabled?: boolean;
351
578
  loading?: boolean;
352
579
  label?: string;
580
+ /**
581
+ * Drawn inside the one label, between the switch and the label text. A
582
+ * leading image should have an empty alt: the label names the row.
583
+ */
584
+ leading?: Snippet;
585
+ /** A line under the label, inside it, tied to the switch with `aria-describedby`; not part of the name. */
586
+ description?: string;
587
+ /** Ids of other elements that describe the switch. The description is added after them. */
588
+ 'aria-describedby'?: string | null;
353
589
  /** The switch's accessible name when there is no visible `label`. */
354
590
  'aria-label'?: string;
355
591
  /** The id of an element of the page that names the switch. */
@@ -379,6 +615,8 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'clas
379
615
  fixed?: boolean;
380
616
  /** Milliseconds a tooltip opened by a tap stays; `0` keeps it until it is dismissed. */
381
617
  touchDuration?: number;
618
+ /** `material` (default): thick glass with body text and no arrow. `inverted`: the 8.1 dark bubble with an arrow. */
619
+ tone?: 'material' | 'inverted';
382
620
  class?: string;
383
621
  children?: Snippet;
384
622
  /** @deprecated never accepted by the component; use `placement`. */
@@ -391,6 +629,8 @@ export interface BottomTabBarProps extends Omit<HTMLAttributes<HTMLElement>, 'cl
391
629
  items: BottomTabBarItem[];
392
630
  /** The href of the active tab, or the path of the current page. Defaults to the current page. */
393
631
  active?: string;
632
+ /** The tab just pressed, while its page is on its way: it takes the mark, `aria-current` stays on `active`. */
633
+ pending?: string;
394
634
  /** Accessible name of the navigation landmark. */
395
635
  label?: string;
396
636
  /** What a badge adds to the tab's accessible name, after the label and a comma. */
@@ -399,6 +639,10 @@ export interface BottomTabBarProps extends Omit<HTMLAttributes<HTMLElement>, 'cl
399
639
  badgeMax?: number;
400
640
  /** Defaults to `fixed`, or to `static` inside an `AppShell`. */
401
641
  position?: 'fixed' | 'static';
642
+ /** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
643
+ scrollEdge?: 'auto' | 'always' | 'never';
644
+ /** Draws the bar as a rounded glass capsule inset from the screen edges. Default false. */
645
+ floating?: boolean;
402
646
  class?: string;
403
647
  }
404
648
  export interface AppBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class' | 'title'> {
@@ -418,10 +662,18 @@ export interface AppBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class' |
418
662
  collapseOnScroll?: boolean;
419
663
  /** How many lines the title may take before it is cut. Default 1. */
420
664
  titleLines?: 1 | 2;
421
- /** Before the title, after the back control. */
665
+ /** Before the title, after the back control. The bar's row is on a fixed pixel scale (`--spacing: 4px`), so the bar's own controls do not grow with the text size. Size what you place here on the same scale (Tailwind numeric classes such as `size-9`, or `calc(var(--spacing) * 9)`), not in rem, or it grows at 200% text while the bar's controls do not. */
422
666
  leading?: Snippet;
423
- /** After the title. At most two icon buttons. */
667
+ /** After the title. At most two icon buttons. The bar's row is on a fixed pixel scale (`--spacing: 4px`), so the bar's own controls do not grow with the text size. Size what you place here on the same scale (Tailwind numeric classes such as `size-9`, or `calc(var(--spacing) * 9)`), not in rem, or it grows at 200% text while the bar's controls do not. */
424
668
  actions?: Snippet;
669
+ /** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
670
+ scrollEdge?: 'auto' | 'always' | 'never';
671
+ /** Draws the title large on a second row that scrolls away; the bar then shows it small. */
672
+ largeTitle?: boolean;
673
+ /** The bar's fill: the page colour, none at rest, the brand colour with on-brand content, or none with the colours of the block it sits in (`inherit`). Default `default`. */
674
+ tone?: 'default' | 'transparent' | 'brand' | 'inherit';
675
+ /** `sticky` (default), or `static` for a bar in the flow of the page. */
676
+ position?: 'sticky' | 'static';
425
677
  class?: string;
426
678
  }
427
679
  export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
@@ -433,10 +685,86 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'cla
433
685
  contentElement?: 'main' | 'div';
434
686
  /** The bottom bar, a `BottomTabBar`. */
435
687
  footer?: Snippet;
688
+ /** Paints the shell with the page colour and the brand wash, and lets it show through the header. */
689
+ canvas?: boolean;
690
+ /** One navigation, drawn as tabs, a rail or a sidebar; `AppNavigation` is the ready-made content. */
691
+ navigation?: Snippet<[AppShellNavigationContext]>;
692
+ /** Where the `navigation` goes. `auto` (default): tabs below 48rem, a rail from 48rem, a sidebar from 64rem. */
693
+ navigationPlacement?: AppShellNavigationMode;
694
+ /** Without a `header`, no top safe-area padding on the content: it starts at the top of the screen and handles the safe area itself. */
695
+ flushTop?: boolean;
436
696
  class?: string;
437
697
  /** Added after the two custom properties the shell sets. */
438
698
  style?: string;
439
699
  }
700
+ export interface AppShellHeaderPartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
701
+ /** The part's content: an `AppBar`, a search field, filter chips, tabs. */
702
+ children?: Snippet;
703
+ /** Stays at the top under the parts that stick above it (default), or scrolls away with the content. */
704
+ sticky?: boolean;
705
+ class?: string;
706
+ }
707
+ export interface AppNavigationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
708
+ /** The destinations, as for `BottomTabBar`. */
709
+ items: BottomTabBarItem[];
710
+ /** The href of the active destination, or the path of the current page. Defaults to the current page. */
711
+ active?: string;
712
+ /** Accessible name of the navigation landmark. */
713
+ label?: string;
714
+ /** What a count adds to the link's accessible name, after the label and a comma. */
715
+ badgeLabel?: (count: number, item: BottomTabBarItem) => string;
716
+ /** Counts above this show as `99+`. */
717
+ badgeMax?: number;
718
+ /** Draws the tab bar form as a floating capsule of glass. */
719
+ floating?: boolean;
720
+ /** Above the list in the rail and the sidebar. */
721
+ header?: Snippet<[{
722
+ placement: 'rail' | 'sidebar';
723
+ }]>;
724
+ /** Below the list in the rail and the sidebar. */
725
+ footer?: Snippet<[{
726
+ placement: 'rail' | 'sidebar';
727
+ }]>;
728
+ class?: string;
729
+ }
730
+ export interface CodeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'size' | 'value' | 'type' | 'id' | 'name' | 'required' | 'disabled' | 'readonly' | 'maxlength' | 'oninput' | 'onblur' | 'aria-label' | 'aria-describedby'> {
731
+ id?: string;
732
+ /** The code typed so far. Bindable. */
733
+ value?: string;
734
+ /** The name the code is posted under, with or without scripts. */
735
+ name?: string;
736
+ class?: string;
737
+ /** Places in the code, a whole number from 1 to 12. Default 6. */
738
+ length?: number;
739
+ /** `numeric` (default): digits only. `alphanumeric` also takes letters. */
740
+ mode?: CodeFieldMode;
741
+ /** Box size: `sm` (44px tall), `md` (default) or `lg`. */
742
+ size?: SizeVariant;
743
+ /** Draws the boxes in groups with a wider gap: a number is each group's size (`4` makes 4 and 4 of 8), a list gives each group's size. Only the drawing changes; the row wraps between groups when it cannot fit. */
744
+ groups?: number | number[];
745
+ /** Names the field. Defaults to the provider's `codeField.label`, then "Verification code". */
746
+ label?: string;
747
+ /** Keeps the label for assistive technology and takes it off the screen. */
748
+ labelHidden?: boolean;
749
+ required?: boolean;
750
+ disabled?: boolean;
751
+ readonly?: boolean;
752
+ variant?: SemanticVariant;
753
+ /** Status text under the field; shown with a `success`, `warning` or `error` variant. */
754
+ message?: string;
755
+ /** Help text under the field, read out with it. */
756
+ hint?: string;
757
+ /** An error under the field: marks it invalid and is announced; wins over `variant` and `message`. */
758
+ error?: string;
759
+ /** Called with the code when the last place is filled. It does not submit anything. */
760
+ oncomplete?: (value: string) => void;
761
+ /** Overrides for the built-in strings: label, description. */
762
+ strings?: Partial<CodeFieldStrings>;
763
+ oninput?: (event: Event) => void;
764
+ onblur?: (event: Event) => void;
765
+ 'aria-label'?: string;
766
+ 'aria-describedby'?: string | null;
767
+ }
440
768
  export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'aria-label' | 'aria-labelledby'> {
441
769
  class?: string;
442
770
  /** Stars given, or `null` for no rating. Bindable. */
@@ -447,7 +775,8 @@ export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class
447
775
  hideLabel?: boolean;
448
776
  'aria-label'?: string;
449
777
  'aria-labelledby'?: string;
450
- size?: SizeVariant;
778
+ /** `xl` is 40px stars; `display` is a display-size compact score (`xl` as a row of stars). */
779
+ size?: 'sm' | 'md' | 'lg' | 'xl' | 'display';
451
780
  /** Colour of a filled star: the primary action colour, or the app's accent. */
452
781
  tone?: 'primary' | 'accent';
453
782
  /** Shows a score: one image with one name, and stars can be partly filled. */
@@ -456,6 +785,10 @@ export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class
456
785
  clearable?: boolean;
457
786
  disabled?: boolean;
458
787
  name?: string;
788
+ /** A read-only score: one star and the number; implies `readonly`. */
789
+ compact?: boolean;
790
+ /** An empty star: a hollow `outline` (default) or a `soft` fill. */
791
+ empty?: 'outline' | 'soft';
459
792
  /** On by default when `readonly`. */
460
793
  showValue?: boolean;
461
794
  formatValue?: (value: number) => string;
@@ -476,6 +809,8 @@ export interface SegmentedControlProps extends Omit<HTMLAttributes<HTMLDivElemen
476
809
  /** Equal-width segments that fill the row. */
477
810
  fullWidth?: boolean;
478
811
  name?: string;
812
+ /** Look of the selected segment: a card-coloured thumb (`neutral`, default) or the solid primary fill. */
813
+ tone?: 'neutral' | 'primary';
479
814
  disabled?: boolean;
480
815
  onchange?: (value: string) => void;
481
816
  }
@@ -498,6 +833,8 @@ export interface FloatingActionButtonProps extends Omit<HTMLAttributes<HTMLEleme
498
833
  export interface StickyActionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
499
834
  /** Accessible name. With it the bar is a group. */
500
835
  label?: string;
836
+ /** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
837
+ scrollEdge?: 'auto' | 'always' | 'never';
501
838
  class?: string;
502
839
  /** Added after the offset and margin the bar sets while the keyboard is up. */
503
840
  style?: string;
@@ -513,6 +850,10 @@ export interface BottomSheetProps extends Omit<HTMLAttributes<HTMLDivElement>, '
513
850
  snapPoints?: BottomSheetSnap[];
514
851
  /** The snap point the sheet is at. Bindable. */
515
852
  snap?: BottomSheetSnap;
853
+ /** As tall as the content, up to half the screen; one resting height, the grip only drags. */
854
+ fit?: boolean;
855
+ /** With `fit`: the tallest the sheet grows before its content scrolls. */
856
+ fitMax?: 'half' | 'full';
516
857
  /** Render the overlay in `document.body`; `false` renders in place. */
517
858
  portal?: boolean;
518
859
  /** When false, Escape, the backdrop, the close button and a swipe down do not close it. */
@@ -564,6 +905,19 @@ export interface DateFieldProps extends Omit<HTMLInputAttributes, 'class' | 'typ
564
905
  size?: SizeVariant;
565
906
  /** Extra classes for the `<input>`. */
566
907
  class?: string;
908
+ /** Language of the field, as a BCP 47 tag or a list of them. With it the field shows the value in that language and opens the library's own picker; without it, the native input. */
909
+ locale?: string | string[];
910
+ /** With `locale`: how the value is shown, as options of `Intl.DateTimeFormat`. */
911
+ format?: Intl.DateTimeFormatOptions;
912
+ /** With `locale`: shown in the placeholder colour while the field is empty. */
913
+ placeholder?: string;
914
+ /** With `locale`: `library` (default) opens the library's picker in a sheet; `native` opens the platform's. */
915
+ picker?: 'library' | 'native';
916
+ /** With `locale`: the words the field says; replace any of them to translate. */
917
+ strings?: Partial<{
918
+ clear: string;
919
+ chooseDate: string;
920
+ }>;
567
921
  }
568
922
  export interface TimeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'type' | 'value' | 'size' | 'min' | 'max' | 'step' | 'required' | 'disabled' | 'readonly' | 'id' | 'name'> {
569
923
  /** Omit to auto-generate; pair with FormField's `id` when used inside FormField. */
@@ -593,6 +947,25 @@ export interface TimeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'typ
593
947
  size?: SizeVariant;
594
948
  /** Extra classes for the `<input>`. */
595
949
  class?: string;
950
+ /** Language of the field, as a BCP 47 tag or a list of them. With it the field shows the value in that language and opens the library's own picker; without it, the native input. */
951
+ locale?: string | string[];
952
+ /** With `locale`: how the value is shown, as options of `Intl.DateTimeFormat`. */
953
+ format?: Intl.DateTimeFormatOptions;
954
+ /** With `locale`: shown in the placeholder colour while the field is empty. */
955
+ placeholder?: string;
956
+ /** With `locale`: `library` (default) opens the library's picker in a sheet; `native` opens the platform's. */
957
+ picker?: 'library' | 'native';
958
+ /** With `locale`: the words the field says; replace any of them to translate. */
959
+ strings?: Partial<{
960
+ clear: string;
961
+ done: string;
962
+ hours: string;
963
+ minutes: string;
964
+ chosenTime: string;
965
+ chooseTime: string;
966
+ }>;
967
+ /** With `locale`, while the field is empty: the time the columns stand at when the sheet opens, as `HH:mm`. Not chosen; `value` stays empty. Left out: now, on the step. */
968
+ openAt?: string;
596
969
  }
597
970
  export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onselect'> {
598
971
  /** The month shown, as `YYYY-MM`. Supports `bind:month`. */
@@ -641,6 +1014,10 @@ export interface PhotoGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'cl
641
1014
  onselect?: (detail: PhotoGridSelectDetail) => void;
642
1015
  /** Puts an "Add photo" tile first and is called when it is pressed. */
643
1016
  onadd?: () => void;
1017
+ /** Called once when a thumbnail cannot be loaded, so the page can answer with a new address. */
1018
+ onloaderror?: (photo: Photo, index: number) => void;
1019
+ /** Puts a "Try again" button on each photo whose `status` is `error` and is called when it is pressed. */
1020
+ onretry?: (photo: Photo, index: number) => void;
644
1021
  /** Overrides for the built-in strings. */
645
1022
  strings?: Partial<PhotoGridStrings>;
646
1023
  /** Extra classes for the host element. */
@@ -661,6 +1038,10 @@ export interface PhotoViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, '
661
1038
  onclose?: (detail: {
662
1039
  reason: PhotoViewerCloseReason;
663
1040
  }) => void;
1041
+ /** Called once when a full image cannot be loaded, so the page can answer with a new address. */
1042
+ onloaderror?: (photo: Photo, index: number) => void;
1043
+ /** Called when "Try again" is pressed, before the image is asked for again; a returned promise is waited for. */
1044
+ onretry?: (photo: Photo, index: number) => void | Promise<void>;
664
1045
  /** Accessible name of the dialog. */
665
1046
  label?: string;
666
1047
  /** Overrides for the built-in strings. */
@@ -701,6 +1082,8 @@ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'clas
701
1082
  alt?: string;
702
1083
  /** Language the initials are upper-cased in. The page's own by default. */
703
1084
  locale?: string;
1085
+ /** The picture drawn inside the circle (an inline SVG), in place of `src` and the initials. */
1086
+ children?: Snippet;
704
1087
  class?: string;
705
1088
  }
706
1089
  export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLUListElement>, 'class' | 'aria-label'> {
@@ -718,24 +1101,124 @@ export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLUListElement>,
718
1101
  locale?: string;
719
1102
  class?: string;
720
1103
  }
1104
+ export interface LineChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
1105
+ /** The lines: a `name` and one value per x label (`null` leaves a gap). */
1106
+ series: ChartSeries[];
1107
+ /** The labels along the x axis, one per point. */
1108
+ xLabels?: string[];
1109
+ /** The bottom of the y axis. Without it, the lowest value rounded down to a tick. */
1110
+ yMin?: number;
1111
+ /** The top of the y axis. Without it, the highest value rounded up to a tick. */
1112
+ yMax?: number;
1113
+ /** `number` (default), `percent` (72 is "72 %"), or a function. */
1114
+ yFormat?: ChartFormat;
1115
+ /** Height of the drawing in px. */
1116
+ height?: number;
1117
+ /** The caption, and what the chart is called. */
1118
+ label: string;
1119
+ labelHidden?: boolean;
1120
+ /** The key under the plot. Without it, shown when there is more than one series. */
1121
+ legend?: boolean;
1122
+ /** A marker on every point, a different shape per series. */
1123
+ markers?: boolean;
1124
+ /** Shows the data table under the chart. */
1125
+ showTable?: boolean;
1126
+ /** The heading of the table's first column. */
1127
+ xTitle?: string;
1128
+ locale?: string;
1129
+ class?: string;
1130
+ /** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
1131
+ glass?: boolean;
1132
+ }
1133
+ export interface BarChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
1134
+ /** The bars, in order. */
1135
+ data: ChartDatum[];
1136
+ /** The colour of the bars. Without it, the first series colour. */
1137
+ color?: ChartColor;
1138
+ /** The top of the value axis. */
1139
+ yMax?: number;
1140
+ /** `number` (default), `percent` (72 is "72 %"), or a function. */
1141
+ yFormat?: ChartFormat;
1142
+ /** Height of the drawing in px. */
1143
+ height?: number;
1144
+ /** The caption, and what the chart is called. */
1145
+ label: string;
1146
+ labelHidden?: boolean;
1147
+ /** Writes each value over its bar. */
1148
+ showValues?: boolean;
1149
+ /** Shows the data table under the chart. */
1150
+ showTable?: boolean;
1151
+ categoryTitle?: string;
1152
+ valueTitle?: string;
1153
+ locale?: string;
1154
+ class?: string;
1155
+ /** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
1156
+ glass?: boolean;
1157
+ }
1158
+ export interface PieChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
1159
+ /** The slices, in order, clockwise from twelve o'clock. */
1160
+ data: ChartDatum[];
1161
+ /** A ring, not a full disc. */
1162
+ donut?: boolean;
1163
+ /** `number` (default), `percent` (72 is "72 %"), or a function. */
1164
+ format?: ChartFormat;
1165
+ /** The widest the drawing gets, in px. */
1166
+ size?: number;
1167
+ /** The caption, and what the chart is called. */
1168
+ label: string;
1169
+ labelHidden?: boolean;
1170
+ /** The key beside the drawing: each slice's label, value and share. */
1171
+ legend?: boolean;
1172
+ /** Shows the data table under the chart. */
1173
+ showTable?: boolean;
1174
+ categoryTitle?: string;
1175
+ valueTitle?: string;
1176
+ shareTitle?: string;
1177
+ locale?: string;
1178
+ class?: string;
1179
+ /** What stands in the middle of the ring (`donut`): the total, or the one share that matters. */
1180
+ center?: Snippet;
1181
+ /** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
1182
+ glass?: boolean;
1183
+ }
1184
+ export interface SparklineProps extends Omit<SVGAttributes<SVGSVGElement>, 'class' | 'points' | 'min' | 'max' | 'color'> {
1185
+ /** The values, in order. `null` leaves a gap. */
1186
+ points: Array<number | null>;
1187
+ /** What the image is called. Without it the line is decoration. */
1188
+ label?: string;
1189
+ /** A theme colour by name or any CSS colour. */
1190
+ color?: ChartColor;
1191
+ min?: number;
1192
+ max?: number;
1193
+ class?: string;
1194
+ }
721
1195
  export type Button = ZabiComponent<ButtonProps, ButtonEvents>;
722
1196
  export type Heading = ZabiComponent<HeadingProps>;
1197
+ export type Block = ZabiComponent<BlockProps>;
723
1198
  export type Card = ZabiComponent<CardProps>;
724
1199
  export type Input = ZabiComponent<InputProps, InputEvents>;
725
1200
  export type Checkbox = ZabiComponent<CheckboxProps, CheckboxEvents>;
726
1201
  export type Select = ZabiComponent<SelectProps, SelectEvents>;
1202
+ export type PickerField = ZabiComponent<PickerFieldProps>;
727
1203
  export type Textarea = ZabiComponent<TextareaProps, TextareaEvents>;
728
1204
  export type Modal = ZabiComponent<ModalProps, ModalEvents>;
729
1205
  export type Alert = ZabiComponent<AlertProps>;
730
1206
  export type Badge = ZabiComponent<BadgeProps>;
1207
+ export type Stat = ZabiComponent<StatProps>;
1208
+ export type SpeechBubble = ZabiComponent<SpeechBubbleProps>;
1209
+ export type Chip = ZabiComponent<ChipProps>;
1210
+ export type ChipGroup = ZabiComponent<ChipGroupProps>;
731
1211
  export type Progress = ZabiComponent<ProgressProps>;
732
1212
  export type Skeleton = ZabiComponent<SkeletonProps>;
1213
+ export type SkeletonGroup = ZabiComponent<SkeletonGroupProps>;
733
1214
  export type Toggle = ZabiComponent<ToggleProps, ToggleEvents>;
734
1215
  export type Tooltip = ZabiComponent<TooltipProps>;
735
1216
  export type BottomTabBar = ZabiComponent<BottomTabBarProps>;
736
1217
  export type AppBar = ZabiComponent<AppBarProps>;
737
1218
  export type AppShell = ZabiComponent<AppShellProps>;
1219
+ export type AppNavigation = ZabiComponent<AppNavigationProps>;
738
1220
  export type Rating = ZabiComponent<RatingProps>;
1221
+ export type CodeField = ZabiComponent<CodeFieldProps>;
739
1222
  export type SegmentedControl = ZabiComponent<SegmentedControlProps>;
740
1223
  export type FloatingActionButton = ZabiComponent<FloatingActionButtonProps>;
741
1224
  export type StickyActionBar = ZabiComponent<StickyActionBarProps>;
@@ -747,5 +1230,9 @@ export type PhotoGrid = ZabiComponent<PhotoGridProps>;
747
1230
  export type PhotoViewer = ZabiComponent<PhotoViewerProps>;
748
1231
  export type Avatar = ZabiComponent<AvatarProps>;
749
1232
  export type AvatarGroup = ZabiComponent<AvatarGroupProps>;
1233
+ export type LineChart = ZabiComponent<LineChartProps>;
1234
+ export type BarChart = ZabiComponent<BarChartProps>;
1235
+ export type PieChart = ZabiComponent<PieChartProps>;
1236
+ export type Sparkline = ZabiComponent<SparklineProps>;
750
1237
  export type Stepper = ZabiComponent<StepperProps>;
751
1238
  //# sourceMappingURL=index.d.ts.map