@human-kit/ui 1.0.0-beta.4 → 1.0.0-beta.6

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 (209) 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-indicator/autocomplete-item-indicator.svelte +2 -2
  10. package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte.d.ts +2 -2
  11. package/dist/autocomplete/list/autocomplete-list.svelte +2 -2
  12. package/dist/autocomplete/list/autocomplete-list.svelte.d.ts +2 -2
  13. package/dist/autocomplete/root/autocomplete.svelte +7 -7
  14. package/dist/autocomplete/root/autocomplete.svelte.d.ts +7 -7
  15. package/dist/autocomplete/status/autocomplete-status.svelte +1 -1
  16. package/dist/autocomplete/status/autocomplete-status.svelte.d.ts +1 -1
  17. package/dist/button/README.md +1 -1
  18. package/dist/button/root/button-root.svelte +15 -10
  19. package/dist/button/root/button-root.svelte.d.ts +15 -10
  20. package/dist/calendar/README.md +3 -3
  21. package/dist/calendar/grid-header/calendar-grid-header.svelte +3 -4
  22. package/dist/calendar/grid-header/calendar-grid-header.svelte.d.ts +3 -4
  23. package/dist/calendar/root/calendar-root.svelte +8 -2
  24. package/dist/calendar/root/calendar-root.svelte.d.ts +8 -2
  25. package/dist/calendar/trigger-next/README.md +1 -1
  26. package/dist/calendar/trigger-previous/README.md +1 -1
  27. package/dist/checkbox/README.md +1 -1
  28. package/dist/checkbox/indicator/README.md +1 -1
  29. package/dist/checkbox/root/README.md +2 -2
  30. package/dist/checkbox/root/checkbox-root.svelte +12 -10
  31. package/dist/checkbox/root/checkbox-root.svelte.d.ts +12 -10
  32. package/dist/clock/README.md +3 -3
  33. package/dist/clock/axis/README.md +1 -1
  34. package/dist/clock/root/README.md +1 -1
  35. package/dist/clock/wheel-column/clock-wheel-column.svelte +1 -1
  36. package/dist/clock/wheel-column/clock-wheel-column.svelte.d.ts +1 -1
  37. package/dist/collapsible/README.md +3 -3
  38. package/dist/collapsible/types.d.ts +10 -7
  39. package/dist/combobox/README.md +2 -2
  40. package/dist/combobox/button/README.md +6 -6
  41. package/dist/combobox/input/README.md +1 -1
  42. package/dist/combobox/input/combobox-input.svelte +3 -3
  43. package/dist/combobox/input/combobox-input.svelte.d.ts +3 -3
  44. package/dist/combobox/item/combobox-listboxitem.svelte +4 -2
  45. package/dist/combobox/item/combobox-listboxitem.svelte.d.ts +4 -2
  46. package/dist/combobox/item-indicator/README.md +1 -1
  47. package/dist/combobox/item-indicator/combobox-item-indicator.svelte +2 -2
  48. package/dist/combobox/item-indicator/combobox-item-indicator.svelte.d.ts +2 -2
  49. package/dist/combobox/list/combobox-listbox.svelte +11 -8
  50. package/dist/combobox/list/combobox-listbox.svelte.d.ts +11 -8
  51. package/dist/combobox/popover/README.md +1 -1
  52. package/dist/combobox/root/README.md +24 -24
  53. package/dist/combobox/root/combobox.svelte +26 -17
  54. package/dist/combobox/root/combobox.svelte.d.ts +26 -17
  55. package/dist/combobox/status/README.md +1 -1
  56. package/dist/combobox/status/combobox-status.svelte +1 -1
  57. package/dist/combobox/status/combobox-status.svelte.d.ts +1 -1
  58. package/dist/combobox/tag/README.md +1 -1
  59. package/dist/combobox/tag/combobox-tag.svelte +1 -1
  60. package/dist/combobox/tag/combobox-tag.svelte.d.ts +1 -1
  61. package/dist/combobox/tag-remove/README.md +1 -1
  62. package/dist/combobox/tag-remove/combobox-tag-remove.svelte +4 -5
  63. package/dist/combobox/tag-remove/combobox-tag-remove.svelte.d.ts +4 -5
  64. package/dist/combobox/tags/README.md +1 -1
  65. package/dist/combobox/tags/combobox-tags.svelte +11 -11
  66. package/dist/combobox/tags/combobox-tags.svelte.d.ts +11 -11
  67. package/dist/combobox/trigger/README.md +7 -7
  68. package/dist/datepicker/README.md +4 -4
  69. package/dist/datepicker/input/date-picker-input.svelte +3 -4
  70. package/dist/datepicker/input/date-picker-input.svelte.d.ts +3 -4
  71. package/dist/datepicker/root/date-picker-root.svelte +1 -1
  72. package/dist/datepicker/trigger/README.md +1 -1
  73. package/dist/daterangepicker/README.md +3 -3
  74. package/dist/daterangepicker/input/date-range-picker-input.svelte +3 -4
  75. package/dist/daterangepicker/input/date-range-picker-input.svelte.d.ts +3 -4
  76. package/dist/dialog/README.md +1 -1
  77. package/dist/dialog/close/dialog-close.svelte +3 -3
  78. package/dist/dialog/close/dialog-close.svelte.d.ts +3 -3
  79. package/dist/dialog/content/dialog-content.svelte +4 -4
  80. package/dist/dialog/content/dialog-content.svelte.d.ts +4 -4
  81. package/dist/dialog/description/dialog-description.svelte +3 -3
  82. package/dist/dialog/description/dialog-description.svelte.d.ts +3 -3
  83. package/dist/dialog/overlay/dialog-overlay.svelte +1 -1
  84. package/dist/dialog/overlay/dialog-overlay.svelte.d.ts +1 -1
  85. package/dist/dialog/portal/dialog-portal.svelte +1 -1
  86. package/dist/dialog/portal/dialog-portal.svelte.d.ts +1 -1
  87. package/dist/dialog/root/README.md +1 -1
  88. package/dist/dialog/root/dialog-root.svelte +36 -11
  89. package/dist/dialog/root/dialog-root.svelte.d.ts +11 -9
  90. package/dist/dialog/title/dialog-title.svelte +3 -3
  91. package/dist/dialog/title/dialog-title.svelte.d.ts +3 -3
  92. package/dist/dialog/trigger/README.md +1 -1
  93. package/dist/drawer/README.md +3 -3
  94. package/dist/drawer/body/drawer-body.svelte +2 -2
  95. package/dist/drawer/body/drawer-body.svelte.d.ts +2 -2
  96. package/dist/drawer/close/drawer-close.svelte +3 -3
  97. package/dist/drawer/close/drawer-close.svelte.d.ts +3 -3
  98. package/dist/drawer/content/drawer-content.svelte +12 -9
  99. package/dist/drawer/content/drawer-content.svelte.d.ts +12 -9
  100. package/dist/drawer/description/drawer-description.svelte +3 -3
  101. package/dist/drawer/description/drawer-description.svelte.d.ts +3 -3
  102. package/dist/drawer/indent/drawer-indent-background.svelte +1 -1
  103. package/dist/drawer/indent/drawer-indent-background.svelte.d.ts +1 -1
  104. package/dist/drawer/indent/drawer-indent.svelte +2 -2
  105. package/dist/drawer/indent/drawer-indent.svelte.d.ts +2 -2
  106. package/dist/drawer/overlay/drawer-overlay.svelte +1 -1
  107. package/dist/drawer/overlay/drawer-overlay.svelte.d.ts +1 -1
  108. package/dist/drawer/portal/drawer-portal.svelte +1 -1
  109. package/dist/drawer/portal/drawer-portal.svelte.d.ts +1 -1
  110. package/dist/drawer/root/context.d.ts +1 -1
  111. package/dist/drawer/root/drawer-root.svelte +25 -23
  112. package/dist/drawer/root/drawer-root.svelte.d.ts +25 -23
  113. package/dist/drawer/swipe-area/drawer-swipe-area.svelte +3 -3
  114. package/dist/drawer/swipe-area/drawer-swipe-area.svelte.d.ts +3 -3
  115. package/dist/drawer/title/drawer-title.svelte +3 -3
  116. package/dist/drawer/title/drawer-title.svelte.d.ts +3 -3
  117. package/dist/drawer/trigger/drawer-trigger.svelte +6 -6
  118. package/dist/drawer/trigger/drawer-trigger.svelte.d.ts +6 -6
  119. package/dist/drawer/viewport/drawer-viewport.svelte +2 -2
  120. package/dist/drawer/viewport/drawer-viewport.svelte.d.ts +2 -2
  121. package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte +1 -1
  122. package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte.d.ts +1 -1
  123. package/dist/dropzone/README.md +4 -6
  124. package/dist/input/input.svelte +6 -6
  125. package/dist/input/input.svelte.d.ts +6 -6
  126. package/dist/listbox/README.md +3 -10
  127. package/dist/listbox/item/listbox-item.svelte +24 -15
  128. package/dist/listbox/item/listbox-item.svelte.d.ts +24 -15
  129. package/dist/listbox/root/README.md +1 -1
  130. package/dist/listbox/root/context.d.ts +1 -1
  131. package/dist/listbox/root/listbox.svelte +50 -38
  132. package/dist/listbox/root/listbox.svelte.d.ts +50 -38
  133. package/dist/locale-provider/README.md +1 -6
  134. package/dist/menu/README.md +6 -15
  135. package/dist/menu/content/menu-content.svelte +14 -10
  136. package/dist/menu/content/menu-content.svelte.d.ts +14 -10
  137. package/dist/menu/context-trigger/menu-context-trigger.svelte +8 -9
  138. package/dist/menu/context-trigger/menu-context-trigger.svelte.d.ts +8 -9
  139. package/dist/menu/group/menu-group-label.svelte +1 -1
  140. package/dist/menu/group/menu-group-label.svelte.d.ts +1 -1
  141. package/dist/menu/item/menu-item.svelte +11 -8
  142. package/dist/menu/item/menu-item.svelte.d.ts +11 -8
  143. package/dist/menu/overlay/menu-overlay.svelte +1 -1
  144. package/dist/menu/overlay/menu-overlay.svelte.d.ts +1 -1
  145. package/dist/menu/root/context.d.ts +6 -3
  146. package/dist/menu/root/menu-root.svelte +14 -8
  147. package/dist/menu/root/menu-root.svelte.d.ts +14 -8
  148. package/dist/menu/root/menu-state.svelte.d.ts +1 -1
  149. package/dist/menu/separator/menu-separator.svelte +1 -1
  150. package/dist/menu/separator/menu-separator.svelte.d.ts +1 -1
  151. package/dist/menu/submenu/menu-submenu-root.svelte +10 -7
  152. package/dist/menu/submenu/menu-submenu-root.svelte.d.ts +10 -7
  153. package/dist/numberfield/root/README.md +1 -1
  154. package/dist/numberfield/scrub-area-cursor/README.md +1 -1
  155. package/dist/popover/README.md +1 -1
  156. package/dist/popover/content/popover-content.svelte +19 -14
  157. package/dist/popover/content/popover-content.svelte.d.ts +19 -14
  158. package/dist/popover/overlay/popover-overlay.svelte +1 -1
  159. package/dist/popover/overlay/popover-overlay.svelte.d.ts +1 -1
  160. package/dist/popover/root/README.md +1 -1
  161. package/dist/popover/root/popover-root.svelte +13 -10
  162. package/dist/popover/root/popover-root.svelte.d.ts +13 -10
  163. package/dist/popover/trigger/README.md +1 -1
  164. package/dist/primitives/floating.d.ts +3 -3
  165. package/dist/primitives/scroll-lock.js +37 -8
  166. package/dist/switch/root/README.md +2 -2
  167. package/dist/switch/root/switch-root.svelte +23 -18
  168. package/dist/switch/root/switch-root.svelte.d.ts +23 -18
  169. package/dist/switch/thumb/switch-thumb.svelte +1 -1
  170. package/dist/switch/thumb/switch-thumb.svelte.d.ts +1 -1
  171. package/dist/table/README.md +15 -10
  172. package/dist/table/checkbox-indicator/README.md +1 -1
  173. package/dist/table/column-resizer/README.md +2 -2
  174. package/dist/table/root/README.md +1 -1
  175. package/dist/table/sort-trigger/README.md +1 -1
  176. package/dist/table/types.d.ts +21 -20
  177. package/dist/tabs/types.d.ts +6 -6
  178. package/dist/timepicker/README.md +3 -2
  179. package/dist/timepicker/input/README.md +1 -1
  180. package/dist/timepicker/input/time-picker-input.svelte +58 -5
  181. package/dist/timepicker/input/time-picker-input.svelte.d.ts +10 -1
  182. package/dist/timepicker/root/README.md +1 -1
  183. package/dist/timepicker/trigger/README.md +1 -1
  184. package/dist/toggle/README.md +1 -1
  185. package/dist/toggle-group/README.md +6 -0
  186. package/dist/toggle-group/root/context.svelte.d.ts +1 -1
  187. package/dist/toggle-group/root/context.svelte.js +20 -11
  188. package/dist/toggle-group/root/toggle-group-root.svelte +20 -15
  189. package/dist/toggle-group/root/toggle-group-teardown-order-child.svelte +13 -0
  190. package/dist/toggle-group/root/toggle-group-teardown-order-child.svelte.d.ts +7 -0
  191. package/dist/toggle-group/types.d.ts +9 -9
  192. package/dist/transfer-list/README.md +6 -17
  193. package/dist/transfer-list/item/transfer-list-item.svelte +4 -4
  194. package/dist/transfer-list/item/transfer-list-item.svelte.d.ts +4 -4
  195. package/dist/transfer-list/list/transfer-list-list.svelte +12 -12
  196. package/dist/transfer-list/list/transfer-list-list.svelte.d.ts +12 -12
  197. package/dist/transfer-list/move/transfer-list-move-button.svelte +4 -4
  198. package/dist/transfer-list/move/transfer-list-move-button.svelte.d.ts +4 -4
  199. package/dist/transfer-list/move/transfer-list-reorder-button.svelte +3 -3
  200. package/dist/transfer-list/move/transfer-list-reorder-button.svelte.d.ts +3 -3
  201. package/dist/transfer-list/root/transfer-list-root.svelte +23 -20
  202. package/dist/transfer-list/root/transfer-list-root.svelte.d.ts +23 -20
  203. package/dist/transfer-list/status/transfer-list-status.svelte +1 -1
  204. package/dist/transfer-list/status/transfer-list-status.svelte.d.ts +1 -1
  205. package/dist/tree/README.md +3 -3
  206. package/dist/tree/checkbox-indicator/README.md +1 -1
  207. package/dist/tree/root/README.md +1 -1
  208. package/dist/tree/types.d.ts +19 -10
  209. package/package.json +1 -1
@@ -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, {}, "">;
@@ -2,9 +2,7 @@
2
2
 
3
3
  ## Description
4
4
 
5
- `Dropzone` is a headless file-drop surface. It renders a focusable `<button>` plus a
6
- visually-hidden `<input type="file">`, so files can be selected by click/keyboard, by
7
- drag-and-drop, or by pasting from the clipboard, and emits the accepted native `File`s.
5
+ `Dropzone` is a headless file-drop surface. It makes a `<button>` element that takes the focus, and a hidden `<input type="file">` element. Thus the user selects the files with a click, with the keyboard, with a drag, or from the clipboard. The component then sends the native `File` objects that it accepts.
8
6
  It is encoding-agnostic — consumers own how files are stored or rendered.
9
7
 
10
8
  ## Anatomy
@@ -33,7 +31,7 @@ It is encoding-agnostic — consumers own how files are stored or rendered.
33
31
  tokens (`.ext`), so include the extensions you care about alongside MIME types.
34
32
  - Directory drops are excluded when the browser exposes `webkitGetAsEntry`; otherwise the
35
33
  drop falls back to `dataTransfer.files` as before.
36
- - `multiple` allows selecting/dropping more than one file; when false only the first is emitted.
34
+ - `multiple` lets the user give more than one file. With `false`, the component sends only the first file.
37
35
  - Style interaction state with `data-drop-target`, `data-focus-visible`, `data-hovered`, and
38
36
  `data-disabled`. The `children` snippet also receives `{ dragging, hovered, focused,
39
37
  focusVisible, disabled }`.
@@ -58,9 +56,9 @@ focusVisible, disabled }`.
58
56
  - The drop surface is a native `<button type="button">`, so it is reachable by Tab and
59
57
  activatable with Enter/Space, which opens the file picker. This is the keyboard path that
60
58
  drag-and-drop alone cannot provide.
61
- - `aria-label` (or `aria-labelledby`/`aria-describedby` via rest props) names the zone.
59
+ - `aria-label` gives the zone its name. The `aria-labelledby` and `aria-describedby` attributes also go through the other props.
62
60
  - `data-focus-visible` follows the shared modality contract and only appears for keyboard or
63
61
  virtual focus.
64
- - `announcement` is rendered into a visually-hidden `role="status" aria-live="polite"` region.
62
+ - The component puts `announcement` in a hidden `role="status" aria-live="polite"` region.
65
63
  - The hidden file input is removed from the tab order (`tabindex="-1"`, `aria-hidden`) so the
66
64
  button is the single focus stop.
@@ -10,17 +10,17 @@
10
10
 
11
11
  type InputProps = HTMLInputAttributes & {
12
12
  class?: ClassValue;
13
- /** Disables the input natively. */
13
+ /** Disables the input, with the native attribute. */
14
14
  disabled?: boolean | null;
15
- /** Native readonly, also exposed as `aria-readonly`. */
15
+ /** The native `readonly` attribute. The component also sets `aria-readonly`. */
16
16
  readonly?: boolean | null;
17
- /** Marks the value as invalid: maps to `aria-invalid` and `data-invalid`. */
17
+ /** Marks the value as not valid. The component sets `aria-invalid` and `data-invalid`. */
18
18
  invalid?: boolean;
19
- /** Native required, also exposed as `aria-required`. */
19
+ /** The native `required` attribute. The component also sets `aria-required`. */
20
20
  required?: boolean | null;
21
- /** Current value. Bindable. */
21
+ /** The value. You can bind it. */
22
22
  value?: HTMLInputAttributes['value'];
23
- /** Bindable reference to the rendered input element. */
23
+ /** A bindable reference to the input element. */
24
24
  element?: HTMLInputElement | null;
25
25
  };
26
26
 
@@ -2,17 +2,17 @@ import type { HTMLInputAttributes } from 'svelte/elements';
2
2
  import type { ClassValue } from '../utils/cn';
3
3
  type InputProps = HTMLInputAttributes & {
4
4
  class?: ClassValue;
5
- /** Disables the input natively. */
5
+ /** Disables the input, with the native attribute. */
6
6
  disabled?: boolean | null;
7
- /** Native readonly, also exposed as `aria-readonly`. */
7
+ /** The native `readonly` attribute. The component also sets `aria-readonly`. */
8
8
  readonly?: boolean | null;
9
- /** Marks the value as invalid: maps to `aria-invalid` and `data-invalid`. */
9
+ /** Marks the value as not valid. The component sets `aria-invalid` and `data-invalid`. */
10
10
  invalid?: boolean;
11
- /** Native required, also exposed as `aria-required`. */
11
+ /** The native `required` attribute. The component also sets `aria-required`. */
12
12
  required?: boolean | null;
13
- /** Current value. Bindable. */
13
+ /** The value. You can bind it. */
14
14
  value?: HTMLInputAttributes['value'];
15
- /** Bindable reference to the rendered input element. */
15
+ /** A bindable reference to the input element. */
16
16
  element?: HTMLInputElement | null;
17
17
  };
18
18
  declare const Input: import("svelte").Component<InputProps, {}, "value" | "element">;
@@ -19,23 +19,16 @@ In `selectionMode="multiple"`, Shift selects a range and Ctrl/Cmd adds a single
19
19
  - **Shift+click** selects everything between the anchor and the clicked option. The anchor is
20
20
  the last option selected without modifiers.
21
21
  - **Shift+Arrow**, **Shift+Home** and **Shift+End** extend the same range with the keyboard.
22
- - A range **replaces** the selection rather than adding to it, following the APG multi-select
23
- listbox pattern — that is what lets a range shrink again when you drag it back toward the
24
- anchor.
22
+ - A range replaces the selection, and does not add to it. This is the APG pattern for a listbox with more than one selection. It is also what lets a range become smaller when the user drags back toward the anchor.
25
23
  - **Ctrl/Cmd+click** toggles one option even under `selectionBehavior="replace"`, where a
26
24
  plain click would clear the rest.
27
25
  - Disabled options are never included.
28
26
 
29
- The range is measured over the options that exist in the DOM. In a **virtualized** list that is
30
- only the rendered window, so pass `getItemKey` alongside `virtualizer` and the range is measured
31
- over the whole collection instead — a range then spans rows that were never rendered, and the
32
- anchor survives being scrolled away.
27
+ The range is measured over the options that exist in the DOM. In a virtualized list, those are only the rows near the viewport. Give `getItemKey` with `virtualizer`, and the component measures the range over the full collection. A range then includes the rows that are not in the DOM, and the anchor stays correct when the user scrolls it away.
33
28
 
34
29
  ## Virtualized lists and assistive technology
35
30
 
36
- A virtualized list holds a handful of options, so the position and count a browser computes from
37
- the DOM describe the window rather than the collection — a screen reader would announce "1 of 8"
38
- for a list of two thousand. `ListBox` writes `aria-setsize` and `aria-posinset` onto the rendered
31
+ A virtualized list holds few options. Thus the position and the count that a browser calculates from the DOM describe that window, and not the collection. For a list of two thousand items, a screen reader would announce "1 of 8". `ListBox` writes `aria-setsize` and `aria-posinset` onto the rendered
39
32
  rows with the real numbers.
40
33
 
41
34
  ## Anatomy
@@ -22,37 +22,46 @@
22
22
  * Props for the ListBox.Item component.
23
23
  */
24
24
  type ListBoxItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'children'> & {
25
- /** Unique identifier for this item. Used for selection tracking. */
25
+ /** The unique identifier of this item. The component uses it for the selection. */
26
26
  id: string | number;
27
- /** Text value for typeahead search. If not provided, extracted from content. */
27
+ /** The text for the typeahead. If you give none, the component reads it from the content. */
28
28
  textValue?: string;
29
- /** Whether this item is disabled and non-selectable. */
29
+ /** Disables this item. The user cannot select it. */
30
30
  disabled?: boolean;
31
- /** CSS class to apply to the item element. */
31
+ /** The CSS class names of the item element. */
32
32
  class?: string;
33
- /** Content to render inside the item. */
33
+ /** The content of the item. */
34
34
  children?: Snippet;
35
35
 
36
36
  // Override props for composition (e.g., ComboBox.Item wrapping ListBox.Item)
37
- /** Override the generated ID. Useful for components with custom ID requirements. */
37
+ /** Replaces the id that the component makes. Use it when your component needs its own id. */
38
38
  customId?: string;
39
- /** Disable real DOM focus handling. When true, no tabindex is set and focus events are skipped. */
39
+ /**
40
+ * Stops the DOM focus control. With `true`, the component sets no tabindex and it ignores the
41
+ * focus events.
42
+ */
40
43
  disableFocusHandling?: boolean;
41
- /** Override the focused state. When provided, this value is used instead of internal focus tracking. */
44
+ /** Replaces the focused state. With this prop, the component uses your value and not its own. */
42
45
  isFocusedOverride?: boolean;
43
- /** Override the focus-visible presentation state. */
46
+ /** Replaces the focus-visible state. */
44
47
  isFocusVisibleOverride?: boolean;
45
- /** Override the select behavior. When provided, called instead of default listbox selection. */
48
+ /**
49
+ * Replaces the selection behavior. With this prop, the component calls it and does not do its
50
+ * own selection.
51
+ */
46
52
  onItemSelect?: (id: string | number, label: string) => void;
47
- /** Callback with resolved text value when mounted (from prop or rendered content). */
53
+ /**
54
+ * The component calls it with the text value when the item goes into the DOM. That text comes
55
+ * from the prop or from the content.
56
+ */
48
57
  onResolvedTextValue?: (label: string) => void;
49
- /** Callback when pointer hover should move logical focus to this item. */
58
+ /** The component calls it when the pointer must move the logical focus to this item. */
50
59
  onItemHoverStart?: (id: string | number, label: string) => void;
51
- /** Whether to scroll this item into view when focused. Useful for virtual focus patterns. */
60
+ /** Scrolls this item into the viewport when it gets the focus. Use it with a virtual focus. */
52
61
  scrollOnFocus?: boolean;
53
- /** Additional disabled state from parent. */
62
+ /** A second disabled state, from the parent. */
54
63
  isParentDisabled?: boolean;
55
- /** Override the visual pressed state. When provided, this value is used instead of internal press tracking. */
64
+ /** Replaces the pressed state. With this prop, the component uses your value and not its own. */
56
65
  pressed?: boolean;
57
66
  };
58
67
 
@@ -4,35 +4,44 @@ import type { HTMLAttributes } from 'svelte/elements';
4
4
  * Props for the ListBox.Item component.
5
5
  */
6
6
  type ListBoxItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'children'> & {
7
- /** Unique identifier for this item. Used for selection tracking. */
7
+ /** The unique identifier of this item. The component uses it for the selection. */
8
8
  id: string | number;
9
- /** Text value for typeahead search. If not provided, extracted from content. */
9
+ /** The text for the typeahead. If you give none, the component reads it from the content. */
10
10
  textValue?: string;
11
- /** Whether this item is disabled and non-selectable. */
11
+ /** Disables this item. The user cannot select it. */
12
12
  disabled?: boolean;
13
- /** CSS class to apply to the item element. */
13
+ /** The CSS class names of the item element. */
14
14
  class?: string;
15
- /** Content to render inside the item. */
15
+ /** The content of the item. */
16
16
  children?: Snippet;
17
- /** Override the generated ID. Useful for components with custom ID requirements. */
17
+ /** Replaces the id that the component makes. Use it when your component needs its own id. */
18
18
  customId?: string;
19
- /** Disable real DOM focus handling. When true, no tabindex is set and focus events are skipped. */
19
+ /**
20
+ * Stops the DOM focus control. With `true`, the component sets no tabindex and it ignores the
21
+ * focus events.
22
+ */
20
23
  disableFocusHandling?: boolean;
21
- /** Override the focused state. When provided, this value is used instead of internal focus tracking. */
24
+ /** Replaces the focused state. With this prop, the component uses your value and not its own. */
22
25
  isFocusedOverride?: boolean;
23
- /** Override the focus-visible presentation state. */
26
+ /** Replaces the focus-visible state. */
24
27
  isFocusVisibleOverride?: boolean;
25
- /** Override the select behavior. When provided, called instead of default listbox selection. */
28
+ /**
29
+ * Replaces the selection behavior. With this prop, the component calls it and does not do its
30
+ * own selection.
31
+ */
26
32
  onItemSelect?: (id: string | number, label: string) => void;
27
- /** Callback with resolved text value when mounted (from prop or rendered content). */
33
+ /**
34
+ * The component calls it with the text value when the item goes into the DOM. That text comes
35
+ * from the prop or from the content.
36
+ */
28
37
  onResolvedTextValue?: (label: string) => void;
29
- /** Callback when pointer hover should move logical focus to this item. */
38
+ /** The component calls it when the pointer must move the logical focus to this item. */
30
39
  onItemHoverStart?: (id: string | number, label: string) => void;
31
- /** Whether to scroll this item into view when focused. Useful for virtual focus patterns. */
40
+ /** Scrolls this item into the viewport when it gets the focus. Use it with a virtual focus. */
32
41
  scrollOnFocus?: boolean;
33
- /** Additional disabled state from parent. */
42
+ /** A second disabled state, from the parent. */
34
43
  isParentDisabled?: boolean;
35
- /** Override the visual pressed state. When provided, this value is used instead of internal press tracking. */
44
+ /** Replaces the pressed state. With this prop, the component uses your value and not its own. */
36
45
  pressed?: boolean;
37
46
  };
38
47
  declare const ListboxItem: import("svelte").Component<ListBoxItemProps, {}, "">;
@@ -17,7 +17,7 @@ Description: Main listbox state container that manages registration, selection,
17
17
  | `value` | `Iterable<string \| number>` | `undefined` | Controlled selection values. |
18
18
  | `defaultValue` | `Iterable<string \| number>` | `undefined` | Initial uncontrolled selection values. |
19
19
  | `children` | `Snippet \| Snippet<[T]>` | `undefined` | Static or dynamic option rendering. |
20
- | `class` | `string` | `''` | CSS class names for the root element. |
20
+ | `class` | `string` | `''` | The CSS class names of the root element. |
21
21
  | `id` | `string` | `undefined` | DOM id for the listbox element. |
22
22
  | `aria-label` | `string` | `undefined` | Accessible label for the listbox. |
23
23
  | `onChange` | `(value: Set<string \| number>) => void` | `undefined` | Called when selection changes. |
@@ -125,7 +125,7 @@ export type CreateListBoxContextOptions = {
125
125
  loop?: boolean;
126
126
  /** Whether typing characters moves focus to a matching item. Default false. */
127
127
  typeahead?: boolean;
128
- /** Initial selection for uncontrolled mode. */
128
+ /** The selection at the start, for when the component controls the state. */
129
129
  initialSelection?: Set<string | number>;
130
130
  /** Callback fired when selection changes. */
131
131
  onSelectionChange?: (selection: Set<string | number>) => void;