@sixbell-telco/sdk 4.9.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 (34) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/components/alert/src/alert.component.d.ts +8 -1
  3. package/components/data-table/README.md +1 -0
  4. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +12 -0
  5. package/components/file-upload/file-uploader/file-uploader.component.d.ts +6 -0
  6. package/components/forms/combobox/README.md +41 -1
  7. package/components/forms/combobox/src/combobox.component.d.ts +134 -3
  8. package/components/forms/select/README.md +41 -1
  9. package/components/forms/select/src/select.component.d.ts +119 -3
  10. package/components/forms/textarea/src/textarea.component.d.ts +6 -1
  11. package/components/progress/src/progress.component.d.ts +17 -3
  12. package/components/table/README.md +2 -0
  13. package/components/table/src/table.component.d.ts +13 -0
  14. package/fesm2022/sixbell-telco-sdk-components-alert.mjs +12 -5
  15. package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -1
  16. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +2 -2
  17. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  18. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +32 -6
  19. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  20. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +204 -21
  21. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  22. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +189 -17
  23. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  24. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +11 -3
  25. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  26. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +22 -4
  27. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  28. package/fesm2022/sixbell-telco-sdk-components-table.mjs +39 -5
  29. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  30. package/i18n/sdk/en.json +7 -1
  31. package/i18n/sdk/es.json +7 -1
  32. package/i18n/sdk/pt.json +7 -1
  33. package/manifest.json +95 -9
  34. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
3
  import { inject, input, booleanAttribute, computed, model, output, signal, viewChild, afterRenderEffect, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
4
  import { toObservable, toSignal } from '@angular/core/rxjs-interop';
@@ -65,6 +66,11 @@ const selectComponent = cva([
65
66
  size: 'md',
66
67
  },
67
68
  });
69
+ /**
70
+ * @internal
71
+ * Classes of an option row; the option sizer uses them too, so it measures what the panel shows
72
+ */
73
+ const OPTION_ROW_CLASS = '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';
68
74
  // ==============================================================================
69
75
  // COMPONENT
70
76
  // ==============================================================================
@@ -195,16 +201,48 @@ class SelectComponent {
195
201
  */
196
202
  disabledKey = input('');
197
203
  /**
198
- * The object property holding a secondary text shown under the option label
204
+ * The object property holding a secondary text shown right-aligned on the option row
199
205
  * (for example why it is disabled: "Already added"). It is part of the
200
206
  * option's accessible name.
201
207
  */
202
208
  descriptionKey = input('');
209
+ /**
210
+ * The object property naming the group an option belongs to. Options that share a value are listed
211
+ * together under one header showing that value, groups in the order they first appear, each group
212
+ * named by its header for assistive technology. Options without the property are listed first,
213
+ * ungrouped. Headers cannot be chosen and the arrow keys skip them. Leave empty for a flat list.
214
+ */
215
+ groupKey = input('');
216
+ /**
217
+ * The object property that marks an option as already taken outside this field when truthy (for
218
+ * example a country added earlier). The option shows the check icon, in the option's own color, but
219
+ * it is not part of the value and never appears in the trigger. Pair it with `disabledKey` so it is
220
+ * dimmed, check included, and cannot be chosen again.
221
+ */
222
+ checkedKey = input('');
203
223
  /**
204
224
  * Whether to show a clear button next to the selected value
205
225
  * @default true
206
226
  */
207
227
  allowClear = input(true, { transform: booleanAttribute });
228
+ /**
229
+ * Width of the options panel.
230
+ * - `'trigger'`: as wide as the control; a long option wraps onto more lines.
231
+ * - `'content'`: at least as wide as the control and wider when an option needs it, up to
232
+ * `min(28rem, 100vw - 2rem)`. Options stay on one line; past that cap the description, then the label,
233
+ * end in an ellipsis and the row shows its full text as a tooltip. Near the viewport edge the panel
234
+ * aligns to the control's end instead of overflowing.
235
+ * @defaultValue 'trigger'
236
+ */
237
+ panelWidth = input('trigger');
238
+ /**
239
+ * Size the closed control to its widest option or the placeholder, measured with the option row's own
240
+ * font, padding and check icon for the current `size`. A selected value never truncates and the control
241
+ * keeps its width between selections. The panel then follows its options as with `panelWidth="content"`.
242
+ * The control does not shrink in a flex row (`shrink-0`); `min-w-*` and `w-*` classes on the element still apply.
243
+ * @defaultValue false
244
+ */
245
+ fitOptions = input(false, { transform: booleanAttribute });
208
246
  /**
209
247
  * Parent form group for reactive forms
210
248
  */
@@ -295,6 +333,35 @@ class SelectComponent {
295
333
  { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
296
334
  { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
297
335
  ];
336
+ /** @internal Content-width panel positions: a panel wider than the control aligns to its end near the viewport edge */
337
+ contentOverlayPositions = [
338
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
339
+ { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },
340
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
341
+ { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },
342
+ ];
343
+ /** @internal Whether the panel sizes to its options (`panelWidth="content"` or `fitOptions`) */
344
+ contentPanel = computed(() => this.fitOptions() || this.panelWidth() === 'content');
345
+ /** @internal Positions bound to the overlay */
346
+ activeOverlayPositions = computed(() => (this.contentPanel() ? this.contentOverlayPositions : this.overlayPositions));
347
+ /** @internal Fixed overlay width: the trigger width, or none when the panel sizes to its options */
348
+ overlayWidth = computed(() => (this.contentPanel() ? '' : this.triggerWidth()));
349
+ /** @internal Classes of the panel box */
350
+ panelClass = computed(() => cn('rounded-box shadow-overlay', this.contentPanel() ? 'w-max max-w-[min(28rem,calc(100vw-2rem))] min-w-full' : 'w-full', this.animationClasses()));
351
+ /**
352
+ * @internal
353
+ * Classes of the hidden option sizer: the panel's menu size, so rows measure alike, plus a reserved scrollbar
354
+ * gutter, so a list that scrolls keeps the width of one that does not; capped like the panel, so a long
355
+ * option cannot widen the control past the panel
356
+ */
357
+ optionSizerClass = computed(() => cn('menu pointer-events-none invisible h-0 max-w-[min(28rem,calc(100vw-2rem))] scrollbar-gutter-stable flex-nowrap overflow-hidden p-0', this.menuSizeClass()));
358
+ /** @internal Classes of an option row */
359
+ optionRowClass = OPTION_ROW_CLASS;
360
+ /** @internal Texts the closed control must fit with `fitOptions`: the placeholder and every option label */
361
+ valueSizerLabels = computed(() => [
362
+ this.translatedPlaceholder(),
363
+ ...this.options().map((option) => this.getDisplayValue(option)),
364
+ ]);
298
365
  /** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
299
366
  placement = computed(() => {
300
367
  const position = this.currentPosition();
@@ -464,18 +531,27 @@ class SelectComponent {
464
531
  }
465
532
  return this.componentClass();
466
533
  });
534
+ /**
535
+ * @internal
536
+ * Options in the order they are listed: ungrouped first, then each `groupKey` group
537
+ */
538
+ optionSections = computed(() => this.groupOptions(this.options()));
539
+ /**
540
+ * @internal
541
+ * Options in the order they are listed, which keyboard navigation and `data-option-index` follow
542
+ */
543
+ orderedOptions = computed(() => this.groupKey() ? this.optionSections().flatMap((section) => section.options.map((entry) => entry.option)) : this.options());
467
544
  /**
468
545
  * CSS classes for the options menu
469
546
  * @internal
470
547
  */
471
548
  menuClass = computed(() => {
472
- return cn('menu max-h-72 w-full flex-nowrap overflow-y-auto overscroll-contain p-0 focus-within:outline-hidden focus:outline-hidden focus-visible:outline-hidden', {
473
- 'menu-xs': this.size() === 'xs',
474
- 'menu-sm': this.size() === 'sm',
475
- 'menu-md': this.size() === 'md',
476
- 'menu-lg': this.size() === 'lg',
477
- 'menu-xl': this.size() === 'xl',
478
- });
549
+ return cn('menu scroll-fade-y max-h-72 w-full flex-nowrap overflow-y-auto overscroll-contain p-0 focus-within:outline-hidden focus:outline-hidden focus-visible:outline-hidden', this.menuSizeClass());
550
+ });
551
+ /** @internal Menu size modifier shared by the options list and the option sizer */
552
+ menuSizeClass = computed(() => {
553
+ const size = this.size();
554
+ return size ? `menu-${size}` : '';
479
555
  });
480
556
  // ==============================================================================
481
557
  // LIFECYCLE METHODS
@@ -693,7 +769,7 @@ class SelectComponent {
693
769
  * @param event - The keyboard event
694
770
  */
695
771
  handleListboxKeydown(event) {
696
- const options = this.options();
772
+ const options = this.orderedOptions();
697
773
  const currentIndex = this.activeOptionIndex();
698
774
  switch (event.key) {
699
775
  case 'ArrowDown': {
@@ -846,6 +922,15 @@ class SelectComponent {
846
922
  const disabledKey = this.disabledKey();
847
923
  return !!disabledKey && !!option && typeof option === 'object' && !!option[disabledKey];
848
924
  }
925
+ /**
926
+ * Whether an option is marked as already taken through `checkedKey`
927
+ * @param option - The option to check
928
+ * @returns True if the option shows the check without being part of the value
929
+ */
930
+ isOptionChecked(option) {
931
+ const checkedKey = this.checkedKey();
932
+ return !!checkedKey && !!option && typeof option === 'object' && !!option[checkedKey];
933
+ }
849
934
  /**
850
935
  * Gets the secondary text for an option through `descriptionKey`
851
936
  * @param option - The option to read
@@ -895,11 +980,47 @@ class SelectComponent {
895
980
  * Updates the trigger button width for overlay positioning
896
981
  */
897
982
  updateTriggerWidth() {
898
- const width = this.fieldRef()?.nativeElement.offsetWidth;
983
+ // Fractional widths round up: rounding down would make an option that exactly fills the control wrap
984
+ const width = Math.ceil(this.fieldRef()?.nativeElement.getBoundingClientRect().width ?? 0);
899
985
  if (!width)
900
986
  return;
901
987
  this.triggerWidth.set(width);
902
988
  }
989
+ /**
990
+ * @internal
991
+ * On hover of a single-line option, shows its full text as a tooltip when its label or description is cut off
992
+ * @param event - The pointer event on the option row
993
+ * @param option - The option the row shows
994
+ */
995
+ syncOptionTitle(event, option) {
996
+ this.syncRowTitle(event.currentTarget, option);
997
+ }
998
+ /**
999
+ * Sets the full-text tooltip of an option row when its label or description is cut off, or removes it;
1000
+ * runs on hover and when the row becomes the keyboard-active one
1001
+ * @param row - The option row
1002
+ * @param option - The option the row shows
1003
+ */
1004
+ syncRowTitle(row, option) {
1005
+ const parts = row.querySelectorAll('[data-st-option-label], [data-st-option-description]');
1006
+ const truncated = Array.from(parts).some((part) => part.scrollWidth > part.clientWidth);
1007
+ if (truncated) {
1008
+ row.setAttribute('title', this.getOptionFullText(option));
1009
+ }
1010
+ else {
1011
+ row.removeAttribute('title');
1012
+ }
1013
+ }
1014
+ /**
1015
+ * Gets the full text of an option: its label, then its description when it has one
1016
+ * @param option - The option to read
1017
+ * @returns The text shown as the tooltip of a truncated option
1018
+ */
1019
+ getOptionFullText(option) {
1020
+ const description = this.getOptionDescription(option);
1021
+ const label = this.getDisplayValue(option);
1022
+ return description ? `${label}, ${description}` : label;
1023
+ }
903
1024
  /**
904
1025
  * Gets the value property from an option
905
1026
  * @param option - The option to get value from
@@ -911,6 +1032,48 @@ class SelectComponent {
911
1032
  const valueKey = this.valueKey();
912
1033
  return valueKey && typeof option === 'object' ? option[valueKey] : option;
913
1034
  }
1035
+ /**
1036
+ * Gets the group an option belongs to through `groupKey`
1037
+ * @param option - The option to read
1038
+ * @returns The group name, or null when the option is ungrouped
1039
+ */
1040
+ getOptionGroup(option) {
1041
+ const groupKey = this.groupKey();
1042
+ if (!groupKey || !option || typeof option !== 'object')
1043
+ return null;
1044
+ const group = option[groupKey];
1045
+ return group === undefined || group === null || group === '' ? null : String(group);
1046
+ }
1047
+ /**
1048
+ * Splits options into the ungrouped run, listed first, and one section per group in first-appearance order.
1049
+ * `index` is the option's position in the listed order; `headerId` is unique per instance.
1050
+ * @param options - The options to list
1051
+ * @returns The sections to render
1052
+ */
1053
+ groupOptions(options) {
1054
+ const ungrouped = [];
1055
+ const groups = new Map();
1056
+ for (const option of options) {
1057
+ const group = this.getOptionGroup(option);
1058
+ if (group === null) {
1059
+ ungrouped.push(option);
1060
+ }
1061
+ else {
1062
+ groups.set(group, [...(groups.get(group) ?? []), option]);
1063
+ }
1064
+ }
1065
+ let index = 0;
1066
+ const entries = (list) => list.map((option) => ({ option, index: index++ }));
1067
+ const sections = [];
1068
+ if (ungrouped.length > 0) {
1069
+ sections.push({ label: null, headerId: null, options: entries(ungrouped) });
1070
+ }
1071
+ let groupIndex = 0;
1072
+ for (const [label, list] of groups) {
1073
+ sections.push({ label, headerId: `${this.listboxId}-group-${groupIndex++}`, options: entries(list) });
1074
+ }
1075
+ return sections;
1076
+ }
914
1077
  /**
915
1078
  * Triggers blur event for form validation
916
1079
  */
@@ -944,12 +1107,14 @@ class SelectComponent {
944
1107
  this.updateActiveOptionVisually();
945
1108
  }
946
1109
  /**
947
- * Sets the first option as active by default
1110
+ * Makes the selected option active when the panel opens, so the highlight and the check sit on the same row;
1111
+ * without an enabled selected option, the first enabled one
948
1112
  */
949
1113
  setDefaultActiveOption() {
950
- const options = this.options();
1114
+ const options = this.orderedOptions();
951
1115
  if (options.length > 0) {
952
- this.setActiveOption(this.findEnabledIndex(options, -1, 1));
1116
+ const selectedIndex = options.findIndex((option) => this.isOptionSelected(option) && !this.isOptionDisabled(option));
1117
+ this.setActiveOption(selectedIndex >= 0 ? selectedIndex : this.findEnabledIndex(options, -1, 1));
953
1118
  }
954
1119
  }
955
1120
  /**
@@ -971,29 +1136,36 @@ class SelectComponent {
971
1136
  const activeOption = this.optionsList()?.nativeElement.querySelector(`[data-option-index="${currentIndex}"]`);
972
1137
  if (activeOption) {
973
1138
  activeOption.classList.add('cdk-option-active');
1139
+ const row = activeOption.querySelector(':scope > button');
1140
+ if (row && this.contentPanel())
1141
+ this.syncRowTitle(row, this.orderedOptions()[currentIndex]);
974
1142
  // Scroll into view if needed
975
1143
  activeOption.scrollIntoView({ block: 'nearest' });
976
1144
  }
977
1145
  }
978
1146
  }
979
1147
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
980
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: SelectComponent, isStandalone: true, selector: "st-select", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showOptional: { classPropertyName: "showOptional", publicName: "showOptional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayKey: { classPropertyName: "displayKey", publicName: "displayKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, disabledKey: { classPropertyName: "disabledKey", publicName: "disabledKey", isSignal: true, isRequired: false, transformFunction: null }, descriptionKey: { classPropertyName: "descriptionKey", publicName: "descriptionKey", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", blurred: "blurred", valueUpdated: "valueUpdated", clicked: "clicked", keyDownEnter: "keyDownEnter", keyDownSpace: "keyDownSpace", triggered: "triggered" }, providers: [
1148
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: SelectComponent, isStandalone: true, selector: "st-select", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showOptional: { classPropertyName: "showOptional", publicName: "showOptional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayKey: { classPropertyName: "displayKey", publicName: "displayKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, disabledKey: { classPropertyName: "disabledKey", publicName: "disabledKey", isSignal: true, isRequired: false, transformFunction: null }, descriptionKey: { classPropertyName: "descriptionKey", publicName: "descriptionKey", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, checkedKey: { classPropertyName: "checkedKey", publicName: "checkedKey", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, fitOptions: { classPropertyName: "fitOptions", publicName: "fitOptions", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", blurred: "blurred", valueUpdated: "valueUpdated", clicked: "clicked", keyDownEnter: "keyDownEnter", keyDownSpace: "keyDownSpace", triggered: "triggered" }, host: { properties: { "class.inline-block": "fitOptions()", "class.align-top": "fitOptions()", "class.shrink-0": "fitOptions()" } }, providers: [
981
1149
  {
982
1150
  provide: NG_VALUE_ACCESSOR,
983
1151
  useExisting: SelectComponent,
984
1152
  multi: true,
985
1153
  },
986
- ], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true, isSignal: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState(); @let options = this.options();\n@let displayValue = this.displayValue();\n@let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div\n\t\t#field\n\t\tcdkOverlayOrigin\n\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t[class]=\"validationClass()\"\n\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t(click)=\"handleFieldChromeClick($event)\"\n\t>\n\t\t<button\n\t\t\t#trigger\n\t\t\t[id]=\"resolvedId()\"\n\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t(click)=\"handleClick($event)\"\n\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\trole=\"combobox\"\n\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t>\n\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t{{ displayValue }}\n\t\t\t</span>\n\t\t</button>\n\t\t@if (showClearButton()) {\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tdata-st-clear\n\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t>\n\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t</button>\n\t\t}\n\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t</span>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"overlayPositions\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"'rounded-box shadow-overlay w-full ' + animationClasses()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@for (option of options; track $index) {\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"$index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption($index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclass=\"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\"\n\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted block text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\">\n\t\t\t\t\t\t\t\t<span>{{ noOptionsLabel() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1154
+ ], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true, isSignal: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState(); @let options = this.options();\n@let displayValue = this.displayValue();\n@let label = this.label();\n@let fitOptions = this.fitOptions(); @let contentPanel = this.contentPanel();\n\n<!-- One option on a single line (content-width panel and option sizer): label, description, check slot (always 16px in the sizer) -->\n<ng-template #optionLine let-option let-sizer=\"sizer\">\n\t@let lineDescription = getOptionDescription(option);\n\t<span class=\"flex min-w-0 grow items-center\">\n\t\t<span data-st-option-label [class]=\"lineDescription ? 'max-w-[calc(100%-1.25rem)] shrink-0 truncate' : 'max-w-full shrink-0 truncate'\">{{\n\t\t\tgetDisplayValue(option)\n\t\t}}</span>\n\t\t@if (lineDescription) {\n\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t<span\n\t\t\t\tdata-st-option-description\n\t\t\t\tclass=\"text-base-content-muted ms-3 me-2 min-w-0 grow truncate text-end text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t>{{ lineDescription }}</span\n\t\t\t>\n\t\t}\n\t</span>\n\t@if (sizer) {\n\t\t<span class=\"size-4 shrink-0\"></span>\n\t} @else if (isOptionSelected(option)) {\n\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t} @else if (isOptionChecked(option)) {\n\t\t<st-icon data-st-option-checked class=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\" [icon]=\"iconCheck\"></st-icon>\n\t} @else {\n\t\t<span aria-hidden=\"true\" class=\"size-4 shrink-0\"></span>\n\t}\n</ng-template>\n\n<!-- Hidden stack of every option row, so CSS takes the widest as the width -->\n<ng-template #optionSizer let-placement>\n\t<ul aria-hidden=\"true\" data-st-option-sizer [class]=\"optionSizerClass() + ' ' + placement\">\n\t\t@for (section of optionSections(); track section.label) {\n\t\t\t@if (section.label) {\n\t\t\t\t<li class=\"menu-title px-4 font-semibold whitespace-nowrap\">{{ section.label }}</li>\n\t\t\t}\n\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t<li>\n\t\t\t\t\t<div [class]=\"optionRowClass + ' whitespace-nowrap'\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: entry.option, sizer: true }\" />\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t}\n\t\t}\n\t</ul>\n</ng-template>\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div [class]=\"fitOptions ? 'grid' : 'contents'\">\n\t\t@if (fitOptions) {\n\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: 'col-start-1 row-start-1 border-x border-solid border-transparent' }\" />\n\t\t}\n\t\t<div\n\t\t\t#field\n\t\t\tcdkOverlayOrigin\n\t\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t\t[class]=\"validationClass()\"\n\t\t\t[class.col-start-1]=\"fitOptions\"\n\t\t\t[class.row-start-1]=\"fitOptions\"\n\t\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t\t(click)=\"handleFieldChromeClick($event)\"\n\t\t>\n\t\t\t<button\n\t\t\t\t#trigger\n\t\t\t\t[id]=\"resolvedId()\"\n\t\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t\t(click)=\"handleClick($event)\"\n\t\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[disabled]=\"disabled()\"\n\t\t\t>\n\t\t\t\t@if (fitOptions) {\n\t\t\t\t\t<span class=\"grid min-w-0\">\n\t\t\t\t\t\t<span class=\"col-start-1 row-start-1 block min-w-0 truncate text-left\">{{ displayValue }}</span>\n\t\t\t\t\t\t<span aria-hidden=\"true\" data-st-value-sizer class=\"invisible col-start-1 row-start-1 h-0 overflow-hidden\">\n\t\t\t\t\t\t\t@for (text of valueSizerLabels(); track $index) {\n\t\t\t\t\t\t\t\t<span class=\"block whitespace-nowrap\">{{ text }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t\t\t{{ displayValue }}\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t</button>\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-st-clear\n\t\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t\t>\n\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t</button>\n\t\t\t} @else if (fitOptions && allowClear()) {\n\t\t\t\t<!-- Keeps the clear button's room so the fitted control does not change width when a value is chosen -->\n\t\t\t\t<span aria-hidden=\"true\" data-st-clear-spacer class=\"w-[1.25em] shrink-0\"></span>\n\t\t\t}\n\t\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"activeOverlayPositions()\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"overlayWidth()\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"panelClass()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-template #optionTemplate let-option let-index=\"index\">\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption(index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t[class]=\"optionRowClass + ' whitespace-nowrap'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\t\t(mouseenter)=\"syncOptionTitle($event, option)\"\n\t\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: option }\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<button type=\"button\" [class]=\"optionRowClass\" (click)=\"handleOptionSelect(option)\" tabindex=\"-1\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"min-w-min flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted ms-3 min-w-0 truncate text-end text-sm not-last:me-2 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t\t} @else if (isOptionChecked(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-checked\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[icon]=\"iconCheck\"\n\t\t\t\t\t\t\t\t\t\t\t></st-icon>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t@for (section of optionSections(); track section.label; let firstSection = $first) {\n\t\t\t\t\t\t\t@if (section.headerId) {\n\t\t\t\t\t\t\t\t@if (!firstSection) {\n\t\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group-separator class=\"pointer-events-none top-0 left-0 mx-0 my-1 w-full p-0\"></li>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group>\n\t\t\t\t\t\t\t\t\t<ul role=\"group\" class=\"ms-0 ps-0 whitespace-normal before:hidden\" [attr.aria-labelledby]=\"section.headerId\">\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\t\t\t\t\tdata-st-option-group-header\n\t\t\t\t\t\t\t\t\t\t\tclass=\"menu-title text-base-content-secondary px-4 font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t[id]=\"section.headerId\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{{ section.label }}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\">\n\t\t\t\t\t\t\t\t<span>{{ noOptionsLabel() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
987
1155
  }
988
1156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SelectComponent, decorators: [{
989
1157
  type: Component,
990
- args: [{ selector: 'st-select', imports: [FormsModule, OverlayModule, PortalModule, CdkListbox, CdkOption, IconComponent, TranslatePipe], providers: [
1158
+ args: [{ selector: 'st-select', imports: [FormsModule, NgTemplateOutlet, OverlayModule, PortalModule, CdkListbox, CdkOption, IconComponent, TranslatePipe], providers: [
991
1159
  {
992
1160
  provide: NG_VALUE_ACCESSOR,
993
1161
  useExisting: SelectComponent,
994
1162
  multi: true,
995
1163
  },
996
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState(); @let options = this.options();\n@let displayValue = this.displayValue();\n@let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div\n\t\t#field\n\t\tcdkOverlayOrigin\n\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t[class]=\"validationClass()\"\n\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t(click)=\"handleFieldChromeClick($event)\"\n\t>\n\t\t<button\n\t\t\t#trigger\n\t\t\t[id]=\"resolvedId()\"\n\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t(click)=\"handleClick($event)\"\n\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\trole=\"combobox\"\n\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t>\n\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t{{ displayValue }}\n\t\t\t</span>\n\t\t</button>\n\t\t@if (showClearButton()) {\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tdata-st-clear\n\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t>\n\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t</button>\n\t\t}\n\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t</span>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"overlayPositions\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"'rounded-box shadow-overlay w-full ' + animationClasses()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@for (option of options; track $index) {\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"$index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption($index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclass=\"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\"\n\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted block text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\">\n\t\t\t\t\t\t\t\t<span>{{ noOptionsLabel() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n" }]
1164
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1165
+ '[class.inline-block]': 'fitOptions()',
1166
+ '[class.align-top]': 'fitOptions()',
1167
+ '[class.shrink-0]': 'fitOptions()',
1168
+ }, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState(); @let options = this.options();\n@let displayValue = this.displayValue();\n@let label = this.label();\n@let fitOptions = this.fitOptions(); @let contentPanel = this.contentPanel();\n\n<!-- One option on a single line (content-width panel and option sizer): label, description, check slot (always 16px in the sizer) -->\n<ng-template #optionLine let-option let-sizer=\"sizer\">\n\t@let lineDescription = getOptionDescription(option);\n\t<span class=\"flex min-w-0 grow items-center\">\n\t\t<span data-st-option-label [class]=\"lineDescription ? 'max-w-[calc(100%-1.25rem)] shrink-0 truncate' : 'max-w-full shrink-0 truncate'\">{{\n\t\t\tgetDisplayValue(option)\n\t\t}}</span>\n\t\t@if (lineDescription) {\n\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t<span\n\t\t\t\tdata-st-option-description\n\t\t\t\tclass=\"text-base-content-muted ms-3 me-2 min-w-0 grow truncate text-end text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t>{{ lineDescription }}</span\n\t\t\t>\n\t\t}\n\t</span>\n\t@if (sizer) {\n\t\t<span class=\"size-4 shrink-0\"></span>\n\t} @else if (isOptionSelected(option)) {\n\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t} @else if (isOptionChecked(option)) {\n\t\t<st-icon data-st-option-checked class=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\" [icon]=\"iconCheck\"></st-icon>\n\t} @else {\n\t\t<span aria-hidden=\"true\" class=\"size-4 shrink-0\"></span>\n\t}\n</ng-template>\n\n<!-- Hidden stack of every option row, so CSS takes the widest as the width -->\n<ng-template #optionSizer let-placement>\n\t<ul aria-hidden=\"true\" data-st-option-sizer [class]=\"optionSizerClass() + ' ' + placement\">\n\t\t@for (section of optionSections(); track section.label) {\n\t\t\t@if (section.label) {\n\t\t\t\t<li class=\"menu-title px-4 font-semibold whitespace-nowrap\">{{ section.label }}</li>\n\t\t\t}\n\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t<li>\n\t\t\t\t\t<div [class]=\"optionRowClass + ' whitespace-nowrap'\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: entry.option, sizer: true }\" />\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t}\n\t\t}\n\t</ul>\n</ng-template>\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div [class]=\"fitOptions ? 'grid' : 'contents'\">\n\t\t@if (fitOptions) {\n\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: 'col-start-1 row-start-1 border-x border-solid border-transparent' }\" />\n\t\t}\n\t\t<div\n\t\t\t#field\n\t\t\tcdkOverlayOrigin\n\t\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t\t[class]=\"validationClass()\"\n\t\t\t[class.col-start-1]=\"fitOptions\"\n\t\t\t[class.row-start-1]=\"fitOptions\"\n\t\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t\t(click)=\"handleFieldChromeClick($event)\"\n\t\t>\n\t\t\t<button\n\t\t\t\t#trigger\n\t\t\t\t[id]=\"resolvedId()\"\n\t\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t\t(click)=\"handleClick($event)\"\n\t\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[disabled]=\"disabled()\"\n\t\t\t>\n\t\t\t\t@if (fitOptions) {\n\t\t\t\t\t<span class=\"grid min-w-0\">\n\t\t\t\t\t\t<span class=\"col-start-1 row-start-1 block min-w-0 truncate text-left\">{{ displayValue }}</span>\n\t\t\t\t\t\t<span aria-hidden=\"true\" data-st-value-sizer class=\"invisible col-start-1 row-start-1 h-0 overflow-hidden\">\n\t\t\t\t\t\t\t@for (text of valueSizerLabels(); track $index) {\n\t\t\t\t\t\t\t\t<span class=\"block whitespace-nowrap\">{{ text }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t\t\t{{ displayValue }}\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t</button>\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-st-clear\n\t\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t\t>\n\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t</button>\n\t\t\t} @else if (fitOptions && allowClear()) {\n\t\t\t\t<!-- Keeps the clear button's room so the fitted control does not change width when a value is chosen -->\n\t\t\t\t<span aria-hidden=\"true\" data-st-clear-spacer class=\"w-[1.25em] shrink-0\"></span>\n\t\t\t}\n\t\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"activeOverlayPositions()\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"overlayWidth()\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"panelClass()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-template #optionTemplate let-option let-index=\"index\">\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption(index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t[class]=\"optionRowClass + ' whitespace-nowrap'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\t\t(mouseenter)=\"syncOptionTitle($event, option)\"\n\t\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: option }\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<button type=\"button\" [class]=\"optionRowClass\" (click)=\"handleOptionSelect(option)\" tabindex=\"-1\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"min-w-min flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted ms-3 min-w-0 truncate text-end text-sm not-last:me-2 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t\t} @else if (isOptionChecked(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-checked\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[icon]=\"iconCheck\"\n\t\t\t\t\t\t\t\t\t\t\t></st-icon>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t@for (section of optionSections(); track section.label; let firstSection = $first) {\n\t\t\t\t\t\t\t@if (section.headerId) {\n\t\t\t\t\t\t\t\t@if (!firstSection) {\n\t\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group-separator class=\"pointer-events-none top-0 left-0 mx-0 my-1 w-full p-0\"></li>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group>\n\t\t\t\t\t\t\t\t\t<ul role=\"group\" class=\"ms-0 ps-0 whitespace-normal before:hidden\" [attr.aria-labelledby]=\"section.headerId\">\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\t\t\t\t\tdata-st-option-group-header\n\t\t\t\t\t\t\t\t\t\t\tclass=\"menu-title text-base-content-secondary px-4 font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t[id]=\"section.headerId\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{{ section.label }}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\">\n\t\t\t\t\t\t\t\t<span>{{ noOptionsLabel() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n" }]
997
1169
  }] });
998
1170
 
999
1171
  /**