@sixbell-telco/sdk 4.8.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/components/accordion/README.md +1 -1
  3. package/components/accordion/src/accordion.component.d.ts +4 -0
  4. package/components/alert/src/alert.component.d.ts +8 -1
  5. package/components/data-table/README.md +1 -0
  6. package/components/data-table/src/data-table.component.d.ts +2 -24
  7. package/components/dialog/README.md +4 -3
  8. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +2 -1
  9. package/components/dialog/src/dialog.component.d.ts +10 -5
  10. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +1 -1
  11. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +3 -2
  12. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +12 -0
  13. package/components/file-upload/file-uploader/file-uploader.component.d.ts +6 -0
  14. package/components/forms/combobox/README.md +49 -0
  15. package/components/forms/combobox/src/combobox.component.d.ts +178 -3
  16. package/components/forms/date-picker/README.md +3 -1
  17. package/components/forms/date-picker/src/date-picker.component.d.ts +8 -1
  18. package/components/forms/form-error/README.md +2 -0
  19. package/components/forms/form-error/src/form-error.component.d.ts +17 -0
  20. package/components/forms/form-hint/README.md +2 -2
  21. package/components/forms/form-item/README.md +1 -0
  22. package/components/forms/form-item/src/form-item.component.d.ts +38 -6
  23. package/components/forms/input/README.md +7 -0
  24. package/components/forms/input/src/input.component.d.ts +11 -1
  25. package/components/forms/select/README.md +48 -0
  26. package/components/forms/select/src/select.component.d.ts +157 -2
  27. package/components/forms/textarea/README.md +1 -0
  28. package/components/forms/textarea/src/textarea.component.d.ts +6 -1
  29. package/components/paginator/README.md +3 -0
  30. package/components/paginator/components/pagination-item/pagination-item.component.d.ts +8 -3
  31. package/components/paginator/src/paginator.component.d.ts +2 -1
  32. package/components/progress/src/progress.component.d.ts +17 -3
  33. package/components/table/README.md +2 -0
  34. package/components/table/src/table.component.d.ts +16 -23
  35. package/directives/only-numbers/src/only-numbers.directive.d.ts +27 -1
  36. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +6 -1
  37. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  38. package/fesm2022/sixbell-telco-sdk-components-alert.mjs +12 -5
  39. package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -1
  40. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +5 -2
  41. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  42. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +30 -13
  43. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
  44. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +2 -1
  45. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
  46. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +10 -4
  47. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
  48. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +1 -1
  49. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  50. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +32 -6
  51. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  52. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +272 -23
  53. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  54. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +17 -4
  55. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
  56. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +32 -4
  57. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
  58. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +74 -10
  59. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -1
  60. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +13 -3
  61. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  62. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +258 -18
  63. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  64. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
  65. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  66. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +11 -3
  67. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  68. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +15 -11
  69. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  70. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +22 -4
  71. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  72. package/fesm2022/sixbell-telco-sdk-components-table.mjs +42 -5
  73. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  74. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +49 -4
  75. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
  76. package/fesm2022/sixbell-telco-sdk-layouts.mjs +1 -1
  77. package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
  78. package/i18n/sdk/en.json +14 -4
  79. package/i18n/sdk/es.json +14 -4
  80. package/i18n/sdk/pt.json +14 -4
  81. package/manifest.json +185 -19
  82. package/package.json +1 -1
  83. package/src/_index.css +19 -0
@@ -42,6 +42,10 @@ type AnimationState = 'closed' | 'opening' | 'open' | 'closing';
42
42
  * Selection type for the combobox
43
43
  */
44
44
  type SelectionType = 'single' | 'multiple';
45
+ /**
46
+ * How wide the options panel is: `'trigger'` copies the control's width, `'content'` grows to the widest option
47
+ */
48
+ export type ComboboxPanelWidth = 'trigger' | 'content';
45
49
  /**
46
50
  * Event emitted when the search query changes
47
51
  */
@@ -136,6 +140,12 @@ export declare class ComboboxComponent implements ControlValueAccessor {
136
140
  private readonly generatedId;
137
141
  /** @internal Id applied to the focusable control and referenced by its label */
138
142
  protected readonly resolvedId: import("@angular/core").Signal<string>;
143
+ /** @internal Id of the options listbox, referenced by the trigger's `aria-controls` */
144
+ protected readonly listboxId: string;
145
+ /** @internal Id of the visually hidden label, which names the listbox */
146
+ protected readonly labelId: string;
147
+ /** @internal Id of the option at `index` in the filtered list */
148
+ protected optionId(index: number): string;
139
149
  /**
140
150
  * Placeholder text displayed when no option is selected
141
151
  */
@@ -169,6 +179,25 @@ export declare class ComboboxComponent implements ControlValueAccessor {
169
179
  * @default true
170
180
  */
171
181
  allowClearAll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
182
+ /**
183
+ * Width of the options panel.
184
+ * - `'trigger'`: as wide as the control; a long option wraps onto more lines.
185
+ * - `'content'`: at least as wide as the control and wider when an option needs it, up to
186
+ * `min(28rem, 100vw - 2rem)`. The width is measured over every option, so searching never resizes the
187
+ * panel. Options stay on one line; past that cap the description, then the label, end in an ellipsis and
188
+ * the row shows its full text as a tooltip. Near the viewport edge the panel aligns to the control's end
189
+ * instead of overflowing.
190
+ * @defaultValue 'trigger'
191
+ */
192
+ panelWidth: import("@angular/core").InputSignal<ComboboxPanelWidth>;
193
+ /**
194
+ * Size the closed control to its widest option or the placeholder, measured with the option row's own
195
+ * font, padding and check icon for the current `size`. A selected value never truncates and the control
196
+ * keeps its width between selections. The panel then follows its options as with `panelWidth="content"`.
197
+ * The control does not shrink in a flex row (`shrink-0`); `min-w-*` and `w-*` classes on the element still apply.
198
+ * @defaultValue false
199
+ */
200
+ fitOptions: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
172
201
  /**
173
202
  * Placeholder text for the search input field
174
203
  * @default 'Search...'
@@ -199,6 +228,34 @@ export declare class ComboboxComponent implements ControlValueAccessor {
199
228
  * Uses the entire object if not specified
200
229
  */
201
230
  valueKey: import("@angular/core").InputSignal<string>;
231
+ /**
232
+ * The object property that marks an option as disabled when truthy.
233
+ * A disabled option stays in the list (and in search results), is dimmed,
234
+ * carries `aria-disabled="true"` and cannot be chosen by click or keyboard.
235
+ * Leave empty to keep every option enabled.
236
+ */
237
+ disabledKey: import("@angular/core").InputSignal<string>;
238
+ /**
239
+ * The object property holding a secondary text shown right-aligned on the option row
240
+ * (for example why it is disabled: "Already added"). It is part of the
241
+ * option's accessible name.
242
+ */
243
+ descriptionKey: import("@angular/core").InputSignal<string>;
244
+ /**
245
+ * The object property naming the group an option belongs to. Options that share a value are listed
246
+ * together under one header showing that value, groups in the order they first appear, each group
247
+ * named by its header for assistive technology. Options without the property are listed first,
248
+ * ungrouped. A group whose options are all filtered out by the search hides its header. Headers
249
+ * cannot be chosen and the arrow keys skip them. Leave empty for a flat list.
250
+ */
251
+ groupKey: import("@angular/core").InputSignal<string>;
252
+ /**
253
+ * The object property that marks an option as already taken outside this field when truthy (for
254
+ * example a country added earlier). The option shows the check icon, in the option's own color, but
255
+ * it is not part of the value and never appears in the trigger. Pair it with `disabledKey` so it is
256
+ * dimmed, check included, and cannot be chosen again.
257
+ */
258
+ checkedKey: import("@angular/core").InputSignal<string>;
202
259
  /**
203
260
  * Selection mode: 'single' for single selection, 'multiple' for multi-select
204
261
  * @default 'single'
@@ -285,6 +342,39 @@ export declare class ComboboxComponent implements ControlValueAccessor {
285
342
  private readonly currentPosition;
286
343
  /** Overlay positions with a symmetric 4px trigger gap (below first, flip above) */
287
344
  readonly overlayPositions: ConnectedPosition[];
345
+ /** @internal Content-width panel positions: a panel wider than the control aligns to its end near the viewport edge */
346
+ private readonly contentOverlayPositions;
347
+ /** @internal Whether the panel sizes to its options (`panelWidth="content"` or `fitOptions`) */
348
+ protected readonly contentPanel: import("@angular/core").Signal<boolean>;
349
+ /** @internal Positions bound to the overlay */
350
+ protected readonly activeOverlayPositions: import("@angular/core").Signal<ConnectedPosition[]>;
351
+ /** @internal Fixed overlay width: the trigger width, or none when the panel sizes to its options */
352
+ protected readonly overlayWidth: import("@angular/core").Signal<string | number>;
353
+ /** @internal Classes of the panel box */
354
+ protected readonly panelClass: import("@angular/core").Signal<string>;
355
+ /**
356
+ * @internal
357
+ * Classes of the hidden option sizer: the panel's menu size, so rows measure alike, plus a reserved scrollbar
358
+ * gutter, so a list that scrolls keeps the width of one that does not; capped like the panel, so a long
359
+ * option cannot widen the control past the panel
360
+ */
361
+ protected readonly optionSizerClass: import("@angular/core").Signal<string>;
362
+ /** @internal Classes of an option row */
363
+ protected readonly optionRowClass = "group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out group-data-disabled:cursor-not-allowed group-data-disabled:bg-transparent group-data-disabled:text-(--color-disabled-content) group-data-disabled:hover:bg-transparent";
364
+ /** @internal Texts the closed control must fit with `fitOptions`: the placeholder and every option label */
365
+ protected readonly valueSizerLabels: import("@angular/core").Signal<any[]>;
366
+ /**
367
+ * @internal
368
+ * Every option in sections, ignoring the search, so the content-width panel keeps its width while filtering
369
+ */
370
+ protected readonly allOptionSections: import("@angular/core").Signal<{
371
+ label: string | null;
372
+ headerId: string | null;
373
+ options: {
374
+ option: any;
375
+ index: number;
376
+ }[];
377
+ }[]>;
288
378
  /** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
289
379
  readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
290
380
  /**
@@ -321,6 +411,23 @@ export declare class ComboboxComponent implements ControlValueAccessor {
321
411
  * @returns Array of options that match the search criteria
322
412
  */
323
413
  filteredOptions: import("@angular/core").Signal<any[]>;
414
+ /**
415
+ * @internal
416
+ * Filtered options in the order they are listed: ungrouped first, then each `groupKey` group
417
+ */
418
+ protected readonly optionSections: import("@angular/core").Signal<{
419
+ label: string | null;
420
+ headerId: string | null;
421
+ options: {
422
+ option: any;
423
+ index: number;
424
+ }[];
425
+ }[]>;
426
+ /**
427
+ * @internal
428
+ * Filtered options in the order they are listed, which keyboard navigation, `data-option-index` and the option ids follow
429
+ */
430
+ protected readonly orderedOptions: import("@angular/core").Signal<any[]>;
324
431
  /**
325
432
  * Whether the overlay is currently open or in the process of opening/closing
326
433
  * @returns True if overlay is visible or animating
@@ -384,6 +491,8 @@ export declare class ComboboxComponent implements ControlValueAccessor {
384
491
  * @internal
385
492
  */
386
493
  menuClass: import("@angular/core").Signal<string>;
494
+ /** @internal Menu size modifier shared by the options list and the option sizer */
495
+ private readonly menuSizeClass;
387
496
  /**
388
497
  * CSS classes for the badge
389
498
  * @internal
@@ -403,7 +512,12 @@ export declare class ComboboxComponent implements ControlValueAccessor {
403
512
  * Translated no results text
404
513
  * @returns Translated no results text or input value
405
514
  */
406
- translatedNoResultsText: import("@angular/core").Signal<any>;
515
+ translatedNoResultsText: import("@angular/core").Signal<string>;
516
+ /**
517
+ * @internal
518
+ * Id of the active option, for the search input's `aria-activedescendant`, or `null` when none is active.
519
+ */
520
+ protected readonly activeOptionId: import("@angular/core").Signal<string | null>;
407
521
  /**
408
522
  * Current search input value for template binding
409
523
  * @returns Current search value
@@ -525,6 +639,24 @@ export declare class ComboboxComponent implements ControlValueAccessor {
525
639
  * @returns True if the option is active
526
640
  */
527
641
  isActiveOption(index: number): boolean;
642
+ /**
643
+ * Whether an option is disabled through `disabledKey`
644
+ * @param option - The option to check
645
+ * @returns True if the option cannot be chosen
646
+ */
647
+ isOptionDisabled(option: any): boolean;
648
+ /**
649
+ * Whether an option is marked as already taken through `checkedKey`
650
+ * @param option - The option to check
651
+ * @returns True if the option shows the check without being part of the value
652
+ */
653
+ isOptionChecked(option: any): boolean;
654
+ /**
655
+ * Gets the secondary text for an option through `descriptionKey`
656
+ * @param option - The option to read
657
+ * @returns The secondary text, or an empty string
658
+ */
659
+ getOptionDescription(option: any): string;
528
660
  /**
529
661
  * Gets the display value for an option
530
662
  * @param option - The option to get display value for
@@ -541,6 +673,26 @@ export declare class ComboboxComponent implements ControlValueAccessor {
541
673
  * Updates the trigger button width for overlay positioning
542
674
  */
543
675
  private updateTriggerWidth;
676
+ /**
677
+ * @internal
678
+ * On hover of a single-line option, shows its full text as a tooltip when its label or description is cut off
679
+ * @param event - The pointer event on the option row
680
+ * @param option - The option the row shows
681
+ */
682
+ protected syncOptionTitle(event: Event, option: any): void;
683
+ /**
684
+ * Sets the full-text tooltip of an option row when its label or description is cut off, or removes it;
685
+ * runs on hover and when the row becomes the keyboard-active one
686
+ * @param row - The option row
687
+ * @param option - The option the row shows
688
+ */
689
+ private syncRowTitle;
690
+ /**
691
+ * Gets the full text of an option: its label, then its description when it has one
692
+ * @param option - The option to read
693
+ * @returns The text shown as the tooltip of a truncated option
694
+ */
695
+ private getOptionFullText;
544
696
  /**
545
697
  * Gets the value property from an option
546
698
  * @param option - The option to get value from
@@ -553,6 +705,19 @@ export declare class ComboboxComponent implements ControlValueAccessor {
553
705
  * @returns True if the value exists in the options array
554
706
  */
555
707
  private isValidValue;
708
+ /**
709
+ * Gets the group an option belongs to through `groupKey`
710
+ * @param option - The option to read
711
+ * @returns The group name, or null when the option is ungrouped
712
+ */
713
+ private getOptionGroup;
714
+ /**
715
+ * Splits options into the ungrouped run, listed first, and one section per group in first-appearance order.
716
+ * `index` is the option's position in the listed order; `headerId` is unique per instance.
717
+ * @param options - The options to list
718
+ * @returns The sections to render
719
+ */
720
+ private groupOptions;
556
721
  /**
557
722
  * Triggers blur event for form validation
558
723
  */
@@ -566,13 +731,23 @@ export declare class ComboboxComponent implements ControlValueAccessor {
566
731
  * The debounce time updates reactively when the input changes
567
732
  */
568
733
  private setupSearchHandling;
734
+ /**
735
+ * Finds the next enabled option index, wrapping around the list
736
+ * @param options - The options being navigated
737
+ * @param from - The index to start from (exclusive)
738
+ * @param step - 1 to move down, -1 to move up
739
+ * @returns The index of the next enabled option, or -1 if every option is disabled
740
+ */
741
+ private findEnabledIndex;
569
742
  /**
570
743
  * Sets the active option for keyboard navigation
571
744
  * @param index - The index of the option to make active
572
745
  */
573
746
  private setActiveOption;
574
747
  /**
575
- * Sets the first option as active by default
748
+ * Sets the first enabled option as active; on open in single mode, the selected option, so the highlight and
749
+ * the check sit on the same row. A search keeps the first match.
750
+ * @param preferSelected - Whether an enabled selected option wins over the first one
576
751
  */
577
752
  private setDefaultActiveOption;
578
753
  /**
@@ -585,6 +760,6 @@ export declare class ComboboxComponent implements ControlValueAccessor {
585
760
  */
586
761
  private setupSearchQueryEmission;
587
762
  static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
588
- static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "st-combobox", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showOptional": { "alias": "showOptional"; "required": false; "isSignal": true; }; "optionalText": { "alias": "optionalText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "parentForm": { "alias": "parentForm"; "required": false; "isSignal": true; }; "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; "allowClear": { "alias": "allowClear"; "required": false; "isSignal": true; }; "allowClearAll": { "alias": "allowClearAll"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "displayKey": { "alias": "displayKey"; "required": false; "isSignal": true; }; "valueKey": { "alias": "valueKey"; "required": false; "isSignal": true; }; "selectionType": { "alias": "selectionType"; "required": false; "isSignal": true; }; "searchDebounced": { "alias": "searchDebounced"; "required": false; "isSignal": true; }; "searchDebounceTime": { "alias": "searchDebounceTime"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "value": "valueChange"; "blurred": "blurred"; "valueUpdated": "valueUpdated"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; "triggered": "triggered"; "searchQuery": "searchQuery"; }, never, ["*"], true, never>;
763
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "st-combobox", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showOptional": { "alias": "showOptional"; "required": false; "isSignal": true; }; "optionalText": { "alias": "optionalText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "parentForm": { "alias": "parentForm"; "required": false; "isSignal": true; }; "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; "allowClear": { "alias": "allowClear"; "required": false; "isSignal": true; }; "allowClearAll": { "alias": "allowClearAll"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "fitOptions": { "alias": "fitOptions"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "displayKey": { "alias": "displayKey"; "required": false; "isSignal": true; }; "valueKey": { "alias": "valueKey"; "required": false; "isSignal": true; }; "disabledKey": { "alias": "disabledKey"; "required": false; "isSignal": true; }; "descriptionKey": { "alias": "descriptionKey"; "required": false; "isSignal": true; }; "groupKey": { "alias": "groupKey"; "required": false; "isSignal": true; }; "checkedKey": { "alias": "checkedKey"; "required": false; "isSignal": true; }; "selectionType": { "alias": "selectionType"; "required": false; "isSignal": true; }; "searchDebounced": { "alias": "searchDebounced"; "required": false; "isSignal": true; }; "searchDebounceTime": { "alias": "searchDebounceTime"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "value": "valueChange"; "blurred": "blurred"; "valueUpdated": "valueUpdated"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; "triggered": "triggered"; "searchQuery": "searchQuery"; }, never, ["*"], true, never>;
589
764
  }
590
765
  export {};
@@ -25,5 +25,7 @@ Single or range calendar. Overlay Clear is gated by `allowClear` (default `true`
25
25
  ## Notes
26
26
 
27
27
  - Wrap with `st-form-item` and put `st-form-errors` as a sibling, not inside the trigger.
28
+ - The picker renders no control of its own: a projected kit control with no form control of its own (the `st-input` above) takes the picker's state, so it gets `aria-required` from the picker's `required` or `Validators.required`, and `aria-invalid="true"` while the picker's control is invalid and touched or dirty. Inside `st-form-item`, its `aria-describedby` lists the hints and, while invalid, the `st-form-errors` message. A projected `st-button` or plain element gets none of this.
28
29
  - Range: bind `[rangeValue]` and `(rangeValueChanged)`.
29
- - Accessibility: the calendar's month buttons are named from `sdk.datePicker.previousMonth` and `sdk.datePicker.nextMonth`, in English when no translation is loaded.
30
+ - Single date and time: `mode="single"` with `[showTimePicker]="true"` shows a time input below the calendar (`HH:mm`, or `HH:mm:ss` with `[showSeconds]`). Bind `[startTimeValue]` and `(startTimeChanged)`; `displayValue()` shows the date plus the time. A day click emits the date and keeps the popover open so the time can still change; it closes on outside click or Escape.
31
+ - Accessibility: the calendar's month buttons are named from `sdk.datePicker.previousMonth` and `sdk.datePicker.nextMonth`, and the single-mode time input from `sdk.datePicker.time`, in English when no translation is loaded.
@@ -100,7 +100,12 @@ export declare class DatepickerComponent implements ControlValueAccessor {
100
100
  * When not set, the enclosing `st-form-item` `required`, then `Validators.required` on the bound control decide.
101
101
  */
102
102
  required: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
103
- /** @internal Required state and hint ids from the enclosing `st-form-item`. */
103
+ /**
104
+ * @internal
105
+ * Required, invalid and description state of the field. The picker renders no control of its own, so it
106
+ * shares this state with the projected kit control (`st-input`), which binds `aria-required`,
107
+ * `aria-invalid` and `aria-describedby`.
108
+ */
104
109
  protected readonly fieldA11y: import("@sixbell-telco/sdk/components/forms/form-item").FormFieldA11y;
105
110
  /**
106
111
  * Picker mode
@@ -353,6 +358,8 @@ export declare class DatepickerComponent implements ControlValueAccessor {
353
358
  previous: string;
354
359
  next: string;
355
360
  }>;
361
+ /** @internal Accessible name of the single-mode time input. */
362
+ protected readonly timeLabel: import("@angular/core").Signal<string>;
356
363
  private clampTime;
357
364
  onStartTimeChange(ev: Event): void;
358
365
  onEndTimeChange(ev: Event): void;
@@ -18,4 +18,6 @@ Full-width validation messages for a control on `parentForm`.
18
18
  ## Notes
19
19
 
20
20
  - `parentForm` and `formField` are required. Projecting errors inside a field is legacy and width-limited.
21
+ - The message shows once the control has errors and is touched or dirty. It then renders as a `role="alert"` element with a generated id, so screen readers announce it when it appears; while hidden it is not an alert and keeps only an invisible placeholder line.
22
+ - Inside `st-form-item`, the message id is added to the control's `aria-describedby` (after the `st-form-hint` ids) while the control is invalid and touched or dirty, and the control gets `aria-invalid="true"`. This works for `st-input`, `st-textarea`, `st-select`, `st-combobox` and the `st-input` projected into `st-datepicker`.
21
23
  - See [Form Errors migration](../../../../../docs/migrations/Form_Errors_Migration.md).
@@ -1,9 +1,26 @@
1
1
  import { FormControl, FormGroup } from '@angular/forms';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * The validation message of one control on `parentForm`.
5
+ *
6
+ * @remarks
7
+ * The message shows once the control is invalid and touched or dirty, as an `role="alert"` element,
8
+ * so screen readers announce it when it appears. Inside `st-form-item`, the message id is also added
9
+ * to the control's `aria-describedby` while the control is invalid, next to the `st-form-hint` ids.
10
+ */
3
11
  export declare class FormErrorsComponent {
4
12
  parentForm: import("@angular/core").InputSignal<FormGroup<any>>;
5
13
  formField: import("@angular/core").InputSignal<string>;
6
14
  formControl: import("@angular/core").Signal<FormControl<any>>;
15
+ /** @internal Id of the message element, referenced by the control's `aria-describedby`. */
16
+ readonly messageId: string;
17
+ constructor();
18
+ /**
19
+ * @internal
20
+ * Whether the message is shown: the control has errors and is touched or dirty.
21
+ * A method for the same reason as `customError()`.
22
+ */
23
+ isVisible(): boolean;
7
24
  /**
8
25
  * Returns the value of the first custom error on the current form control.
9
26
  *
@@ -22,8 +22,8 @@ Helper text for a form field, linked to its control through `aria-describedby`,
22
22
  - `st-form-hint` must sit inside `st-form-item`. Input: `id` (generated when omitted). The control's `aria-describedby` lists every hint in the item.
23
23
  - `st-form-required-legend` renders `sdk.formFields.requiredLegend` ("Fields marked with * are required"); `textKey` overrides it. Place it once above the first field.
24
24
  - Required marker: `st-input`, `st-textarea`, `st-select`, `st-combobox`, `st-range` and `st-date-picker` show `*` after the label and (except `st-date-picker`, see below) set `aria-required="true"` on the native control or `role="combobox"` trigger when their `required` input is set, else when `st-form-item [required]` is set, else when the bound control has `Validators.required`. The `*` is `aria-hidden`; `showOptional` is unchanged.
25
- - `st-date-picker` projects its own trigger: mark the projected `st-input` too (for example through `st-form-item [required]`) so it is announced.
25
+ - `st-date-picker` projects its own trigger: a projected `st-input` without a form control of its own takes the picker's required state and sets `aria-required`.
26
26
  - `st-range` shows the marker but does not set `aria-required` (not allowed on the `slider` role); it adds a visually hidden "Required" note (`sdk.formFields.required`) to its `aria-describedby` instead.
27
- - `st-date-picker` reads `Validators.required` when it renders and when its inputs change; a validator added later is not picked up, so set `required` explicitly in that case.
27
+ - A validator added or removed later is picked up once the control's validity is updated (`updateValueAndValidity()`).
28
28
  - An explicit `required` on the control wins over `st-form-item [required]` and over the validator, so `[required]="false"` removes the marker. Angular's `RequiredValidator` also matches `[required]` next to `formControlName`, so `[required]="true"` adds `Validators.required` to the control.
29
29
  - Replaces hand-rolled `span.field-hint` hints in consumer apps.
@@ -15,3 +15,4 @@
15
15
 
16
16
  - Place `st-form-errors` as a sibling (not inside) the input/field component.
17
17
  - `st-form-item` provides a consistent vertical gap and full-width error line.
18
+ - It is also the field context for assistive technology: controls inside it read `required` from it, list every `st-form-hint` id in their `aria-describedby`, and add the `st-form-errors` message id there, with `aria-invalid="true"`, while the control is invalid and touched or dirty. One field per item.
@@ -7,8 +7,9 @@ export declare const optionalBooleanAttribute: (value: unknown) => boolean | und
7
7
  * A layout wrapper for one form field: the control, its `st-form-hint` and its `st-form-errors`.
8
8
  *
9
9
  * @remarks
10
- * It is also the field context: controls inside it read `required` from here, and every
11
- * `st-form-hint` inside it is linked to the control through `aria-describedby`.
10
+ * It is also the field context: controls inside it read `required` from here, every
11
+ * `st-form-hint` inside it is linked to the control through `aria-describedby`, and so is the
12
+ * `st-form-errors` message while the control is invalid and touched or dirty.
12
13
  */
13
14
  export declare class FormItemComponent {
14
15
  /**
@@ -16,15 +17,34 @@ export declare class FormItemComponent {
16
17
  */
17
18
  required: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
18
19
  private readonly hints;
20
+ private readonly errors;
19
21
  /** Ids of the hints inside this item, space separated, or `null` when there are none. */
20
22
  readonly describedBy: Signal<string | null>;
21
23
  /** @internal Called by `st-form-hint`. */
22
24
  registerHint(id: string): void;
23
25
  /** @internal Called by `st-form-hint`. */
24
26
  unregisterHint(id: string): void;
27
+ /** @internal Ids of the `st-form-errors` messages inside this item. */
28
+ readonly errorIds: Signal<readonly string[]>;
29
+ /** @internal Called by `st-form-errors`. */
30
+ registerError(id: string): void;
31
+ /** @internal Called by `st-form-errors`. */
32
+ unregisterError(id: string): void;
25
33
  static ɵfac: i0.ɵɵFactoryDeclaration<FormItemComponent, never>;
26
34
  static ɵcmp: i0.ɵɵComponentDeclaration<FormItemComponent, "st-form-item", never, { "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, [":not(st-form-errors)", "st-form-errors"], true, never>;
27
35
  }
36
+ /**
37
+ * @internal
38
+ * Provided by a field that wraps a projected kit control instead of rendering its own (`st-datepicker`
39
+ * around its `st-input` trigger). The projected control has no form control of its own, so it takes
40
+ * the field's `required` and `invalid` state from here.
41
+ */
42
+ export declare class FormFieldA11yScope {
43
+ /** The wrapping field's state. */
44
+ readonly field: import("@angular/core").WritableSignal<FormFieldA11y | null>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldA11yScope, never>;
46
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormFieldA11yScope>;
47
+ }
28
48
  /** Sources a form control passes to `injectFormFieldA11y`. */
29
49
  export interface FormFieldA11ySource {
30
50
  /** The control's own `required` input (`undefined` when not set). */
@@ -33,17 +53,29 @@ export interface FormFieldA11ySource {
33
53
  control: () => AbstractControl | null | undefined;
34
54
  /** A signal that changes when the control status changes, so validator changes are picked up. */
35
55
  status?: () => unknown;
56
+ /**
57
+ * Set by a field that wraps a projected kit control (`st-datepicker`): it then shares its state
58
+ * through the `FormFieldA11yScope` it provides.
59
+ */
60
+ wrapsControl?: boolean;
36
61
  }
37
- /** Required state and hint ids for a form control. */
62
+ /** Required, invalid and description state for a form control. */
38
63
  export interface FormFieldA11y {
39
64
  /** Whether the field shows the required marker and is announced as required. */
40
65
  required: Signal<boolean>;
41
- /** Value for the control's `aria-describedby`. */
66
+ /** Whether the control is invalid and touched or dirty: the value for `aria-invalid`. */
67
+ invalid: Signal<boolean>;
68
+ /** Value for the control's `aria-describedby`: the hint ids, then the error ids while `invalid`. */
42
69
  describedBy: Signal<string | null>;
43
70
  }
44
71
  /**
45
72
  * @internal
46
- * Resolves the required state (explicit input, then the enclosing `st-form-item`, then `Validators.required`)
47
- * and the hint ids for a form control. Call it in an injection context.
73
+ * Resolves, for one form control:
74
+ * - `required`: the explicit input, then a wrapping field (for a control without a form control of its own), then the
75
+ * enclosing `st-form-item`, then `Validators.required`;
76
+ * - `invalid`: the bound control is invalid and touched or dirty (a control without one takes it from a wrapping field);
77
+ * - `describedBy`: the `st-form-hint` ids of the enclosing `st-form-item`, plus its `st-form-errors` ids while `invalid`.
78
+ *
79
+ * Bind `aria-invalid` to `invalid() || null` and `aria-describedby` to `describedBy()`. Call it in an injection context.
48
80
  */
49
81
  export declare function injectFormFieldA11y(source: FormFieldA11ySource): FormFieldA11y;
@@ -15,6 +15,13 @@ Text field. Default `variant` is `base`.
15
15
  ## Notes
16
16
 
17
17
  - Supports `parentForm` / `formControlName`, `onlyNumbers`, `ghost`, `debounceTime`.
18
+ - `onlyNumbers` accepts digits only. Add `onlyNumbersAllowNegative` for a single leading `-` and `onlyNumbersAllowDecimal` for a single `.` after at least one digit (no comma). With either on, each keypress and paste is judged by the value it leaves, so half-typed values (`-`, `4.`, `-0.`) stay typeable; check the complete value with a form validator.
19
+
20
+ ```html
21
+ <st-input label="Amount" onlyNumbers onlyNumbersAllowNegative onlyNumbersAllowDecimal [(value)]="amount"></st-input>
22
+ ```
23
+
18
24
  - Prefer `(triggered)` instead of the old `(enterPressed)`.
19
25
  - `label` names the inner `<input>` through a generated id; pass `inputId` when you need a known id.
20
26
  - `passwordToggle` on `type="password"` adds a reveal button named from `sdk.input.showPassword` / `sdk.input.hidePassword`.
27
+ - Validation errors: inside `st-form-item` with `st-form-errors`, the inner `<input>` gets `aria-invalid="true"` while its control is invalid and touched or dirty, and the error message id joins the hint ids in its `aria-describedby`. See [Form Error](../form-error/README.md).
@@ -102,6 +102,16 @@ export declare class InputComponent implements ControlValueAccessor {
102
102
  * @defaultValue false
103
103
  */
104
104
  onlyNumbers: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
105
+ /**
106
+ * With `onlyNumbers`, also accept a single leading `-`
107
+ * @defaultValue false
108
+ */
109
+ onlyNumbersAllowNegative: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
110
+ /**
111
+ * With `onlyNumbers`, also accept a single `.` as decimal separator after at least one digit
112
+ * @defaultValue false
113
+ */
114
+ onlyNumbersAllowDecimal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
105
115
  /**
106
116
  * Whether to use ghost (transparent) styling
107
117
  * @defaultValue false
@@ -241,6 +251,6 @@ export declare class InputComponent implements ControlValueAccessor {
241
251
  */
242
252
  private setupDebounce;
243
253
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
244
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "st-input", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showOptional": { "alias": "showOptional"; "required": false; "isSignal": true; }; "optionalText": { "alias": "optionalText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "passwordToggle": { "alias": "passwordToggle"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "focus": { "alias": "focus"; "required": false; "isSignal": true; }; "onlyNumbers": { "alias": "onlyNumbers"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "parentForm": { "alias": "parentForm"; "required": false; "isSignal": true; }; "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "keyDownEnter": "keyDownEnter"; "triggered": "triggered"; "clicked": "clicked"; "blurred": "blurred"; "valueDebounced": "valueDebounced"; }, never, ["st-input-content[alignment='start']", "st-input-content[alignment='end']", ":not(st-input-content)"], true, never>;
254
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "st-input", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showOptional": { "alias": "showOptional"; "required": false; "isSignal": true; }; "optionalText": { "alias": "optionalText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "passwordToggle": { "alias": "passwordToggle"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "focus": { "alias": "focus"; "required": false; "isSignal": true; }; "onlyNumbers": { "alias": "onlyNumbers"; "required": false; "isSignal": true; }; "onlyNumbersAllowNegative": { "alias": "onlyNumbersAllowNegative"; "required": false; "isSignal": true; }; "onlyNumbersAllowDecimal": { "alias": "onlyNumbersAllowDecimal"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "parentForm": { "alias": "parentForm"; "required": false; "isSignal": true; }; "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "keyDownEnter": "keyDownEnter"; "triggered": "triggered"; "clicked": "clicked"; "blurred": "blurred"; "valueDebounced": "valueDebounced"; }, never, ["st-input-content[alignment='start']", "st-input-content[alignment='end']", ":not(st-input-content)"], true, never>;
245
255
  }
246
256
  export {};
@@ -12,8 +12,56 @@ List picker. Clear is a sibling of the trigger; the chevron is a custom icon tha
12
12
  <st-select label="Status" [options]="statuses" displayKey="label" valueKey="id" [(value)]="status"></st-select>
13
13
  ```
14
14
 
15
+ ## Width
16
+
17
+ The control's width is measured with `getBoundingClientRect()` and rounded up, so a panel that copies it is never a fraction of a pixel narrower than the control (an option that exactly fills the control no longer wraps).
18
+
19
+ - `panelWidth` (`'trigger' | 'content'`, default `'trigger'`). `'trigger'` keeps the panel as wide as the control, as before; a long option wraps. `'content'` makes the panel at least as wide as the control and wider when an option needs it, up to `min(28rem, 100vw - 2rem)`. Options stay on one line, with the check slot reserved on every row. Past the cap the description is cut first, then the label, both with an ellipsis; hovering a cut-off row, or making it the keyboard-active row, shows its full text (`Label, Description`) as a `title`. The accessible name and keyboard navigation do not change. Near the viewport edge the panel aligns to the control's end instead of overflowing, and it still flips above the control when there is no room below.
20
+ - `fitOptions` (boolean, default `false`) sizes the closed control to its widest option or its placeholder. A hidden sizer in the component's own template stacks every option row with the option row's classes and the menu size of the current `size` (label, description and check slot), plus every label in the control's own font, so CSS takes the widest in real pixels. The room of the clear button is kept while nothing is chosen, so the control keeps its width between selections and a chosen value is never cut off. The sizer is capped like the panel (`min(28rem, 100vw - 2rem)`), so one very long option cannot widen the control past the panel. The element becomes `inline-block align-top shrink-0`: it shrinks to that width in a block, `align-top` keeps it from sitting on the text baseline (no stray gap below it in a line box) and does not shrink in a flex row that scrolls (`overflow-x-auto`). `min-w-*` and `w-*` classes on the element still apply; a narrower `w-*` cuts the value with an ellipsis.
21
+ - How they combine: `fitOptions` implies `panelWidth="content"`, so setting both is the same as `fitOptions` alone. With a fitted control the panel ends up as wide as the control; it only grows past it when a `w-*` or `max-w-*` class makes the control narrower than its options.
22
+
23
+ ```html
24
+ <!-- A short filter whose panel shows every option on one line -->
25
+ <st-select
26
+ class="min-w-28"
27
+ size="sm"
28
+ panelWidth="content"
29
+ [options]="['All', 'OC_ACN_MISMATCH', 'WHITELIST_GTO', 'BLACKLIST_MSISDN']"
30
+ [(value)]="filter"
31
+ ></st-select>
32
+
33
+ <!-- A control as wide as its widest option, in a scrolling filter bar -->
34
+ <div class="flex gap-4 overflow-x-auto">
35
+ <st-select size="sm" fitOptions [options]="refreshOptions" displayKey="label" valueKey="seconds" [(value)]="refresh"></st-select>
36
+ </div>
37
+ ```
38
+
15
39
  ## Notes
16
40
 
17
41
  - `allowClear` defaults to `true`. The panel opens 4px from the field with the shared popover motion (`popover-motion`), toward the side the CDK placed it on.
42
+ - When the panel opens with a value, the selected option (the one with the check) is the active row, so the highlight and the check sit on the same option and ArrowDown moves on from it. Without a value, or when the selected option is disabled, the first enabled option is active.
18
43
  - Do not nest the clear button inside the trigger.
19
44
  - Async options: a value written through the form (`writeValue`) before its option exists is kept and resolved to the matching option, with its label, as soon as one arrives (first load or a replaced list), without calling `onChange` (the control stays pristine). A user selection, clear or `writeValue(null)` replaces it. While no option matches the select shows the placeholder and its value is `null`; the form control still holds the written value.
45
+ - Disabled options: `disabledKey` names the option property that disables it when truthy. The option stays in the list and in search results, is dimmed with the kit's disabled colors (`--color-disabled-content`), carries `aria-disabled="true"` and cannot be chosen by click, Enter or Space. ArrowUp, ArrowDown, Home and End skip them. Without `disabledKey` every option is enabled.
46
+ - Secondary text: `descriptionKey` names an option property shown on the same row as the label, right-aligned in the muted colour before the check (for example why the option is disabled). A long label wraps first; a long description is cut with an ellipsis rather than pushed under the label. It is part of the option's accessible name (read as "Label, Description").
47
+ - Option groups: `groupKey` names an option property holding its group. Options that share a value are listed under one header showing that value, styled like the dropdown section label (`st-dropdown-label`) with a separator line before it unless it opens the list, groups in the order they first appear; options without the property are listed first, ungrouped. Each group is a `role="group"` with `aria-labelledby` pointing at its header (ids unique per instance). Headers cannot be chosen. ArrowUp, ArrowDown, Home and End follow the listed order and skip headers; disabled options stay skipped. Without `groupKey` the list is flat, in the given order.
48
+ - Already-taken options: `checkedKey` names an option property that, when truthy, shows the check icon on the option without making it part of the value: it never appears in the trigger or counts as selected. Pair it with `disabledKey` so the check is dimmed with the option text (`--color-disabled-content`), the option carries `aria-disabled="true"` and it cannot be chosen again; use `descriptionKey` to say why. Without `disabledKey` the check is only a marker and the option can still be chosen.
49
+ - Scrolling: the option list fades its top and bottom edges while there is more to scroll to (`scroll-fade-y`) and contains its overscroll.
50
+ - Validation errors: inside `st-form-item` with `st-form-errors`, the `role="combobox"` trigger gets `aria-invalid="true"` while its control is invalid and touched or dirty, and the error message id joins the hint ids in its `aria-describedby`. See [Form Error](../form-error/README.md).
51
+ - Listbox: the trigger has `aria-haspopup="listbox"` and `aria-controls` pointing at the listbox's generated id (unique per instance). The listbox is named by the `label` (through the visually hidden label's id), or by the trigger when there is no `label`. With no options it shows `sdk.select.noOptions` ("No options available" when no translation is loaded).
52
+
53
+ ```html
54
+ <st-select [options]="countries" displayKey="name" valueKey="code" disabledKey="added" descriptionKey="note" [(value)]="country"></st-select>
55
+ ```
56
+
57
+ ```html
58
+ <st-select
59
+ [options]="countries"
60
+ displayKey="name"
61
+ valueKey="code"
62
+ groupKey="group"
63
+ disabledKey="added"
64
+ checkedKey="added"
65
+ [(value)]="country"
66
+ ></st-select>
67
+ ```