@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
@@ -3,15 +3,15 @@ import type { HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
3
3
  import type { CollapsibleContext } from './root/context.js';
4
4
  export type { CollapsibleContext } from './root/context.js';
5
5
  export type CollapsibleRootProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class'> & {
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 common
14
- * 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 `open`,
12
+ * and it reports only through `onOpenChange`. Thus the parent can refuse a change: the parent
13
+ * does not send the new value down. The default is off, because `bind:open` is the usual case and
14
+ * it needs the write-back.
15
15
  */
16
16
  controlledOpen?: boolean;
17
17
  onOpenChange?: (open: boolean) => void;
@@ -28,7 +28,10 @@ export type CollapsibleTriggerProps = Omit<HTMLButtonAttributes, 'children' | 'c
28
28
  element?: HTMLButtonElement | null;
29
29
  };
30
30
  export type CollapsiblePanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'hidden'> & {
31
- /** Keep the closed panel mounted (hidden) instead of unmounting it after the exit animation. */
31
+ /**
32
+ * Keep the closed panel in the DOM, and hidden. Without it, the panel leaves the DOM after the
33
+ * exit animation.
34
+ */
32
35
  forceMount?: boolean;
33
36
  children?: Snippet;
34
37
  class?: string;
@@ -10,10 +10,10 @@
10
10
  - Use controlled props (`value`, `inputValue`, `open`) only when external state management is needed.
11
11
  - Use `pending` on `ComboBox.Root` to expose async loading state on the root while keeping the rest of the composition under your control.
12
12
  - Prefer `ComboBox.Trigger` in new code. `ComboBox.Button` remains available as a compatibility alias.
13
- - Use `ComboBox.Clear` when you want a built-in clear affordance that resets both the input and selected value.
13
+ - Use `ComboBox.Clear` when you want a control that removes the input text and the selected value together.
14
14
  - Provide a stable `id` in SSR environments to keep ARIA ids deterministic.
15
15
  - Render `ComboBox.Tags`, `ComboBox.Tag`, and `ComboBox.TagRemove` in multiple mode to expose selected values.
16
- - Render `ComboBox.Status` to announce the number of visible results to screen readers as the filter changes. It is a visually-hidden `aria-live="polite"` region; the default message is localized (via `LocaleProvider`) and can be replaced with the `formatMessage` prop. It only announces while the popover is open.
16
+ - Use `ComboBox.Status` to announce the number of the results to a screen reader when the filter changes. It is a hidden `aria-live="polite"` region. `LocaleProvider` localizes the default message, and the `formatMessage` prop replaces it. The region announces only while the popover is open.
17
17
  - Choose `trigger="focus"`, `trigger="input"`, or `trigger="press"` based on your opening behavior requirements.
18
18
 
19
19
  ## Anatomy
@@ -7,12 +7,12 @@
7
7
  Name: `ComboBox.Button`
8
8
  Description: Compatibility alias for `ComboBox.Trigger`.
9
9
 
10
- | Prop | Type | Default | Description |
11
- | -------------- | ---------------------- | ----------- | --------------------------------------------------------------- |
12
- | `class` | `string` | `undefined` | CSS class names for the trigger element. |
13
- | `children` | `Snippet` | `undefined` | Custom trigger content. If omitted, a chevron icon is rendered. |
14
- | `tabindex` | `number` | `-1` | Tab index applied to the trigger button. |
15
- | `...restProps` | `HTMLButtonAttributes` | `-` | Additional native button attributes. |
10
+ | Prop | Type | Default | Description |
11
+ | -------------- | ---------------------- | ----------- | --------------------------------------------------------------------------------------- |
12
+ | `class` | `string` | `undefined` | The CSS class names of the trigger element. |
13
+ | `children` | `Snippet` | `undefined` | Your own content for the trigger. If you give none, the component makes a chevron icon. |
14
+ | `tabindex` | `number` | `-1` | Tab index applied to the trigger button. |
15
+ | `...restProps` | `HTMLButtonAttributes` | `-` | Additional native button attributes. |
16
16
 
17
17
  ## Notes
18
18
 
@@ -12,5 +12,5 @@ Description: Text input with `role="combobox"` that syncs typed value, active de
12
12
  | `aria-label` | `string` | `undefined` | Accessible label applied directly to the input. |
13
13
  | `aria-labelledby` | `string` | `undefined` | Element id that labels the input. |
14
14
  | `aria-describedby` | `string` | `undefined` | Element id that describes the input behavior. |
15
- | `class` | `string` | `undefined` | CSS class names for the input element. |
15
+ | `class` | `string` | `undefined` | The CSS class names of the input element. |
16
16
  | `...restProps` | `HTMLInputAttributes` | `-` | Additional native input attributes. |
@@ -8,11 +8,11 @@
8
8
  } from '../../primitives/input-modality';
9
9
 
10
10
  type ComboBoxInputProps = HTMLInputAttributes & {
11
- /** Accessible label for the input */
11
+ /** The accessible name of the input. */
12
12
  'aria-label'?: string;
13
- /** ID of element that labels this input */
13
+ /** The id of the element that gives this input its name. */
14
14
  'aria-labelledby'?: string;
15
- /** ID of element that describes this input (e.g., usage instructions) */
15
+ /** The id of the element that describes this input, for example the instructions. */
16
16
  'aria-describedby'?: string;
17
17
  class?: string;
18
18
  };
@@ -1,10 +1,10 @@
1
1
  import type { HTMLInputAttributes } from 'svelte/elements';
2
2
  type ComboBoxInputProps = HTMLInputAttributes & {
3
- /** Accessible label for the input */
3
+ /** The accessible name of the input. */
4
4
  'aria-label'?: string;
5
- /** ID of element that labels this input */
5
+ /** The id of the element that gives this input its name. */
6
6
  'aria-labelledby'?: string;
7
- /** ID of element that describes this input (e.g., usage instructions) */
7
+ /** The id of the element that describes this input, for example the instructions. */
8
8
  'aria-describedby'?: string;
9
9
  class?: string;
10
10
  };
@@ -31,9 +31,11 @@
31
31
  | 'scrollOnFocus'
32
32
  | 'isParentDisabled'
33
33
  > & {
34
- /** Called when this item is activated as an action instead of selected. */
34
+ /**
35
+ * The component calls it when the user activates this item as an action, and does not select it.
36
+ */
35
37
  onAction?: ComboBoxItemActionHandler;
36
- /** Whether to close the popover after running onAction. */
38
+ /** Closes the popover after the `onAction` function runs. */
37
39
  closeOnAction?: boolean;
38
40
  };
39
41
 
@@ -14,9 +14,11 @@ import { type ComboBoxItemActionHandler } from '../root/context';
14
14
  * - Automatic filtering based on inputValue
15
15
  */
16
16
  type ComboBoxListBoxItemProps = Omit<ComponentProps<typeof ListBoxItem>, 'customId' | 'disableFocusHandling' | 'isFocusedOverride' | 'onItemSelect' | 'onResolvedTextValue' | 'scrollOnFocus' | 'isParentDisabled'> & {
17
- /** Called when this item is activated as an action instead of selected. */
17
+ /**
18
+ * The component calls it when the user activates this item as an action, and does not select it.
19
+ */
18
20
  onAction?: ComboBoxItemActionHandler;
19
- /** Whether to close the popover after running onAction. */
21
+ /** Closes the popover after the `onAction` function runs. */
20
22
  closeOnAction?: boolean;
21
23
  };
22
24
  declare const ComboboxListboxitem: import("svelte").Component<ComboBoxListBoxItemProps, {}, "">;
@@ -11,5 +11,5 @@ Description: Visual selection indicator rendered inside `ComboBox.Item`.
11
11
  | -------------- | --------------------------------- | ------------ | ---------------------------------------------------- |
12
12
  | `children` | `Snippet` | `check icon` | Custom indicator content. |
13
13
  | `forceMount` | `boolean` | `false` | Forces rendering even when the item is not selected. |
14
- | `class` | `string` | `undefined` | CSS class names for the indicator wrapper. |
14
+ | `class` | `string` | `undefined` | The CSS class names of the indicator container. |
15
15
  | `...restProps` | `HTMLAttributes<HTMLSpanElement>` | `-` | Additional attributes passed to the wrapper span. |
@@ -14,9 +14,9 @@
14
14
  * Only renders when the parent item is selected.
15
15
  */
16
16
  type ComboBoxItemIndicatorProps = {
17
- /** Content to render when selected (defaults to checkmark icon) */
17
+ /** The content while the item is selected. The default is a check mark icon. */
18
18
  children?: Snippet;
19
- /** Force show the indicator regardless of selection state */
19
+ /** Keeps the indicator in the DOM, for each selection state. */
20
20
  forceMount?: boolean;
21
21
  class?: string;
22
22
  } & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
@@ -6,9 +6,9 @@ import type { HTMLAttributes } from 'svelte/elements';
6
6
  * Only renders when the parent item is selected.
7
7
  */
8
8
  type ComboBoxItemIndicatorProps = {
9
- /** Content to render when selected (defaults to checkmark icon) */
9
+ /** The content while the item is selected. The default is a check mark icon. */
10
10
  children?: Snippet;
11
- /** Force show the indicator regardless of selection state */
11
+ /** Keeps the indicator in the DOM, for each selection state. */
12
12
  forceMount?: boolean;
13
13
  class?: string;
14
14
  } & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
@@ -23,20 +23,23 @@
23
23
  | 'items'
24
24
  | 'id'
25
25
  > & {
26
- /** Optional items for dynamic rendering - overrides items from ComboBox context */
26
+ /**
27
+ * The items, for a list that the component makes from an array. They replace the items of the
28
+ * ComboBox context.
29
+ */
27
30
  items?: Iterable<T>;
28
- /** Content of the listbox. Receives item in dynamic mode. */
31
+ /** The content of the listbox. From an array of items, it receives one item. */
29
32
  children?: Snippet<[T]> | Snippet;
30
33
  /**
31
- * Renders only the options near the viewport. See `ListBox`'s own `virtualizer` for
32
- * the constraints (uniform row height, the list is the scroller).
34
+ * Makes only the options near the viewport. The `virtualizer` prop of `ListBox` gives the two
35
+ * conditions: all of the rows have the same height, and the list is the element that scrolls.
33
36
  *
34
- * With no `items` of its own it virtualizes the ComboBox's, already filtered: the
35
- * per-item filtering an unvirtualized list relies on cannot work when most items were
36
- * never rendered.
37
+ * Without its own `items`, it uses the filtered items of the ComboBox. A list without a
38
+ * virtualizer filters one item at a time, and that cannot work when most of the items are not in
39
+ * the DOM.
37
40
  */
38
41
  virtualizer?: { rowHeight?: number; overscan?: number };
39
- /** Rows rendered above the options, inside the listbox (e.g. a "Create …" action). */
42
+ /** The rows in the listbox above the options, for example a "Create …" action. */
40
43
  header?: Snippet;
41
44
  };
42
45
 
@@ -29,23 +29,26 @@ declare function $$render<T extends object = object>(): {
29
29
  context?: ListBoxContext;
30
30
  element?: HTMLElement;
31
31
  }, "children" | "id" | "value" | "element" | "defaultValue" | "onChange" | "selectionMode" | "context" | "selectionBehavior" | "items"> & {
32
- /** Optional items for dynamic rendering - overrides items from ComboBox context */
32
+ /**
33
+ * The items, for a list that the component makes from an array. They replace the items of the
34
+ * ComboBox context.
35
+ */
33
36
  items?: Iterable<T>;
34
- /** Content of the listbox. Receives item in dynamic mode. */
37
+ /** The content of the listbox. From an array of items, it receives one item. */
35
38
  children?: Snippet<[T]> | Snippet;
36
39
  /**
37
- * Renders only the options near the viewport. See `ListBox`'s own `virtualizer` for
38
- * the constraints (uniform row height, the list is the scroller).
40
+ * Makes only the options near the viewport. The `virtualizer` prop of `ListBox` gives the two
41
+ * conditions: all of the rows have the same height, and the list is the element that scrolls.
39
42
  *
40
- * With no `items` of its own it virtualizes the ComboBox's, already filtered: the
41
- * per-item filtering an unvirtualized list relies on cannot work when most items were
42
- * never rendered.
43
+ * Without its own `items`, it uses the filtered items of the ComboBox. A list without a
44
+ * virtualizer filters one item at a time, and that cannot work when most of the items are not in
45
+ * the DOM.
43
46
  */
44
47
  virtualizer?: {
45
48
  rowHeight?: number;
46
49
  overscan?: number;
47
50
  };
48
- /** Rows rendered above the options, inside the listbox (e.g. a "Create …" action). */
51
+ /** The rows in the listbox above the options, for example a "Create …" action. */
49
52
  header?: Snippet;
50
53
  };
51
54
  exports: {};
@@ -23,5 +23,5 @@ Description: Floating container for combobox options. Internally composes `Popov
23
23
 
24
24
  ## Notes
25
25
 
26
- - `ComboBox.Popover` forwards all `Popover.Content` configuration props except the controlled open-state wiring (`open`, `triggerRef`, and `onOpenChange`).
26
+ - `ComboBox.Popover` accepts each `Popover.Content` prop. It does not accept the props of the controlled open state: `open`, `triggerRef`, and `onOpenChange`.
27
27
  - The default placement is `bottom-start` to match the combobox input.
@@ -7,30 +7,30 @@
7
7
  Name: `ComboBox.Root`
8
8
  Description: State container for combobox behavior, including open state, input value, selection logic, filtering, and keyboard interaction.
9
9
 
10
- | Prop | Type | Default | Description |
11
- | ------------------- | ------------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------- |
12
- | `id` | `string` | `$props.id()` | Stable id used to derive internal ARIA ids. |
13
- | `disabled` | `boolean` | `false` | Disables all user interaction. |
14
- | `pending` | `boolean` | `false` | Exposes busy async state on the root via `data-pending`. |
15
- | `readonly` | `boolean` | `false` | Keeps the component interactive but prevents value changes. |
16
- | `value` | `string \| number \| null \| (string \| number)[]` | `null` in single mode | Controlled selection value. Supports `bind:value`. |
17
- | `defaultValue` | `string \| number \| null \| (string \| number)[]` | `undefined` | Initial selection value in uncontrolled mode. |
18
- | `inputValue` | `string` | `undefined` | Controlled input value. Supports `bind:inputValue`. |
19
- | `defaultInputValue` | `string` | `''` | Initial input value in uncontrolled mode. |
20
- | `selectionBehavior` | `'toggle' \| 'replace'` | `'toggle'` | Selection behavior when selecting an option. |
21
- | `selectionMode` | `'single' \| 'multiple'` | `'single'` | Single-select or multi-select mode. |
22
- | `closeOnSelect` | `boolean` | `single: true / multiple: false` | Controls whether the popover closes after selection. |
23
- | `open` | `boolean` | `undefined` | Controlled open state. Supports `bind:open`. |
24
- | `trigger` | `'focus' \| 'input' \| 'press'` | `'press'` | Opening strategy for the popover. |
25
- | `filterActionItems` | `boolean` | `true` | Whether `onAction` items participate in local filtering. |
26
- | `onInputChange` | `(value: string) => void` | `undefined` | Called when the input value changes. |
27
- | `onOpenChange` | `(open: boolean) => void` | `undefined` | Called when open state changes. |
28
- | `onChange` | `(value: string \| number \| null \| (string \| number)[]) => void` | `undefined` | Called when selection changes. |
29
- | `items` | `T[]` | `undefined` | Optional item collection for dynamic rendering. |
30
- | `children` | `Snippet` | `undefined` | Composed combobox parts. |
31
- | `class` | `string` | `''` | CSS class names for the root group element. |
32
- | `aria-label` | `string` | `undefined` | Accessible label for the combobox group. |
33
- | `aria-labelledby` | `string` | `undefined` | Id of an external labeling element. |
10
+ | Prop | Type | Default | Description |
11
+ | ------------------- | ------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------------- |
12
+ | `id` | `string` | `$props.id()` | Stable id used to derive internal ARIA ids. |
13
+ | `disabled` | `boolean` | `false` | Stops all of the user interaction. |
14
+ | `pending` | `boolean` | `false` | Exposes busy async state on the root via `data-pending`. |
15
+ | `readonly` | `boolean` | `false` | Keeps the component interactive but prevents value changes. |
16
+ | `value` | `string \| number \| null \| (string \| number)[]` | `null` in single mode | Controlled selection value. Supports `bind:value`. |
17
+ | `defaultValue` | `string \| number \| null \| (string \| number)[]` | `undefined` | Initial selection value in uncontrolled mode. |
18
+ | `inputValue` | `string` | `undefined` | Controlled input value. Supports `bind:inputValue`. |
19
+ | `defaultInputValue` | `string` | `''` | Initial input value in uncontrolled mode. |
20
+ | `selectionBehavior` | `'toggle' \| 'replace'` | `'toggle'` | Selection behavior when selecting an option. |
21
+ | `selectionMode` | `'single' \| 'multiple'` | `'single'` | The selection mode: one selection, or more than one selection. |
22
+ | `closeOnSelect` | `boolean` | `single: true / multiple: false` | Controls whether the popover closes after selection. |
23
+ | `open` | `boolean` | `undefined` | The open state. Supports `bind:open`. |
24
+ | `trigger` | `'focus' \| 'input' \| 'press'` | `'press'` | Opening strategy for the popover. |
25
+ | `filterActionItems` | `boolean` | `true` | Whether `onAction` items participate in local filtering. |
26
+ | `onInputChange` | `(value: string) => void` | `undefined` | The component calls it when the text in the input changes. |
27
+ | `onOpenChange` | `(open: boolean) => void` | `undefined` | Called when open state changes. |
28
+ | `onChange` | `(value: string \| number \| null \| (string \| number)[]) => void` | `undefined` | Called when selection changes. |
29
+ | `items` | `T[]` | `undefined` | Optional item collection for dynamic rendering. |
30
+ | `children` | `Snippet` | `undefined` | The combobox parts that you assemble. |
31
+ | `class` | `string` | `''` | The CSS class names of the root group element. |
32
+ | `aria-label` | `string` | `undefined` | The accessible name of the combobox group.. |
33
+ | `aria-labelledby` | `string` | `undefined` | Id of an external labeling element. |
34
34
 
35
35
  ### Context utilities
36
36
 
@@ -18,50 +18,59 @@
18
18
  } from '../../primitives/input-modality';
19
19
 
20
20
  type ComboBoxProps<T> = {
21
- /** Stable ID used to generate internal ARIA IDs (recommended for SSR). */
21
+ /** A stable id, from which the component makes its internal ARIA ids. Give one on a server. */
22
22
  id?: string;
23
23
  disabled?: boolean;
24
24
  pending?: boolean;
25
25
  readonly?: boolean;
26
- /** Selected value(s). Single value for single mode, array for multiple mode. Can be bound with bind:value */
26
+ /**
27
+ * The selected value or values: one value in the single mode, and an array in the multiple mode.
28
+ * You can bind it with `bind:value`.
29
+ */
27
30
  value?: string | number | null | (string | number)[];
28
31
  defaultValue?: string | number | null | (string | number)[];
29
32
  /**
30
- * Opt into fully controlled selection: the component stops writing back to `value`
31
- * and only reports through `onChange`, so the parent can reject a change by not
32
- * flowing the new value back down. Off by default, because `bind:value` — the
33
- * common case — needs the write-back to work at all.
33
+ * Give your own code full control of the selection. The component stops to write back to
34
+ * `value`, and it reports only through `onChange`. Thus the parent can refuse a change: the
35
+ * parent does not send the new value down. The default is off, because `bind:value` is the usual
36
+ * case and it needs the write-back.
34
37
  */
35
38
  controlledValue?: boolean;
36
- /** Current input value. Can be bound with bind:inputValue */
39
+ /** The text in the input. You can bind it with `bind:inputValue`. */
37
40
  inputValue?: string;
38
41
  defaultInputValue?: string;
39
- /** Opt into fully controlled input text. See `controlledValue`. */
42
+ /** Give your own code full control of the input text. Read `controlledValue`. */
40
43
  controlledInputValue?: boolean;
41
44
  selectionBehavior?: 'toggle' | 'replace';
42
45
  selectionMode?: 'single' | 'multiple';
43
- /** Whether to close popover after selection. Default: true for single, false for multiple */
46
+ /**
47
+ * Closes the popover after a selection. The default is true in the single mode, and false in the
48
+ * multiple mode.
49
+ */
44
50
  closeOnSelect?: boolean;
45
- /** Whether the popover is open. Can be bound with bind:open */
51
+ /** The open state of the popover. You can bind it with `bind:open`. */
46
52
  open?: boolean;
47
- /** Opt into fully controlled open state. See `controlledValue`. */
53
+ /** Give your own code full control of the open state. Read `controlledValue`. */
48
54
  controlledOpen?: boolean;
49
- /** How the popover opens: 'focus' | 'input' | 'press'. Default: 'press' */
55
+ /** What opens the popover: 'focus', 'input', or 'press'. The default is 'press'. */
50
56
  trigger?: 'focus' | 'input' | 'press';
51
- /** Function used to filter items locally. Set to null to disable local filtering. */
57
+ /** The function that filters the items locally. Set it to null to stop the local filter. */
52
58
  filter?: ComboBoxFilter | null;
53
- /** Whether items with onAction should participate in local filtering. */
59
+ /** Puts the items that have an `onAction` function into the local filter. */
54
60
  filterActionItems?: boolean;
55
61
  onInputChange?: (value: string) => void;
56
62
  onOpenChange?: (open: boolean) => void;
57
63
  onChange?: (value: string | number | null | (string | number)[]) => void;
58
- /** Optional: Array of items. Used internally to resolve selected labels before options mount. */
64
+ /**
65
+ * The array of the items. The component uses it to find the names of the selected values before
66
+ * the options go into the DOM.
67
+ */
59
68
  items?: T[];
60
69
  children?: Snippet;
61
70
  class?: string;
62
- /** Accessible label for the combobox group */
71
+ /** The accessible name of the combobox group. */
63
72
  'aria-label'?: string;
64
- /** ID of element that labels this combobox group */
73
+ /** The id of the element that gives this combobox group its name. */
65
74
  'aria-labelledby'?: string;
66
75
  };
67
76
 
@@ -1,50 +1,59 @@
1
1
  import { type Snippet } from 'svelte';
2
2
  import { type ComboBoxFilter } from './context';
3
3
  type ComboBoxProps<T> = {
4
- /** Stable ID used to generate internal ARIA IDs (recommended for SSR). */
4
+ /** A stable id, from which the component makes its internal ARIA ids. Give one on a server. */
5
5
  id?: string;
6
6
  disabled?: boolean;
7
7
  pending?: boolean;
8
8
  readonly?: boolean;
9
- /** Selected value(s). Single value for single mode, array for multiple mode. Can be bound with bind:value */
9
+ /**
10
+ * The selected value or values: one value in the single mode, and an array in the multiple mode.
11
+ * You can bind it with `bind:value`.
12
+ */
10
13
  value?: string | number | null | (string | number)[];
11
14
  defaultValue?: string | number | null | (string | number)[];
12
15
  /**
13
- * Opt into fully controlled selection: the component stops writing back to `value`
14
- * and only reports through `onChange`, so the parent can reject a change by not
15
- * flowing the new value back down. Off by default, because `bind:value` — the
16
- * common case — needs the write-back to work at all.
16
+ * Give your own code full control of the selection. The component stops to write back to
17
+ * `value`, and it reports only through `onChange`. Thus the parent can refuse a change: the
18
+ * parent does not send the new value down. The default is off, because `bind:value` is the usual
19
+ * case and it needs the write-back.
17
20
  */
18
21
  controlledValue?: boolean;
19
- /** Current input value. Can be bound with bind:inputValue */
22
+ /** The text in the input. You can bind it with `bind:inputValue`. */
20
23
  inputValue?: string;
21
24
  defaultInputValue?: string;
22
- /** Opt into fully controlled input text. See `controlledValue`. */
25
+ /** Give your own code full control of the input text. Read `controlledValue`. */
23
26
  controlledInputValue?: boolean;
24
27
  selectionBehavior?: 'toggle' | 'replace';
25
28
  selectionMode?: 'single' | 'multiple';
26
- /** Whether to close popover after selection. Default: true for single, false for multiple */
29
+ /**
30
+ * Closes the popover after a selection. The default is true in the single mode, and false in the
31
+ * multiple mode.
32
+ */
27
33
  closeOnSelect?: boolean;
28
- /** Whether the popover is open. Can be bound with bind:open */
34
+ /** The open state of the popover. You can bind it with `bind:open`. */
29
35
  open?: boolean;
30
- /** Opt into fully controlled open state. See `controlledValue`. */
36
+ /** Give your own code full control of the open state. Read `controlledValue`. */
31
37
  controlledOpen?: boolean;
32
- /** How the popover opens: 'focus' | 'input' | 'press'. Default: 'press' */
38
+ /** What opens the popover: 'focus', 'input', or 'press'. The default is 'press'. */
33
39
  trigger?: 'focus' | 'input' | 'press';
34
- /** Function used to filter items locally. Set to null to disable local filtering. */
40
+ /** The function that filters the items locally. Set it to null to stop the local filter. */
35
41
  filter?: ComboBoxFilter | null;
36
- /** Whether items with onAction should participate in local filtering. */
42
+ /** Puts the items that have an `onAction` function into the local filter. */
37
43
  filterActionItems?: boolean;
38
44
  onInputChange?: (value: string) => void;
39
45
  onOpenChange?: (open: boolean) => void;
40
46
  onChange?: (value: string | number | null | (string | number)[]) => void;
41
- /** Optional: Array of items. Used internally to resolve selected labels before options mount. */
47
+ /**
48
+ * The array of the items. The component uses it to find the names of the selected values before
49
+ * the options go into the DOM.
50
+ */
42
51
  items?: T[];
43
52
  children?: Snippet;
44
53
  class?: string;
45
- /** Accessible label for the combobox group */
54
+ /** The accessible name of the combobox group. */
46
55
  'aria-label'?: string;
47
- /** ID of element that labels this combobox group */
56
+ /** The id of the element that gives this combobox group its name. */
48
57
  'aria-labelledby'?: string;
49
58
  };
50
59
  declare function $$render<T extends object = object>(): {
@@ -13,7 +13,7 @@ Description: Visually-hidden `aria-live="polite"` region that announces the numb
13
13
 
14
14
  ## Notes
15
15
 
16
- - The count includes disabled-but-visible items, matching what is rendered on screen.
16
+ - The count includes a disabled item that the user sees. Thus it agrees with the list on the screen.
17
17
  - The default message is localized through `LocaleProvider` (`combobox.noResults`, `combobox.oneResult`, `combobox.multipleResults`).
18
18
  - The region only announces while the popover is open; when closed it renders an empty message, so closing never announces "no results".
19
19
  - Mirrors `Autocomplete.Status`.
@@ -13,7 +13,7 @@
13
13
  * closed combobox would otherwise incorrectly announce "no results".
14
14
  */
15
15
  type ComboBoxStatusProps = {
16
- /** Build the announced message from the visible item count. */
16
+ /** Makes the announced message from the number of the items that the user sees. */
17
17
  formatMessage?: (count: number) => string;
18
18
  };
19
19
 
@@ -7,7 +7,7 @@
7
7
  * closed combobox would otherwise incorrectly announce "no results".
8
8
  */
9
9
  type ComboBoxStatusProps = {
10
- /** Build the announced message from the visible item count. */
10
+ /** Makes the announced message from the number of the items that the user sees. */
11
11
  formatMessage?: (count: number) => string;
12
12
  };
13
13
  declare const ComboboxStatus: import("svelte").Component<ComboBoxStatusProps, {}, "">;
@@ -5,7 +5,7 @@
5
5
  ### ComboBox.Tag
6
6
 
7
7
  Name: `ComboBox.Tag`
8
- Description: Visual token representing one selected value in multiple selection mode.
8
+ Description: One tag, for one selected value, in the multiple selection mode.
9
9
 
10
10
  | Prop | Type | Default | Description |
11
11
  | -------------- | --------------------------------- | ----------- | ------------------------------------ |
@@ -21,7 +21,7 @@
21
21
  * Supports keyboard navigation: ArrowLeft/Right to navigate, Delete/Backspace to remove, ArrowDown to focus input.
22
22
  */
23
23
  type ComboBoxTagProps = {
24
- /** Content of the tag - use ComboBox.TagRemove for remove button */
24
+ /** The content of the tag. For the remove button, use ComboBox.TagRemove. */
25
25
  children: Snippet;
26
26
  class?: string;
27
27
  } & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
@@ -13,7 +13,7 @@ import type { HTMLAttributes } from 'svelte/elements';
13
13
  * Supports keyboard navigation: ArrowLeft/Right to navigate, Delete/Backspace to remove, ArrowDown to focus input.
14
14
  */
15
15
  type ComboBoxTagProps = {
16
- /** Content of the tag - use ComboBox.TagRemove for remove button */
16
+ /** The content of the tag. For the remove button, use ComboBox.TagRemove. */
17
17
  children: Snippet;
18
18
  class?: string;
19
19
  } & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
@@ -10,5 +10,5 @@ Description: Remove action button for a selected tag.
10
10
  | Prop | Type | Default | Description |
11
11
  | -------------- | ---------------------- | ----------- | --------------------------------------------------------------- |
12
12
  | `children` | `Snippet` | `X icon` | Custom button content. |
13
- | `class` | `string` | `undefined` | CSS class names for the remove button. |
13
+ | `class` | `string` | `undefined` | The CSS class names of the remove button. |
14
14
  | `...restProps` | `HTMLButtonAttributes` | `-` | Additional button attributes, excluding reserved trigger props. |
@@ -10,14 +10,13 @@
10
10
  * Must be used inside ComboBox.Tag.
11
11
  */
12
12
  type ComboBoxTagRemoveProps = {
13
- /** Content of the button (defaults to X icon) */
13
+ /** The content of the button. The default is an X icon. */
14
14
  children?: Snippet;
15
15
  class?: string;
16
16
  /**
17
- * Accessible name of the button. Defaults to `Remove <tag label>`; override it to
18
- * translate the verb, or to name the tag by something other than its combobox
19
- * label (which falls back to the raw value when the selection was set
20
- * programmatically and the option never rendered).
17
+ * The accessible name of the button. The default is `Remove <tag label>`. Replace it to
18
+ * translate the verb, or to name the tag with a different text. The default label is the raw
19
+ * value when your code sets the selection and the option never goes into the DOM.
21
20
  */
22
21
  'aria-label'?: string;
23
22
  } & Omit<HTMLButtonAttributes, 'class' | 'children' | 'type' | 'onclick' | 'aria-label'>;
@@ -5,14 +5,13 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
5
5
  * Must be used inside ComboBox.Tag.
6
6
  */
7
7
  type ComboBoxTagRemoveProps = {
8
- /** Content of the button (defaults to X icon) */
8
+ /** The content of the button. The default is an X icon. */
9
9
  children?: Snippet;
10
10
  class?: string;
11
11
  /**
12
- * Accessible name of the button. Defaults to `Remove <tag label>`; override it to
13
- * translate the verb, or to name the tag by something other than its combobox
14
- * label (which falls back to the raw value when the selection was set
15
- * programmatically and the option never rendered).
12
+ * The accessible name of the button. The default is `Remove <tag label>`. Replace it to
13
+ * translate the verb, or to name the tag with a different text. The default label is the raw
14
+ * value when your code sets the selection and the option never goes into the DOM.
16
15
  */
17
16
  'aria-label'?: string;
18
17
  } & Omit<HTMLButtonAttributes, 'class' | 'children' | 'type' | 'onclick' | 'aria-label'>;