@4sh/ui-kit 0.2.0 → 0.3.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.
- package/README.fr.md +162 -55
- package/README.md +157 -54
- package/collection.json +2 -13
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +48 -8
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +2 -2
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +9 -3
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +4 -5
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +43 -5
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +3 -3
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +2 -2
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +2 -2
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +2 -2
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +2 -2
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +2 -2
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +4 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +6 -6
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +4 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +2 -2
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2 -2
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/package.json +1 -4
- package/schematics/index.cjs +34 -59
- package/styles/component-vars.scss +953 -0
- package/styles/generated/_tokens-semantics.scss +36 -0
- package/styles/settings/_ui-config.scss +54 -44
- package/styles.css +1 -1
- package/types/4sh-ui-kit-base-ui-icon.d.ts +35 -4
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +6 -1
- package/types/4sh-ui-kit-forms-ui-input.d.ts +33 -2
- package/types/4sh-ui-kit-layout-ui-card.d.ts +1 -1
- package/schematics/schema-add.json +0 -19
- package/schematics/schema-ng-add.json +0 -13
- package/schematics/schema-update.json +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-segment-control.mjs","sources":["../../../projects/ui-kit/forms/ui-segment-control/src/lib/ui-segment-control.ts","../../../projects/ui-kit/forms/ui-segment-control/src/lib/ui-segment-control.html","../../../projects/ui-kit/forms/ui-segment-control/src/public-api.ts","../../../projects/ui-kit/forms/ui-segment-control/src/4sh-ui-kit-forms-ui-segment-control.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n effect,\n forwardRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl } from '@4sh/ui-kit/forms';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type SegmentControlSize = 'default' | 'small';\nexport type SegmentControlOrientation = 'horizontal' | 'vertical';\n\n/** Selected value: a single value (single mode) or an array (`multiple`). */\nexport type SegmentControlValue<T = unknown> = T | T[] | null;\n\n/**\n * Rich option shape. Options may also be primitives (`string`/`number`) or any\n * object, in which case the `optionLabel` / `optionValue` / `optionDisabled` /\n * `optionIcon` field names tell the control how to read them.\n */\nexport interface SegmentControlOption<T = unknown> {\n /** Text shown inside the segment. */\n label?: string;\n /** Value carried into the model when the segment is selected. */\n value: T;\n /** Leading icon name (design-system icon). */\n icon?: string;\n /** Disables just this segment. */\n disabled?: boolean;\n /** Accessible name (required for an icon-only segment). */\n ariaLabel?: string;\n}\n\n/** Payload emitted when a segment is clicked. */\nexport interface SegmentControlOptionClickEvent<T = unknown> {\n /** The original option (as passed in `options`). */\n option: T;\n /** The resolved value of that option. */\n value: T;\n /** Index of the option in the list. */\n index: number;\n /** Originating DOM event. */\n originalEvent: Event;\n}\n\n/** Context handed to a custom item template. */\nexport interface SegmentControlItemContext<T = unknown> {\n /** The original option (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n option: T;\n /** Whether this segment is currently selected. */\n selected: boolean;\n /** Index of the option in the list. */\n index: number;\n}\n\n/** @ignore Internal, normalized view of an option (template + logic source). */\ninterface NormalizedSegment {\n key: string;\n index: number;\n value: unknown;\n label: string | null;\n icon: string | null;\n ariaLabel: string | null;\n disabled: boolean;\n selected: boolean;\n original: unknown;\n}\n\n/** @ignore Measured geometry of the sliding selection indicator. */\ninterface ThumbMetrics {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\n/**\n * ui-segment-control — headless segmented control for choosing one (or, with\n * `multiple`, several) value(s) from a short list of inline buttons.\n *\n * Each segment is a real native `<button>`; the group carries WAI-ARIA semantics\n * (`radiogroup`/`radio` in single mode with roving arrow-key navigation and\n * select-on-arrow, `group`/`aria-pressed` in `multiple` mode) so keyboard and\n * screen-reader support come for free. Interactive states (hover/focus/pressed/\n * disabled) are pure CSS driven by the `actions.*` design tokens.\n *\n * In single mode a sliding indicator glides under the selected segment, timed by\n * the shared motion system (honours reduced-motion and the `motion` opt-out).\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`) — it is a `ControlValueAccessor`.\n *\n * @example\n * ```html\n * <ui-segment-control [(ngModel)]=\"view\" [options]=\"['Liste', 'Grille']\" />\n * ```\n */\n@Component({\n selector: 'ui-segment-control',\n imports: [UiIcon, NgTemplateOutlet],\n templateUrl: './ui-segment-control.html',\n styleUrl: './ui-segment-control.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSegmentControl), multi: true },\n ],\n host: {\n class: 'ui-segment-control',\n '[class._small]': \"size() === 'small'\",\n '[class._vertical]': \"orientation() === 'vertical'\",\n '[class._fluid]': 'fluid()',\n '[class._multiple]': 'multiple()',\n '[class._disabled]': 'isDisabled()',\n '[class._invalid]': 'isInvalid()',\n '[class._no-motion]': '!motion()',\n '[attr.role]': \"multiple() ? 'group' : 'radiogroup'\",\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() || null',\n '[attr.aria-invalid]': \"isInvalid() ? 'true' : null\",\n '[attr.aria-disabled]': \"isDisabled() ? 'true' : null\",\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class UiSegmentControl<T = unknown> extends BaseFieldControl<SegmentControlValue<T>> {\n /** Options to display, one button each. Primitives, objects, or `SegmentControlOption`. */\n options = input<readonly (T | SegmentControlOption<T>)[]>([]);\n /** Field name to read a label from, when options are objects. */\n optionLabel = input<string>();\n /** Field name to read the value from, when options are objects. */\n optionValue = input<string>();\n /** Field name to read the disabled flag from, when options are objects. */\n optionDisabled = input<string>();\n /** Field name to read an icon name from, when options are objects. */\n optionIcon = input<string>();\n /** Property used to compare object values for equality (selection matching). */\n dataKey = input<string>();\n /** Allow selecting several values at once (the model becomes an array). */\n multiple = input(false, { transform: booleanAttribute });\n /** Whether the selection can be fully cleared (single) / emptied (multiple). */\n allowEmpty = input(true, { transform: booleanAttribute });\n /** Size. */\n size = input<SegmentControlSize>('default');\n /** Layout axis (drives which arrow keys navigate). */\n orientation = input<SegmentControlOrientation>('horizontal');\n /** Span the full width of the parent (segments share the width evenly). */\n fluid = input(false, { transform: booleanAttribute });\n /** Animate the sliding indicator (honours reduced-motion regardless). */\n motion = input(true, { transform: booleanAttribute });\n /** Custom template for a segment's content (receives `{ $implicit, option, selected, index }`). */\n itemTemplate = input<TemplateRef<SegmentControlItemContext<T>>>();\n\n /** Emitted on user selection with the new model value. */\n selectionChange = output<SegmentControlValue<T>>();\n /** Emitted when a segment is clicked (even if it does not change the value). */\n optionClick = output<SegmentControlOptionClickEvent<T>>();\n\n /** @ignore */\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** @ignore */\n private readonly hostDestroyRef = inject(DestroyRef);\n /** @ignore Native segment buttons (for roving focus + indicator measurement). */\n private readonly optionEls = viewChildren<ElementRef<HTMLButtonElement>>('optionBtn');\n /** @ignore Current model value (written by the form or by user selection).\n * Redeclared over the base signal to keep `null` (not `undefined`) as the empty value. */\n protected override readonly modelValue = signal<SegmentControlValue<T>>(null);\n /** @ignore Index the roving focus last landed on. */\n private readonly focusedIndex = signal(0);\n /** @ignore Measured geometry of the sliding indicator (null until first measure). */\n protected readonly thumb = signal<ThumbMetrics | null>(null);\n /** @ignore Bumped by the ResizeObserver to re-measure the indicator. */\n private readonly resizeTick = signal(0);\n\n constructor() {\n super();\n\n // Re-measure the sliding indicator whenever the observed geometry changes.\n afterNextRender(() => {\n const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));\n ro.observe(this.host.nativeElement);\n this.hostDestroyRef.onDestroy(() => ro.disconnect());\n });\n\n // Track the selected segment with the indicator (single mode only).\n afterRenderEffect(() => {\n const index = this.selectedIndex();\n this.resizeTick();\n // Track layout-affecting inputs so the indicator follows re-layouts.\n this.size();\n this.orientation();\n this.fluid();\n this.normalizedOptions();\n\n if (this.multiple() || index === -1) return;\n const el = this.optionEls()[index]?.nativeElement;\n const track = this.host.nativeElement;\n if (!el) return;\n\n const next: ThumbMetrics = {\n x: el.offsetLeft - track.clientLeft,\n y: el.offsetTop - track.clientTop,\n w: el.offsetWidth,\n h: el.offsetHeight,\n };\n const cur = untracked(this.thumb);\n if (!cur || cur.x !== next.x || cur.y !== next.y || cur.w !== next.w || cur.h !== next.h) {\n this.thumb.set(next);\n }\n });\n\n // A11y safeguards (dev only).\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n console.warn(\n '[ui-segment-control] Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n const iconOnly = this.normalizedOptions().some((o) => o.icon && !o.label && !o.ariaLabel);\n if (iconOnly) {\n console.warn(\n '[ui-segment-control] Icon-only segment has no accessible name: add `ariaLabel` on the option.',\n );\n }\n });\n }\n }\n\n /** @ignore Icon size derived from the control size. */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore Options resolved to a flat, render-ready shape. */\n protected readonly normalizedOptions = computed<NormalizedSegment[]>(() => {\n const raw = this.options() ?? [];\n const model = this.modelValue();\n const groupDisabled = this.isDisabled();\n return raw.map((option, index) => {\n const value = this.resolveValue(option);\n const label = this.resolveLabel(option);\n return {\n key: `${this.uid}-${index}`,\n index,\n value,\n label,\n icon: this.resolveIcon(option),\n ariaLabel: this.resolveAriaLabel(option),\n disabled: groupDisabled || this.resolveDisabled(option),\n selected: this.isValueSelected(value, model),\n original: option,\n };\n });\n });\n\n /** @ignore Index of the selected segment in single mode (-1 if none / multiple). */\n protected readonly selectedIndex = computed(() =>\n this.multiple() ? -1 : this.normalizedOptions().findIndex((o) => o.selected),\n );\n\n /** @ignore Whether the sliding indicator should render. */\n protected readonly showThumb = computed(\n () => !this.multiple() && this.selectedIndex() !== -1 && this.thumb() !== null,\n );\n\n /** @ignore CSS transform positioning the indicator over the selected segment. */\n protected readonly thumbTransform = computed(() => {\n const t = this.thumb();\n return t ? `translate(${t.x}px, ${t.y}px)` : null;\n });\n\n /** @ignore Segment that owns the group's single tab stop (roving tabindex). */\n protected readonly rovingIndex = computed(() => {\n const opts = this.normalizedOptions();\n if (!opts.length) return -1;\n if (!this.multiple()) {\n const selected = opts.findIndex((o) => o.selected && !o.disabled);\n if (selected !== -1) return selected;\n }\n const focused = this.focusedIndex();\n if (opts[focused] && !opts[focused].disabled) return focused;\n return opts.findIndex((o) => !o.disabled);\n });\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-segment-control';\n }\n\n /** Move focus to the group's current tab stop. */\n focus(options?: FocusOptions): void {\n const index = this.rovingIndex();\n if (index !== -1) this.optionEls()[index]?.nativeElement.focus(options);\n }\n\n /** @ignore The tabindex for a given segment (roving: one 0, the rest -1). */\n protected tabindexFor(index: number): number {\n return index === this.rovingIndex() ? 0 : -1;\n }\n\n /** @ignore Select (or toggle / clear) a segment on user interaction. */\n protected select(option: NormalizedSegment, event: Event): void {\n if (option.disabled || this.readonly()) return;\n const value = option.value as T;\n\n let next: SegmentControlValue<T>;\n if (this.multiple()) {\n const current = Array.isArray(this.modelValue()) ? [...(this.modelValue() as T[])] : [];\n const at = current.findIndex((v) => this.equals(v, value));\n if (at !== -1) {\n if (!this.allowEmpty() && current.length === 1) return; // keep at least one\n current.splice(at, 1);\n } else {\n current.push(value);\n }\n next = current;\n } else {\n if (option.selected) {\n if (!this.allowEmpty()) return; // cannot clear the selection\n next = null;\n } else {\n next = value;\n }\n }\n\n this.focusedIndex.set(option.index);\n this.modelValue.set(next);\n this.emitChange(next);\n this.selectionChange.emit(next);\n this.optionClick.emit({ option: option.original as T, value, index: option.index, originalEvent: event });\n }\n\n /** @ignore */\n protected onOptionFocus(index: number): void {\n this.focusedIndex.set(index);\n }\n\n /** @ignore Roving focus (and select-on-arrow in single mode). */\n protected onKeydown(event: KeyboardEvent): void {\n const horizontal = this.orientation() === 'horizontal';\n const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';\n const prevKey = horizontal ? 'ArrowLeft' : 'ArrowUp';\n if (![nextKey, prevKey, 'Home', 'End'].includes(event.key)) return;\n\n const opts = this.normalizedOptions();\n const enabled = opts.filter((o) => !o.disabled);\n if (!enabled.length) return;\n\n event.preventDefault();\n let pos = enabled.findIndex((o) => o.index === this.focusedIndex());\n if (pos === -1) pos = 0;\n\n switch (event.key) {\n case nextKey: pos = (pos + 1) % enabled.length; break;\n case prevKey: pos = (pos - 1 + enabled.length) % enabled.length; break;\n case 'Home': pos = 0; break;\n case 'End': pos = enabled.length - 1; break;\n }\n\n const target = enabled[pos];\n this.focusedIndex.set(target.index);\n this.optionEls()[target.index]?.nativeElement.focus();\n // Single mode follows the radio pattern: arrows move AND select.\n if (!this.multiple()) this.select(target, event);\n }\n\n /** @ignore Mark touched when focus leaves the whole group. */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !this.host.nativeElement.contains(next)) this.emitTouch();\n }\n\n // --- Option resolution -------------------------------------------------\n\n /** @ignore */\n private isObject(option: unknown): option is Record<string, unknown> {\n return typeof option === 'object' && option !== null;\n }\n\n /** @ignore */\n private resolveValue(option: unknown): unknown {\n const field = this.optionValue();\n if (field && this.isObject(option)) return option[field];\n if (this.isObject(option) && 'value' in option) return option['value'];\n return option;\n }\n\n /** @ignore */\n private resolveLabel(option: unknown): string | null {\n const field = this.optionLabel();\n if (field && this.isObject(option)) return this.asText(option[field]);\n if (this.isObject(option)) return 'label' in option ? this.asText(option['label']) : null;\n return this.asText(option);\n }\n\n /** @ignore */\n private resolveIcon(option: unknown): string | null {\n const field = this.optionIcon();\n if (field && this.isObject(option)) return this.asText(option[field]);\n if (this.isObject(option) && 'icon' in option) return this.asText(option['icon']);\n return null;\n }\n\n /** @ignore */\n private resolveAriaLabel(option: unknown): string | null {\n if (this.isObject(option) && 'ariaLabel' in option) return this.asText(option['ariaLabel']);\n return null;\n }\n\n /** @ignore */\n private resolveDisabled(option: unknown): boolean {\n const field = this.optionDisabled();\n if (field && this.isObject(option)) return !!option[field];\n if (this.isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n }\n\n /** @ignore */\n private asText(value: unknown): string | null {\n return value === null || value === undefined ? null : String(value);\n }\n\n /** @ignore Whether a resolved value is part of the current model. */\n private isValueSelected(value: unknown, model: SegmentControlValue<T>): boolean {\n if (this.multiple()) {\n return Array.isArray(model) && model.some((v) => this.equals(v, value));\n }\n return this.equals(model, value);\n }\n\n /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */\n private equals(a: unknown, b: unknown): boolean {\n const key = this.dataKey();\n if (key && this.isObject(a) && this.isObject(b)) return a[key] === b[key];\n return a === b;\n }\n}\n","@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{ option.label }}</span>\n }\n }\n </button>\n}\n","/*\n * Public API Surface of ui-kit/ui-segment-control\n */\n\nexport * from './lib/ui-segment-control';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA6FA;;;;;;;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AC3B,wBAAA,gBAAgB,EAAE,oBAAoB;AACtC,wBAAA,mBAAmB,EAAE,8BAA8B;AACnD,wBAAA,gBAAgB,EAAE,SAAS;AAC3B,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,kBAAkB,EAAE,aAAa;AACjC,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,aAAa,EAAE,qCAAqC;AACpD,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,qBAAqB,EAAE,6BAA6B;AACpD,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA,EAAA,QAAA,EAAA,s6CAAA,EAAA,MAAA,EAAA,CAAA,wmIAAA,CAAA,EAAA;09CAwCwE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElLtF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-segment-control.mjs","sources":["../../../projects/ui-kit/forms/ui-segment-control/src/lib/ui-segment-control.ts","../../../projects/ui-kit/forms/ui-segment-control/src/lib/ui-segment-control.html","../../../projects/ui-kit/forms/ui-segment-control/src/public-api.ts","../../../projects/ui-kit/forms/ui-segment-control/src/4sh-ui-kit-forms-ui-segment-control.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n effect,\n forwardRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl } from '@4sh/ui-kit/forms';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type SegmentControlSize = 'default' | 'small';\nexport type SegmentControlOrientation = 'horizontal' | 'vertical';\n\n/** Selected value: a single value (single mode) or an array (`multiple`). */\nexport type SegmentControlValue<T = unknown> = T | T[] | null;\n\n/**\n * Rich option shape. Options may also be primitives (`string`/`number`) or any\n * object, in which case the `optionLabel` / `optionValue` / `optionDisabled` /\n * `optionIcon` field names tell the control how to read them.\n */\nexport interface SegmentControlOption<T = unknown> {\n /** Text shown inside the segment. */\n label?: string;\n /** Value carried into the model when the segment is selected. */\n value: T;\n /** Leading icon name (design-system icon). */\n icon?: string;\n /** Disables just this segment. */\n disabled?: boolean;\n /** Accessible name (required for an icon-only segment). */\n ariaLabel?: string;\n}\n\n/** Payload emitted when a segment is clicked. */\nexport interface SegmentControlOptionClickEvent<T = unknown> {\n /** The original option (as passed in `options`). */\n option: T;\n /** The resolved value of that option. */\n value: T;\n /** Index of the option in the list. */\n index: number;\n /** Originating DOM event. */\n originalEvent: Event;\n}\n\n/** Context handed to a custom item template. */\nexport interface SegmentControlItemContext<T = unknown> {\n /** The original option (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n option: T;\n /** Whether this segment is currently selected. */\n selected: boolean;\n /** Index of the option in the list. */\n index: number;\n}\n\n/** @ignore Internal, normalized view of an option (template + logic source). */\ninterface NormalizedSegment {\n key: string;\n index: number;\n value: unknown;\n label: string | null;\n icon: string | null;\n ariaLabel: string | null;\n disabled: boolean;\n selected: boolean;\n original: unknown;\n}\n\n/** @ignore Measured geometry of the sliding selection indicator. */\ninterface ThumbMetrics {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\n/**\n * ui-segment-control — headless segmented control for choosing one (or, with\n * `multiple`, several) value(s) from a short list of inline buttons.\n *\n * Each segment is a real native `<button>`; the group carries WAI-ARIA semantics\n * (`radiogroup`/`radio` in single mode with roving arrow-key navigation and\n * select-on-arrow, `group`/`aria-pressed` in `multiple` mode) so keyboard and\n * screen-reader support come for free. Interactive states (hover/focus/pressed/\n * disabled) are pure CSS driven by the `actions.*` design tokens.\n *\n * In single mode a sliding indicator glides under the selected segment, timed by\n * the shared motion system (honours reduced-motion and the `motion` opt-out).\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`) — it is a `ControlValueAccessor`.\n *\n * @example\n * ```html\n * <ui-segment-control [(ngModel)]=\"view\" [options]=\"['Liste', 'Grille']\" />\n * ```\n */\n@Component({\n selector: 'ui-segment-control',\n imports: [UiIcon, NgTemplateOutlet],\n templateUrl: './ui-segment-control.html',\n styleUrl: './ui-segment-control.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSegmentControl), multi: true },\n ],\n host: {\n class: 'ui-segment-control',\n '[class._small]': \"size() === 'small'\",\n '[class._vertical]': \"orientation() === 'vertical'\",\n '[class._fluid]': 'fluid()',\n '[class._multiple]': 'multiple()',\n '[class._disabled]': 'isDisabled()',\n '[class._invalid]': 'isInvalid()',\n '[class._no-motion]': '!motion()',\n '[attr.role]': \"multiple() ? 'group' : 'radiogroup'\",\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() || null',\n '[attr.aria-invalid]': \"isInvalid() ? 'true' : null\",\n '[attr.aria-disabled]': \"isDisabled() ? 'true' : null\",\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class UiSegmentControl<T = unknown> extends BaseFieldControl<SegmentControlValue<T>> {\n /** Options to display, one button each. Primitives, objects, or `SegmentControlOption`. */\n options = input<readonly (T | SegmentControlOption<T>)[]>([]);\n /** Field name to read a label from, when options are objects. */\n optionLabel = input<string>();\n /** Field name to read the value from, when options are objects. */\n optionValue = input<string>();\n /** Field name to read the disabled flag from, when options are objects. */\n optionDisabled = input<string>();\n /** Field name to read an icon name from, when options are objects. */\n optionIcon = input<string>();\n /** Property used to compare object values for equality (selection matching). */\n dataKey = input<string>();\n /** Allow selecting several values at once (the model becomes an array). */\n multiple = input(false, { transform: booleanAttribute });\n /** Whether the selection can be fully cleared (single) / emptied (multiple). */\n allowEmpty = input(true, { transform: booleanAttribute });\n /** Size. */\n size = input<SegmentControlSize>('default');\n /** Layout axis (drives which arrow keys navigate). */\n orientation = input<SegmentControlOrientation>('horizontal');\n /** Span the full width of the parent (segments share the width evenly). */\n fluid = input(false, { transform: booleanAttribute });\n /** Animate the sliding indicator (honours reduced-motion regardless). */\n motion = input(true, { transform: booleanAttribute });\n /** Custom template for a segment's content (receives `{ $implicit, option, selected, index }`). */\n itemTemplate = input<TemplateRef<SegmentControlItemContext<T>>>();\n\n /** Emitted on user selection with the new model value. */\n selectionChange = output<SegmentControlValue<T>>();\n /** Emitted when a segment is clicked (even if it does not change the value). */\n optionClick = output<SegmentControlOptionClickEvent<T>>();\n\n /** @ignore */\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** @ignore */\n private readonly hostDestroyRef = inject(DestroyRef);\n /** @ignore Native segment buttons (for roving focus + indicator measurement). */\n private readonly optionEls = viewChildren<ElementRef<HTMLButtonElement>>('optionBtn');\n /** @ignore Current model value (written by the form or by user selection).\n * Redeclared over the base signal to keep `null` (not `undefined`) as the empty value. */\n protected override readonly modelValue = signal<SegmentControlValue<T>>(null);\n /** @ignore Index the roving focus last landed on. */\n private readonly focusedIndex = signal(0);\n /** @ignore Measured geometry of the sliding indicator (null until first measure). */\n protected readonly thumb = signal<ThumbMetrics | null>(null);\n /** @ignore Bumped by the ResizeObserver to re-measure the indicator. */\n private readonly resizeTick = signal(0);\n\n constructor() {\n super();\n\n // Re-measure the sliding indicator whenever the observed geometry changes.\n afterNextRender(() => {\n const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));\n ro.observe(this.host.nativeElement);\n this.hostDestroyRef.onDestroy(() => ro.disconnect());\n });\n\n // Track the selected segment with the indicator (single mode only).\n afterRenderEffect(() => {\n const index = this.selectedIndex();\n this.resizeTick();\n // Track layout-affecting inputs so the indicator follows re-layouts.\n this.size();\n this.orientation();\n this.fluid();\n this.normalizedOptions();\n\n if (this.multiple() || index === -1) return;\n const el = this.optionEls()[index]?.nativeElement;\n const track = this.host.nativeElement;\n if (!el) return;\n\n const next: ThumbMetrics = {\n x: el.offsetLeft - track.clientLeft,\n y: el.offsetTop - track.clientTop,\n w: el.offsetWidth,\n h: el.offsetHeight,\n };\n const cur = untracked(this.thumb);\n if (!cur || cur.x !== next.x || cur.y !== next.y || cur.w !== next.w || cur.h !== next.h) {\n this.thumb.set(next);\n }\n });\n\n // A11y safeguards (dev only).\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n console.warn(\n '[ui-segment-control] Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n const iconOnly = this.normalizedOptions().some((o) => o.icon && !o.label && !o.ariaLabel);\n if (iconOnly) {\n console.warn(\n '[ui-segment-control] Icon-only segment has no accessible name: add `ariaLabel` on the option.',\n );\n }\n });\n }\n }\n\n /** @ignore Icon size derived from the control size. */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore Options resolved to a flat, render-ready shape. */\n protected readonly normalizedOptions = computed<NormalizedSegment[]>(() => {\n const raw = this.options() ?? [];\n const model = this.modelValue();\n const groupDisabled = this.isDisabled();\n return raw.map((option, index) => {\n const value = this.resolveValue(option);\n const label = this.resolveLabel(option);\n return {\n key: `${this.uid}-${index}`,\n index,\n value,\n label,\n icon: this.resolveIcon(option),\n ariaLabel: this.resolveAriaLabel(option),\n disabled: groupDisabled || this.resolveDisabled(option),\n selected: this.isValueSelected(value, model),\n original: option,\n };\n });\n });\n\n /** @ignore Index of the selected segment in single mode (-1 if none / multiple). */\n protected readonly selectedIndex = computed(() =>\n this.multiple() ? -1 : this.normalizedOptions().findIndex((o) => o.selected),\n );\n\n /** @ignore Whether the sliding indicator should render. */\n protected readonly showThumb = computed(\n () => !this.multiple() && this.selectedIndex() !== -1 && this.thumb() !== null,\n );\n\n /** @ignore CSS transform positioning the indicator over the selected segment. */\n protected readonly thumbTransform = computed(() => {\n const t = this.thumb();\n return t ? `translate(${t.x}px, ${t.y}px)` : null;\n });\n\n /** @ignore Segment that owns the group's single tab stop (roving tabindex). */\n protected readonly rovingIndex = computed(() => {\n const opts = this.normalizedOptions();\n if (!opts.length) return -1;\n if (!this.multiple()) {\n const selected = opts.findIndex((o) => o.selected && !o.disabled);\n if (selected !== -1) return selected;\n }\n const focused = this.focusedIndex();\n if (opts[focused] && !opts[focused].disabled) return focused;\n return opts.findIndex((o) => !o.disabled);\n });\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-segment-control';\n }\n\n /** Move focus to the group's current tab stop. */\n focus(options?: FocusOptions): void {\n const index = this.rovingIndex();\n if (index !== -1) this.optionEls()[index]?.nativeElement.focus(options);\n }\n\n /** @ignore The tabindex for a given segment (roving: one 0, the rest -1). */\n protected tabindexFor(index: number): number {\n return index === this.rovingIndex() ? 0 : -1;\n }\n\n /** @ignore Select (or toggle / clear) a segment on user interaction. */\n protected select(option: NormalizedSegment, event: Event): void {\n if (option.disabled || this.readonly()) return;\n const value = option.value as T;\n\n let next: SegmentControlValue<T>;\n if (this.multiple()) {\n const current = Array.isArray(this.modelValue()) ? [...(this.modelValue() as T[])] : [];\n const at = current.findIndex((v) => this.equals(v, value));\n if (at !== -1) {\n if (!this.allowEmpty() && current.length === 1) return; // keep at least one\n current.splice(at, 1);\n } else {\n current.push(value);\n }\n next = current;\n } else {\n if (option.selected) {\n if (!this.allowEmpty()) return; // cannot clear the selection\n next = null;\n } else {\n next = value;\n }\n }\n\n this.focusedIndex.set(option.index);\n this.modelValue.set(next);\n this.emitChange(next);\n this.selectionChange.emit(next);\n this.optionClick.emit({ option: option.original as T, value, index: option.index, originalEvent: event });\n }\n\n /** @ignore */\n protected onOptionFocus(index: number): void {\n this.focusedIndex.set(index);\n }\n\n /** @ignore Roving focus (and select-on-arrow in single mode). */\n protected onKeydown(event: KeyboardEvent): void {\n const horizontal = this.orientation() === 'horizontal';\n const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';\n const prevKey = horizontal ? 'ArrowLeft' : 'ArrowUp';\n if (![nextKey, prevKey, 'Home', 'End'].includes(event.key)) return;\n\n const opts = this.normalizedOptions();\n const enabled = opts.filter((o) => !o.disabled);\n if (!enabled.length) return;\n\n event.preventDefault();\n let pos = enabled.findIndex((o) => o.index === this.focusedIndex());\n if (pos === -1) pos = 0;\n\n switch (event.key) {\n case nextKey: pos = (pos + 1) % enabled.length; break;\n case prevKey: pos = (pos - 1 + enabled.length) % enabled.length; break;\n case 'Home': pos = 0; break;\n case 'End': pos = enabled.length - 1; break;\n }\n\n const target = enabled[pos];\n this.focusedIndex.set(target.index);\n this.optionEls()[target.index]?.nativeElement.focus();\n // Single mode follows the radio pattern: arrows move AND select.\n if (!this.multiple()) this.select(target, event);\n }\n\n /** @ignore Mark touched when focus leaves the whole group. */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !this.host.nativeElement.contains(next)) this.emitTouch();\n }\n\n // --- Option resolution -------------------------------------------------\n\n /** @ignore */\n private isObject(option: unknown): option is Record<string, unknown> {\n return typeof option === 'object' && option !== null;\n }\n\n /** @ignore */\n private resolveValue(option: unknown): unknown {\n const field = this.optionValue();\n if (field && this.isObject(option)) return option[field];\n if (this.isObject(option) && 'value' in option) return option['value'];\n return option;\n }\n\n /** @ignore */\n private resolveLabel(option: unknown): string | null {\n const field = this.optionLabel();\n if (field && this.isObject(option)) return this.asText(option[field]);\n if (this.isObject(option)) return 'label' in option ? this.asText(option['label']) : null;\n return this.asText(option);\n }\n\n /** @ignore */\n private resolveIcon(option: unknown): string | null {\n const field = this.optionIcon();\n if (field && this.isObject(option)) return this.asText(option[field]);\n if (this.isObject(option) && 'icon' in option) return this.asText(option['icon']);\n return null;\n }\n\n /** @ignore */\n private resolveAriaLabel(option: unknown): string | null {\n if (this.isObject(option) && 'ariaLabel' in option) return this.asText(option['ariaLabel']);\n return null;\n }\n\n /** @ignore */\n private resolveDisabled(option: unknown): boolean {\n const field = this.optionDisabled();\n if (field && this.isObject(option)) return !!option[field];\n if (this.isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n }\n\n /** @ignore */\n private asText(value: unknown): string | null {\n return value === null || value === undefined ? null : String(value);\n }\n\n /** @ignore Whether a resolved value is part of the current model. */\n private isValueSelected(value: unknown, model: SegmentControlValue<T>): boolean {\n if (this.multiple()) {\n return Array.isArray(model) && model.some((v) => this.equals(v, value));\n }\n return this.equals(model, value);\n }\n\n /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */\n private equals(a: unknown, b: unknown): boolean {\n const key = this.dataKey();\n if (key && this.isObject(a) && this.isObject(b)) return a[key] === b[key];\n return a === b;\n }\n}\n","@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{ option.label }}</span>\n }\n }\n </button>\n}\n","/*\n * Public API Surface of ui-kit/ui-segment-control\n */\n\nexport * from './lib/ui-segment-control';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA6FA;;;;;;;;;;;;;;;;;;;;AAoBG;AA2BG,MAAO,gBAA8B,SAAQ,gBAAwC,CAAA;AAiDzF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAhDT,IAAA,CAAA,OAAO,GAAG,KAAK,CAA2C,EAAE;oFAAC;;AAE7D,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;AAE7B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;AAE7B,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK;sGAAU;;AAEhC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAU;;AAE5B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAU;;QAEzB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAExD,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,IAAI,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAEzD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAqB,SAAS;iFAAC;;QAE3C,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,YAAY;wFAAC;;QAE5D,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAErD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,IAAI,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAErD,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK;oGAA6C;;QAGjE,IAAA,CAAA,eAAe,GAAG,MAAM,EAA0B;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AAC,MAAM,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAGxB;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,sBAAsB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;qBAC7F,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,gBAAgB,EAAE,oBAAoB;AACtC,wBAAA,mBAAmB,EAAE,8BAA8B;AACnD,wBAAA,gBAAgB,EAAE,SAAS;AAC3B,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,kBAAkB,EAAE,aAAa;AACjC,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,aAAa,EAAE,qCAAqC;AACpD,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,qBAAqB,EAAE,6BAA6B;AACpD,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA,EAAA,QAAA,EAAA,s6CAAA,EAAA,MAAA,EAAA,CAAA,qwKAAA,CAAA,EAAA;09CAwCwE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElLtF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -849,11 +849,11 @@ class UiSelect extends BaseFormField {
|
|
|
849
849
|
return this.resolver.equals(a, b);
|
|
850
850
|
}
|
|
851
851
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: UiSelect, isStandalone: true, selector: "ui-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterAriaLabel: { classPropertyName: "filterAriaLabel", publicName: "filterAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", opened: "opened", closed: "closed", cleared: "cleared", filterChange: "filterChange", lazyLoad: "lazyLoad", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "triggerEl", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInputEl", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the trigger role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-select-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\n }\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, selected: row.selected, index: row.index }\"\n />\n } @else {\n <span class=\"ui-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </ng-container>\n @if (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"ui-select-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div #container class=\"ui-select\" [class._editable]=\"isEditable()\" (click)=\"onContainerClick($event)\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"ctx\" />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{ overflowText() }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"selectedItemContexts()[0]\" />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ placeholder() ?? '' }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner uiFieldSuffix class=\"ui-select-loading\" size=\"small\" orientation=\"horizontal\" ariaLabel=\"Chargement des options\" />\n } @else {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--units-md)}.ui-select-trigger:last-child{padding-inline-end:var(--units-md)}.ui-select-trigger._small{font-size:var(--size-typography-text-md)}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--form-low-content-default)}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-xs);min-width:0}.ui-select-overflow{flex-shrink:0;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);color:var(--form-low-content-default);white-space:nowrap}.ui-select-overflow._small{font-size:var(--size-typography-text-sm)}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-native:first-child{padding-inline-start:var(--units-md)}.ui-select-native:last-child{padding-inline-end:var(--units-md)}.ui-select-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-native._small{font-size:var(--size-typography-text-md)}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--size-components-2xs);height:var(--size-components-2xs);flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--radius-full);background:none;color:var(--form-low-content-default);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-select-clear:first-child{margin-inline-start:var(--units-md)}.ui-select-clear:last-child{margin-inline-end:var(--units-md)}.ui-select-clear:hover:not(:disabled){color:var(--form-high-content-hover)}.ui-select-clear:focus-visible{outline:none;color:var(--form-high-content-focused);box-shadow:0 0 0 var(--units-2xs) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-chevron{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-chevron:first-child{margin-inline-start:var(--units-md)}.ui-select-chevron:last-child{margin-inline-end:var(--units-md)}.ui-select-chevron._disabled{color:var(--form-high-content-disabled)}.ui-select-chevron{transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--units-md)}.ui-select-loading:last-child{margin-inline-end:var(--units-md)}.ui-select-panel{border:var(--stroke-default) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);display:flex;flex-direction:column;gap:var(--units-xs);box-sizing:border-box;max-width:calc(100vw - var(--units-lg));padding:var(--units-xs)}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--units-xs) var(--units-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:var(--size-components-sm);flex-shrink:0;padding:0;border:var(--stroke-sm) solid var(--form-high-stroke-default);border-radius:var(--radius-sm);background-color:var(--form-high-surface-default);transition:border-color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--form-high-stroke-hover)}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--form-high-stroke-focused)}.ui-select-panel .ui-select-filter._small{height:var(--size-components-xs)}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--units-sm)}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--units-sm)}.ui-select-panel .ui-select-filter-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--units-sm)}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--units-sm)}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-panel .ui-select-filter-input{font-size:var(--size-typography-text-md)}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:19.5rem}.ui-select-panel .ui-select-scroller._small{max-height:16rem}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--units-xs);margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:2.5rem}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:2rem}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:2.5rem;flex-shrink:0;padding:0 var(--units-default);border-radius:var(--radius-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-option._small{height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-select-panel .ui-select-option._selected{background-color:var(--form-high-surface-hover);color:var(--form-high-content-checked)}.ui-select-panel .ui-select-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.125rem;height:1.125rem;flex-shrink:0;border:var(--stroke-default) solid var(--form-high-stroke-default);border-radius:var(--radius-xs);background-color:var(--form-high-surface-default);transition:background-color var(--transition-default) var(--transition-easeinout),border-color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{color:var(--form-high-content-checked);opacity:0;transform:scale(.6);transition:opacity var(--transition-default) var(--transition-easeinout),transform var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--form-high-stroke-checked)}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--form-high-stroke-disabled);background-color:var(--form-high-surface-disabled)}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:2rem;flex-shrink:0;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-select-panel .ui-select-group._small{height:1.5rem;padding:0 var(--units-md);font-size:var(--size-typography-text-sm)}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:2.5rem;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-low-content-default)}\n"], dependencies: [{ 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", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.ɵɵCdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiSpinner, selector: "ui-spinner", inputs: ["size", "orientation", "label", "ariaLabel", "spinnerTemplate", "image", "imageAlt", "icon", "strokeWidth", "fill", "animationDuration", "delay"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
852
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: UiSelect, isStandalone: true, selector: "ui-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterAriaLabel: { classPropertyName: "filterAriaLabel", publicName: "filterAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", opened: "opened", closed: "closed", cleared: "cleared", filterChange: "filterChange", lazyLoad: "lazyLoad", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "triggerEl", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInputEl", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the trigger role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-select-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\n }\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, selected: row.selected, index: row.index }\"\n />\n } @else {\n <span class=\"ui-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </ng-container>\n @if (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"ui-select-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div #container class=\"ui-select\" [class._editable]=\"isEditable()\" (click)=\"onContainerClick($event)\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"ctx\" />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{ overflowText() }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"selectedItemContexts()[0]\" />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ placeholder() ?? '' }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner uiFieldSuffix class=\"ui-select-loading\" size=\"small\" orientation=\"horizontal\" ariaLabel=\"Chargement des options\" />\n } @else {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-trigger:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--form-low-content-default)}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0}.ui-select-overflow{flex-shrink:0;font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--form-low-content-default);white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--form-low-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-clear:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-clear:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-clear:hover:not(:disabled){color:var(--form-high-content-hover)}.ui-select-clear:focus-visible{outline:none;color:var(--form-high-content-focused);box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-chevron{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-chevron:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-chevron:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-chevron._disabled{color:var(--form-high-content-disabled)}.ui-select-chevron{transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-loading:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base);display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--form-high-stroke-default);border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--form-high-surface-default);transition:border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--form-high-stroke-hover)}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--form-high-stroke-focused)}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-select-panel .ui-select-option._selected{background-color:var(--form-high-surface-hover);color:var(--form-high-content-checked)}.ui-select-panel .ui-select-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--form-high-surface-default);transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--form-high-content-checked);opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),transform var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--form-high-stroke-checked)}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--form-high-stroke-disabled);background-color:var(--form-high-surface-disabled)}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-low-content-default)}\n"], dependencies: [{ 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", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.ɵɵCdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiSpinner, selector: "ui-spinner", inputs: ["size", "orientation", "label", "ariaLabel", "spinnerTemplate", "image", "imageAlt", "icon", "strokeWidth", "fill", "animationDuration", "delay"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
853
853
|
}
|
|
854
854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UiSelect, decorators: [{
|
|
855
855
|
type: Component,
|
|
856
|
-
args: [{ selector: 'ui-select', imports: [NgTemplateOutlet, OverlayModule, ScrollingModule, UiField, UiIcon, UiSpinner, UiMotion], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the trigger role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-select-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\n }\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, selected: row.selected, index: row.index }\"\n />\n } @else {\n <span class=\"ui-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </ng-container>\n @if (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"ui-select-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div #container class=\"ui-select\" [class._editable]=\"isEditable()\" (click)=\"onContainerClick($event)\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"ctx\" />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{ overflowText() }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"selectedItemContexts()[0]\" />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ placeholder() ?? '' }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner uiFieldSuffix class=\"ui-select-loading\" size=\"small\" orientation=\"horizontal\" ariaLabel=\"Chargement des options\" />\n } @else {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--units-md)}.ui-select-trigger:last-child{padding-inline-end:var(--units-md)}.ui-select-trigger._small{font-size:var(--size-typography-text-md)}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--form-low-content-default)}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-xs);min-width:0}.ui-select-overflow{flex-shrink:0;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);color:var(--form-low-content-default);white-space:nowrap}.ui-select-overflow._small{font-size:var(--size-typography-text-sm)}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-native:first-child{padding-inline-start:var(--units-md)}.ui-select-native:last-child{padding-inline-end:var(--units-md)}.ui-select-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-native._small{font-size:var(--size-typography-text-md)}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--size-components-2xs);height:var(--size-components-2xs);flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--radius-full);background:none;color:var(--form-low-content-default);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-select-clear:first-child{margin-inline-start:var(--units-md)}.ui-select-clear:last-child{margin-inline-end:var(--units-md)}.ui-select-clear:hover:not(:disabled){color:var(--form-high-content-hover)}.ui-select-clear:focus-visible{outline:none;color:var(--form-high-content-focused);box-shadow:0 0 0 var(--units-2xs) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-chevron{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-chevron:first-child{margin-inline-start:var(--units-md)}.ui-select-chevron:last-child{margin-inline-end:var(--units-md)}.ui-select-chevron._disabled{color:var(--form-high-content-disabled)}.ui-select-chevron{transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--units-md)}.ui-select-loading:last-child{margin-inline-end:var(--units-md)}.ui-select-panel{border:var(--stroke-default) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);display:flex;flex-direction:column;gap:var(--units-xs);box-sizing:border-box;max-width:calc(100vw - var(--units-lg));padding:var(--units-xs)}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--units-xs) var(--units-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:var(--size-components-sm);flex-shrink:0;padding:0;border:var(--stroke-sm) solid var(--form-high-stroke-default);border-radius:var(--radius-sm);background-color:var(--form-high-surface-default);transition:border-color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--form-high-stroke-hover)}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--form-high-stroke-focused)}.ui-select-panel .ui-select-filter._small{height:var(--size-components-xs)}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--units-sm)}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--units-sm)}.ui-select-panel .ui-select-filter-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--units-sm)}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--units-sm)}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-panel .ui-select-filter-input{font-size:var(--size-typography-text-md)}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:19.5rem}.ui-select-panel .ui-select-scroller._small{max-height:16rem}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--units-xs);margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:2.5rem}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:2rem}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:2.5rem;flex-shrink:0;padding:0 var(--units-default);border-radius:var(--radius-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-option._small{height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-select-panel .ui-select-option._selected{background-color:var(--form-high-surface-hover);color:var(--form-high-content-checked)}.ui-select-panel .ui-select-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.125rem;height:1.125rem;flex-shrink:0;border:var(--stroke-default) solid var(--form-high-stroke-default);border-radius:var(--radius-xs);background-color:var(--form-high-surface-default);transition:background-color var(--transition-default) var(--transition-easeinout),border-color var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{color:var(--form-high-content-checked);opacity:0;transform:scale(.6);transition:opacity var(--transition-default) var(--transition-easeinout),transform var(--transition-default) var(--transition-easeinout)}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--form-high-stroke-checked)}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--form-high-stroke-disabled);background-color:var(--form-high-surface-disabled)}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:2rem;flex-shrink:0;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-select-panel .ui-select-group._small{height:1.5rem;padding:0 var(--units-md);font-size:var(--size-typography-text-sm)}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:2.5rem;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-low-content-default)}\n"] }]
|
|
856
|
+
args: [{ selector: 'ui-select', imports: [NgTemplateOutlet, OverlayModule, ScrollingModule, UiField, UiIcon, UiSpinner, UiMotion], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the trigger role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-select-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\n }\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, selected: row.selected, index: row.index }\"\n />\n } @else {\n <span class=\"ui-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </ng-container>\n @if (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"ui-select-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div #container class=\"ui-select\" [class._editable]=\"isEditable()\" (click)=\"onContainerClick($event)\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"ctx\" />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{ overflowText() }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container [ngTemplateOutlet]=\"selectedItemTemplate()!\" [ngTemplateOutletContext]=\"selectedItemContexts()[0]\" />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ placeholder() ?? '' }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner uiFieldSuffix class=\"ui-select-loading\" size=\"small\" orientation=\"horizontal\" ariaLabel=\"Chargement des options\" />\n } @else {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-trigger:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--form-low-content-default)}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0}.ui-select-overflow{flex-shrink:0;font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--form-low-content-default);white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--form-low-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-clear:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-clear:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-clear:hover:not(:disabled){color:var(--form-high-content-hover)}.ui-select-clear:focus-visible{outline:none;color:var(--form-high-content-focused);box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-chevron{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-chevron:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-chevron:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-chevron._disabled{color:var(--form-high-content-disabled)}.ui-select-chevron{transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-loading:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base);display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--form-high-stroke-default);border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--form-high-surface-default);transition:border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--form-high-stroke-hover)}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--form-high-stroke-focused)}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--ui-select-filter-padding-x, var(--units-sm))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-select-panel .ui-select-option._selected{background-color:var(--form-high-surface-hover);color:var(--form-high-content-checked)}.ui-select-panel .ui-select-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--form-high-surface-default);transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--form-high-content-checked);opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),transform var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--form-high-stroke-checked)}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--form-high-stroke-disabled);background-color:var(--form-high-surface-disabled)}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--fontfamily-base);font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--fontfamily-base);font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--form-low-content-default)}\n"] }]
|
|
857
857
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], checkbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkbox", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterAriaLabel", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], containerEl: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], triggerEl: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInputEl: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
|
|
858
858
|
|
|
859
859
|
/*
|