@human-kit/ui 1.0.0-beta.5 → 1.0.0-beta.7

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 (255) hide show
  1. package/README.md +19 -17
  2. package/dist/accordion/README.md +3 -3
  3. package/dist/accordion/types.d.ts +37 -23
  4. package/dist/autocomplete/README.md +6 -7
  5. package/dist/autocomplete/empty/autocomplete-empty.svelte +1 -1
  6. package/dist/autocomplete/empty/autocomplete-empty.svelte.d.ts +1 -1
  7. package/dist/autocomplete/input/autocomplete-input.svelte +3 -3
  8. package/dist/autocomplete/input/autocomplete-input.svelte.d.ts +3 -3
  9. package/dist/autocomplete/item/autocomplete-item.svelte +10 -0
  10. package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte +2 -2
  11. package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte.d.ts +2 -2
  12. package/dist/autocomplete/list/autocomplete-list.svelte +2 -2
  13. package/dist/autocomplete/list/autocomplete-list.svelte.d.ts +2 -2
  14. package/dist/autocomplete/root/autocomplete.svelte +7 -7
  15. package/dist/autocomplete/root/autocomplete.svelte.d.ts +7 -7
  16. package/dist/autocomplete/status/autocomplete-status.svelte +1 -1
  17. package/dist/autocomplete/status/autocomplete-status.svelte.d.ts +1 -1
  18. package/dist/button/README.md +1 -1
  19. package/dist/button/root/button-root.svelte +24 -10
  20. package/dist/button/root/button-root.svelte.d.ts +15 -10
  21. package/dist/calendar/README.md +3 -3
  22. package/dist/calendar/body-cell/calendar-body-cell.svelte +7 -0
  23. package/dist/calendar/grid-header/calendar-grid-header.svelte +3 -4
  24. package/dist/calendar/grid-header/calendar-grid-header.svelte.d.ts +3 -4
  25. package/dist/calendar/root/calendar-root.svelte +8 -2
  26. package/dist/calendar/root/calendar-root.svelte.d.ts +8 -2
  27. package/dist/calendar/trigger-next/README.md +1 -1
  28. package/dist/calendar/trigger-previous/README.md +1 -1
  29. package/dist/checkbox/README.md +1 -1
  30. package/dist/checkbox/indicator/README.md +1 -1
  31. package/dist/checkbox/indicator/checkbox-indicator.svelte +1 -0
  32. package/dist/checkbox/indicator/checkbox-indicator.svelte.d.ts +1 -0
  33. package/dist/checkbox/root/README.md +2 -2
  34. package/dist/checkbox/root/checkbox-root.svelte +118 -40
  35. package/dist/checkbox/root/checkbox-root.svelte.d.ts +17 -10
  36. package/dist/checkbox-group/README.md +95 -0
  37. package/dist/checkbox-group/index.d.ts +15 -0
  38. package/dist/checkbox-group/index.js +6 -0
  39. package/dist/checkbox-group/index.parts.d.ts +4 -0
  40. package/dist/checkbox-group/index.parts.js +7 -0
  41. package/dist/checkbox-group/label/checkbox-group-label.svelte +36 -0
  42. package/dist/checkbox-group/label/checkbox-group-label.svelte.d.ts +4 -0
  43. package/dist/checkbox-group/root/checkbox-group-root.svelte +118 -0
  44. package/dist/checkbox-group/root/checkbox-group-root.svelte.d.ts +4 -0
  45. package/dist/checkbox-group/root/context.svelte.d.ts +52 -0
  46. package/dist/checkbox-group/root/context.svelte.js +251 -0
  47. package/dist/checkbox-group/types.d.ts +57 -0
  48. package/dist/checkbox-group/types.js +1 -0
  49. package/dist/clock/README.md +3 -3
  50. package/dist/clock/axis/README.md +1 -1
  51. package/dist/clock/root/README.md +1 -1
  52. package/dist/clock/wheel-column/clock-wheel-column.svelte +1 -1
  53. package/dist/clock/wheel-column/clock-wheel-column.svelte.d.ts +1 -1
  54. package/dist/collapsible/README.md +3 -3
  55. package/dist/collapsible/types.d.ts +10 -7
  56. package/dist/combobox/README.md +2 -2
  57. package/dist/combobox/button/README.md +6 -6
  58. package/dist/combobox/input/README.md +1 -1
  59. package/dist/combobox/input/combobox-input.svelte +3 -3
  60. package/dist/combobox/input/combobox-input.svelte.d.ts +3 -3
  61. package/dist/combobox/item/combobox-listboxitem.svelte +4 -2
  62. package/dist/combobox/item/combobox-listboxitem.svelte.d.ts +4 -2
  63. package/dist/combobox/item-indicator/README.md +1 -1
  64. package/dist/combobox/item-indicator/combobox-item-indicator.svelte +2 -2
  65. package/dist/combobox/item-indicator/combobox-item-indicator.svelte.d.ts +2 -2
  66. package/dist/combobox/list/combobox-listbox.svelte +11 -8
  67. package/dist/combobox/list/combobox-listbox.svelte.d.ts +11 -8
  68. package/dist/combobox/popover/README.md +1 -1
  69. package/dist/combobox/root/README.md +24 -24
  70. package/dist/combobox/root/combobox.svelte +26 -17
  71. package/dist/combobox/root/combobox.svelte.d.ts +26 -17
  72. package/dist/combobox/status/README.md +1 -1
  73. package/dist/combobox/status/combobox-status.svelte +1 -1
  74. package/dist/combobox/status/combobox-status.svelte.d.ts +1 -1
  75. package/dist/combobox/tag/README.md +1 -1
  76. package/dist/combobox/tag/combobox-tag.svelte +1 -1
  77. package/dist/combobox/tag/combobox-tag.svelte.d.ts +1 -1
  78. package/dist/combobox/tag-remove/README.md +1 -1
  79. package/dist/combobox/tag-remove/combobox-tag-remove.svelte +4 -5
  80. package/dist/combobox/tag-remove/combobox-tag-remove.svelte.d.ts +4 -5
  81. package/dist/combobox/tags/README.md +1 -1
  82. package/dist/combobox/tags/combobox-tags.svelte +11 -11
  83. package/dist/combobox/tags/combobox-tags.svelte.d.ts +11 -11
  84. package/dist/combobox/trigger/README.md +7 -7
  85. package/dist/datepicker/README.md +4 -4
  86. package/dist/datepicker/input/date-picker-input.svelte +3 -4
  87. package/dist/datepicker/input/date-picker-input.svelte.d.ts +3 -4
  88. package/dist/datepicker/root/date-picker-root.svelte +1 -1
  89. package/dist/datepicker/trigger/README.md +1 -1
  90. package/dist/daterangepicker/README.md +3 -3
  91. package/dist/daterangepicker/input/date-range-picker-input.svelte +3 -4
  92. package/dist/daterangepicker/input/date-range-picker-input.svelte.d.ts +3 -4
  93. package/dist/dialog/README.md +1 -1
  94. package/dist/dialog/close/dialog-close.svelte +3 -3
  95. package/dist/dialog/close/dialog-close.svelte.d.ts +3 -3
  96. package/dist/dialog/content/dialog-content.svelte +4 -4
  97. package/dist/dialog/content/dialog-content.svelte.d.ts +4 -4
  98. package/dist/dialog/description/dialog-description.svelte +3 -3
  99. package/dist/dialog/description/dialog-description.svelte.d.ts +3 -3
  100. package/dist/dialog/overlay/dialog-overlay.svelte +1 -1
  101. package/dist/dialog/overlay/dialog-overlay.svelte.d.ts +1 -1
  102. package/dist/dialog/portal/dialog-portal.svelte +1 -1
  103. package/dist/dialog/portal/dialog-portal.svelte.d.ts +1 -1
  104. package/dist/dialog/root/README.md +1 -1
  105. package/dist/dialog/root/dialog-root.svelte +36 -11
  106. package/dist/dialog/root/dialog-root.svelte.d.ts +11 -9
  107. package/dist/dialog/title/dialog-title.svelte +3 -3
  108. package/dist/dialog/title/dialog-title.svelte.d.ts +3 -3
  109. package/dist/dialog/trigger/README.md +1 -1
  110. package/dist/drawer/README.md +3 -3
  111. package/dist/drawer/body/drawer-body.svelte +2 -2
  112. package/dist/drawer/body/drawer-body.svelte.d.ts +2 -2
  113. package/dist/drawer/close/drawer-close.svelte +3 -3
  114. package/dist/drawer/close/drawer-close.svelte.d.ts +3 -3
  115. package/dist/drawer/content/drawer-content.svelte +12 -9
  116. package/dist/drawer/content/drawer-content.svelte.d.ts +12 -9
  117. package/dist/drawer/description/drawer-description.svelte +3 -3
  118. package/dist/drawer/description/drawer-description.svelte.d.ts +3 -3
  119. package/dist/drawer/indent/drawer-indent-background.svelte +1 -1
  120. package/dist/drawer/indent/drawer-indent-background.svelte.d.ts +1 -1
  121. package/dist/drawer/indent/drawer-indent.svelte +2 -2
  122. package/dist/drawer/indent/drawer-indent.svelte.d.ts +2 -2
  123. package/dist/drawer/overlay/drawer-overlay.svelte +1 -1
  124. package/dist/drawer/overlay/drawer-overlay.svelte.d.ts +1 -1
  125. package/dist/drawer/portal/drawer-portal.svelte +1 -1
  126. package/dist/drawer/portal/drawer-portal.svelte.d.ts +1 -1
  127. package/dist/drawer/root/context.d.ts +1 -1
  128. package/dist/drawer/root/drawer-root.svelte +25 -23
  129. package/dist/drawer/root/drawer-root.svelte.d.ts +25 -23
  130. package/dist/drawer/swipe-area/drawer-swipe-area.svelte +3 -3
  131. package/dist/drawer/swipe-area/drawer-swipe-area.svelte.d.ts +3 -3
  132. package/dist/drawer/title/drawer-title.svelte +3 -3
  133. package/dist/drawer/title/drawer-title.svelte.d.ts +3 -3
  134. package/dist/drawer/trigger/drawer-trigger.svelte +6 -6
  135. package/dist/drawer/trigger/drawer-trigger.svelte.d.ts +6 -6
  136. package/dist/drawer/viewport/drawer-viewport.svelte +2 -2
  137. package/dist/drawer/viewport/drawer-viewport.svelte.d.ts +2 -2
  138. package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte +1 -1
  139. package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte.d.ts +1 -1
  140. package/dist/dropzone/README.md +4 -6
  141. package/dist/index.d.ts +4 -0
  142. package/dist/index.js +4 -0
  143. package/dist/input/input.svelte +6 -6
  144. package/dist/input/input.svelte.d.ts +6 -6
  145. package/dist/listbox/README.md +3 -10
  146. package/dist/listbox/item/listbox-item.svelte +24 -15
  147. package/dist/listbox/item/listbox-item.svelte.d.ts +24 -15
  148. package/dist/listbox/root/README.md +1 -1
  149. package/dist/listbox/root/context.d.ts +1 -1
  150. package/dist/listbox/root/listbox.svelte +50 -38
  151. package/dist/listbox/root/listbox.svelte.d.ts +50 -38
  152. package/dist/locale-provider/README.md +1 -6
  153. package/dist/menu/README.md +6 -15
  154. package/dist/menu/content/menu-content.svelte +14 -10
  155. package/dist/menu/content/menu-content.svelte.d.ts +14 -10
  156. package/dist/menu/context-trigger/menu-context-trigger.svelte +8 -9
  157. package/dist/menu/context-trigger/menu-context-trigger.svelte.d.ts +8 -9
  158. package/dist/menu/group/menu-group-label.svelte +1 -1
  159. package/dist/menu/group/menu-group-label.svelte.d.ts +1 -1
  160. package/dist/menu/item/menu-item.svelte +11 -8
  161. package/dist/menu/item/menu-item.svelte.d.ts +11 -8
  162. package/dist/menu/overlay/menu-overlay.svelte +1 -1
  163. package/dist/menu/overlay/menu-overlay.svelte.d.ts +1 -1
  164. package/dist/menu/root/context.d.ts +6 -3
  165. package/dist/menu/root/menu-root.svelte +14 -8
  166. package/dist/menu/root/menu-root.svelte.d.ts +14 -8
  167. package/dist/menu/root/menu-state.svelte.d.ts +1 -1
  168. package/dist/menu/separator/menu-separator.svelte +1 -1
  169. package/dist/menu/separator/menu-separator.svelte.d.ts +1 -1
  170. package/dist/menu/submenu/menu-submenu-root.svelte +10 -7
  171. package/dist/menu/submenu/menu-submenu-root.svelte.d.ts +10 -7
  172. package/dist/numberfield/root/README.md +1 -1
  173. package/dist/numberfield/scrub-area-cursor/README.md +1 -1
  174. package/dist/popover/README.md +1 -1
  175. package/dist/popover/content/popover-content.svelte +19 -14
  176. package/dist/popover/content/popover-content.svelte.d.ts +19 -14
  177. package/dist/popover/overlay/popover-overlay.svelte +1 -1
  178. package/dist/popover/overlay/popover-overlay.svelte.d.ts +1 -1
  179. package/dist/popover/root/README.md +1 -1
  180. package/dist/popover/root/popover-root.svelte +13 -10
  181. package/dist/popover/root/popover-root.svelte.d.ts +13 -10
  182. package/dist/popover/trigger/README.md +1 -1
  183. package/dist/primitives/floating.d.ts +3 -3
  184. package/dist/primitives/focus-visible.svelte.d.ts +14 -0
  185. package/dist/primitives/focus-visible.svelte.js +19 -0
  186. package/dist/primitives/index.d.ts +1 -0
  187. package/dist/primitives/index.js +1 -0
  188. package/dist/primitives/input-modality.d.ts +7 -0
  189. package/dist/primitives/input-modality.js +32 -5
  190. package/dist/primitives/scroll-lock.js +37 -8
  191. package/dist/radio-group/README.md +103 -0
  192. package/dist/radio-group/index.d.ts +18 -0
  193. package/dist/radio-group/index.js +9 -0
  194. package/dist/radio-group/index.parts.d.ts +4 -0
  195. package/dist/radio-group/index.parts.js +4 -0
  196. package/dist/radio-group/indicator/radio-group-indicator.svelte +43 -0
  197. package/dist/radio-group/indicator/radio-group-indicator.svelte.d.ts +12 -0
  198. package/dist/radio-group/item/context.d.ts +18 -0
  199. package/dist/radio-group/item/context.js +15 -0
  200. package/dist/radio-group/item/radio-group-item.svelte +377 -0
  201. package/dist/radio-group/item/radio-group-item.svelte.d.ts +35 -0
  202. package/dist/radio-group/label/radio-group-label.svelte +37 -0
  203. package/dist/radio-group/label/radio-group-label.svelte.d.ts +4 -0
  204. package/dist/radio-group/root/context.svelte.d.ts +57 -0
  205. package/dist/radio-group/root/context.svelte.js +284 -0
  206. package/dist/radio-group/root/radio-group-root.svelte +193 -0
  207. package/dist/radio-group/root/radio-group-root.svelte.d.ts +4 -0
  208. package/dist/radio-group/types.d.ts +50 -0
  209. package/dist/radio-group/types.js +1 -0
  210. package/dist/switch/root/README.md +2 -2
  211. package/dist/switch/root/switch-root.svelte +32 -18
  212. package/dist/switch/root/switch-root.svelte.d.ts +23 -18
  213. package/dist/switch/thumb/switch-thumb.svelte +1 -1
  214. package/dist/switch/thumb/switch-thumb.svelte.d.ts +1 -1
  215. package/dist/table/README.md +15 -10
  216. package/dist/table/checkbox-indicator/README.md +1 -1
  217. package/dist/table/column-header-cell/table-column-header-cell.svelte +24 -0
  218. package/dist/table/column-resizer/README.md +2 -2
  219. package/dist/table/root/README.md +1 -1
  220. package/dist/table/root/table-root.svelte +29 -6
  221. package/dist/table/sort-trigger/README.md +1 -1
  222. package/dist/table/types.d.ts +21 -20
  223. package/dist/tabs/types.d.ts +6 -6
  224. package/dist/timepicker/README.md +3 -2
  225. package/dist/timepicker/input/README.md +1 -1
  226. package/dist/timepicker/input/time-picker-input.svelte +66 -5
  227. package/dist/timepicker/input/time-picker-input.svelte.d.ts +18 -1
  228. package/dist/timepicker/root/README.md +1 -1
  229. package/dist/timepicker/trigger/README.md +1 -1
  230. package/dist/toggle/README.md +1 -1
  231. package/dist/toggle/root/toggle-root.svelte +28 -0
  232. package/dist/toggle/root/toggle-root.svelte.d.ts +19 -0
  233. package/dist/toggle-group/README.md +8 -10
  234. package/dist/toggle-group/index.d.ts +2 -0
  235. package/dist/toggle-group/index.parts.d.ts +1 -0
  236. package/dist/toggle-group/index.parts.js +4 -0
  237. package/dist/toggle-group/types.d.ts +7 -6
  238. package/dist/transfer-list/README.md +6 -17
  239. package/dist/transfer-list/item/transfer-list-item.svelte +4 -4
  240. package/dist/transfer-list/item/transfer-list-item.svelte.d.ts +4 -4
  241. package/dist/transfer-list/list/transfer-list-list.svelte +12 -12
  242. package/dist/transfer-list/list/transfer-list-list.svelte.d.ts +12 -12
  243. package/dist/transfer-list/move/transfer-list-move-button.svelte +4 -4
  244. package/dist/transfer-list/move/transfer-list-move-button.svelte.d.ts +4 -4
  245. package/dist/transfer-list/move/transfer-list-reorder-button.svelte +3 -3
  246. package/dist/transfer-list/move/transfer-list-reorder-button.svelte.d.ts +3 -3
  247. package/dist/transfer-list/root/transfer-list-root.svelte +23 -20
  248. package/dist/transfer-list/root/transfer-list-root.svelte.d.ts +23 -20
  249. package/dist/transfer-list/status/transfer-list-status.svelte +1 -1
  250. package/dist/transfer-list/status/transfer-list-status.svelte.d.ts +1 -1
  251. package/dist/tree/README.md +3 -3
  252. package/dist/tree/checkbox-indicator/README.md +1 -1
  253. package/dist/tree/root/README.md +1 -1
  254. package/dist/tree/types.d.ts +19 -10
  255. package/package.json +11 -1
@@ -25,9 +25,9 @@
25
25
  * forcing it here would fight consumers whose panel sizes to its content.
26
26
  */
27
27
  type DrawerBodyProps = {
28
- /** Content of the body region. */
28
+ /** The content of the body region. */
29
29
  children?: Snippet;
30
- /** CSS class for the body. */
30
+ /** The CSS class names of the body. */
31
31
  class?: string;
32
32
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
33
33
 
@@ -22,9 +22,9 @@ import type { HTMLAttributes } from 'svelte/elements';
22
22
  * forcing it here would fight consumers whose panel sizes to its content.
23
23
  */
24
24
  type DrawerBodyProps = {
25
- /** Content of the body region. */
25
+ /** The content of the body region. */
26
26
  children?: Snippet;
27
- /** CSS class for the body. */
27
+ /** The CSS class names of the body. */
28
28
  class?: string;
29
29
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
30
30
  declare const DrawerBody: import("svelte").Component<DrawerBodyProps, {}, "">;
@@ -12,11 +12,11 @@
12
12
  * unreachable for some users. Every dismissible drawer wants one of these.
13
13
  */
14
14
  export type DrawerCloseProps = Omit<HTMLButtonAttributes, 'type' | 'class' | 'children'> & {
15
- /** Button label. */
15
+ /** The name on the button. */
16
16
  children?: Snippet;
17
- /** CSS class for the button. */
17
+ /** The CSS class names of the button. */
18
18
  class?: string;
19
- /** Bindable reference to the rendered button. */
19
+ /** A bindable reference to the button element. */
20
20
  element?: HTMLButtonElement | null;
21
21
  };
22
22
 
@@ -8,11 +8,11 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
8
8
  * unreachable for some users. Every dismissible drawer wants one of these.
9
9
  */
10
10
  export type DrawerCloseProps = Omit<HTMLButtonAttributes, 'type' | 'class' | 'children'> & {
11
- /** Button label. */
11
+ /** The name on the button. */
12
12
  children?: Snippet;
13
- /** CSS class for the button. */
13
+ /** The CSS class names of the button. */
14
14
  class?: string;
15
- /** Bindable reference to the rendered button. */
15
+ /** A bindable reference to the button element. */
16
16
  element?: HTMLButtonElement | null;
17
17
  };
18
18
  declare const DrawerClose: import("svelte").Component<DrawerCloseProps, {}, "element">;
@@ -51,21 +51,24 @@
51
51
  * Belongs inside a Drawer.Portal, optionally wrapped in a Drawer.Viewport.
52
52
  */
53
53
  type DrawerContentProps = {
54
- /** Content of the panel. */
54
+ /** The content of the panel. */
55
55
  children?: Snippet;
56
- /** CSS class for the panel. */
56
+ /** The CSS class names of the panel. */
57
57
  class?: string;
58
58
  /**
59
- * Where focus lands when the drawer opens. Defaults to the first focusable
60
- * element inside the panel.
59
+ * The element that gets the focus when the drawer opens. The default is the first element in the
60
+ * panel that can take the focus.
61
61
  */
62
62
  initialFocus?: HTMLElement | string | (() => HTMLElement | null | undefined);
63
63
  /**
64
- * `touch-action` for the panel. Defaults to `pan-y` for left/right drawers —
65
- * children keep scrolling vertically while the horizontal axis is reserved for
66
- * the drag — and to nothing for top/bottom ones, where reserving the vertical
67
- * axis would break every scrollable region inside (`touch-action` intersects
68
- * down the ancestor chain, so a child cannot opt back in).
64
+ * The `touch-action` value of the panel.
65
+ *
66
+ * For a left drawer or a right drawer, the default is `pan-y`. The children still scroll on the
67
+ * vertical axis, and the horizontal axis belongs to the drag.
68
+ *
69
+ * For a top drawer or a bottom drawer, there is no default. A reservation of the vertical axis
70
+ * would break each region in the panel that scrolls. `touch-action` applies down the chain of
71
+ * the parents, and a child cannot cancel it.
69
72
  */
70
73
  touchAction?: string | null;
71
74
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
@@ -5,21 +5,24 @@ import type { HTMLAttributes } from 'svelte/elements';
5
5
  * Belongs inside a Drawer.Portal, optionally wrapped in a Drawer.Viewport.
6
6
  */
7
7
  type DrawerContentProps = {
8
- /** Content of the panel. */
8
+ /** The content of the panel. */
9
9
  children?: Snippet;
10
- /** CSS class for the panel. */
10
+ /** The CSS class names of the panel. */
11
11
  class?: string;
12
12
  /**
13
- * Where focus lands when the drawer opens. Defaults to the first focusable
14
- * element inside the panel.
13
+ * The element that gets the focus when the drawer opens. The default is the first element in the
14
+ * panel that can take the focus.
15
15
  */
16
16
  initialFocus?: HTMLElement | string | (() => HTMLElement | null | undefined);
17
17
  /**
18
- * `touch-action` for the panel. Defaults to `pan-y` for left/right drawers —
19
- * children keep scrolling vertically while the horizontal axis is reserved for
20
- * the drag — and to nothing for top/bottom ones, where reserving the vertical
21
- * axis would break every scrollable region inside (`touch-action` intersects
22
- * down the ancestor chain, so a child cannot opt back in).
18
+ * The `touch-action` value of the panel.
19
+ *
20
+ * For a left drawer or a right drawer, the default is `pan-y`. The children still scroll on the
21
+ * vertical axis, and the horizontal axis belongs to the drag.
22
+ *
23
+ * For a top drawer or a bottom drawer, there is no default. A reservation of the vertical axis
24
+ * would break each region in the panel that scrolls. `touch-action` applies down the chain of
25
+ * the parents, and a child cannot cancel it.
23
26
  */
24
27
  touchAction?: string | null;
25
28
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
@@ -11,11 +11,11 @@
11
11
  * than only when the user happens to arrow onto it.
12
12
  */
13
13
  type DrawerDescriptionProps = {
14
- /** Supporting text announced after the title. */
14
+ /** The text that a screen reader announces after the title. */
15
15
  children?: Snippet;
16
- /** CSS class for the paragraph. */
16
+ /** The CSS class names of the paragraph. */
17
17
  class?: string;
18
- /** Overrides the generated id. */
18
+ /** Replaces the id that the component makes. */
19
19
  id?: string;
20
20
  } & Omit<HTMLAttributes<HTMLParagraphElement>, 'class' | 'children' | 'id'>;
21
21
 
@@ -8,11 +8,11 @@ import type { HTMLAttributes } from 'svelte/elements';
8
8
  * than only when the user happens to arrow onto it.
9
9
  */
10
10
  type DrawerDescriptionProps = {
11
- /** Supporting text announced after the title. */
11
+ /** The text that a screen reader announces after the title. */
12
12
  children?: Snippet;
13
- /** CSS class for the paragraph. */
13
+ /** The CSS class names of the paragraph. */
14
14
  class?: string;
15
- /** Overrides the generated id. */
15
+ /** Replaces the id that the component makes. */
16
16
  id?: string;
17
17
  } & Omit<HTMLAttributes<HTMLParagraphElement>, 'class' | 'children' | 'id'>;
18
18
  declare const DrawerDescription: import("svelte").Component<DrawerDescriptionProps, {}, "">;
@@ -12,7 +12,7 @@
12
12
  * normally the same colour as the app.
13
13
  */
14
14
  type DrawerIndentBackgroundProps = {
15
- /** CSS class for the layer. */
15
+ /** The CSS class names of the layer. */
16
16
  class?: string;
17
17
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
18
18
 
@@ -9,7 +9,7 @@ import type { HTMLAttributes } from 'svelte/elements';
9
9
  * normally the same colour as the app.
10
10
  */
11
11
  type DrawerIndentBackgroundProps = {
12
- /** CSS class for the layer. */
12
+ /** The CSS class names of the layer. */
13
13
  class?: string;
14
14
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
15
15
  declare const DrawerIndentBackground: import("svelte").Component<DrawerIndentBackgroundProps, {}, "">;
@@ -25,9 +25,9 @@
25
25
  * module-global, so there is nothing left for one to coordinate.
26
26
  */
27
27
  type DrawerIndentProps = {
28
- /** The app UI that pulls back while a drawer is open. */
28
+ /** The application UI that moves back while a drawer is open. */
29
29
  children?: Snippet;
30
- /** CSS class for the wrapper. */
30
+ /** The CSS class names of the container element. */
31
31
  class?: string;
32
32
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
33
33
 
@@ -22,9 +22,9 @@ import type { HTMLAttributes } from 'svelte/elements';
22
22
  * module-global, so there is nothing left for one to coordinate.
23
23
  */
24
24
  type DrawerIndentProps = {
25
- /** The app UI that pulls back while a drawer is open. */
25
+ /** The application UI that moves back while a drawer is open. */
26
26
  children?: Snippet;
27
- /** CSS class for the wrapper. */
27
+ /** The CSS class names of the container element. */
28
28
  class?: string;
29
29
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
30
30
  declare const DrawerIndent: import("svelte").Component<DrawerIndentProps, {}, "">;
@@ -10,7 +10,7 @@
10
10
  * Belongs inside a Drawer.Portal.
11
11
  */
12
12
  type DrawerOverlayProps = {
13
- /** CSS class for the overlay. */
13
+ /** The CSS class names of the overlay. */
14
14
  class?: string;
15
15
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
16
16
 
@@ -4,7 +4,7 @@ import type { HTMLAttributes } from 'svelte/elements';
4
4
  * Belongs inside a Drawer.Portal.
5
5
  */
6
6
  type DrawerOverlayProps = {
7
- /** CSS class for the overlay. */
7
+ /** The CSS class names of the overlay. */
8
8
  class?: string;
9
9
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
10
10
  declare const DrawerOverlay: import("svelte").Component<DrawerOverlayProps, {}, "">;
@@ -11,7 +11,7 @@
11
11
  * it can play before they leave.
12
12
  */
13
13
  type DrawerPortalProps = {
14
- /** The layers to portal (Overlay, Viewport/Content). */
14
+ /** The layers for the portal: the Overlay, and the Viewport or the Content. */
15
15
  children?: Snippet;
16
16
  };
17
17
 
@@ -5,7 +5,7 @@ import type { Snippet } from 'svelte';
5
5
  * it can play before they leave.
6
6
  */
7
7
  type DrawerPortalProps = {
8
- /** The layers to portal (Overlay, Viewport/Content). */
8
+ /** The layers for the portal: the Overlay, and the Viewport or the Content. */
9
9
  children?: Snippet;
10
10
  };
11
11
  declare const DrawerPortal: import("svelte").Component<DrawerPortalProps, {}, "">;
@@ -9,7 +9,7 @@ import type { DrawerModal, DrawerSide, DrawerCloseReason, DrawerSnapPoint } from
9
9
  export type DrawerContext = {
10
10
  /** Whether the drawer is open. */
11
11
  readonly isOpen: boolean;
12
- /** Edge the panel is anchored to. */
12
+ /** The edge of the panel. */
13
13
  readonly side: DrawerSide;
14
14
  /** Focus/scroll behaviour: `true`, `'trap-focus'`, or `false`. */
15
15
  readonly modal: DrawerModal;
@@ -24,54 +24,56 @@
24
24
  * Renders no element of its own; it provides the context every other part reads.
25
25
  */
26
26
  type DrawerRootProps = {
27
- /** Open state. Two-way by default — use `bind:open`. */
27
+ /** The open state. By default it goes in the two directions: use `bind:open`. */
28
28
  open?: boolean;
29
- /** Initial open state, for when `open` is not supplied. */
29
+ /** The open state at the start, for when you give no `open`. */
30
30
  defaultOpen?: boolean;
31
31
  /**
32
- * Opt into fully controlled state: the component stops writing back to `open` and
33
- * only reports through `onOpenChange`, so the parent can reject a change by not
34
- * flowing the new value back down. Off by default, because `bind:open` — the
35
- * common case — needs the write-back to work at all.
32
+ * Give your own code full control of the open state. The component stops to write back to
33
+ * `open`, and it reports only through `onOpenChange`. Thus the parent can refuse a change: the
34
+ * parent does not send the new value down. The default is off, because `bind:open` is the usual
35
+ * case and it needs the write-back.
36
36
  */
37
37
  controlledOpen?: boolean;
38
38
  /** Callback when the open state changes. */
39
39
  onOpenChange?: (open: boolean) => void;
40
- /** Edge the panel is anchored to. */
40
+ /** The edge of the panel. */
41
41
  side?: DrawerSide;
42
- /** Focus trap / scroll lock behaviour. See `DrawerModal`. */
42
+ /** How the drawer holds the focus and stops the page scroll. Read `DrawerModal`. */
43
43
  modal?: DrawerModal;
44
- /** Whether a swipe toward the anchored edge may dismiss the drawer. */
44
+ /** Lets a swipe toward the anchored edge dismiss the drawer. */
45
45
  dismissible?: boolean;
46
- /** Whether pressing Escape closes the drawer. */
46
+ /** Closes the drawer when the user pushes the `Escape` key. */
47
47
  shouldCloseOnEscape?: boolean;
48
- /** Whether pressing outside the panel closes it. */
48
+ /** Closes the panel when the user presses outside it. */
49
49
  shouldCloseOnInteractOutside?: boolean;
50
50
  /**
51
- * Resting positions the panel may settle on, smallest offset first is not
52
- * required — they are sorted internally. See `DrawerSnapPoint` for the accepted
53
- * value forms. Without this the drawer is either fully open or closed.
51
+ * The rest positions of the panel. They can be in any sequence, because the component sorts
52
+ * them. `DrawerSnapPoint` gives the value forms that the prop accepts. Without this prop, the
53
+ * drawer is open or closed, and nothing between.
54
54
  */
55
55
  snapPoints?: readonly DrawerSnapPoint[];
56
- /** Active snap point. Two-way by default — use `bind:snapPoint`. */
56
+ /** The current snap point. By default it goes in the two directions: use `bind:snapPoint`. */
57
57
  snapPoint?: DrawerSnapPoint | null;
58
- /** Initial snap point, for when `snapPoint` is not supplied. */
58
+ /** The snap point at the start, for when you give no `snapPoint`. */
59
59
  defaultSnapPoint?: DrawerSnapPoint | null;
60
- /** Callback when the active snap point changes. */
60
+ /** The component calls it when the current snap point changes. */
61
61
  onSnapPointChange?: (snapPoint: DrawerSnapPoint | null, event?: Event) => void;
62
62
  /**
63
- * Stops a fast flick from skipping past the neighbouring snap point. Use it when
64
- * every step is meaningful and jumping two at once would disorient.
63
+ * Stops a fast flick at the next snap point. Use it when each step has a meaning, and a jump of
64
+ * two steps would confuse the user.
65
65
  */
66
66
  snapToSequentialPoints?: boolean;
67
67
  /**
68
- * Drives the drawer from a detached handle instead of the `open` prop, so
69
- * triggers can live anywhere in the tree. See `createDrawerHandle`.
68
+ * Controls the drawer from a separate object, and not from the `open` prop. Thus a trigger can
69
+ * be at any position in the tree. Read `createDrawerHandle`.
70
70
  */
71
71
  handle?: DrawerHandle<Payload>;
72
- /** Reference to the trigger element. Set manually or via Drawer.Trigger. */
72
+ /**
73
+ * The reference to the trigger element. Set it in your own code, or let Drawer.Trigger set it.
74
+ */
73
75
  triggerRef?: HTMLElement | null;
74
- /** Children snippet, receiving state helpers. */
76
+ /** The children snippet. It receives the state functions. */
75
77
  children?: Snippet<[DrawerStateHelpers<Payload>]>;
76
78
  };
77
79
 
@@ -3,54 +3,56 @@ import type { DrawerModal, DrawerSide, DrawerSnapPoint, DrawerStateHelpers } fro
3
3
  import type { DrawerHandle } from './handle.svelte';
4
4
  declare function $$render<Payload = unknown>(): {
5
5
  props: {
6
- /** Open state. Two-way by default — use `bind:open`. */
6
+ /** The open state. By default it goes in the two directions: use `bind:open`. */
7
7
  open?: boolean;
8
- /** Initial open state, for when `open` is not supplied. */
8
+ /** The open state at the start, for when you give no `open`. */
9
9
  defaultOpen?: boolean;
10
10
  /**
11
- * Opt into fully controlled state: the component stops writing back to `open` and
12
- * only reports through `onOpenChange`, so the parent can reject a change by not
13
- * flowing the new value back down. Off by default, because `bind:open` — the
14
- * common case — needs the write-back to work at all.
11
+ * Give your own code full control of the open state. The component stops to write back to
12
+ * `open`, and it reports only through `onOpenChange`. Thus the parent can refuse a change: the
13
+ * parent does not send the new value down. The default is off, because `bind:open` is the usual
14
+ * case and it needs the write-back.
15
15
  */
16
16
  controlledOpen?: boolean;
17
17
  /** Callback when the open state changes. */
18
18
  onOpenChange?: (open: boolean) => void;
19
- /** Edge the panel is anchored to. */
19
+ /** The edge of the panel. */
20
20
  side?: DrawerSide;
21
- /** Focus trap / scroll lock behaviour. See `DrawerModal`. */
21
+ /** How the drawer holds the focus and stops the page scroll. Read `DrawerModal`. */
22
22
  modal?: DrawerModal;
23
- /** Whether a swipe toward the anchored edge may dismiss the drawer. */
23
+ /** Lets a swipe toward the anchored edge dismiss the drawer. */
24
24
  dismissible?: boolean;
25
- /** Whether pressing Escape closes the drawer. */
25
+ /** Closes the drawer when the user pushes the `Escape` key. */
26
26
  shouldCloseOnEscape?: boolean;
27
- /** Whether pressing outside the panel closes it. */
27
+ /** Closes the panel when the user presses outside it. */
28
28
  shouldCloseOnInteractOutside?: boolean;
29
29
  /**
30
- * Resting positions the panel may settle on, smallest offset first is not
31
- * required — they are sorted internally. See `DrawerSnapPoint` for the accepted
32
- * value forms. Without this the drawer is either fully open or closed.
30
+ * The rest positions of the panel. They can be in any sequence, because the component sorts
31
+ * them. `DrawerSnapPoint` gives the value forms that the prop accepts. Without this prop, the
32
+ * drawer is open or closed, and nothing between.
33
33
  */
34
34
  snapPoints?: readonly DrawerSnapPoint[];
35
- /** Active snap point. Two-way by default — use `bind:snapPoint`. */
35
+ /** The current snap point. By default it goes in the two directions: use `bind:snapPoint`. */
36
36
  snapPoint?: DrawerSnapPoint | null;
37
- /** Initial snap point, for when `snapPoint` is not supplied. */
37
+ /** The snap point at the start, for when you give no `snapPoint`. */
38
38
  defaultSnapPoint?: DrawerSnapPoint | null;
39
- /** Callback when the active snap point changes. */
39
+ /** The component calls it when the current snap point changes. */
40
40
  onSnapPointChange?: (snapPoint: DrawerSnapPoint | null, event?: Event) => void;
41
41
  /**
42
- * Stops a fast flick from skipping past the neighbouring snap point. Use it when
43
- * every step is meaningful and jumping two at once would disorient.
42
+ * Stops a fast flick at the next snap point. Use it when each step has a meaning, and a jump of
43
+ * two steps would confuse the user.
44
44
  */
45
45
  snapToSequentialPoints?: boolean;
46
46
  /**
47
- * Drives the drawer from a detached handle instead of the `open` prop, so
48
- * triggers can live anywhere in the tree. See `createDrawerHandle`.
47
+ * Controls the drawer from a separate object, and not from the `open` prop. Thus a trigger can
48
+ * be at any position in the tree. Read `createDrawerHandle`.
49
49
  */
50
50
  handle?: DrawerHandle<Payload>;
51
- /** Reference to the trigger element. Set manually or via Drawer.Trigger. */
51
+ /**
52
+ * The reference to the trigger element. Set it in your own code, or let Drawer.Trigger set it.
53
+ */
52
54
  triggerRef?: HTMLElement | null;
53
- /** Children snippet, receiving state helpers. */
55
+ /** The children snippet. It receives the state functions. */
54
56
  children?: Snippet<[DrawerStateHelpers<Payload>]>;
55
57
  };
56
58
  exports: {};
@@ -20,11 +20,11 @@
20
20
  * drawer is unreachable by keyboard and to anyone who cannot perform the gesture.
21
21
  */
22
22
  type DrawerSwipeAreaProps = {
23
- /** CSS class for the strip. */
23
+ /** The CSS class names of the strip. */
24
24
  class?: string;
25
- /** Thickness of the strip, as a CSS length. */
25
+ /** The thickness of the strip, as a CSS length. */
26
26
  size?: string;
27
- /** Turns the gesture off without unmounting the strip. */
27
+ /** Stops the gesture, but keeps the strip in the DOM. */
28
28
  disabled?: boolean;
29
29
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
30
30
 
@@ -10,11 +10,11 @@ import type { HTMLAttributes } from 'svelte/elements';
10
10
  * drawer is unreachable by keyboard and to anyone who cannot perform the gesture.
11
11
  */
12
12
  type DrawerSwipeAreaProps = {
13
- /** CSS class for the strip. */
13
+ /** The CSS class names of the strip. */
14
14
  class?: string;
15
- /** Thickness of the strip, as a CSS length. */
15
+ /** The thickness of the strip, as a CSS length. */
16
16
  size?: string;
17
- /** Turns the gesture off without unmounting the strip. */
17
+ /** Stops the gesture, but keeps the strip in the DOM. */
18
18
  disabled?: boolean;
19
19
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class'>;
20
20
  declare const DrawerSwipeArea: import("svelte").Component<DrawerSwipeAreaProps, {}, "">;
@@ -12,11 +12,11 @@
12
12
  * from the text inside it.
13
13
  */
14
14
  type DrawerTitleProps = {
15
- /** The drawer's name. */
15
+ /** The name of the drawer. */
16
16
  children?: Snippet;
17
- /** CSS class for the heading. */
17
+ /** The CSS class names of the heading. */
18
18
  class?: string;
19
- /** Overrides the generated id. */
19
+ /** Replaces the id that the component makes. */
20
20
  id?: string;
21
21
  } & Omit<HTMLAttributes<HTMLHeadingElement>, 'class' | 'children' | 'id'>;
22
22
 
@@ -9,11 +9,11 @@ import type { HTMLAttributes } from 'svelte/elements';
9
9
  * from the text inside it.
10
10
  */
11
11
  type DrawerTitleProps = {
12
- /** The drawer's name. */
12
+ /** The name of the drawer. */
13
13
  children?: Snippet;
14
- /** CSS class for the heading. */
14
+ /** The CSS class names of the heading. */
15
15
  class?: string;
16
- /** Overrides the generated id. */
16
+ /** Replaces the id that the component makes. */
17
17
  id?: string;
18
18
  } & Omit<HTMLAttributes<HTMLHeadingElement>, 'class' | 'children' | 'id'>;
19
19
  declare const DrawerTitle: import("svelte").Component<DrawerTitleProps, {}, "">;
@@ -13,18 +13,18 @@
13
13
  HTMLButtonAttributes,
14
14
  'type' | 'class' | 'children' | 'aria-haspopup' | 'aria-expanded'
15
15
  > & {
16
- /** Button label. */
16
+ /** The name on the button. */
17
17
  children?: Snippet;
18
- /** CSS class for the button. */
18
+ /** The CSS class names of the button. */
19
19
  class?: string;
20
- /** Bindable reference to the rendered button. */
20
+ /** A bindable reference to the button element. */
21
21
  element?: HTMLButtonElement | null;
22
22
  /**
23
- * Opens the drawer through a detached handle instead of context, so the trigger
24
- * can live anywhere in the tree. See `createDrawerHandle`.
23
+ * Opens the drawer through a separate object, and not through the context. Thus the trigger can
24
+ * be at any position in the tree. Read `createDrawerHandle`.
25
25
  */
26
26
  handle?: DrawerHandle<Payload>;
27
- /** Value handed to the drawer's `children` snippet when this trigger opens it. */
27
+ /** The value that goes to the `children` snippet of the drawer when this trigger opens it. */
28
28
  payload?: Payload;
29
29
  };
30
30
 
@@ -3,18 +3,18 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
3
3
  import type { DrawerHandle } from '../root/handle.svelte';
4
4
  declare function $$render<Payload = unknown>(): {
5
5
  props: Omit<HTMLButtonAttributes, "children" | "class" | "aria-expanded" | "aria-haspopup" | "type"> & {
6
- /** Button label. */
6
+ /** The name on the button. */
7
7
  children?: Snippet;
8
- /** CSS class for the button. */
8
+ /** The CSS class names of the button. */
9
9
  class?: string;
10
- /** Bindable reference to the rendered button. */
10
+ /** A bindable reference to the button element. */
11
11
  element?: HTMLButtonElement | null;
12
12
  /**
13
- * Opens the drawer through a detached handle instead of context, so the trigger
14
- * can live anywhere in the tree. See `createDrawerHandle`.
13
+ * Opens the drawer through a separate object, and not through the context. Thus the trigger can
14
+ * be at any position in the tree. Read `createDrawerHandle`.
15
15
  */
16
16
  handle?: DrawerHandle<Payload>;
17
- /** Value handed to the drawer's `children` snippet when this trigger opens it. */
17
+ /** The value that goes to the `children` snippet of the drawer when this trigger opens it. */
18
18
  payload?: Payload;
19
19
  };
20
20
  exports: {};
@@ -12,9 +12,9 @@
12
12
  * Belongs inside a Drawer.Portal, wrapping a Drawer.Content.
13
13
  */
14
14
  type DrawerViewportProps = {
15
- /** The panel this viewport places. */
15
+ /** The panel that this viewport puts in position. */
16
16
  children?: Snippet;
17
- /** CSS class for the viewport. */
17
+ /** The CSS class names of the viewport. */
18
18
  class?: string;
19
19
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
20
20
 
@@ -5,9 +5,9 @@ import type { HTMLAttributes } from 'svelte/elements';
5
5
  * Belongs inside a Drawer.Portal, wrapping a Drawer.Content.
6
6
  */
7
7
  type DrawerViewportProps = {
8
- /** The panel this viewport places. */
8
+ /** The panel that this viewport puts in position. */
9
9
  children?: Snippet;
10
- /** CSS class for the viewport. */
10
+ /** The CSS class names of the viewport. */
11
11
  class?: string;
12
12
  } & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
13
13
  declare const DrawerViewport: import("svelte").Component<DrawerViewportProps, {}, "">;
@@ -25,7 +25,7 @@
25
25
  * every desktop where this does not apply anyway) the provider is inert.
26
26
  */
27
27
  type DrawerVirtualKeyboardProviderProps = {
28
- /** The subtree the keyboard inset is published to. */
28
+ /** The elements below it, which receive the keyboard inset. */
29
29
  children?: Snippet;
30
30
  };
31
31
 
@@ -21,7 +21,7 @@ import type { Snippet } from 'svelte';
21
21
  * every desktop where this does not apply anyway) the provider is inert.
22
22
  */
23
23
  type DrawerVirtualKeyboardProviderProps = {
24
- /** The subtree the keyboard inset is published to. */
24
+ /** The elements below it, which receive the keyboard inset. */
25
25
  children?: Snippet;
26
26
  };
27
27
  declare const DrawerVirtualKeyboardProvider: import("svelte").Component<DrawerVirtualKeyboardProviderProps, {}, "">;