@4sh/ui-kit 0.14.0 → 0.16.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 +8 -0
- package/README.md +8 -0
- 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-actions-ui-speed-dial.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +4 -4
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +69 -22
- 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 +15 -6
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-editor.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 -4
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +12 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +19 -8
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +30 -9
- 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 +8 -3
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-knob.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-swatch-picker.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +10 -4
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.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-forms.mjs +46 -2
- package/fesm2022/4sh-ui-kit-forms.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-chip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-chip.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-toast.mjs +2 -2
- 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-bottom-sheet.mjs +2 -2
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.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-navigation-ui-bottom-tab-bar.mjs +4 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.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 +4 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +6 -6
- 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/mcp/data/component-api.json +14 -0
- package/mcp/data/text-search-docs.json +45 -15
- package/mcp/data/ui-config.json +317 -23
- package/mcp/package.json +1 -1
- package/package.json +1 -1
- package/styles/base/_motion.scss +16 -16
- package/styles/component-vars.scss +2 -5
- package/styles/generated/_tokens-motion.scss +54 -0
- package/styles/generated/_tokens-transitions.scss +4 -4
- package/styles/generated/_tokens.scss +1 -0
- package/styles/settings/_ui-config.scss +23 -6
- package/styles/utils/_mixins.scss +39 -5
- package/styles/utils/_motion.scss +3 -3
- package/styles.css +1 -1
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +16 -3
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +2 -0
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +4 -1
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +5 -1
- package/types/4sh-ui-kit-forms-ui-input.d.ts +2 -0
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +2 -0
- package/types/4sh-ui-kit-forms.d.ts +25 -1
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, numberAttribute, booleanAttribute, output, contentChild, inject, ElementRef, signal, computed, afterNextRender, isDevMode, effect, forwardRef, Component } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import { BaseFieldControl, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
|
|
5
|
+
import { BaseFieldControl, warnMissingAccessibleName, hasFocus, UiBrowserFill } from '@4sh/ui-kit/forms';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ui-input-otp — headless one-time-password field: a row of single-character
|
|
@@ -121,6 +121,7 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
121
121
|
/* touched is emitted on group focusout */
|
|
122
122
|
},
|
|
123
123
|
paste: (event) => this.onPaste(event, index),
|
|
124
|
+
browserFill: (event) => this.onBrowserFill(event, index),
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
/** @ignore Cell input: single source of the per-cell value (view → form). */
|
|
@@ -129,23 +130,37 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
129
130
|
return;
|
|
130
131
|
const target = event.target;
|
|
131
132
|
const raw = this.sanitize(target.value);
|
|
133
|
+
// A value written by the browser into a cell without focus must not pull the focus in.
|
|
134
|
+
const typed = hasFocus(target);
|
|
132
135
|
// Multi-char (autofill / paste into a cell) → distribute across cells.
|
|
133
136
|
if (raw.length > 1) {
|
|
134
|
-
|
|
137
|
+
target.value = raw.charAt(0);
|
|
138
|
+
this.setFromIndex(index, raw, typed);
|
|
135
139
|
return;
|
|
136
140
|
}
|
|
137
141
|
const tokens = [...this.tokens()];
|
|
138
142
|
tokens[index] = raw;
|
|
139
143
|
target.value = raw; // reflect the sanitised value
|
|
140
144
|
this.commit(tokens);
|
|
145
|
+
if (!typed)
|
|
146
|
+
return;
|
|
141
147
|
const inputType = event.inputType;
|
|
142
148
|
if (raw)
|
|
143
149
|
this.focusCell(index + 1);
|
|
144
150
|
else if (inputType === 'deleteContentBackward')
|
|
145
151
|
this.focusCell(index - 1);
|
|
146
152
|
}
|
|
153
|
+
/** @ignore Value written by the browser into a cell without an `input` event. */
|
|
154
|
+
onBrowserFill(event, index) {
|
|
155
|
+
if (event.target.value !== this.cellValue(index)) {
|
|
156
|
+
this.onInput(event, index);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
147
159
|
/** @ignore Keyboard navigation + input guards. */
|
|
148
160
|
onKeydown(event, index) {
|
|
161
|
+
// Chrome's autofill dispatches a bare `Event`, without `key`.
|
|
162
|
+
if (!(event instanceof KeyboardEvent))
|
|
163
|
+
return;
|
|
149
164
|
if (event.altKey || event.ctrlKey || event.metaKey)
|
|
150
165
|
return;
|
|
151
166
|
const target = event.target;
|
|
@@ -192,8 +207,13 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
192
207
|
}
|
|
193
208
|
/** @ignore Select the cell content on focus + track the roving index. */
|
|
194
209
|
onFocus(event, index) {
|
|
210
|
+
const cell = event.target;
|
|
211
|
+
// Chrome's autofill sends a focus event to a cell it fills without focusing it,
|
|
212
|
+
// and `select()` would pull the focus in.
|
|
213
|
+
if (!hasFocus(cell))
|
|
214
|
+
return;
|
|
195
215
|
this.focusedIndex.set(index);
|
|
196
|
-
|
|
216
|
+
cell.select?.();
|
|
197
217
|
}
|
|
198
218
|
/** @ignore Distribute a pasted code across the cells from `index`. */
|
|
199
219
|
onPaste(event, index) {
|
|
@@ -210,8 +230,8 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
210
230
|
if (!next || !this.host.nativeElement.contains(next))
|
|
211
231
|
this.emitTouch();
|
|
212
232
|
}
|
|
213
|
-
/** @ignore Write `chars` into the cells starting at `from`, then commit + focus. */
|
|
214
|
-
setFromIndex(from, chars) {
|
|
233
|
+
/** @ignore Write `chars` into the cells starting at `from`, then commit (+ focus). */
|
|
234
|
+
setFromIndex(from, chars, moveFocus = true) {
|
|
215
235
|
const tokens = [...this.tokens()];
|
|
216
236
|
const max = this.length();
|
|
217
237
|
let i = from;
|
|
@@ -221,7 +241,8 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
221
241
|
tokens[i++] = ch;
|
|
222
242
|
}
|
|
223
243
|
this.commit(tokens);
|
|
224
|
-
|
|
244
|
+
if (moveFocus)
|
|
245
|
+
this.focusCell(Math.min(i, max - 1));
|
|
225
246
|
}
|
|
226
247
|
/** @ignore Persist the tokens, emit the joined value (+ `completed` when full). */
|
|
227
248
|
commit(tokens) {
|
|
@@ -258,11 +279,11 @@ class UiInputOtp extends BaseFieldControl {
|
|
|
258
279
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputOtp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
259
280
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiInputOtp, isStandalone: true, selector: "ui-input-otp", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, integerOnly: { classPropertyName: "integerOnly", publicName: "integerOnly", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, charAriaLabel: { classPropertyName: "charAriaLabel", publicName: "charAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", completed: "completed" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "class._small": "size() === 'small'", "class._large": "size() === 'large'", "class._disabled": "isDisabled()", "class._readonly": "readonly()", "class._invalid": "isInvalid()", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledBy() || null", "attr.aria-invalid": "isInvalid() ? 'true' : null", "attr.aria-disabled": "isDisabled() ? 'true' : null" }, classAttribute: "ui-input-otp" }, providers: [
|
|
260
281
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },
|
|
261
|
-
], queries: [{ propertyName: "inputTemplate", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-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)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
282
|
+
], queries: [{ propertyName: "inputTemplate", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: UiBrowserFill, selector: "[uiBrowserFill]", outputs: ["browserFill"] }] }); }
|
|
262
283
|
}
|
|
263
284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputOtp, decorators: [{
|
|
264
285
|
type: Component,
|
|
265
|
-
args: [{ selector: 'ui-input-otp', imports: [NgTemplateOutlet], providers: [
|
|
286
|
+
args: [{ selector: 'ui-input-otp', imports: [NgTemplateOutlet, UiBrowserFill], providers: [
|
|
266
287
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },
|
|
267
288
|
], host: {
|
|
268
289
|
class: 'ui-input-otp',
|
|
@@ -277,7 +298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
277
298
|
'[attr.aria-invalid]': "isInvalid() ? 'true' : null",
|
|
278
299
|
'[attr.aria-disabled]': "isDisabled() ? 'true' : null",
|
|
279
300
|
'(focusout)': 'onFocusOut($event)',
|
|
280
|
-
}, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-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)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"] }]
|
|
301
|
+
}, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"] }]
|
|
281
302
|
}], ctorParameters: () => [], propDecorators: { length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], integerOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "integerOnly", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], charAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "charAriaLabel", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completed: [{ type: i0.Output, args: ["completed"] }], inputTemplate: [{ type: i0.ContentChild, args: ['input', { isSignal: true }] }] } });
|
|
282
303
|
|
|
283
304
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-input-otp.mjs","sources":["../../../projects/ui-kit/forms/ui-input-otp/src/lib/ui-input-otp.ts","../../../projects/ui-kit/forms/ui-input-otp/src/lib/ui-input-otp.html","../../../projects/ui-kit/forms/ui-input-otp/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-otp/src/4sh-ui-kit-forms-ui-input-otp.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl } from '@4sh/ui-kit/forms';\nimport { warnMissingAccessibleName } from '@4sh/ui-kit/forms';\n\n/** Size of the OTP cells. `default` is the base. */\nexport type InputOtpSize = 'small' | 'default' | 'large';\n\n/** DOM event handlers handed to a custom `#input` cell template. */\nexport interface InputOtpCellEvents {\n /** Wire on `(input)`. */\n input: (event: Event) => void;\n /** Wire on `(keydown)`. */\n keydown: (event: KeyboardEvent) => void;\n /** Wire on `(focus)`. */\n focus: (event: FocusEvent) => void;\n /** Wire on `(blur)`. */\n blur: (event: FocusEvent) => void;\n /** Wire on `(paste)`. */\n paste: (event: ClipboardEvent) => void;\n}\n\n/** Context handed to the `#input` template (one per cell). */\nexport interface InputOtpCellContext {\n /** Current value of this cell (default `$implicit`). */\n $implicit: string;\n /** Same as `$implicit`, named for readability. */\n value: string;\n /** Zero-based index of the cell. */\n index: number;\n /** Event handlers to bind on the custom control (keeps the OTP behaviour). */\n events: InputOtpCellEvents;\n /** Roving tabindex for this cell (`0` for the active one, `-1` otherwise). */\n tabindex: number;\n}\n\n/**\n * ui-input-otp — headless one-time-password field: a row of single-character\n * cells backing a single string value.\n *\n * Each cell is a real native `<input maxlength=\"1\">`; the group carries\n * `role=\"group\"` and a **roving tabindex** so `Tab` enters/leaves the field as a\n * whole while `←`/`→` move between cells (`Backspace` clears and steps\n * back). Typing auto-advances, and pasting a code distributes it across the\n * cells. Interactive states (hover/focus/disabled) are pure CSS driven by the\n * `form.*` design tokens.\n *\n * - `mask` hides the characters (`type=\"password\"`).\n * - `integerOnly` restricts input to digits (`inputmode=\"numeric\"`).\n * - a `#input` template replaces the default cell with your own control (it\n * receives the value, index, roving tabindex and the event handlers to bind).\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`, Angular 22) — it is a `ControlValueAccessor` (interop handled by\n * `BaseControlValueAccessor`).\n *\n * @example\n * ```html\n * <ui-input-otp [(ngModel)]=\"code\" [length]=\"6\" [integerOnly]=\"true\" ariaLabel=\"Code de vérification\" />\n * ```\n */\n@Component({\n selector: 'ui-input-otp',\n imports: [NgTemplateOutlet],\n templateUrl: './ui-input-otp.html',\n styleUrl: './ui-input-otp.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },\n ],\n host: {\n class: 'ui-input-otp',\n role: 'group',\n '[class._small]': \"size() === 'small'\",\n '[class._large]': \"size() === 'large'\",\n '[class._disabled]': 'isDisabled()',\n '[class._readonly]': 'readonly()',\n '[class._invalid]': 'isInvalid()',\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 '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class UiInputOtp extends BaseFieldControl<string> {\n /** Number of cells (characters) to enter. */\n length = input(4, { transform: numberAttribute });\n /** Hide the characters (renders `type=\"password\"`). */\n mask = input(false, { transform: booleanAttribute });\n /** Restrict input to integers (`inputmode=\"numeric\"`, non-digits rejected). */\n integerOnly = input(false, { transform: booleanAttribute });\n /** Cell size. */\n size = input<InputOtpSize>('default');\n /** Accessible-name prefix of each cell (\"<prefix> N\"). Falls back to `ariaLabel`. */\n charAriaLabel = input<string>('Caractère');\n /** Focus the first cell on init. */\n autofocus = input(false, { transform: booleanAttribute });\n\n /** Emitted with the joined value on every change. */\n valueChange = output<string>();\n /** Emitted with the value once every cell is filled. */\n completed = output<string>();\n\n /** Custom cell template (`<ng-template #input let-value let-i=\"index\" let-events=\"events\">`). */\n protected readonly inputTemplate = contentChild<TemplateRef<InputOtpCellContext>>('input');\n\n /** @ignore */\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** @ignore Per-cell characters (source of truth for the view). */\n private readonly tokens = signal<string[]>([]);\n /** @ignore Cell that owns the group's single tab stop (roving tabindex). */\n private readonly focusedIndex = signal(0);\n\n constructor() {\n super();\n\n // Optional autofocus on the first cell after the view exists.\n afterNextRender(() => {\n if (this.autofocus() && !this.isDisabled()) this.focusCell(0);\n });\n\n // A11y safeguard (dev only): the group needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-input-otp',\n 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n });\n }\n }\n\n /** @ignore Native input type (masked → password). */\n protected readonly inputType = computed(() => (this.mask() ? 'password' : 'text'));\n /** @ignore Hint for the on-screen keyboard. */\n protected readonly inputMode = computed(() => (this.integerOnly() ? 'numeric' : 'text'));\n\n /** @ignore Render-ready list of cells (index + current value). */\n protected readonly cells = computed(() => {\n const tokens = this.tokens();\n return Array.from({ length: Math.max(0, this.length()) }, (_, index) => ({\n index,\n id: `${this.uid}-${index}`,\n value: tokens[index] ?? '',\n }));\n });\n\n override writeValue(value: string | number | null): void {\n this.tokens.set(this.toTokens(value));\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-input-otp';\n }\n\n /** Move focus to the first cell. */\n focus(options?: FocusOptions): void {\n this.focusCell(0, options);\n }\n\n /** @ignore Roving tabindex for a given cell (one `0`, the rest `-1`). */\n protected tabindexFor(index: number): number {\n const active = Math.min(this.focusedIndex(), this.length() - 1);\n return index === Math.max(0, active) ? 0 : -1;\n }\n\n /** @ignore Value shown in a cell. */\n protected cellValue(index: number): string {\n return this.tokens()[index] ?? '';\n }\n\n /** @ignore Handlers exposed to a custom `#input` template. */\n protected cellEvents(index: number): InputOtpCellEvents {\n return {\n input: (event: Event) => this.onInput(event, index),\n keydown: (event: KeyboardEvent) => this.onKeydown(event, index),\n focus: (event: FocusEvent) => this.onFocus(event, index),\n blur: () => {\n /* touched is emitted on group focusout */\n },\n paste: (event: ClipboardEvent) => this.onPaste(event, index),\n };\n }\n\n /** @ignore Cell input: single source of the per-cell value (view → form). */\n protected onInput(event: Event, index: number): void {\n if (this.readonly()) return;\n const target = event.target as HTMLInputElement;\n const raw = this.sanitize(target.value);\n\n // Multi-char (autofill / paste into a cell) → distribute across cells.\n if (raw.length > 1) {\n this.setFromIndex(index, raw);\n return;\n }\n\n const tokens = [...this.tokens()];\n tokens[index] = raw;\n target.value = raw; // reflect the sanitised value\n this.commit(tokens);\n\n const inputType = (event as InputEvent).inputType;\n if (raw) this.focusCell(index + 1);\n else if (inputType === 'deleteContentBackward') this.focusCell(index - 1);\n }\n\n /** @ignore Keyboard navigation + input guards. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n const target = event.target as HTMLInputElement;\n\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n this.focusCell(index - 1);\n return;\n case 'ArrowRight':\n event.preventDefault();\n this.focusCell(index + 1);\n return;\n case 'Home':\n event.preventDefault();\n this.focusCell(0);\n return;\n case 'End':\n event.preventDefault();\n this.focusCell(this.length() - 1);\n return;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n return;\n case 'Backspace':\n // Empty cell → clear + step back (a filled cell clears via native input).\n if (!target.value && !this.readonly()) {\n event.preventDefault();\n const tokens = [...this.tokens()];\n if (tokens[index - 1] !== undefined) tokens[index - 1] = '';\n this.commit(tokens);\n this.focusCell(index - 1);\n }\n return;\n default: {\n if (event.key.length !== 1) return; // let control keys through\n // Reject non-digits when integer-only.\n if (this.integerOnly() && !/^\\d$/.test(event.key)) event.preventDefault();\n }\n }\n }\n\n /** @ignore Select the cell content on focus + track the roving index. */\n protected onFocus(event: FocusEvent, index: number): void {\n this.focusedIndex.set(index);\n (event.target as HTMLInputElement).select?.();\n }\n\n /** @ignore Distribute a pasted code across the cells from `index`. */\n protected onPaste(event: ClipboardEvent, index: number): void {\n if (this.isDisabled() || this.readonly()) return;\n event.preventDefault();\n const pasted = this.sanitize(event.clipboardData?.getData('text') ?? '');\n if (pasted) this.setFromIndex(index, pasted);\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 /** @ignore Write `chars` into the cells starting at `from`, then commit + focus. */\n private setFromIndex(from: number, chars: string): void {\n const tokens = [...this.tokens()];\n const max = this.length();\n let i = from;\n for (const ch of chars) {\n if (i >= max) break;\n tokens[i++] = ch;\n }\n this.commit(tokens);\n this.focusCell(Math.min(i, max - 1));\n }\n\n /** @ignore Persist the tokens, emit the joined value (+ `completed` when full). */\n private commit(tokens: string[]): void {\n const trimmed = tokens.slice(0, this.length());\n this.tokens.set(trimmed);\n const value = trimmed.join('');\n this.emitChange(value);\n this.valueChange.emit(value);\n if (value.length === this.length() && trimmed.every((c) => c !== '')) {\n this.completed.emit(value);\n }\n }\n\n /** @ignore Focus (and select) the cell at `index`, if it exists. */\n private focusCell(index: number, options?: FocusOptions): void {\n if (index < 0 || index >= this.length()) return;\n this.focusedIndex.set(index);\n const el = this.host.nativeElement.querySelectorAll<HTMLInputElement>('input')[index];\n if (el) {\n el.focus(options);\n el.select();\n }\n }\n\n /** @ignore Split a form value into an array of single characters (bounded). */\n private toTokens(value: string | number | null | undefined): string[] {\n if (value === null || value === undefined || value === '') return [];\n return String(value).split('').slice(0, this.length());\n }\n\n /** @ignore Drop non-digits when integer-only, otherwise pass through. */\n private sanitize(value: string): string {\n return this.integerOnly() ? value.replace(/\\D/g, '') : value;\n }\n}\n","@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n","/*\n * Public API Surface of ui-kit/ui-input-otp\n */\n\nexport * from './lib/ui-input-otp';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAwBG,MAAO,UAAW,SAAQ,gBAAwB,CAAA;AA6BtD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QA5BT,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,CAAC,8EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;QAEjD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAEpD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAE3D,IAAA,CAAA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,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAqBf,UAAU,EAAA,UAAA,EAAA,CAAA;kBAvBtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EACf,CAAC,gBAAgB,CAAC,EAAA,SAAA,EAGhB;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;qBACvF,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,cAAc;AACrB,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,gBAAgB,EAAE,oBAAoB;AACtC,wBAAA,gBAAgB,EAAE,oBAAoB;AACtC,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,kBAAkB,EAAE,aAAa;AACjC,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,qBAAqB,EAAE,6BAA6B;AACpD,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA,EAAA,QAAA,EAAA,0nCAAA,EAAA,MAAA,EAAA,CAAA,mqGAAA,CAAA,EAAA;wxBAsBiF,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzH3F;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-input-otp.mjs","sources":["../../../projects/ui-kit/forms/ui-input-otp/src/lib/ui-input-otp.ts","../../../projects/ui-kit/forms/ui-input-otp/src/lib/ui-input-otp.html","../../../projects/ui-kit/forms/ui-input-otp/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-otp/src/4sh-ui-kit-forms-ui-input-otp.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl, hasFocus, UiBrowserFill } from '@4sh/ui-kit/forms';\nimport { warnMissingAccessibleName } from '@4sh/ui-kit/forms';\n\n/** Size of the OTP cells. `default` is the base. */\nexport type InputOtpSize = 'small' | 'default' | 'large';\n\n/** DOM event handlers handed to a custom `#input` cell template. */\nexport interface InputOtpCellEvents {\n /** Wire on `(input)`. */\n input: (event: Event) => void;\n /** Wire on `(keydown)`. */\n keydown: (event: KeyboardEvent) => void;\n /** Wire on `(focus)`. */\n focus: (event: FocusEvent) => void;\n /** Wire on `(blur)`. */\n blur: (event: FocusEvent) => void;\n /** Wire on `(paste)`. */\n paste: (event: ClipboardEvent) => void;\n /** Wire on `(browserFill)` of a cell marked `uiBrowserFill`. */\n browserFill: (event: Event) => void;\n}\n\n/** Context handed to the `#input` template (one per cell). */\nexport interface InputOtpCellContext {\n /** Current value of this cell (default `$implicit`). */\n $implicit: string;\n /** Same as `$implicit`, named for readability. */\n value: string;\n /** Zero-based index of the cell. */\n index: number;\n /** Event handlers to bind on the custom control (keeps the OTP behaviour). */\n events: InputOtpCellEvents;\n /** Roving tabindex for this cell (`0` for the active one, `-1` otherwise). */\n tabindex: number;\n}\n\n/**\n * ui-input-otp — headless one-time-password field: a row of single-character\n * cells backing a single string value.\n *\n * Each cell is a real native `<input maxlength=\"1\">`; the group carries\n * `role=\"group\"` and a **roving tabindex** so `Tab` enters/leaves the field as a\n * whole while `←`/`→` move between cells (`Backspace` clears and steps\n * back). Typing auto-advances, and pasting a code distributes it across the\n * cells. Interactive states (hover/focus/disabled) are pure CSS driven by the\n * `form.*` design tokens.\n *\n * - `mask` hides the characters (`type=\"password\"`).\n * - `integerOnly` restricts input to digits (`inputmode=\"numeric\"`).\n * - a `#input` template replaces the default cell with your own control (it\n * receives the value, index, roving tabindex and the event handlers to bind).\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`, Angular 22) — it is a `ControlValueAccessor` (interop handled by\n * `BaseControlValueAccessor`).\n *\n * @example\n * ```html\n * <ui-input-otp [(ngModel)]=\"code\" [length]=\"6\" [integerOnly]=\"true\" ariaLabel=\"Code de vérification\" />\n * ```\n */\n@Component({\n selector: 'ui-input-otp',\n imports: [NgTemplateOutlet, UiBrowserFill],\n templateUrl: './ui-input-otp.html',\n styleUrl: './ui-input-otp.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },\n ],\n host: {\n class: 'ui-input-otp',\n role: 'group',\n '[class._small]': \"size() === 'small'\",\n '[class._large]': \"size() === 'large'\",\n '[class._disabled]': 'isDisabled()',\n '[class._readonly]': 'readonly()',\n '[class._invalid]': 'isInvalid()',\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 '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class UiInputOtp extends BaseFieldControl<string> {\n /** Number of cells (characters) to enter. */\n length = input(4, { transform: numberAttribute });\n /** Hide the characters (renders `type=\"password\"`). */\n mask = input(false, { transform: booleanAttribute });\n /** Restrict input to integers (`inputmode=\"numeric\"`, non-digits rejected). */\n integerOnly = input(false, { transform: booleanAttribute });\n /** Cell size. */\n size = input<InputOtpSize>('default');\n /** Accessible-name prefix of each cell (\"<prefix> N\"). Falls back to `ariaLabel`. */\n charAriaLabel = input<string>('Caractère');\n /** Focus the first cell on init. */\n autofocus = input(false, { transform: booleanAttribute });\n\n /** Emitted with the joined value on every change. */\n valueChange = output<string>();\n /** Emitted with the value once every cell is filled. */\n completed = output<string>();\n\n /** Custom cell template (`<ng-template #input let-value let-i=\"index\" let-events=\"events\">`). */\n protected readonly inputTemplate = contentChild<TemplateRef<InputOtpCellContext>>('input');\n\n /** @ignore */\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** @ignore Per-cell characters (source of truth for the view). */\n private readonly tokens = signal<string[]>([]);\n /** @ignore Cell that owns the group's single tab stop (roving tabindex). */\n private readonly focusedIndex = signal(0);\n\n constructor() {\n super();\n\n // Optional autofocus on the first cell after the view exists.\n afterNextRender(() => {\n if (this.autofocus() && !this.isDisabled()) this.focusCell(0);\n });\n\n // A11y safeguard (dev only): the group needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-input-otp',\n 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n });\n }\n }\n\n /** @ignore Native input type (masked → password). */\n protected readonly inputType = computed(() => (this.mask() ? 'password' : 'text'));\n /** @ignore Hint for the on-screen keyboard. */\n protected readonly inputMode = computed(() => (this.integerOnly() ? 'numeric' : 'text'));\n\n /** @ignore Render-ready list of cells (index + current value). */\n protected readonly cells = computed(() => {\n const tokens = this.tokens();\n return Array.from({ length: Math.max(0, this.length()) }, (_, index) => ({\n index,\n id: `${this.uid}-${index}`,\n value: tokens[index] ?? '',\n }));\n });\n\n override writeValue(value: string | number | null): void {\n this.tokens.set(this.toTokens(value));\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-input-otp';\n }\n\n /** Move focus to the first cell. */\n focus(options?: FocusOptions): void {\n this.focusCell(0, options);\n }\n\n /** @ignore Roving tabindex for a given cell (one `0`, the rest `-1`). */\n protected tabindexFor(index: number): number {\n const active = Math.min(this.focusedIndex(), this.length() - 1);\n return index === Math.max(0, active) ? 0 : -1;\n }\n\n /** @ignore Value shown in a cell. */\n protected cellValue(index: number): string {\n return this.tokens()[index] ?? '';\n }\n\n /** @ignore Handlers exposed to a custom `#input` template. */\n protected cellEvents(index: number): InputOtpCellEvents {\n return {\n input: (event: Event) => this.onInput(event, index),\n keydown: (event: KeyboardEvent) => this.onKeydown(event, index),\n focus: (event: FocusEvent) => this.onFocus(event, index),\n blur: () => {\n /* touched is emitted on group focusout */\n },\n paste: (event: ClipboardEvent) => this.onPaste(event, index),\n browserFill: (event: Event) => this.onBrowserFill(event, index),\n };\n }\n\n /** @ignore Cell input: single source of the per-cell value (view → form). */\n protected onInput(event: Event, index: number): void {\n if (this.readonly()) return;\n const target = event.target as HTMLInputElement;\n const raw = this.sanitize(target.value);\n // A value written by the browser into a cell without focus must not pull the focus in.\n const typed = hasFocus(target);\n\n // Multi-char (autofill / paste into a cell) → distribute across cells.\n if (raw.length > 1) {\n target.value = raw.charAt(0);\n this.setFromIndex(index, raw, typed);\n return;\n }\n\n const tokens = [...this.tokens()];\n tokens[index] = raw;\n target.value = raw; // reflect the sanitised value\n this.commit(tokens);\n if (!typed) return;\n\n const inputType = (event as InputEvent).inputType;\n if (raw) this.focusCell(index + 1);\n else if (inputType === 'deleteContentBackward') this.focusCell(index - 1);\n }\n\n /** @ignore Value written by the browser into a cell without an `input` event. */\n protected onBrowserFill(event: Event, index: number): void {\n if ((event.target as HTMLInputElement).value !== this.cellValue(index)) {\n this.onInput(event, index);\n }\n }\n\n /** @ignore Keyboard navigation + input guards. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n // Chrome's autofill dispatches a bare `Event`, without `key`.\n if (!(event instanceof KeyboardEvent)) return;\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n const target = event.target as HTMLInputElement;\n\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n this.focusCell(index - 1);\n return;\n case 'ArrowRight':\n event.preventDefault();\n this.focusCell(index + 1);\n return;\n case 'Home':\n event.preventDefault();\n this.focusCell(0);\n return;\n case 'End':\n event.preventDefault();\n this.focusCell(this.length() - 1);\n return;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n return;\n case 'Backspace':\n // Empty cell → clear + step back (a filled cell clears via native input).\n if (!target.value && !this.readonly()) {\n event.preventDefault();\n const tokens = [...this.tokens()];\n if (tokens[index - 1] !== undefined) tokens[index - 1] = '';\n this.commit(tokens);\n this.focusCell(index - 1);\n }\n return;\n default: {\n if (event.key.length !== 1) return; // let control keys through\n // Reject non-digits when integer-only.\n if (this.integerOnly() && !/^\\d$/.test(event.key)) event.preventDefault();\n }\n }\n }\n\n /** @ignore Select the cell content on focus + track the roving index. */\n protected onFocus(event: FocusEvent, index: number): void {\n const cell = event.target as HTMLInputElement;\n // Chrome's autofill sends a focus event to a cell it fills without focusing it,\n // and `select()` would pull the focus in.\n if (!hasFocus(cell)) return;\n this.focusedIndex.set(index);\n cell.select?.();\n }\n\n /** @ignore Distribute a pasted code across the cells from `index`. */\n protected onPaste(event: ClipboardEvent, index: number): void {\n if (this.isDisabled() || this.readonly()) return;\n event.preventDefault();\n const pasted = this.sanitize(event.clipboardData?.getData('text') ?? '');\n if (pasted) this.setFromIndex(index, pasted);\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 /** @ignore Write `chars` into the cells starting at `from`, then commit (+ focus). */\n private setFromIndex(from: number, chars: string, moveFocus = true): void {\n const tokens = [...this.tokens()];\n const max = this.length();\n let i = from;\n for (const ch of chars) {\n if (i >= max) break;\n tokens[i++] = ch;\n }\n this.commit(tokens);\n if (moveFocus) this.focusCell(Math.min(i, max - 1));\n }\n\n /** @ignore Persist the tokens, emit the joined value (+ `completed` when full). */\n private commit(tokens: string[]): void {\n const trimmed = tokens.slice(0, this.length());\n this.tokens.set(trimmed);\n const value = trimmed.join('');\n this.emitChange(value);\n this.valueChange.emit(value);\n if (value.length === this.length() && trimmed.every((c) => c !== '')) {\n this.completed.emit(value);\n }\n }\n\n /** @ignore Focus (and select) the cell at `index`, if it exists. */\n private focusCell(index: number, options?: FocusOptions): void {\n if (index < 0 || index >= this.length()) return;\n this.focusedIndex.set(index);\n const el = this.host.nativeElement.querySelectorAll<HTMLInputElement>('input')[index];\n if (el) {\n el.focus(options);\n el.select();\n }\n }\n\n /** @ignore Split a form value into an array of single characters (bounded). */\n private toTokens(value: string | number | null | undefined): string[] {\n if (value === null || value === undefined || value === '') return [];\n return String(value).split('').slice(0, this.length());\n }\n\n /** @ignore Drop non-digits when integer-only, otherwise pass through. */\n private sanitize(value: string): string {\n return this.integerOnly() ? value.replace(/\\D/g, '') : value;\n }\n}\n","@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n","/*\n * Public API Surface of ui-kit/ui-input-otp\n */\n\nexport * from './lib/ui-input-otp';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api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.7", ngImport: i0, type: UiInputTags, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
678
678
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiInputTags, isStandalone: true, selector: "ui-input-tags", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, delimiter: { classPropertyName: "delimiter", publicName: "delimiter", isSignal: true, isRequired: false, transformFunction: null }, allowDuplicate: { classPropertyName: "allowDuplicate", publicName: "allowDuplicate", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: true, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "addOnPaste", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, chipLevel: { classPropertyName: "chipLevel", publicName: "chipLevel", isSignal: true, isRequired: false, transformFunction: null }, chipSubLevel: { classPropertyName: "chipSubLevel", publicName: "chipSubLevel", isSignal: true, isRequired: false, transformFunction: null }, chipRounded: { classPropertyName: "chipRounded", publicName: "chipRounded", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", 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 }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", 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 }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", 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 }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, removeTagLabel: { classPropertyName: "removeTagLabel", publicName: "removeTagLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tagAdd: "tagAdd", tagRemove: "tagRemove", valueChange: "valueChange", completeMethod: "completeMethod", optionSelect: "optionSelect", opened: "opened", closed: "closed", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
|
|
679
679
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true },
|
|
680
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input 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-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-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(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-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: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
680
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input 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-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-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(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-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: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
681
681
|
}
|
|
682
682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputTags, decorators: [{
|
|
683
683
|
type: Component,
|
|
684
684
|
args: [{ selector: 'ui-input-tags', imports: [NgTemplateOutlet, OverlayModule, UiField, UiIcon, UiChip, UiMotion], providers: [
|
|
685
685
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true },
|
|
686
|
-
], template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input 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-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-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(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"] }]
|
|
686
|
+
], template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input 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-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-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(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"] }]
|
|
687
687
|
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], delimiter: [{ type: i0.Input, args: [{ isSignal: true, alias: "delimiter", required: false }] }], allowDuplicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDuplicate", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], addOnTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnTab", required: false }] }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnPaste", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], chipLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipLevel", required: false }] }], chipSubLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipSubLevel", required: false }] }], chipRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipRounded", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", 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 }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", 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 }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], removeTagLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeTagLabel", required: false }] }], tagAdd: [{ type: i0.Output, args: ["tagAdd"] }], tagRemove: [{ type: i0.Output, args: ["tagRemove"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], optionSelect: [{ type: i0.Output, args: ["optionSelect"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], containerEl: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], tagEls: [{ type: i0.ViewChildren, args: ['tagEl', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
688
688
|
|
|
689
689
|
/*
|