frontile 0.18.0-alpha.14 → 0.18.0-alpha.16

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 (126) hide show
  1. package/declarations/-private/control-blur.d.ts +63 -0
  2. package/declarations/-private/dialog.d.ts +15 -0
  3. package/declarations/components/buttons/chip.d.ts +35 -4
  4. package/declarations/components/collections/listbox/item.d.ts +12 -0
  5. package/declarations/components/collections/listbox/listbox.d.ts +10 -7
  6. package/declarations/components/collections/table/table.d.ts +3 -0
  7. package/declarations/components/forms/autocomplete.d.ts +50 -5
  8. package/declarations/components/forms/form-control.d.ts +5 -0
  9. package/declarations/components/forms/form-feedback.d.ts +22 -1
  10. package/declarations/components/forms/form.d.ts +1 -1
  11. package/declarations/components/forms/input.d.ts +11 -1
  12. package/declarations/components/forms/native-select.d.ts +22 -6
  13. package/declarations/components/forms/select/end-content.d.ts +31 -0
  14. package/declarations/components/forms/select/native-mirror.d.ts +44 -0
  15. package/declarations/components/forms/select/select.d.ts +454 -0
  16. package/declarations/components/forms/select/selected-items.d.ts +80 -0
  17. package/declarations/components/forms/select/trigger.d.ts +81 -0
  18. package/declarations/components/forms/select/types.d.ts +427 -0
  19. package/declarations/components/forms/select.d.ts +2 -498
  20. package/declarations/components/forms/textarea.d.ts +6 -0
  21. package/declarations/components/notifications/notifications-container.d.ts +1 -0
  22. package/declarations/components/overlays/drawer/header.d.ts +14 -0
  23. package/declarations/components/overlays/drawer.d.ts +20 -1
  24. package/declarations/components/overlays/modal/header.d.ts +14 -0
  25. package/declarations/components/overlays/modal.d.ts +20 -1
  26. package/declarations/components/overlays/overlay.d.ts +1 -0
  27. package/declarations/components/overlays/popover.d.ts +55 -2
  28. package/declarations/components/status/progress-bar.d.ts +27 -2
  29. package/declarations/components/utilities/collapsible.d.ts +11 -1
  30. package/declarations/components/utilities/divider.d.ts +14 -0
  31. package/declarations/components/utilities/spinner.d.ts +8 -0
  32. package/declarations/utils/listManager.d.ts +70 -6
  33. package/declarations/utils/standard-validator.d.ts +28 -3
  34. package/dist/components/buttons/chip.js +1 -1
  35. package/dist/components/buttons/chip.js.map +1 -1
  36. package/dist/components/collections/listbox/item.js +8 -5
  37. package/dist/components/collections/listbox/item.js.map +1 -1
  38. package/dist/components/collections/listbox/listbox.js +2 -2
  39. package/dist/components/collections/listbox/listbox.js.map +1 -1
  40. package/dist/components/collections/table/table.js +51 -6
  41. package/dist/components/collections/table/table.js.map +1 -1
  42. package/dist/components/forms/autocomplete.js +33 -12
  43. package/dist/components/forms/autocomplete.js.map +1 -1
  44. package/dist/components/forms/checkbox-group.js +1 -1
  45. package/dist/components/forms/checkbox-group.js.map +1 -1
  46. package/dist/components/forms/field.js +1 -1
  47. package/dist/components/forms/form-control.js +12 -3
  48. package/dist/components/forms/form-control.js.map +1 -1
  49. package/dist/components/forms/form-feedback.js +25 -8
  50. package/dist/components/forms/form-feedback.js.map +1 -1
  51. package/dist/components/forms/form.js +7 -4
  52. package/dist/components/forms/form.js.map +1 -1
  53. package/dist/components/forms/index.js +2 -2
  54. package/dist/components/forms/native-select.js +2 -2
  55. package/dist/components/forms/native-select.js.map +1 -1
  56. package/dist/components/forms/radio-group.js +1 -1
  57. package/dist/components/forms/radio-group.js.map +1 -1
  58. package/dist/components/forms/select/end-content.js +24 -0
  59. package/dist/components/forms/select/end-content.js.map +1 -0
  60. package/dist/components/forms/select/native-mirror.js +29 -0
  61. package/dist/components/forms/select/native-mirror.js.map +1 -0
  62. package/dist/components/forms/select/select.js +629 -0
  63. package/dist/components/forms/select/select.js.map +1 -0
  64. package/dist/components/forms/select/selected-items.js +63 -0
  65. package/dist/components/forms/select/selected-items.js.map +1 -0
  66. package/dist/components/forms/select/trigger.js +30 -0
  67. package/dist/components/forms/select/trigger.js.map +1 -0
  68. package/dist/components/forms/select/types.js +2 -0
  69. package/dist/components/forms/select/types.js.map +1 -0
  70. package/dist/components/forms/select.js +1 -391
  71. package/dist/components/forms/select.js.map +1 -1
  72. package/dist/components/notifications/index.js +1 -1
  73. package/dist/components/notifications/notification-card.js +15 -4
  74. package/dist/components/notifications/notification-card.js.map +1 -1
  75. package/dist/components/notifications/notifications-container.js +18 -7
  76. package/dist/components/notifications/notifications-container.js.map +1 -1
  77. package/dist/components/overlays/drawer/header.js +8 -1
  78. package/dist/components/overlays/drawer/header.js.map +1 -1
  79. package/dist/components/overlays/drawer.js +69 -1
  80. package/dist/components/overlays/drawer.js.map +1 -1
  81. package/dist/components/overlays/index.js +1 -1
  82. package/dist/components/overlays/modal/header.js +8 -1
  83. package/dist/components/overlays/modal/header.js.map +1 -1
  84. package/dist/components/overlays/modal.js +69 -1
  85. package/dist/components/overlays/modal.js.map +1 -1
  86. package/dist/components/overlays/overlay.js +37 -4
  87. package/dist/components/overlays/overlay.js.map +1 -1
  88. package/dist/components/overlays/popover.js +118 -16
  89. package/dist/components/overlays/popover.js.map +1 -1
  90. package/dist/components/overlays/portal.js +110 -8
  91. package/dist/components/overlays/portal.js.map +1 -1
  92. package/dist/components/status/progress-bar.js +47 -6
  93. package/dist/components/status/progress-bar.js.map +1 -1
  94. package/dist/components/utilities/avatar.js +1 -1
  95. package/dist/components/utilities/avatar.js.map +1 -1
  96. package/dist/components/utilities/collapsible.js +70 -9
  97. package/dist/components/utilities/collapsible.js.map +1 -1
  98. package/dist/components/utilities/divider.js +8 -2
  99. package/dist/components/utilities/divider.js.map +1 -1
  100. package/dist/components/utilities/spinner.js +1 -1
  101. package/dist/components/utilities/spinner.js.map +1 -1
  102. package/dist/control-blur-C8OnSQR5.js +124 -0
  103. package/dist/control-blur-C8OnSQR5.js.map +1 -0
  104. package/dist/dialog-CreV7aPQ.js +27 -0
  105. package/dist/dialog-CreV7aPQ.js.map +1 -0
  106. package/dist/dom-Dpb18UgD.js +116 -0
  107. package/dist/dom-Dpb18UgD.js.map +1 -0
  108. package/dist/forms.js +2 -2
  109. package/dist/index.js +4 -4
  110. package/dist/{manager-x3PBWzjm.js → manager-BA-8yKMJ.js} +14 -3
  111. package/dist/manager-BA-8yKMJ.js.map +1 -0
  112. package/dist/modifiers/press.js +51 -16
  113. package/dist/modifiers/press.js.map +1 -1
  114. package/dist/notifications.js +1 -1
  115. package/dist/overlays.js +1 -1
  116. package/dist/services/notifications.js +1 -1
  117. package/dist/utils/listManager.js +328 -58
  118. package/dist/utils/listManager.js.map +1 -1
  119. package/dist/utils/nested-data.js +60 -1
  120. package/dist/utils/nested-data.js.map +1 -1
  121. package/dist/utils/standard-validator.js +36 -6
  122. package/dist/utils/standard-validator.js.map +1 -1
  123. package/package.json +4 -4
  124. package/dist/manager-x3PBWzjm.js.map +0 -1
  125. package/dist/portal-D2m_lkn7.js +0 -168
  126. package/dist/portal-D2m_lkn7.js.map +0 -1
@@ -0,0 +1,63 @@
1
+ interface ControlBlurTrackerOptions {
2
+ /**
3
+ * The element the popover's `trigger` modifier is installed on. Its
4
+ * `aria-controls` is how the portaled content is found, so this must be the
5
+ * element that opens the dropdown, not merely something inside the control.
6
+ */
7
+ trigger: () => HTMLElement | null | undefined;
8
+ /** The control's outermost element: trigger, chips, clear button and all. */
9
+ container: () => HTMLElement | null | undefined;
10
+ /** Whether the control's dropdown is currently open. */
11
+ isOpen: () => boolean;
12
+ /** Whether the owning component has been (or is being) destroyed. */
13
+ isDestroyed: () => boolean;
14
+ /** Called once each time focus genuinely leaves the control. */
15
+ onBlur: () => void;
16
+ }
17
+ /**
18
+ * Decides when a composite control -- a trigger plus a dropdown -- has really
19
+ * lost focus, and reports it once.
20
+ *
21
+ * A trigger's own blur is not the answer. Clicking an option moves focus onto
22
+ * that option, which is *inside* the control as far as the user is concerned
23
+ * but is not a DOM descendant of the trigger: the popover content is portaled
24
+ * to the end of the document. And in multiple selection mode the dropdown
25
+ * stays open across several such clicks, so a trigger-blur-means-blur rule
26
+ * fires mid-interaction -- which is what made blur validation paint "pick at
27
+ * least three" under a field the user was still filling in.
28
+ *
29
+ * So the control is treated as two regions, the container and the popover
30
+ * content, and focus leaving one for the other is not a blur:
31
+ *
32
+ * - **`focusout` naming its destination** (`relatedTarget`) is answered
33
+ * immediately, with no timer at all. This covers every deliberate exit --
34
+ * Tab, or a click on another focusable thing -- and every move *into* the
35
+ * dropdown, including the option click that starts a selection.
36
+ * - **A targetless `focusout`** is deferred by {@link FOCUS_SETTLE_MS} and then
37
+ * judged on `document.activeElement`. Focus nowhere (`body`) while the
38
+ * dropdown is open is still part of the interaction -- a click on the
39
+ * dropdown's padding -- so it is not a blur; once the dropdown has closed,
40
+ * the same state means the user clicked away.
41
+ *
42
+ * The portaled content is located through the trigger's `aria-controls`, which
43
+ * the popover's trigger modifier sets to the content's id. That needs no extra
44
+ * plumbing through the popover and stays correct wherever the content is
45
+ * rendered.
46
+ *
47
+ * Callers must call {@link cancel} from `willDestroy`: a pending timer would
48
+ * otherwise resolve against a torn-down component and both write tracked state
49
+ * and call a callback the consumer has stopped expecting.
50
+ */
51
+ declare class ControlBlurTracker {
52
+ #private;
53
+ private readonly options;
54
+ constructor(options: ControlBlurTrackerOptions);
55
+ /**
56
+ * Wire this to `focusout` on the trigger -- not `blur`, whose
57
+ * `relatedTarget` browsers are not obliged to populate.
58
+ */
59
+ handleFocusOut: (event: FocusEvent) => void;
60
+ /** Cancels a pending decision. Call from the owner's `willDestroy`. */
61
+ cancel: () => void;
62
+ }
63
+ export { ControlBlurTracker, type ControlBlurTrackerOptions };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Warns when a dialog ends up with no accessible name at all — no registered
3
+ * `Header`, and no `aria-label`/`aria-labelledby` of the consumer's own.
4
+ * Assistive technology announces such a dialog as just "dialog", and nothing
5
+ * else surfaces the mistake at runtime.
6
+ *
7
+ * Consumer-supplied names arrive through `...attributes`, which the component
8
+ * cannot see in its args, so this inspects the rendered element for them. A
9
+ * heading merely carrying `headerId` deliberately does *not* count: nothing
10
+ * points `aria-labelledby` at it, so the dialog really is unnamed, and that is
11
+ * the case most worth surfacing.
12
+ *
13
+ * `warn` is stripped from production builds, so this costs consumers nothing.
14
+ */
15
+ export declare function warnIfDialogHasNoAccessibleName(element: Element, hasRegisteredHeader: boolean, component: 'modal' | 'drawer'): void;
@@ -8,19 +8,29 @@ interface ChipSignature {
8
8
  */
9
9
  appearance?: 'default' | 'outlined' | 'faded';
10
10
  /**
11
- * The intent of the chip
11
+ * The intent of the chip, which drives its color
12
+ *
13
+ * @defaultValue 'default'
12
14
  */
13
15
  intent?: 'default' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger';
14
16
  /**
15
17
  * The size of the chip
18
+ *
19
+ * @defaultValue 'md'
16
20
  */
17
21
  size?: 'sm' | 'md' | 'lg';
18
22
  /**
19
- * The radius the chip
23
+ * The border radius of the chip
24
+ *
25
+ * @defaultValue 'full'
20
26
  */
21
27
  radius?: 'none' | 'sm' | 'lg' | 'full';
22
28
  /**
23
- * Option to add dot to the chip
29
+ * Adds a dot before the content, colored by `@intent`. On the `default`
30
+ * appearance the dot takes the chip's text color, since the chip's
31
+ * background is already the intent color.
32
+ *
33
+ * @defaultValue false
24
34
  */
25
35
  withDot?: boolean;
26
36
  /**
@@ -29,7 +39,28 @@ interface ChipSignature {
29
39
  */
30
40
  onClose?: () => void;
31
41
  /**
32
- * Disables the clip and disables the close button if any.
42
+ * The accessible name of the close button. Every close button would
43
+ * otherwise be announced as just "Close", which does not say *what* is
44
+ * being removed — worth setting when several chips sit together.
45
+ *
46
+ * @defaultValue 'Close'
47
+ */
48
+ closeButtonTitle?: string;
49
+ /**
50
+ * `tabindex` for the close button.
51
+ *
52
+ * Set to `-1` when chips sit inside another control (a multi-select field,
53
+ * say) and the close button should stay a pointer affordance: every chip
54
+ * would otherwise cost a Tab stop before the control itself is reached.
55
+ * Whoever does this owes keyboard users another way to remove a chip.
56
+ *
57
+ * @defaultValue undefined (the close button is a normal tab stop)
58
+ */
59
+ closeButtonTabIndex?: number | string;
60
+ /**
61
+ * Dims the chip and disables its close button, if any.
62
+ *
63
+ * @defaultValue false
33
64
  */
34
65
  isDisabled?: boolean;
35
66
  /**
@@ -5,6 +5,12 @@ export interface ListboxItemSignature {
5
5
  manager: ListManager;
6
6
  key: string;
7
7
  textValue?: string;
8
+ /**
9
+ * The entry of `@items` this option renders, remembered on the registered
10
+ * list item so a selection can hand it back. Bound for you on the Item
11
+ * yielded from the `:item` block; block-form options have no such entry.
12
+ */
13
+ item?: unknown;
8
14
  description?: string;
9
15
  shortcut?: string;
10
16
  onClick?: () => void;
@@ -38,6 +44,12 @@ declare class ListboxItem extends Component<ListboxItemSignature> {
38
44
  get key(): string;
39
45
  onRegister(item: ListItem): void;
40
46
  onClick(): void;
47
+ /**
48
+ * A roving tabindex: the manager nominates one option as the composite's tab
49
+ * stop and every other option stays out of the tab order, as the ARIA
50
+ * listbox pattern requires. Giving a `0` to each active *or selected* option
51
+ * turned a multi-select with eight selections into eight tab stops.
52
+ */
41
53
  get tabindex(): 0 | -1;
42
54
  get classNames(): {
43
55
  base: string;
@@ -3,6 +3,7 @@ import { ListManager, type SelectionMode, type ListItem } from '../../../utils/l
3
3
  import { ListboxItem, type ListboxItemSignature } from './item';
4
4
  import type { WithBoundArgs } from '@glint/template';
5
5
  type ItemCompBounded = WithBoundArgs<typeof ListboxItem, 'manager'>;
6
+ type ItemCompBoundedWithItem = WithBoundArgs<typeof ListboxItem, 'manager' | 'item'>;
6
7
  interface ListboxSignature<T> {
7
8
  Args: {
8
9
  /**
@@ -23,7 +24,7 @@ interface ListboxSignature<T> {
23
24
  */
24
25
  elementToAddKeyboardEvents?: HTMLElement;
25
26
  /**
26
- * @edefaultValue 'frist'
27
+ * @defaultValue 'first'
27
28
  */
28
29
  autoActivateMode?: 'none' | 'first' | 'selected';
29
30
  onAction?: (key: string) => void;
@@ -42,12 +43,14 @@ interface ListboxSignature<T> {
42
43
  };
43
44
  Element: HTMLUListElement;
44
45
  Blocks: {
45
- item: [{
46
- item: T;
47
- key: string;
48
- label: string;
49
- Item: ItemCompBounded;
50
- }];
46
+ item: [
47
+ {
48
+ item: T;
49
+ key: string;
50
+ label: string;
51
+ Item: ItemCompBoundedWithItem;
52
+ }
53
+ ];
51
54
  default: [{
52
55
  Item: ItemCompBounded;
53
56
  }];
@@ -147,8 +147,11 @@ declare class Table<T = unknown, TColumns extends ColumnConfig<T>[] = ColumnConf
147
147
  get hasSelection(): boolean;
148
148
  get selectedKeysSet(): Set<string>;
149
149
  get disabledKeysSet(): Set<string>;
150
+ activeRowKey?: string;
150
151
  getRowData: (row: Row<T>) => T;
151
152
  getKey: (itemOrRow: T | Row<T>) => string;
153
+ get rovingRowKey(): string | undefined;
154
+ rowTabIndex: (row: Row<T>) => string;
152
155
  isKeyDisabled: (key: string) => boolean;
153
156
  handleSelect: (key: string) => void;
154
157
  handleDeselect: (key: string) => void;
@@ -3,6 +3,7 @@ import type Owner from '@ember/owner';
3
3
  import { type ListItem } from './native-select';
4
4
  import { type ListboxSignature } from '../collections/listbox';
5
5
  import { type AutocompleteSlots, type AutocompleteVariants, type SlotsToClasses } from '@frontile/theme';
6
+ import { ControlBlurTracker } from '../../-private/control-blur';
6
7
  import { type PopoverSignature, type ContentSignature } from '../overlays/popover';
7
8
  import { type FormControlSharedArgs } from './form-control';
8
9
  interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement' | 'flipOptions' | 'middleware' | 'shiftOptions' | 'offsetOptions' | 'strategy' | 'didClose'>, Pick<ListboxSignature<T>['Args'], 'appearance' | 'intent' | 'disabledKeys' | 'allowEmpty' | 'items' | 'onAction'>, Pick<ContentSignature['Args'], 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition' | 'transition'>, FormControlSharedArgs {
@@ -141,7 +142,14 @@ interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement'
141
142
  /**
142
143
  * Whether to include a clear button in the autocomplete component.
143
144
  * If enabled, this allows users to clear the selection and input text.
144
- * This option ignores the `allowEmpty` setting.
145
+ *
146
+ * This option deliberately overrides `allowEmpty`: that argument governs
147
+ * deselecting an *option* in the listbox, while this is a separate affordance
148
+ * you opt into for exactly the purpose of emptying the field. Since
149
+ * `allowEmpty` defaults to false, honouring it here would render the button
150
+ * dead by default.
151
+ *
152
+ * No clear button is rendered on a disabled Autocomplete.
145
153
  *
146
154
  * @defaultValue false
147
155
  */
@@ -175,7 +183,16 @@ interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement'
175
183
  */
176
184
  searchMessage?: string;
177
185
  /**
178
- * Callback fired when the autocomplete component loses focus.
186
+ * Callback fired when focus leaves the Autocomplete.
187
+ *
188
+ * "Leaves the Autocomplete" means the whole control: the input *and* its
189
+ * dropdown, which is rendered outside the input in the DOM. Moving focus
190
+ * between them -- which is what clicking an option does -- is not a blur, so
191
+ * this does not fire while the user is picking an option. It fires once, when
192
+ * focus lands somewhere outside the control (or nowhere, with the dropdown
193
+ * closed).
194
+ *
195
+ * This is what `Field` drives blur validation from.
179
196
  */
180
197
  onBlur?: () => void;
181
198
  }
@@ -247,7 +264,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
247
264
  selectedLabel?: string;
248
265
  containerRef: {
249
266
  current: HTMLDivElement | undefined;
250
- "__#8@#onChange"?: ((el: HTMLDivElement | undefined) => void) | undefined;
267
+ "__#9@#onChange"?: ((el: HTMLDivElement | undefined) => void) | undefined;
251
268
  setup: import("ember-modifier").FunctionBasedModifier<{
252
269
  Args: {
253
270
  Positional: unknown[];
@@ -258,7 +275,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
258
275
  };
259
276
  triggerRef: {
260
277
  current: HTMLInputElement | undefined;
261
- "__#8@#onChange"?: ((el: HTMLInputElement | undefined) => void) | undefined;
278
+ "__#9@#onChange"?: ((el: HTMLInputElement | undefined) => void) | undefined;
262
279
  setup: import("ember-modifier").FunctionBasedModifier<{
263
280
  Args: {
264
281
  Positional: unknown[];
@@ -285,7 +302,12 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
285
302
  get blockScroll(): boolean;
286
303
  get disableFocusTrap(): boolean;
287
304
  onAction: (key: string) => void;
288
- handleBlur: () => void;
305
+ /**
306
+ * Reports focus leaving the *whole* control -- the input and its portaled
307
+ * dropdown -- rather than the input, which blurs on the way into the
308
+ * dropdown whenever an option is clicked. See `ControlBlurTracker`.
309
+ */
310
+ blurTracker: ControlBlurTracker;
289
311
  clearSelectedKeys: () => void;
290
312
  onItemsChange: (nodes: ListItem[], _: "add" | "remove") => void;
291
313
  didClose: () => void;
@@ -301,6 +323,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
301
323
  endContentPointerEvents?: "none" | "auto" | undefined;
302
324
  hasStartContent?: boolean | undefined;
303
325
  hasEndContent?: boolean | undefined;
326
+ hasChips?: boolean | undefined;
304
327
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
305
328
  innerContainer: (slotProps?: ({
306
329
  size?: "sm" | "md" | "lg" | undefined;
@@ -308,6 +331,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
308
331
  endContentPointerEvents?: "none" | "auto" | undefined;
309
332
  hasStartContent?: boolean | undefined;
310
333
  hasEndContent?: boolean | undefined;
334
+ hasChips?: boolean | undefined;
311
335
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
312
336
  startContent: (slotProps?: ({
313
337
  size?: "sm" | "md" | "lg" | undefined;
@@ -315,6 +339,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
315
339
  endContentPointerEvents?: "none" | "auto" | undefined;
316
340
  hasStartContent?: boolean | undefined;
317
341
  hasEndContent?: boolean | undefined;
342
+ hasChips?: boolean | undefined;
318
343
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
319
344
  endContent: (slotProps?: ({
320
345
  size?: "sm" | "md" | "lg" | undefined;
@@ -322,6 +347,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
322
347
  endContentPointerEvents?: "none" | "auto" | undefined;
323
348
  hasStartContent?: boolean | undefined;
324
349
  hasEndContent?: boolean | undefined;
350
+ hasChips?: boolean | undefined;
325
351
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
326
352
  input: (slotProps?: ({
327
353
  size?: "sm" | "md" | "lg" | undefined;
@@ -329,6 +355,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
329
355
  endContentPointerEvents?: "none" | "auto" | undefined;
330
356
  hasStartContent?: boolean | undefined;
331
357
  hasEndContent?: boolean | undefined;
358
+ hasChips?: boolean | undefined;
332
359
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
333
360
  } & {
334
361
  base: (slotProps?: ({
@@ -337,6 +364,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
337
364
  endContentPointerEvents?: "none" | "auto" | undefined;
338
365
  hasStartContent?: boolean | undefined;
339
366
  hasEndContent?: boolean | undefined;
367
+ hasChips?: boolean | undefined;
340
368
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
341
369
  listbox: (slotProps?: ({
342
370
  size?: "sm" | "md" | "lg" | undefined;
@@ -344,6 +372,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
344
372
  endContentPointerEvents?: "none" | "auto" | undefined;
345
373
  hasStartContent?: boolean | undefined;
346
374
  hasEndContent?: boolean | undefined;
375
+ hasChips?: boolean | undefined;
347
376
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
348
377
  icon: (slotProps?: ({
349
378
  size?: "sm" | "md" | "lg" | undefined;
@@ -351,6 +380,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
351
380
  endContentPointerEvents?: "none" | "auto" | undefined;
352
381
  hasStartContent?: boolean | undefined;
353
382
  hasEndContent?: boolean | undefined;
383
+ hasChips?: boolean | undefined;
354
384
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
355
385
  clearButton: (slotProps?: ({
356
386
  size?: "sm" | "md" | "lg" | undefined;
@@ -358,6 +388,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
358
388
  endContentPointerEvents?: "none" | "auto" | undefined;
359
389
  hasStartContent?: boolean | undefined;
360
390
  hasEndContent?: boolean | undefined;
391
+ hasChips?: boolean | undefined;
361
392
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
362
393
  input: (slotProps?: ({
363
394
  size?: "sm" | "md" | "lg" | undefined;
@@ -365,6 +396,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
365
396
  endContentPointerEvents?: "none" | "auto" | undefined;
366
397
  hasStartContent?: boolean | undefined;
367
398
  hasEndContent?: boolean | undefined;
399
+ hasChips?: boolean | undefined;
368
400
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
369
401
  emptyContent: (slotProps?: ({
370
402
  size?: "sm" | "md" | "lg" | undefined;
@@ -372,8 +404,21 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
372
404
  endContentPointerEvents?: "none" | "auto" | undefined;
373
405
  hasStartContent?: boolean | undefined;
374
406
  hasEndContent?: boolean | undefined;
407
+ hasChips?: boolean | undefined;
375
408
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
376
409
  } & {};
410
+ /**
411
+ * Whether the clear button takes the chevron's place: something to clear,
412
+ * and a control that can act on it.
413
+ *
414
+ * `@allowEmpty` is deliberately not consulted -- it governs deselecting an
415
+ * *option* in the listbox, while `@isClearable` is a separate affordance the
416
+ * consumer opts into for exactly this purpose (and `@allowEmpty` defaults to
417
+ * false, so honouring it here would leave the button dead by default). A
418
+ * disabled Autocomplete shows no clear button at all: it carries no disabled
419
+ * state of its own, so it would be a focusable button that clears a field
420
+ * the user is not allowed to change.
421
+ */
377
422
  get isClearable(): boolean | undefined;
378
423
  get isLoading(): boolean;
379
424
  get filteredItems(): T[] | undefined;
@@ -90,6 +90,11 @@ declare class FormControl extends Component<FormControlSignature> {
90
90
  get feedbackId(): string;
91
91
  describedBy: (hasDescription?: string | boolean, hasFeedback?: string | boolean) => string | undefined;
92
92
  get isInvalid(): boolean;
93
+ /**
94
+ * The error messages as a single string, used by the persistent live region.
95
+ * Uses `FormFeedback`'s own join, so both render the same separator.
96
+ */
97
+ get errorMessageText(): string;
93
98
  get showErrorFeedback(): boolean;
94
99
  }
95
100
  export { FormControl, type FormControlSignature, type FormControlSharedArgs };
@@ -24,6 +24,15 @@ interface FormFeedbackSignature {
24
24
  * @defaultValue 'md'
25
25
  */
26
26
  size?: FormFeedbackVariants['size'];
27
+ /**
28
+ * Whether the element is itself an `aria-live` region. Set this to `false`
29
+ * when something else (such as `FormControl`, which keeps a persistent
30
+ * live region in the DOM) already announces the messages, so they are not
31
+ * announced twice.
32
+ *
33
+ * @defaultValue true
34
+ */
35
+ announce?: boolean;
27
36
  /**
28
37
  * Class names for the feedback element, merged with the theme's.
29
38
  */
@@ -34,10 +43,22 @@ interface FormFeedbackSignature {
34
43
  default: [];
35
44
  };
36
45
  }
46
+ /**
47
+ * Renders feedback messages as a single string. An array is joined with `; `.
48
+ *
49
+ * Shared with `FormControl`, whose persistent live region announces the same
50
+ * text, so both render an identical separator.
51
+ *
52
+ * @param messages A list of messages or a single message string.
53
+ * @returns The messages as one string, or an empty string when there are none.
54
+ */
55
+ declare function feedbackMessageText(messages: string[] | string | undefined): string;
37
56
  declare class FormFeedback extends Component<FormFeedbackSignature> {
38
57
  get isError(): boolean;
39
58
  get classes(): string;
59
+ get announce(): boolean;
60
+ get ariaLive(): string | undefined;
40
61
  get messageText(): string;
41
62
  }
42
- export { FormFeedback, type FormFeedbackSignature };
63
+ export { FormFeedback, feedbackMessageText, type FormFeedbackSignature };
43
64
  export default FormFeedback;
@@ -159,7 +159,7 @@ declare class Form<T = FormDataCompiled> extends Component<FormSignature<T>> {
159
159
  /** Reference to the form element. */
160
160
  element: {
161
161
  current: HTMLFormElement | undefined;
162
- "__#8@#onChange"?: ((el: HTMLFormElement | undefined) => void) | undefined;
162
+ "__#9@#onChange"?: ((el: HTMLFormElement | undefined) => void) | undefined;
163
163
  setup: import("ember-modifier").FunctionBasedModifier<{
164
164
  Args: {
165
165
  Positional: unknown[];
@@ -78,7 +78,7 @@ declare class Input extends Component<InputSignature> {
78
78
  elementValue: string;
79
79
  inputRef: {
80
80
  current: HTMLInputElement | undefined;
81
- "__#8@#onChange"?: ((el: HTMLInputElement | undefined) => void) | undefined;
81
+ "__#9@#onChange"?: ((el: HTMLInputElement | undefined) => void) | undefined;
82
82
  setup: import("ember-modifier").FunctionBasedModifier<{
83
83
  Args: {
84
84
  Positional: unknown[];
@@ -107,6 +107,7 @@ declare class Input extends Component<InputSignature> {
107
107
  endContentPointerEvents?: "none" | "auto" | undefined;
108
108
  hasStartContent?: boolean | undefined;
109
109
  hasEndContent?: boolean | undefined;
110
+ hasChips?: boolean | undefined;
110
111
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
111
112
  innerContainer: (slotProps?: ({
112
113
  size?: "sm" | "md" | "lg" | undefined;
@@ -114,6 +115,7 @@ declare class Input extends Component<InputSignature> {
114
115
  endContentPointerEvents?: "none" | "auto" | undefined;
115
116
  hasStartContent?: boolean | undefined;
116
117
  hasEndContent?: boolean | undefined;
118
+ hasChips?: boolean | undefined;
117
119
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
118
120
  startContent: (slotProps?: ({
119
121
  size?: "sm" | "md" | "lg" | undefined;
@@ -121,6 +123,7 @@ declare class Input extends Component<InputSignature> {
121
123
  endContentPointerEvents?: "none" | "auto" | undefined;
122
124
  hasStartContent?: boolean | undefined;
123
125
  hasEndContent?: boolean | undefined;
126
+ hasChips?: boolean | undefined;
124
127
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
125
128
  endContent: (slotProps?: ({
126
129
  size?: "sm" | "md" | "lg" | undefined;
@@ -128,6 +131,7 @@ declare class Input extends Component<InputSignature> {
128
131
  endContentPointerEvents?: "none" | "auto" | undefined;
129
132
  hasStartContent?: boolean | undefined;
130
133
  hasEndContent?: boolean | undefined;
134
+ hasChips?: boolean | undefined;
131
135
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
132
136
  input: (slotProps?: ({
133
137
  size?: "sm" | "md" | "lg" | undefined;
@@ -135,6 +139,7 @@ declare class Input extends Component<InputSignature> {
135
139
  endContentPointerEvents?: "none" | "auto" | undefined;
136
140
  hasStartContent?: boolean | undefined;
137
141
  hasEndContent?: boolean | undefined;
142
+ hasChips?: boolean | undefined;
138
143
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
139
144
  } & {
140
145
  base: (slotProps?: ({
@@ -143,6 +148,7 @@ declare class Input extends Component<InputSignature> {
143
148
  endContentPointerEvents?: "none" | "auto" | undefined;
144
149
  hasStartContent?: boolean | undefined;
145
150
  hasEndContent?: boolean | undefined;
151
+ hasChips?: boolean | undefined;
146
152
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
147
153
  innerContainer: (slotProps?: ({
148
154
  size?: "sm" | "md" | "lg" | undefined;
@@ -150,6 +156,7 @@ declare class Input extends Component<InputSignature> {
150
156
  endContentPointerEvents?: "none" | "auto" | undefined;
151
157
  hasStartContent?: boolean | undefined;
152
158
  hasEndContent?: boolean | undefined;
159
+ hasChips?: boolean | undefined;
153
160
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
154
161
  startContent: (slotProps?: ({
155
162
  size?: "sm" | "md" | "lg" | undefined;
@@ -157,6 +164,7 @@ declare class Input extends Component<InputSignature> {
157
164
  endContentPointerEvents?: "none" | "auto" | undefined;
158
165
  hasStartContent?: boolean | undefined;
159
166
  hasEndContent?: boolean | undefined;
167
+ hasChips?: boolean | undefined;
160
168
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
161
169
  endContent: (slotProps?: ({
162
170
  size?: "sm" | "md" | "lg" | undefined;
@@ -164,6 +172,7 @@ declare class Input extends Component<InputSignature> {
164
172
  endContentPointerEvents?: "none" | "auto" | undefined;
165
173
  hasStartContent?: boolean | undefined;
166
174
  hasEndContent?: boolean | undefined;
175
+ hasChips?: boolean | undefined;
167
176
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
168
177
  input: (slotProps?: ({
169
178
  size?: "sm" | "md" | "lg" | undefined;
@@ -171,6 +180,7 @@ declare class Input extends Component<InputSignature> {
171
180
  endContentPointerEvents?: "none" | "auto" | undefined;
172
181
  hasStartContent?: boolean | undefined;
173
182
  hasEndContent?: boolean | undefined;
183
+ hasChips?: boolean | undefined;
174
184
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
175
185
  } & {};
176
186
  }
@@ -5,6 +5,7 @@ import { type FormControlSharedArgs } from './form-control';
5
5
  import { ListManager, type ListItem } from '../../utils/listManager';
6
6
  import type { WithBoundArgs } from '@glint/template';
7
7
  type ItemCompBounded = WithBoundArgs<typeof NativeSelectItem, 'manager'>;
8
+ type ItemCompBoundedWithItem = WithBoundArgs<typeof NativeSelectItem, 'manager' | 'item'>;
8
9
  interface BaseArgs<T> extends FormControlSharedArgs {
9
10
  /**
10
11
  * Keys of the options that cannot be selected. Disabled options are still
@@ -125,12 +126,14 @@ interface NativeSelectSignature<T> {
125
126
  Args: Args<T>;
126
127
  Element: HTMLSelectElement;
127
128
  Blocks: {
128
- item: [{
129
- item: T;
130
- key: string;
131
- label: string;
132
- Item: ItemCompBounded;
133
- }];
129
+ item: [
130
+ {
131
+ item: T;
132
+ key: string;
133
+ label: string;
134
+ Item: ItemCompBoundedWithItem;
135
+ }
136
+ ];
134
137
  default: [{
135
138
  Item: ItemCompBounded;
136
139
  }];
@@ -151,6 +154,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
151
154
  endContentPointerEvents?: "none" | "auto" | undefined;
152
155
  hasStartContent?: boolean | undefined;
153
156
  hasEndContent?: boolean | undefined;
157
+ hasChips?: boolean | undefined;
154
158
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
155
159
  innerContainer: (slotProps?: ({
156
160
  size?: "sm" | "md" | "lg" | undefined;
@@ -158,6 +162,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
158
162
  endContentPointerEvents?: "none" | "auto" | undefined;
159
163
  hasStartContent?: boolean | undefined;
160
164
  hasEndContent?: boolean | undefined;
165
+ hasChips?: boolean | undefined;
161
166
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
162
167
  startContent: (slotProps?: ({
163
168
  size?: "sm" | "md" | "lg" | undefined;
@@ -165,6 +170,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
165
170
  endContentPointerEvents?: "none" | "auto" | undefined;
166
171
  hasStartContent?: boolean | undefined;
167
172
  hasEndContent?: boolean | undefined;
173
+ hasChips?: boolean | undefined;
168
174
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
169
175
  endContent: (slotProps?: ({
170
176
  size?: "sm" | "md" | "lg" | undefined;
@@ -172,6 +178,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
172
178
  endContentPointerEvents?: "none" | "auto" | undefined;
173
179
  hasStartContent?: boolean | undefined;
174
180
  hasEndContent?: boolean | undefined;
181
+ hasChips?: boolean | undefined;
175
182
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
176
183
  input: (slotProps?: ({
177
184
  size?: "sm" | "md" | "lg" | undefined;
@@ -179,6 +186,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
179
186
  endContentPointerEvents?: "none" | "auto" | undefined;
180
187
  hasStartContent?: boolean | undefined;
181
188
  hasEndContent?: boolean | undefined;
189
+ hasChips?: boolean | undefined;
182
190
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
183
191
  } & {
184
192
  input: (slotProps?: ({
@@ -187,6 +195,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
187
195
  endContentPointerEvents?: "none" | "auto" | undefined;
188
196
  hasStartContent?: boolean | undefined;
189
197
  hasEndContent?: boolean | undefined;
198
+ hasChips?: boolean | undefined;
190
199
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
191
200
  icon: (slotProps?: ({
192
201
  size?: "sm" | "md" | "lg" | undefined;
@@ -194,6 +203,7 @@ declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<
194
203
  endContentPointerEvents?: "none" | "auto" | undefined;
195
204
  hasStartContent?: boolean | undefined;
196
205
  hasEndContent?: boolean | undefined;
206
+ hasChips?: boolean | undefined;
197
207
  } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
198
208
  } & {};
199
209
  get isMultiple(): boolean;
@@ -216,6 +226,12 @@ export interface SelectItemSignature {
216
226
  * option's rendered text content.
217
227
  */
218
228
  textValue?: string;
229
+ /**
230
+ * The entry of `@items` this option renders, remembered on the registered
231
+ * list item so a selection can hand it back. Bound for you on the Item
232
+ * yielded from the `:item` block; block-form options have no such entry.
233
+ */
234
+ item?: unknown;
219
235
  };
220
236
  Element: HTMLOptionElement;
221
237
  Blocks: {