@eagami/ui 5.84.0 → 5.86.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/fesm2022/eagami-ui.mjs +165 -36
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +46 -9
package/fesm2022/eagami-ui.mjs
CHANGED
|
@@ -6610,6 +6610,10 @@ var AutocompleteComponent = class AutocompleteComponent extends LabelledFieldCon
|
|
|
6610
6610
|
inputEl = viewChild("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
|
|
6611
6611
|
i18n = inject(EagamiI18nService);
|
|
6612
6612
|
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
6613
|
+
ariaLabelledby = input(void 0, {
|
|
6614
|
+
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
6615
|
+
alias: "aria-labelledby"
|
|
6616
|
+
});
|
|
6613
6617
|
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
6614
6618
|
options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
6615
6619
|
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
@@ -6786,6 +6790,13 @@ var AutocompleteComponent = class AutocompleteComponent extends LabelledFieldCon
|
|
|
6786
6790
|
isRequired: false,
|
|
6787
6791
|
transformFunction: null
|
|
6788
6792
|
},
|
|
6793
|
+
ariaLabelledby: {
|
|
6794
|
+
classPropertyName: "ariaLabelledby",
|
|
6795
|
+
publicName: "aria-labelledby",
|
|
6796
|
+
isSignal: true,
|
|
6797
|
+
isRequired: false,
|
|
6798
|
+
transformFunction: null
|
|
6799
|
+
},
|
|
6789
6800
|
placeholder: {
|
|
6790
6801
|
classPropertyName: "placeholder",
|
|
6791
6802
|
publicName: "placeholder",
|
|
@@ -6878,6 +6889,7 @@ var AutocompleteComponent = class AutocompleteComponent extends LabelledFieldCon
|
|
|
6878
6889
|
focused: "focused",
|
|
6879
6890
|
blurred: "blurred"
|
|
6880
6891
|
},
|
|
6892
|
+
host: { properties: { "attr.aria-labelledby": "null" } },
|
|
6881
6893
|
providers: [{
|
|
6882
6894
|
provide: NG_VALUE_ACCESSOR,
|
|
6883
6895
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
@@ -6892,7 +6904,7 @@ var AutocompleteComponent = class AutocompleteComponent extends LabelledFieldCon
|
|
|
6892
6904
|
}],
|
|
6893
6905
|
usesInheritance: true,
|
|
6894
6906
|
ngImport: i0,
|
|
6895
|
-
template: "<div class=\"ea-autocomplete ea-autocomplete--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [forId]=\"id()\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n #anchorEl\n class=\"ea-autocomplete__wrapper\"\n [ngClass]=\"wrapperClasses()\">\n <span class=\"ea-autocomplete__prefix\">\n <ng-content select=\"[slot=prefix]\" />\n </span>\n\n <input\n #inputEl\n class=\"ea-autocomplete__input\"\n type=\"text\"\n dir=\"auto\"\n autocomplete=\"off\"\n role=\"combobox\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"value()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel()\"\n [attr.aria-expanded]=\"showList()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? id() + '-option-' + focusedIndex() : null\n \"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n (keydown)=\"handleKeydown($event)\" />\n\n <span class=\"ea-autocomplete__suffix\">\n <ng-content select=\"[slot=suffix]\" />\n </span>\n\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"ea-autocomplete__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (mousedown)=\"onClearMousedown($event)\"\n (click)=\"clear()\">\n <ea-icon-x />\n </button>\n }\n </div>\n\n <ea-popover\n [anchor]=\"anchorEl\"\n [open]=\"showList()\"\n placement=\"bottom-start\"\n role=\"listbox\"\n [aria-label]=\"label() ?? ariaLabel()\"\n [surfaceId]=\"id() + '-listbox'\"\n [matchAnchorWidth]=\"true\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"close\"\n (closeRequested)=\"close()\">\n <div\n class=\"ea-autocomplete__listbox\"\n [ngClass]=\"listboxClasses()\">\n @for (group of renderedGroups(); track $index) {\n <div\n class=\"ea-autocomplete__group\"\n [class.ea-autocomplete__group--ruled]=\"group.rule\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @if (group.label; as groupLabel) {\n <div\n class=\"ea-autocomplete__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </div>\n }\n @for (entry of group.options; track entry.option.value) {\n <div\n class=\"ea-autocomplete__option\"\n role=\"option\"\n [id]=\"id() + '-option-' + entry.index\"\n [class.ea-autocomplete__option--focused]=\"entry.index === focusedIndex()\"\n [class.ea-autocomplete__option--disabled]=\"entry.option.disabled\"\n [attr.aria-selected]=\"entry.index === selectedIndex()\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (mousedown)=\"selectOption(entry.option)\"\n (mouseenter)=\"focusedIndex.set(entry.index)\">\n {{ entry.option.label }}\n </div>\n }\n </div>\n }\n @if (showEmpty()) {\n <div\n class=\"ea-autocomplete__empty\"\n role=\"status\">\n {{ resolvedEmptyMessage() }}\n </div>\n }\n </div>\n </ea-popover>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
6907
|
+
template: "<div class=\"ea-autocomplete ea-autocomplete--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [forId]=\"id()\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n #anchorEl\n class=\"ea-autocomplete__wrapper\"\n [ngClass]=\"wrapperClasses()\">\n <span class=\"ea-autocomplete__prefix\">\n <ng-content select=\"[slot=prefix]\" />\n </span>\n\n <input\n #inputEl\n class=\"ea-autocomplete__input\"\n type=\"text\"\n dir=\"auto\"\n autocomplete=\"off\"\n role=\"combobox\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"value()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"label() || ariaLabelledby() ? null : (ariaLabel() ?? null)\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.aria-expanded]=\"showList()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? id() + '-option-' + focusedIndex() : null\n \"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n (keydown)=\"handleKeydown($event)\" />\n\n <span class=\"ea-autocomplete__suffix\">\n <ng-content select=\"[slot=suffix]\" />\n </span>\n\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"ea-autocomplete__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (mousedown)=\"onClearMousedown($event)\"\n (click)=\"clear()\">\n <ea-icon-x />\n </button>\n }\n </div>\n\n <ea-popover\n [anchor]=\"anchorEl\"\n [open]=\"showList()\"\n placement=\"bottom-start\"\n role=\"listbox\"\n [aria-label]=\"ariaLabelledby() ? undefined : (label() ?? ariaLabel())\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [surfaceId]=\"id() + '-listbox'\"\n [matchAnchorWidth]=\"true\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"close\"\n (closeRequested)=\"close()\">\n <div\n class=\"ea-autocomplete__listbox\"\n [ngClass]=\"listboxClasses()\">\n @for (group of renderedGroups(); track $index) {\n <div\n class=\"ea-autocomplete__group\"\n [class.ea-autocomplete__group--ruled]=\"group.rule\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @if (group.label; as groupLabel) {\n <div\n class=\"ea-autocomplete__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </div>\n }\n @for (entry of group.options; track entry.option.value) {\n <div\n class=\"ea-autocomplete__option\"\n role=\"option\"\n [id]=\"id() + '-option-' + entry.index\"\n [class.ea-autocomplete__option--focused]=\"entry.index === focusedIndex()\"\n [class.ea-autocomplete__option--disabled]=\"entry.option.disabled\"\n [attr.aria-selected]=\"entry.index === selectedIndex()\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (mousedown)=\"selectOption(entry.option)\"\n (mouseenter)=\"focusedIndex.set(entry.index)\">\n {{ entry.option.label }}\n </div>\n }\n </div>\n }\n @if (showEmpty()) {\n <div\n class=\"ea-autocomplete__empty\"\n role=\"status\">\n {{ resolvedEmptyMessage() }}\n </div>\n }\n </div>\n </ea-popover>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
6896
6908
|
styles: [".ea-autocomplete{position:relative;display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-autocomplete--2xs{font-size:var(--font-size-2xs)}.ea-autocomplete--xs{font-size:var(--font-size-xs)}.ea-autocomplete--sm{font-size:var(--font-size-sm)}.ea-autocomplete--md{font-size:var(--font-size-md)}.ea-autocomplete--lg{font-size:var(--font-size-lg)}.ea-autocomplete--xl{font-size:var(--font-size-xl)}.ea-autocomplete__wrapper{display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:0 .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);transition:var(--transition-colors),var(--transition-shadow)}.ea-autocomplete__wrapper--focused{outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-autocomplete__wrapper--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--error{border-color:var(--color-error-default)}.ea-autocomplete__wrapper--error.ea-autocomplete__wrapper--focused{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-autocomplete__wrapper--error.ea-autocomplete__wrapper--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--disabled{background-color:var(--color-bg-muted);opacity:.6;cursor:default}.ea-autocomplete__wrapper--readonly:has(:focus-visible){border-color:var(--color-border-focus);outline:none;box-shadow:none}@media(forced-colors:active){.ea-autocomplete__wrapper--readonly:has(:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--readonly button{cursor:default}.ea-autocomplete__wrapper--readonly button:hover{background-color:transparent;color:var(--color-text-secondary)}.ea-autocomplete__input{flex:1;min-width:0;padding:.5em 0;border:none;background:transparent;font-family:var(--font-family-sans);color:var(--color-text-primary);outline:none}.ea-autocomplete__input::placeholder{opacity:1;font-style:italic;color:var(--color-text-tertiary)}.ea-autocomplete__input:disabled{cursor:default}.ea-autocomplete__prefix,.ea-autocomplete__suffix{display:flex;flex-shrink:0;align-items:center;color:var(--color-text-secondary)}.ea-autocomplete__prefix:empty,.ea-autocomplete__suffix:empty{display:none}.ea-autocomplete__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-autocomplete__clear>*{font-size:1.25em}.ea-autocomplete__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-autocomplete__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-autocomplete__clear:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-autocomplete__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__clear:disabled{cursor:default;opacity:.5}.ea-autocomplete__listbox{overflow-y:auto;overscroll-behavior:none;max-height:15rem;padding:.25em 0;list-style:none;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-autocomplete-listbox-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-autocomplete__listbox{border:1px solid CanvasText}}.ea-autocomplete__listbox--2xs{font-size:var(--font-size-2xs)}.ea-autocomplete__listbox--xs{font-size:var(--font-size-xs)}.ea-autocomplete__listbox--sm{font-size:var(--font-size-sm)}.ea-autocomplete__listbox--md{font-size:var(--font-size-md)}.ea-autocomplete__listbox--lg{font-size:var(--font-size-lg)}.ea-autocomplete__listbox--xl{font-size:var(--font-size-xl)}.ea-autocomplete__group{position:relative}.ea-autocomplete__group--ruled{padding-top:.25em;margin-top:.25em}.ea-autocomplete__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-autocomplete__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-autocomplete__option{padding:.5em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-autocomplete__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-autocomplete__option--focused{background-color:Highlight;color:HighlightText}}.ea-autocomplete__option--disabled{color:var(--color-text-disabled);cursor:default}@media(forced-colors:active){.ea-autocomplete__option--disabled{color:GrayText}}.ea-autocomplete__empty{padding:.5em .75em;font-size:inherit;font-style:italic;color:var(--color-text-tertiary)}\n"],
|
|
6897
6909
|
dependencies: [
|
|
6898
6910
|
{
|
|
@@ -6977,12 +6989,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6977
6989
|
XIconComponent
|
|
6978
6990
|
],
|
|
6979
6991
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6992
|
+
host: { "[attr.aria-labelledby]": "null" },
|
|
6980
6993
|
providers: [{
|
|
6981
6994
|
provide: NG_VALUE_ACCESSOR,
|
|
6982
6995
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
6983
6996
|
multi: true
|
|
6984
6997
|
}],
|
|
6985
|
-
template: "<div class=\"ea-autocomplete ea-autocomplete--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [forId]=\"id()\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n #anchorEl\n class=\"ea-autocomplete__wrapper\"\n [ngClass]=\"wrapperClasses()\">\n <span class=\"ea-autocomplete__prefix\">\n <ng-content select=\"[slot=prefix]\" />\n </span>\n\n <input\n #inputEl\n class=\"ea-autocomplete__input\"\n type=\"text\"\n dir=\"auto\"\n autocomplete=\"off\"\n role=\"combobox\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"value()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel()\"\n [attr.aria-expanded]=\"showList()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? id() + '-option-' + focusedIndex() : null\n \"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n (keydown)=\"handleKeydown($event)\" />\n\n <span class=\"ea-autocomplete__suffix\">\n <ng-content select=\"[slot=suffix]\" />\n </span>\n\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"ea-autocomplete__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (mousedown)=\"onClearMousedown($event)\"\n (click)=\"clear()\">\n <ea-icon-x />\n </button>\n }\n </div>\n\n <ea-popover\n [anchor]=\"anchorEl\"\n [open]=\"showList()\"\n placement=\"bottom-start\"\n role=\"listbox\"\n [aria-label]=\"label() ?? ariaLabel()\"\n [surfaceId]=\"id() + '-listbox'\"\n [matchAnchorWidth]=\"true\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"close\"\n (closeRequested)=\"close()\">\n <div\n class=\"ea-autocomplete__listbox\"\n [ngClass]=\"listboxClasses()\">\n @for (group of renderedGroups(); track $index) {\n <div\n class=\"ea-autocomplete__group\"\n [class.ea-autocomplete__group--ruled]=\"group.rule\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @if (group.label; as groupLabel) {\n <div\n class=\"ea-autocomplete__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </div>\n }\n @for (entry of group.options; track entry.option.value) {\n <div\n class=\"ea-autocomplete__option\"\n role=\"option\"\n [id]=\"id() + '-option-' + entry.index\"\n [class.ea-autocomplete__option--focused]=\"entry.index === focusedIndex()\"\n [class.ea-autocomplete__option--disabled]=\"entry.option.disabled\"\n [attr.aria-selected]=\"entry.index === selectedIndex()\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (mousedown)=\"selectOption(entry.option)\"\n (mouseenter)=\"focusedIndex.set(entry.index)\">\n {{ entry.option.label }}\n </div>\n }\n </div>\n }\n @if (showEmpty()) {\n <div\n class=\"ea-autocomplete__empty\"\n role=\"status\">\n {{ resolvedEmptyMessage() }}\n </div>\n }\n </div>\n </ea-popover>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
6998
|
+
template: "<div class=\"ea-autocomplete ea-autocomplete--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [forId]=\"id()\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n #anchorEl\n class=\"ea-autocomplete__wrapper\"\n [ngClass]=\"wrapperClasses()\">\n <span class=\"ea-autocomplete__prefix\">\n <ng-content select=\"[slot=prefix]\" />\n </span>\n\n <input\n #inputEl\n class=\"ea-autocomplete__input\"\n type=\"text\"\n dir=\"auto\"\n autocomplete=\"off\"\n role=\"combobox\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"value()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"label() || ariaLabelledby() ? null : (ariaLabel() ?? null)\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.aria-expanded]=\"showList()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? id() + '-option-' + focusedIndex() : null\n \"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n (keydown)=\"handleKeydown($event)\" />\n\n <span class=\"ea-autocomplete__suffix\">\n <ng-content select=\"[slot=suffix]\" />\n </span>\n\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"ea-autocomplete__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (mousedown)=\"onClearMousedown($event)\"\n (click)=\"clear()\">\n <ea-icon-x />\n </button>\n }\n </div>\n\n <ea-popover\n [anchor]=\"anchorEl\"\n [open]=\"showList()\"\n placement=\"bottom-start\"\n role=\"listbox\"\n [aria-label]=\"ariaLabelledby() ? undefined : (label() ?? ariaLabel())\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [surfaceId]=\"id() + '-listbox'\"\n [matchAnchorWidth]=\"true\"\n [closeOnEscape]=\"false\"\n scrollBehavior=\"close\"\n (closeRequested)=\"close()\">\n <div\n class=\"ea-autocomplete__listbox\"\n [ngClass]=\"listboxClasses()\">\n @for (group of renderedGroups(); track $index) {\n <div\n class=\"ea-autocomplete__group\"\n [class.ea-autocomplete__group--ruled]=\"group.rule\"\n [attr.role]=\"grouped() ? 'group' : 'presentation'\"\n [attr.aria-label]=\"group.label ?? null\">\n @if (group.label; as groupLabel) {\n <div\n class=\"ea-autocomplete__group-label\"\n aria-hidden=\"true\">\n {{ groupLabel }}\n </div>\n }\n @for (entry of group.options; track entry.option.value) {\n <div\n class=\"ea-autocomplete__option\"\n role=\"option\"\n [id]=\"id() + '-option-' + entry.index\"\n [class.ea-autocomplete__option--focused]=\"entry.index === focusedIndex()\"\n [class.ea-autocomplete__option--disabled]=\"entry.option.disabled\"\n [attr.aria-selected]=\"entry.index === selectedIndex()\"\n [attr.aria-disabled]=\"entry.option.disabled || null\"\n (mousedown)=\"selectOption(entry.option)\"\n (mouseenter)=\"focusedIndex.set(entry.index)\">\n {{ entry.option.label }}\n </div>\n }\n </div>\n }\n @if (showEmpty()) {\n <div\n class=\"ea-autocomplete__empty\"\n role=\"status\">\n {{ resolvedEmptyMessage() }}\n </div>\n }\n </div>\n </ea-popover>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
6986
6999
|
styles: [".ea-autocomplete{position:relative;display:flex;flex-direction:column;gap:.375em;--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-autocomplete--2xs{font-size:var(--font-size-2xs)}.ea-autocomplete--xs{font-size:var(--font-size-xs)}.ea-autocomplete--sm{font-size:var(--font-size-sm)}.ea-autocomplete--md{font-size:var(--font-size-md)}.ea-autocomplete--lg{font-size:var(--font-size-lg)}.ea-autocomplete--xl{font-size:var(--font-size-xl)}.ea-autocomplete__wrapper{display:flex;align-items:center;gap:.5em;width:100%;min-height:2.5em;padding:0 .75em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);transition:var(--transition-colors),var(--transition-shadow)}.ea-autocomplete__wrapper--focused{outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-autocomplete__wrapper--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--error{border-color:var(--color-error-default)}.ea-autocomplete__wrapper--error.ea-autocomplete__wrapper--focused{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-autocomplete__wrapper--error.ea-autocomplete__wrapper--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--disabled{background-color:var(--color-bg-muted);opacity:.6;cursor:default}.ea-autocomplete__wrapper--readonly:has(:focus-visible){border-color:var(--color-border-focus);outline:none;box-shadow:none}@media(forced-colors:active){.ea-autocomplete__wrapper--readonly:has(:focus-visible){outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__wrapper--readonly button{cursor:default}.ea-autocomplete__wrapper--readonly button:hover{background-color:transparent;color:var(--color-text-secondary)}.ea-autocomplete__input{flex:1;min-width:0;padding:.5em 0;border:none;background:transparent;font-family:var(--font-family-sans);color:var(--color-text-primary);outline:none}.ea-autocomplete__input::placeholder{opacity:1;font-style:italic;color:var(--color-text-tertiary)}.ea-autocomplete__input:disabled{cursor:default}.ea-autocomplete__prefix,.ea-autocomplete__suffix{display:flex;flex-shrink:0;align-items:center;color:var(--color-text-secondary)}.ea-autocomplete__prefix:empty,.ea-autocomplete__suffix:empty{display:none}.ea-autocomplete__clear{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-autocomplete__clear>*{font-size:1.25em}.ea-autocomplete__clear:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-autocomplete__clear:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-autocomplete__clear:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-autocomplete__clear:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-autocomplete__clear:disabled{cursor:default;opacity:.5}.ea-autocomplete__listbox{overflow-y:auto;overscroll-behavior:none;max-height:15rem;padding:.25em 0;list-style:none;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--ea-autocomplete-listbox-background-color, var(--color-bg-elevated))}@media(forced-colors:active){.ea-autocomplete__listbox{border:1px solid CanvasText}}.ea-autocomplete__listbox--2xs{font-size:var(--font-size-2xs)}.ea-autocomplete__listbox--xs{font-size:var(--font-size-xs)}.ea-autocomplete__listbox--sm{font-size:var(--font-size-sm)}.ea-autocomplete__listbox--md{font-size:var(--font-size-md)}.ea-autocomplete__listbox--lg{font-size:var(--font-size-lg)}.ea-autocomplete__listbox--xl{font-size:var(--font-size-xl)}.ea-autocomplete__group{position:relative}.ea-autocomplete__group--ruled{padding-top:.25em;margin-top:.25em}.ea-autocomplete__group--ruled:before{position:absolute;top:0;inset-inline-end:0;inset-inline-start:0;height:var(--border-width-thin);background-color:var(--color-divider);content:\"\"}.ea-autocomplete__group-label{display:block;padding:.5em .75em .125em;font-size:.8125em;font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-autocomplete__option{padding:.5em .75em;font-size:inherit;font-family:var(--font-family-sans);color:var(--color-text-primary);cursor:pointer;transition:var(--transition-colors)}.ea-autocomplete__option--focused{background-color:var(--color-state-hover)}@media(forced-colors:active){.ea-autocomplete__option--focused{background-color:Highlight;color:HighlightText}}.ea-autocomplete__option--disabled{color:var(--color-text-disabled);cursor:default}@media(forced-colors:active){.ea-autocomplete__option--disabled{color:GrayText}}.ea-autocomplete__empty{padding:.5em .75em;font-size:inherit;font-style:italic;color:var(--color-text-tertiary)}\n"]
|
|
6987
7000
|
}]
|
|
6988
7001
|
}],
|
|
@@ -6999,6 +7012,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6999
7012
|
required: false
|
|
7000
7013
|
}]
|
|
7001
7014
|
}],
|
|
7015
|
+
ariaLabelledby: [{
|
|
7016
|
+
type: i0.Input,
|
|
7017
|
+
args: [{
|
|
7018
|
+
isSignal: true,
|
|
7019
|
+
alias: "aria-labelledby",
|
|
7020
|
+
required: false
|
|
7021
|
+
}]
|
|
7022
|
+
}],
|
|
7002
7023
|
placeholder: [{
|
|
7003
7024
|
type: i0.Input,
|
|
7004
7025
|
args: [{
|
|
@@ -14842,12 +14863,46 @@ function focusOnReveal(isOpen, popover, focus) {
|
|
|
14842
14863
|
pending.set(latestRequest);
|
|
14843
14864
|
};
|
|
14844
14865
|
}
|
|
14866
|
+
const QUERY_RESET_MS = 500;
|
|
14867
|
+
function isTypedCharacter(event) {
|
|
14868
|
+
return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
|
|
14869
|
+
}
|
|
14870
|
+
var Typeahead = class {
|
|
14871
|
+
query = "";
|
|
14872
|
+
timer;
|
|
14873
|
+
constructor() {
|
|
14874
|
+
inject(DestroyRef).onDestroy(() => this.reset());
|
|
14875
|
+
}
|
|
14876
|
+
accepts(event) {
|
|
14877
|
+
return isTypedCharacter(event) && (event.key !== " " || this.query !== "");
|
|
14878
|
+
}
|
|
14879
|
+
match(key, labels, current, includeCurrent = false) {
|
|
14880
|
+
clearTimeout(this.timer);
|
|
14881
|
+
this.timer = setTimeout(() => this.query = "", QUERY_RESET_MS);
|
|
14882
|
+
this.query += foldForSearch(key);
|
|
14883
|
+
if (labels.length === 0) return -1;
|
|
14884
|
+
const start = Math.max(current, 0);
|
|
14885
|
+
const firstOffset = this.query.length > 1 || includeCurrent || current < 0 ? 0 : 1;
|
|
14886
|
+
for (let offset = firstOffset; offset <= labels.length; offset++) {
|
|
14887
|
+
const idx = (start + offset) % labels.length;
|
|
14888
|
+
const label = labels[idx];
|
|
14889
|
+
if (label !== null && foldForSearch(label).startsWith(this.query)) return idx;
|
|
14890
|
+
}
|
|
14891
|
+
return -1;
|
|
14892
|
+
}
|
|
14893
|
+
reset() {
|
|
14894
|
+
clearTimeout(this.timer);
|
|
14895
|
+
this.timer = void 0;
|
|
14896
|
+
this.query = "";
|
|
14897
|
+
}
|
|
14898
|
+
};
|
|
14845
14899
|
var MenuComponent = class MenuComponent {
|
|
14846
14900
|
injector = inject(Injector);
|
|
14847
14901
|
i18n = inject(EagamiI18nService);
|
|
14848
14902
|
listEl = viewChild("listEl", ...ngDevMode ? [{ debugName: "listEl" }] : /* istanbul ignore next */ []);
|
|
14849
14903
|
popover = viewChild(PopoverComponent, ...ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []);
|
|
14850
14904
|
focusFirstItemOnReveal = focusOnReveal(() => this.open(), () => this.popover(), () => this.focusFirstItem());
|
|
14905
|
+
typeahead = new Typeahead();
|
|
14851
14906
|
placement = input("bottom-start", ...ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []);
|
|
14852
14907
|
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
14853
14908
|
maxHeight = input("20rem", ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
|
|
@@ -14870,6 +14925,7 @@ var MenuComponent = class MenuComponent {
|
|
|
14870
14925
|
constructor() {
|
|
14871
14926
|
effect(() => {
|
|
14872
14927
|
if (!this.open()) {
|
|
14928
|
+
this.typeahead.reset();
|
|
14873
14929
|
this.activeItemId.set(null);
|
|
14874
14930
|
this.asContextMenu.set(false);
|
|
14875
14931
|
this.anchorPoint.set(null);
|
|
@@ -14960,6 +15016,12 @@ var MenuComponent = class MenuComponent {
|
|
|
14960
15016
|
case "End":
|
|
14961
15017
|
event.preventDefault();
|
|
14962
15018
|
next = items.length - 1;
|
|
15019
|
+
break;
|
|
15020
|
+
default: if (this.typeahead.accepts(event)) {
|
|
15021
|
+
event.preventDefault();
|
|
15022
|
+
const labels = items.map((item) => item.querySelector(".ea-menu-item__label")?.textContent?.trim() ?? "");
|
|
15023
|
+
next = this.typeahead.match(event.key, labels, current);
|
|
15024
|
+
}
|
|
14963
15025
|
}
|
|
14964
15026
|
if (next >= 0) this.focusItem(items[next]);
|
|
14965
15027
|
}
|
|
@@ -16378,6 +16440,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16378
16440
|
var CodeInputComponent = class CodeInputComponent extends LabelledFieldControlBase {
|
|
16379
16441
|
digitEls = viewChildren("digitEl", ...ngDevMode ? [{ debugName: "digitEls" }] : /* istanbul ignore next */ []);
|
|
16380
16442
|
i18n = inject(EagamiI18nService);
|
|
16443
|
+
ariaLabel = input(void 0, {
|
|
16444
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
16445
|
+
alias: "aria-label"
|
|
16446
|
+
});
|
|
16381
16447
|
ariaLabelledby = input(void 0, {
|
|
16382
16448
|
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
16383
16449
|
alias: "aria-labelledby"
|
|
@@ -16512,6 +16578,13 @@ var CodeInputComponent = class CodeInputComponent extends LabelledFieldControlBa
|
|
|
16512
16578
|
isStandalone: true,
|
|
16513
16579
|
selector: "ea-code-input",
|
|
16514
16580
|
inputs: {
|
|
16581
|
+
ariaLabel: {
|
|
16582
|
+
classPropertyName: "ariaLabel",
|
|
16583
|
+
publicName: "aria-label",
|
|
16584
|
+
isSignal: true,
|
|
16585
|
+
isRequired: false,
|
|
16586
|
+
transformFunction: null
|
|
16587
|
+
},
|
|
16515
16588
|
ariaLabelledby: {
|
|
16516
16589
|
classPropertyName: "ariaLabelledby",
|
|
16517
16590
|
publicName: "aria-labelledby",
|
|
@@ -16595,7 +16668,7 @@ var CodeInputComponent = class CodeInputComponent extends LabelledFieldControlBa
|
|
|
16595
16668
|
}],
|
|
16596
16669
|
usesInheritance: true,
|
|
16597
16670
|
ngImport: i0,
|
|
16598
|
-
template: "<div class=\"ea-code-input-field ea-code-input-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n class=\"ea-code-input-group\"\n [class.ea-code-input-group--xs]=\"size() === 'xs'\"\n [class.ea-code-input-group--sm]=\"size() === 'sm'\"\n [class.ea-code-input-group--md]=\"size() === 'md'\"\n [class.ea-code-input-group--lg]=\"size() === 'lg'\"\n [class.ea-code-input-group--xl]=\"size() === 'xl'\"\n [class.ea-code-input-group--error]=\"hasError()\"\n [class.ea-code-input-group--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"ariaLabelledby() || (label() ? id() + '-label' : null)\"\n [attr.aria-label]=\"\n !label() && !ariaLabelledby()\n ? i18n.messages().codeInput.groupLabel(length())\n : null\n \"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \">\n @for (i of indices(); track i) {\n <input\n #digitEl\n class=\"ea-code-input\"\n [class.ea-code-input--focused]=\"focusedIndex() === i && !readonly()\"\n [class.ea-code-input--readonly]=\"readonly()\"\n [class.ea-code-input--filled]=\"digits()[i] !== ''\"\n type=\"text\"\n [attr.inputmode]=\"allowAllChars() ? 'text' : 'numeric'\"\n autocomplete=\"one-time-code\"\n maxlength=\"1\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"digits()[i]\"\n [placeholder]=\"placeholders()[i]\"\n [attr.aria-label]=\"i18n.messages().codeInput.digitLabel(i + 1, length())\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus(i)\"\n (blur)=\"handleBlur()\" />\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
16671
|
+
template: "<div class=\"ea-code-input-field ea-code-input-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n class=\"ea-code-input-group\"\n [class.ea-code-input-group--xs]=\"size() === 'xs'\"\n [class.ea-code-input-group--sm]=\"size() === 'sm'\"\n [class.ea-code-input-group--md]=\"size() === 'md'\"\n [class.ea-code-input-group--lg]=\"size() === 'lg'\"\n [class.ea-code-input-group--xl]=\"size() === 'xl'\"\n [class.ea-code-input-group--error]=\"hasError()\"\n [class.ea-code-input-group--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"ariaLabelledby() || (label() ? id() + '-label' : null)\"\n [attr.aria-label]=\"\n !label() && !ariaLabelledby()\n ? (ariaLabel() ?? i18n.messages().codeInput.groupLabel(length()))\n : null\n \"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \">\n @for (i of indices(); track i) {\n <input\n #digitEl\n class=\"ea-code-input\"\n [class.ea-code-input--focused]=\"focusedIndex() === i && !readonly()\"\n [class.ea-code-input--readonly]=\"readonly()\"\n [class.ea-code-input--filled]=\"digits()[i] !== ''\"\n type=\"text\"\n [attr.inputmode]=\"allowAllChars() ? 'text' : 'numeric'\"\n autocomplete=\"one-time-code\"\n maxlength=\"1\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"digits()[i]\"\n [placeholder]=\"placeholders()[i]\"\n [attr.aria-label]=\"i18n.messages().codeInput.digitLabel(i + 1, length())\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus(i)\"\n (blur)=\"handleBlur()\" />\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
16599
16672
|
styles: [".ea-code-input-field{display:flex;flex-direction:column;gap:.375em;color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-code-input-field--2xs{font-size:var(--font-size-2xs)}.ea-code-input-field--xs{font-size:var(--font-size-xs)}.ea-code-input-field--sm{font-size:var(--font-size-sm)}.ea-code-input-field--md{font-size:var(--font-size-md)}.ea-code-input-field--lg{font-size:var(--font-size-lg)}.ea-code-input-field--xl{font-size:var(--font-size-xl)}.ea-code-input-group{display:flex;gap:var(--ea-code-input-gap, .5em)}.ea-code-input-group--error .ea-code-input{border-color:var(--color-error-default)}.ea-code-input-group--error .ea-code-input--focused{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-code-input-group--error .ea-code-input--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input-group--disabled{opacity:.6}.ea-code-input-group--disabled .ea-code-input{background-color:var(--color-bg-muted);border-color:var(--color-border-default);cursor:default}.ea-code-input{display:flex;align-items:center;justify-content:center;width:var(--ea-code-input-cell-width, 2.5em);height:var(--ea-code-input-cell-height, 3em);padding:0;font-size:var(--ea-code-input-font-size, 1em);font-weight:var(--ea-code-input-font-weight, var(--font-weight-semibold));text-align:center;font-family:var(--ea-code-input-font-family, var(--font-family-sans));line-height:var(--line-height-none);letter-spacing:var(--letter-spacing-normal);background-color:var(--ea-code-input-background-color, var(--color-bg-base));border:var(--border-width-thin) solid var(--ea-code-input-border-color, var(--color-border-default));border-radius:var(--ea-code-input-radius, var(--radius-md));outline:none;color:var(--ea-code-input-color, var(--color-text-primary));caret-color:var(--ea-code-input-caret-color, transparent);transition:var(--transition-colors),var(--transition-shadow)}.ea-code-input::placeholder{opacity:1;font-style:italic;color:var(--color-text-tertiary)}.ea-code-input--focused{border-color:var(--ea-code-input-border-color-focus, var(--color-border-default));outline:none;box-shadow:var(--ea-code-input-shadow-focus, var(--shadow-focus-ring))}@media(forced-colors:active){.ea-code-input--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input--readonly{cursor:default}.ea-code-input--readonly:focus-visible{border-color:var(--color-border-focus);outline:none;box-shadow:none}@media(forced-colors:active){.ea-code-input--readonly:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input--filled{border-color:var(--ea-code-input-border-color-filled, var(--color-border-strong))}.ea-code-input:disabled{cursor:default}.ea-code-input::-webkit-outer-spin-button,.ea-code-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"],
|
|
16600
16673
|
dependencies: [{
|
|
16601
16674
|
kind: "component",
|
|
@@ -16640,7 +16713,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16640
16713
|
useExisting: forwardRef(() => CodeInputComponent),
|
|
16641
16714
|
multi: true
|
|
16642
16715
|
}],
|
|
16643
|
-
template: "<div class=\"ea-code-input-field ea-code-input-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n class=\"ea-code-input-group\"\n [class.ea-code-input-group--xs]=\"size() === 'xs'\"\n [class.ea-code-input-group--sm]=\"size() === 'sm'\"\n [class.ea-code-input-group--md]=\"size() === 'md'\"\n [class.ea-code-input-group--lg]=\"size() === 'lg'\"\n [class.ea-code-input-group--xl]=\"size() === 'xl'\"\n [class.ea-code-input-group--error]=\"hasError()\"\n [class.ea-code-input-group--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"ariaLabelledby() || (label() ? id() + '-label' : null)\"\n [attr.aria-label]=\"\n !label() && !ariaLabelledby()\n ? i18n.messages().codeInput.groupLabel(length())\n : null\n \"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \">\n @for (i of indices(); track i) {\n <input\n #digitEl\n class=\"ea-code-input\"\n [class.ea-code-input--focused]=\"focusedIndex() === i && !readonly()\"\n [class.ea-code-input--readonly]=\"readonly()\"\n [class.ea-code-input--filled]=\"digits()[i] !== ''\"\n type=\"text\"\n [attr.inputmode]=\"allowAllChars() ? 'text' : 'numeric'\"\n autocomplete=\"one-time-code\"\n maxlength=\"1\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"digits()[i]\"\n [placeholder]=\"placeholders()[i]\"\n [attr.aria-label]=\"i18n.messages().codeInput.digitLabel(i + 1, length())\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus(i)\"\n (blur)=\"handleBlur()\" />\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
16716
|
+
template: "<div class=\"ea-code-input-field ea-code-input-field--{{ size() }}\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n\n <div\n class=\"ea-code-input-group\"\n [class.ea-code-input-group--xs]=\"size() === 'xs'\"\n [class.ea-code-input-group--sm]=\"size() === 'sm'\"\n [class.ea-code-input-group--md]=\"size() === 'md'\"\n [class.ea-code-input-group--lg]=\"size() === 'lg'\"\n [class.ea-code-input-group--xl]=\"size() === 'xl'\"\n [class.ea-code-input-group--error]=\"hasError()\"\n [class.ea-code-input-group--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"ariaLabelledby() || (label() ? id() + '-label' : null)\"\n [attr.aria-label]=\"\n !label() && !ariaLabelledby()\n ? (ariaLabel() ?? i18n.messages().codeInput.groupLabel(length()))\n : null\n \"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \">\n @for (i of indices(); track i) {\n <input\n #digitEl\n class=\"ea-code-input\"\n [class.ea-code-input--focused]=\"focusedIndex() === i && !readonly()\"\n [class.ea-code-input--readonly]=\"readonly()\"\n [class.ea-code-input--filled]=\"digits()[i] !== ''\"\n type=\"text\"\n [attr.inputmode]=\"allowAllChars() ? 'text' : 'numeric'\"\n autocomplete=\"one-time-code\"\n maxlength=\"1\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"digits()[i]\"\n [placeholder]=\"placeholders()[i]\"\n [attr.aria-label]=\"i18n.messages().codeInput.digitLabel(i + 1, length())\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus(i)\"\n (blur)=\"handleBlur()\" />\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
16644
16717
|
styles: [".ea-code-input-field{display:flex;flex-direction:column;gap:.375em;color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-code-input-field--2xs{font-size:var(--font-size-2xs)}.ea-code-input-field--xs{font-size:var(--font-size-xs)}.ea-code-input-field--sm{font-size:var(--font-size-sm)}.ea-code-input-field--md{font-size:var(--font-size-md)}.ea-code-input-field--lg{font-size:var(--font-size-lg)}.ea-code-input-field--xl{font-size:var(--font-size-xl)}.ea-code-input-group{display:flex;gap:var(--ea-code-input-gap, .5em)}.ea-code-input-group--error .ea-code-input{border-color:var(--color-error-default)}.ea-code-input-group--error .ea-code-input--focused{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-code-input-group--error .ea-code-input--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input-group--disabled{opacity:.6}.ea-code-input-group--disabled .ea-code-input{background-color:var(--color-bg-muted);border-color:var(--color-border-default);cursor:default}.ea-code-input{display:flex;align-items:center;justify-content:center;width:var(--ea-code-input-cell-width, 2.5em);height:var(--ea-code-input-cell-height, 3em);padding:0;font-size:var(--ea-code-input-font-size, 1em);font-weight:var(--ea-code-input-font-weight, var(--font-weight-semibold));text-align:center;font-family:var(--ea-code-input-font-family, var(--font-family-sans));line-height:var(--line-height-none);letter-spacing:var(--letter-spacing-normal);background-color:var(--ea-code-input-background-color, var(--color-bg-base));border:var(--border-width-thin) solid var(--ea-code-input-border-color, var(--color-border-default));border-radius:var(--ea-code-input-radius, var(--radius-md));outline:none;color:var(--ea-code-input-color, var(--color-text-primary));caret-color:var(--ea-code-input-caret-color, transparent);transition:var(--transition-colors),var(--transition-shadow)}.ea-code-input::placeholder{opacity:1;font-style:italic;color:var(--color-text-tertiary)}.ea-code-input--focused{border-color:var(--ea-code-input-border-color-focus, var(--color-border-default));outline:none;box-shadow:var(--ea-code-input-shadow-focus, var(--shadow-focus-ring))}@media(forced-colors:active){.ea-code-input--focused{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input--readonly{cursor:default}.ea-code-input--readonly:focus-visible{border-color:var(--color-border-focus);outline:none;box-shadow:none}@media(forced-colors:active){.ea-code-input--readonly:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-code-input--filled{border-color:var(--ea-code-input-border-color-filled, var(--color-border-strong))}.ea-code-input:disabled{cursor:default}.ea-code-input::-webkit-outer-spin-button,.ea-code-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
|
|
16645
16718
|
}]
|
|
16646
16719
|
}],
|
|
@@ -16649,6 +16722,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16649
16722
|
type: i0.ViewChildren,
|
|
16650
16723
|
args: ["digitEl", { isSignal: true }]
|
|
16651
16724
|
}],
|
|
16725
|
+
ariaLabel: [{
|
|
16726
|
+
type: i0.Input,
|
|
16727
|
+
args: [{
|
|
16728
|
+
isSignal: true,
|
|
16729
|
+
alias: "aria-label",
|
|
16730
|
+
required: false
|
|
16731
|
+
}]
|
|
16732
|
+
}],
|
|
16652
16733
|
ariaLabelledby: [{
|
|
16653
16734
|
type: i0.Input,
|
|
16654
16735
|
args: [{
|
|
@@ -17047,6 +17128,10 @@ var DatePickerComponent = class DatePickerComponent extends LabelledFieldControl
|
|
|
17047
17128
|
injector = inject(Injector);
|
|
17048
17129
|
i18n = inject(EagamiI18nService);
|
|
17049
17130
|
placeholder = input(void 0, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
17131
|
+
ariaLabel = input(void 0, {
|
|
17132
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
17133
|
+
alias: "aria-label"
|
|
17134
|
+
});
|
|
17050
17135
|
ariaLabelledby = input(void 0, {
|
|
17051
17136
|
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
17052
17137
|
alias: "aria-labelledby"
|
|
@@ -17094,7 +17179,7 @@ var DatePickerComponent = class DatePickerComponent extends LabelledFieldControl
|
|
|
17094
17179
|
}
|
|
17095
17180
|
}, ...ngDevMode ? [{ debugName: "intlLocalizesEffectiveLocale" }] : /* istanbul ignore next */ []);
|
|
17096
17181
|
resolvedPlaceholder = computed(() => this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "resolvedPlaceholder" }] : /* istanbul ignore next */ []);
|
|
17097
|
-
fallbackLabel = computed(() => this.placeholder() ?? this.i18n.messages().datePicker.placeholder, ...ngDevMode ? [{ debugName: "fallbackLabel" }] : /* istanbul ignore next */ []);
|
|
17182
|
+
fallbackLabel = computed(() => this.ariaLabel() ?? this.placeholder() ?? this.i18n.messages().datePicker.placeholder, ...ngDevMode ? [{ debugName: "fallbackLabel" }] : /* istanbul ignore next */ []);
|
|
17098
17183
|
dialogId = computed(() => `${this.id()}-dialog`, ...ngDevMode ? [{ debugName: "dialogId" }] : /* istanbul ignore next */ []);
|
|
17099
17184
|
fieldClasses = computed(() => ({
|
|
17100
17185
|
"ea-date-picker__field--focused": (this.isFocused() || this.isOpen()) && !this.readonly(),
|
|
@@ -17446,6 +17531,13 @@ var DatePickerComponent = class DatePickerComponent extends LabelledFieldControl
|
|
|
17446
17531
|
isRequired: false,
|
|
17447
17532
|
transformFunction: null
|
|
17448
17533
|
},
|
|
17534
|
+
ariaLabel: {
|
|
17535
|
+
classPropertyName: "ariaLabel",
|
|
17536
|
+
publicName: "aria-label",
|
|
17537
|
+
isSignal: true,
|
|
17538
|
+
isRequired: false,
|
|
17539
|
+
transformFunction: null
|
|
17540
|
+
},
|
|
17449
17541
|
ariaLabelledby: {
|
|
17450
17542
|
classPropertyName: "ariaLabelledby",
|
|
17451
17543
|
publicName: "aria-labelledby",
|
|
@@ -17707,6 +17799,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
17707
17799
|
required: false
|
|
17708
17800
|
}]
|
|
17709
17801
|
}],
|
|
17802
|
+
ariaLabel: [{
|
|
17803
|
+
type: i0.Input,
|
|
17804
|
+
args: [{
|
|
17805
|
+
isSignal: true,
|
|
17806
|
+
alias: "aria-label",
|
|
17807
|
+
required: false
|
|
17808
|
+
}]
|
|
17809
|
+
}],
|
|
17710
17810
|
ariaLabelledby: [{
|
|
17711
17811
|
type: i0.Input,
|
|
17712
17812
|
args: [{
|
|
@@ -18895,9 +18995,6 @@ const LIST_KEYS = /* @__PURE__ */ new Set([
|
|
|
18895
18995
|
"Enter",
|
|
18896
18996
|
"Escape"
|
|
18897
18997
|
]);
|
|
18898
|
-
function isTypedCharacter(event) {
|
|
18899
|
-
return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
|
|
18900
|
-
}
|
|
18901
18998
|
var DropdownComponent = class DropdownComponent extends LabelledFieldControlBase {
|
|
18902
18999
|
elRef = viewChild("triggerEl", ...ngDevMode ? [{ debugName: "elRef" }] : /* istanbul ignore next */ []);
|
|
18903
19000
|
popover = viewChild(PopoverComponent, ...ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []);
|
|
@@ -18926,13 +19023,11 @@ var DropdownComponent = class DropdownComponent extends LabelledFieldControlBase
|
|
|
18926
19023
|
focusedIndex = signal(-1, ...ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []);
|
|
18927
19024
|
searchTerm = signal("", ...ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []);
|
|
18928
19025
|
_formDisabled = signal(false, ...ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []);
|
|
18929
|
-
|
|
18930
|
-
typeaheadTimer;
|
|
19026
|
+
typeahead = new Typeahead();
|
|
18931
19027
|
onChange = () => {};
|
|
18932
19028
|
onTouched = () => {};
|
|
18933
19029
|
constructor() {
|
|
18934
19030
|
super();
|
|
18935
|
-
inject(DestroyRef).onDestroy(() => clearTimeout(this.typeaheadTimer));
|
|
18936
19031
|
afterRenderEffect(() => {
|
|
18937
19032
|
if (this.searchable() && this.popover()?.isPositioned()) untracked(() => this.searchEl()?.nativeElement.focus());
|
|
18938
19033
|
});
|
|
@@ -19015,8 +19110,7 @@ var DropdownComponent = class DropdownComponent extends LabelledFieldControlBase
|
|
|
19015
19110
|
this.isOpen.set(false);
|
|
19016
19111
|
this.focusedIndex.set(-1);
|
|
19017
19112
|
this.searchTerm.set("");
|
|
19018
|
-
this.
|
|
19019
|
-
clearTimeout(this.typeaheadTimer);
|
|
19113
|
+
this.typeahead.reset();
|
|
19020
19114
|
if (searching) this.focus();
|
|
19021
19115
|
}
|
|
19022
19116
|
clear() {
|
|
@@ -19035,7 +19129,7 @@ var DropdownComponent = class DropdownComponent extends LabelledFieldControlBase
|
|
|
19035
19129
|
if (this.isDisabled() || this.readonly()) return;
|
|
19036
19130
|
switch (event.key) {
|
|
19037
19131
|
case " ":
|
|
19038
|
-
if (this.
|
|
19132
|
+
if (this.typeahead.accepts(event)) this.handleTypeahead(event);
|
|
19039
19133
|
else this.selectFocusedOrOpen(event);
|
|
19040
19134
|
break;
|
|
19041
19135
|
case "Enter":
|
|
@@ -19125,25 +19219,13 @@ var DropdownComponent = class DropdownComponent extends LabelledFieldControlBase
|
|
|
19125
19219
|
document.getElementById(`${this.id()}-option-${idx}`)?.scrollIntoView({ block: "nearest" });
|
|
19126
19220
|
}
|
|
19127
19221
|
handleTypeahead(event) {
|
|
19128
|
-
if (!
|
|
19222
|
+
if (!this.typeahead.accepts(event)) return;
|
|
19129
19223
|
event.preventDefault();
|
|
19130
|
-
if (this.typeaheadTimer !== void 0) clearTimeout(this.typeaheadTimer);
|
|
19131
|
-
this.typeaheadTimer = setTimeout(() => this.typeaheadQuery = "", 500);
|
|
19132
|
-
this.typeaheadQuery += foldForSearch(event.key);
|
|
19133
19224
|
const wasOpen = this.isOpen();
|
|
19134
19225
|
if (!wasOpen) this.toggle();
|
|
19135
|
-
const
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
const firstOffset = this.typeaheadQuery.length > 1 || !wasOpen ? 0 : 1;
|
|
19139
|
-
for (let offset = firstOffset; offset <= opts.length; offset++) {
|
|
19140
|
-
const idx = (start + offset) % opts.length;
|
|
19141
|
-
const opt = opts[idx];
|
|
19142
|
-
if (!opt.disabled && foldForSearch(opt.label).startsWith(this.typeaheadQuery)) {
|
|
19143
|
-
this.setFocusedIndex(idx);
|
|
19144
|
-
return;
|
|
19145
|
-
}
|
|
19146
|
-
}
|
|
19226
|
+
const labels = this.filteredOptions().map((o) => o.disabled ? null : o.label);
|
|
19227
|
+
const idx = this.typeahead.match(event.key, labels, this.focusedIndex(), !wasOpen);
|
|
19228
|
+
if (idx >= 0) this.setFocusedIndex(idx);
|
|
19147
19229
|
}
|
|
19148
19230
|
moveFocus(delta) {
|
|
19149
19231
|
const opts = this.filteredOptions();
|
|
@@ -26302,6 +26384,10 @@ var RangeSliderComponent = class RangeSliderComponent extends LabelledFieldContr
|
|
|
26302
26384
|
...ngDevMode ? { debugName: "ariaLabelHigh" } : /* istanbul ignore next */ {},
|
|
26303
26385
|
alias: "aria-label-high"
|
|
26304
26386
|
});
|
|
26387
|
+
ariaLabel = input(void 0, {
|
|
26388
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
26389
|
+
alias: "aria-label"
|
|
26390
|
+
});
|
|
26305
26391
|
ariaLabelledby = input(void 0, {
|
|
26306
26392
|
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
26307
26393
|
alias: "aria-labelledby"
|
|
@@ -26324,11 +26410,12 @@ var RangeSliderComponent = class RangeSliderComponent extends LabelledFieldContr
|
|
|
26324
26410
|
highPercent = computed(() => this.toPercent(this.clampedValue()[1]), ...ngDevMode ? [{ debugName: "highPercent" }] : /* istanbul ignore next */ []);
|
|
26325
26411
|
lowThumbLabel = computed(() => this.ariaLabelLow() ?? this.i18n.messages().rangeSlider.lowThumbLabel, ...ngDevMode ? [{ debugName: "lowThumbLabel" }] : /* istanbul ignore next */ []);
|
|
26326
26412
|
highThumbLabel = computed(() => this.ariaLabelHigh() ?? this.i18n.messages().rangeSlider.highThumbLabel, ...ngDevMode ? [{ debugName: "highThumbLabel" }] : /* istanbul ignore next */ []);
|
|
26413
|
+
fieldAriaLabel = computed(() => this.label() || this.ariaLabelledby() ? null : this.ariaLabel() || null, ...ngDevMode ? [{ debugName: "fieldAriaLabel" }] : /* istanbul ignore next */ []);
|
|
26327
26414
|
lowThumbLabelledBy = computed(() => this.thumbLabelledBy("low"), ...ngDevMode ? [{ debugName: "lowThumbLabelledBy" }] : /* istanbul ignore next */ []);
|
|
26328
26415
|
highThumbLabelledBy = computed(() => this.thumbLabelledBy("high"), ...ngDevMode ? [{ debugName: "highThumbLabelledBy" }] : /* istanbul ignore next */ []);
|
|
26329
26416
|
thumbLabelledBy(thumb) {
|
|
26330
26417
|
const thumbLabelId = `${this.id()}-${thumb}-label`;
|
|
26331
|
-
const fieldLabelledBy = this.ariaLabelledby() || (this.label() ? `${this.id()}-label` : null);
|
|
26418
|
+
const fieldLabelledBy = this.ariaLabelledby() || (this.label() ? `${this.id()}-label` : null) || (this.fieldAriaLabel() ? `${this.id()}-aria-label` : null);
|
|
26332
26419
|
return fieldLabelledBy ? `${fieldLabelledBy} ${thumbLabelId}` : thumbLabelId;
|
|
26333
26420
|
}
|
|
26334
26421
|
formatDisplay(value) {
|
|
@@ -26554,6 +26641,13 @@ var RangeSliderComponent = class RangeSliderComponent extends LabelledFieldContr
|
|
|
26554
26641
|
isRequired: false,
|
|
26555
26642
|
transformFunction: null
|
|
26556
26643
|
},
|
|
26644
|
+
ariaLabel: {
|
|
26645
|
+
classPropertyName: "ariaLabel",
|
|
26646
|
+
publicName: "aria-label",
|
|
26647
|
+
isSignal: true,
|
|
26648
|
+
isRequired: false,
|
|
26649
|
+
transformFunction: null
|
|
26650
|
+
},
|
|
26557
26651
|
ariaLabelledby: {
|
|
26558
26652
|
classPropertyName: "ariaLabelledby",
|
|
26559
26653
|
publicName: "aria-labelledby",
|
|
@@ -26595,8 +26689,8 @@ var RangeSliderComponent = class RangeSliderComponent extends LabelledFieldContr
|
|
|
26595
26689
|
}],
|
|
26596
26690
|
usesInheritance: true,
|
|
26597
26691
|
ngImport: i0,
|
|
26598
|
-
template: "<div\n class=\"ea-range-slider-field\"\n [ngClass]=\"hostClasses()\">\n @if (label() || showValue()) {\n <div class=\"ea-range-slider-field__header\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n @if (showValue()) {\n <span class=\"ea-range-slider-field__value\">\n <bdi>\n {{ formatDisplay(clampedValue()[0]) }} –\n {{ formatDisplay(clampedValue()[1]) }}\n </bdi>\n </span>\n }\n </div>\n }\n\n <div class=\"ea-range-slider\">\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-low-label'\">\n {{ lowThumbLabel() }}\n </span>\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-high-label'\">\n {{ highThumbLabel() }}\n </span>\n <div\n #trackEl\n class=\"ea-range-slider__track\"\n (pointerdown)=\"handleTrackPointerDown($event)\"\n (pointermove)=\"handleTrackPointerMove($event)\"\n (pointerup)=\"handleTrackPointerUp($event)\"\n (pointercancel)=\"handleTrackPointerUp($event)\">\n <div\n class=\"ea-range-slider__fill\"\n [style.inset-inline-start.%]=\"lowPercent()\"\n [style.inset-inline-end.%]=\"100 - highPercent()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--low\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-low'\"\n [attr.aria-labelledby]=\"lowThumbLabelledBy()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"clampedValue()[1]\"\n [attr.aria-valuenow]=\"clampedValue()[0]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[0])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"lowPercent()\"\n (keydown)=\"handleKeydown($event, 'low')\"\n (blur)=\"handleBlur()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--high\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-high'\"\n [attr.aria-labelledby]=\"highThumbLabelledBy()\"\n [attr.aria-valuemin]=\"clampedValue()[0]\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"clampedValue()[1]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[1])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"highPercent()\"\n (keydown)=\"handleKeydown($event, 'high')\"\n (blur)=\"handleBlur()\">\n </div>\n </div>\n\n @if (showMinMaxLabels()) {\n <div class=\"ea-range-slider__minmax\">\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(min()) }}\n </span>\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(max()) }}\n </span>\n </div>\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
26599
|
-
styles: [".ea-range-slider-field{display:flex;flex-direction:column;gap:.375em;font-family:var(--font-family-sans);color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-range-slider-field.ea-range-slider--2xs{font-size:var(--font-size-2xs)}.ea-range-slider-field.ea-range-slider--xs{font-size:var(--font-size-xs)}.ea-range-slider-field.ea-range-slider--sm{font-size:var(--font-size-sm)}.ea-range-slider-field.ea-range-slider--md{font-size:var(--font-size-md)}.ea-range-slider-field.ea-range-slider--lg{font-size:var(--font-size-lg)}.ea-range-slider-field.ea-range-slider--xl{font-size:var(--font-size-xl)}.ea-range-slider-field__header{display:flex;justify-content:space-between;align-items:baseline;gap:.5em}.ea-range-slider-field__value{margin-inline-start:auto;font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-range-slider{display:flex;flex-direction:column;gap:.25em;width:100%}.ea-range-slider--2xs .ea-range-slider{--ea-range-slider-size: .5rem}.ea-range-slider--xs .ea-range-slider{--ea-range-slider-size: .625rem}.ea-range-slider--sm .ea-range-slider{--ea-range-slider-size: .875rem}.ea-range-slider--md .ea-range-slider{--ea-range-slider-size: 1.125rem}.ea-range-slider--lg .ea-range-slider{--ea-range-slider-size: 1.375rem}.ea-range-slider--xl .ea-range-slider{--ea-range-slider-size: 1.625rem}.ea-range-slider__thumb-label{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-range-slider__track{position:relative;width:100%;height:calc(var(--ea-range-slider-size, 1.125rem) / 3);background-color:var(--color-bg-muted);border-radius:var(--radius-full);cursor:pointer;touch-action:none}.ea-range-slider__fill{position:absolute;top:0;height:100%;background-color:var(--color-brand-default);border-radius:inherit;transition:var(--transition-colors)}@media(forced-colors:active){.ea-range-slider__fill{background-color:Highlight}}.ea-range-slider__thumb{position:absolute;top:50%;width:var(--ea-range-slider-size, 1.125rem);height:var(--ea-range-slider-size, 1.125rem);background-color:var(--color-neutral-0);border:var(--border-width-medium) solid var(--color-brand-default);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);margin-inline-start:calc(var(--ea-range-slider-size, 1.125rem) / -2);cursor:grab;transform:translateY(-50%);transition:box-shadow var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}@media(forced-colors:active){.ea-range-slider__thumb{background-color:Canvas;border-color:CanvasText}}.ea-range-slider__thumb:focus-visible{z-index:1;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-range-slider__minmax{display:flex;justify-content:space-between;margin-top:.25em}.ea-range-slider__minmax-label{font-size:calc(var(--ea-range-slider-size, 1.125rem) * .67);color:var(--color-text-tertiary);font-variant-numeric:tabular-nums}.ea-range-slider--dragging .ea-range-slider__thumb{cursor:grabbing;transform:translateY(-50%) scale(1.1)}.ea-range-slider--disabled{opacity:.5;cursor:default}.ea-range-slider--disabled .ea-range-slider__track,.ea-range-slider--disabled .ea-range-slider__thumb{cursor:default}.ea-range-slider--error .ea-range-slider__fill{background-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb{border-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}\n"],
|
|
26692
|
+
template: "<div\n class=\"ea-range-slider-field\"\n [ngClass]=\"hostClasses()\">\n @if (label() || showValue()) {\n <div class=\"ea-range-slider-field__header\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n @if (showValue()) {\n <span class=\"ea-range-slider-field__value\">\n <bdi>\n {{ formatDisplay(clampedValue()[0]) }} –\n {{ formatDisplay(clampedValue()[1]) }}\n </bdi>\n </span>\n }\n </div>\n }\n\n <div class=\"ea-range-slider\">\n @if (fieldAriaLabel(); as fieldName) {\n <span\n class=\"ea-range-slider__name\"\n [id]=\"id() + '-aria-label'\">\n {{ fieldName }}\n </span>\n }\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-low-label'\">\n {{ lowThumbLabel() }}\n </span>\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-high-label'\">\n {{ highThumbLabel() }}\n </span>\n <div\n #trackEl\n class=\"ea-range-slider__track\"\n (pointerdown)=\"handleTrackPointerDown($event)\"\n (pointermove)=\"handleTrackPointerMove($event)\"\n (pointerup)=\"handleTrackPointerUp($event)\"\n (pointercancel)=\"handleTrackPointerUp($event)\">\n <div\n class=\"ea-range-slider__fill\"\n [style.inset-inline-start.%]=\"lowPercent()\"\n [style.inset-inline-end.%]=\"100 - highPercent()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--low\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-low'\"\n [attr.aria-labelledby]=\"lowThumbLabelledBy()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"clampedValue()[1]\"\n [attr.aria-valuenow]=\"clampedValue()[0]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[0])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"lowPercent()\"\n (keydown)=\"handleKeydown($event, 'low')\"\n (blur)=\"handleBlur()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--high\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-high'\"\n [attr.aria-labelledby]=\"highThumbLabelledBy()\"\n [attr.aria-valuemin]=\"clampedValue()[0]\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"clampedValue()[1]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[1])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"highPercent()\"\n (keydown)=\"handleKeydown($event, 'high')\"\n (blur)=\"handleBlur()\">\n </div>\n </div>\n\n @if (showMinMaxLabels()) {\n <div class=\"ea-range-slider__minmax\">\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(min()) }}\n </span>\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(max()) }}\n </span>\n </div>\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
26693
|
+
styles: [".ea-range-slider-field{display:flex;flex-direction:column;gap:.375em;font-family:var(--font-family-sans);color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-range-slider-field.ea-range-slider--2xs{font-size:var(--font-size-2xs)}.ea-range-slider-field.ea-range-slider--xs{font-size:var(--font-size-xs)}.ea-range-slider-field.ea-range-slider--sm{font-size:var(--font-size-sm)}.ea-range-slider-field.ea-range-slider--md{font-size:var(--font-size-md)}.ea-range-slider-field.ea-range-slider--lg{font-size:var(--font-size-lg)}.ea-range-slider-field.ea-range-slider--xl{font-size:var(--font-size-xl)}.ea-range-slider-field__header{display:flex;justify-content:space-between;align-items:baseline;gap:.5em}.ea-range-slider-field__value{margin-inline-start:auto;font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-range-slider{display:flex;flex-direction:column;gap:.25em;width:100%}.ea-range-slider--2xs .ea-range-slider{--ea-range-slider-size: .5rem}.ea-range-slider--xs .ea-range-slider{--ea-range-slider-size: .625rem}.ea-range-slider--sm .ea-range-slider{--ea-range-slider-size: .875rem}.ea-range-slider--md .ea-range-slider{--ea-range-slider-size: 1.125rem}.ea-range-slider--lg .ea-range-slider{--ea-range-slider-size: 1.375rem}.ea-range-slider--xl .ea-range-slider{--ea-range-slider-size: 1.625rem}.ea-range-slider__name,.ea-range-slider__thumb-label{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-range-slider__track{position:relative;width:100%;height:calc(var(--ea-range-slider-size, 1.125rem) / 3);background-color:var(--color-bg-muted);border-radius:var(--radius-full);cursor:pointer;touch-action:none}.ea-range-slider__fill{position:absolute;top:0;height:100%;background-color:var(--color-brand-default);border-radius:inherit;transition:var(--transition-colors)}@media(forced-colors:active){.ea-range-slider__fill{background-color:Highlight}}.ea-range-slider__thumb{position:absolute;top:50%;width:var(--ea-range-slider-size, 1.125rem);height:var(--ea-range-slider-size, 1.125rem);background-color:var(--color-neutral-0);border:var(--border-width-medium) solid var(--color-brand-default);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);margin-inline-start:calc(var(--ea-range-slider-size, 1.125rem) / -2);cursor:grab;transform:translateY(-50%);transition:box-shadow var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}@media(forced-colors:active){.ea-range-slider__thumb{background-color:Canvas;border-color:CanvasText}}.ea-range-slider__thumb:focus-visible{z-index:1;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-range-slider__minmax{display:flex;justify-content:space-between;margin-top:.25em}.ea-range-slider__minmax-label{font-size:calc(var(--ea-range-slider-size, 1.125rem) * .67);color:var(--color-text-tertiary);font-variant-numeric:tabular-nums}.ea-range-slider--dragging .ea-range-slider__thumb{cursor:grabbing;transform:translateY(-50%) scale(1.1)}.ea-range-slider--disabled{opacity:.5;cursor:default}.ea-range-slider--disabled .ea-range-slider__track,.ea-range-slider--disabled .ea-range-slider__thumb{cursor:default}.ea-range-slider--error .ea-range-slider__fill{background-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb{border-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}\n"],
|
|
26600
26694
|
dependencies: [
|
|
26601
26695
|
{
|
|
26602
26696
|
kind: "component",
|
|
@@ -26653,8 +26747,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
26653
26747
|
useExisting: forwardRef(() => RangeSliderComponent),
|
|
26654
26748
|
multi: true
|
|
26655
26749
|
}],
|
|
26656
|
-
template: "<div\n class=\"ea-range-slider-field\"\n [ngClass]=\"hostClasses()\">\n @if (label() || showValue()) {\n <div class=\"ea-range-slider-field__header\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n @if (showValue()) {\n <span class=\"ea-range-slider-field__value\">\n <bdi>\n {{ formatDisplay(clampedValue()[0]) }} –\n {{ formatDisplay(clampedValue()[1]) }}\n </bdi>\n </span>\n }\n </div>\n }\n\n <div class=\"ea-range-slider\">\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-low-label'\">\n {{ lowThumbLabel() }}\n </span>\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-high-label'\">\n {{ highThumbLabel() }}\n </span>\n <div\n #trackEl\n class=\"ea-range-slider__track\"\n (pointerdown)=\"handleTrackPointerDown($event)\"\n (pointermove)=\"handleTrackPointerMove($event)\"\n (pointerup)=\"handleTrackPointerUp($event)\"\n (pointercancel)=\"handleTrackPointerUp($event)\">\n <div\n class=\"ea-range-slider__fill\"\n [style.inset-inline-start.%]=\"lowPercent()\"\n [style.inset-inline-end.%]=\"100 - highPercent()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--low\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-low'\"\n [attr.aria-labelledby]=\"lowThumbLabelledBy()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"clampedValue()[1]\"\n [attr.aria-valuenow]=\"clampedValue()[0]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[0])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"lowPercent()\"\n (keydown)=\"handleKeydown($event, 'low')\"\n (blur)=\"handleBlur()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--high\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-high'\"\n [attr.aria-labelledby]=\"highThumbLabelledBy()\"\n [attr.aria-valuemin]=\"clampedValue()[0]\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"clampedValue()[1]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[1])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"highPercent()\"\n (keydown)=\"handleKeydown($event, 'high')\"\n (blur)=\"handleBlur()\">\n </div>\n </div>\n\n @if (showMinMaxLabels()) {\n <div class=\"ea-range-slider__minmax\">\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(min()) }}\n </span>\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(max()) }}\n </span>\n </div>\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
26657
|
-
styles: [".ea-range-slider-field{display:flex;flex-direction:column;gap:.375em;font-family:var(--font-family-sans);color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-range-slider-field.ea-range-slider--2xs{font-size:var(--font-size-2xs)}.ea-range-slider-field.ea-range-slider--xs{font-size:var(--font-size-xs)}.ea-range-slider-field.ea-range-slider--sm{font-size:var(--font-size-sm)}.ea-range-slider-field.ea-range-slider--md{font-size:var(--font-size-md)}.ea-range-slider-field.ea-range-slider--lg{font-size:var(--font-size-lg)}.ea-range-slider-field.ea-range-slider--xl{font-size:var(--font-size-xl)}.ea-range-slider-field__header{display:flex;justify-content:space-between;align-items:baseline;gap:.5em}.ea-range-slider-field__value{margin-inline-start:auto;font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-range-slider{display:flex;flex-direction:column;gap:.25em;width:100%}.ea-range-slider--2xs .ea-range-slider{--ea-range-slider-size: .5rem}.ea-range-slider--xs .ea-range-slider{--ea-range-slider-size: .625rem}.ea-range-slider--sm .ea-range-slider{--ea-range-slider-size: .875rem}.ea-range-slider--md .ea-range-slider{--ea-range-slider-size: 1.125rem}.ea-range-slider--lg .ea-range-slider{--ea-range-slider-size: 1.375rem}.ea-range-slider--xl .ea-range-slider{--ea-range-slider-size: 1.625rem}.ea-range-slider__thumb-label{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-range-slider__track{position:relative;width:100%;height:calc(var(--ea-range-slider-size, 1.125rem) / 3);background-color:var(--color-bg-muted);border-radius:var(--radius-full);cursor:pointer;touch-action:none}.ea-range-slider__fill{position:absolute;top:0;height:100%;background-color:var(--color-brand-default);border-radius:inherit;transition:var(--transition-colors)}@media(forced-colors:active){.ea-range-slider__fill{background-color:Highlight}}.ea-range-slider__thumb{position:absolute;top:50%;width:var(--ea-range-slider-size, 1.125rem);height:var(--ea-range-slider-size, 1.125rem);background-color:var(--color-neutral-0);border:var(--border-width-medium) solid var(--color-brand-default);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);margin-inline-start:calc(var(--ea-range-slider-size, 1.125rem) / -2);cursor:grab;transform:translateY(-50%);transition:box-shadow var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}@media(forced-colors:active){.ea-range-slider__thumb{background-color:Canvas;border-color:CanvasText}}.ea-range-slider__thumb:focus-visible{z-index:1;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-range-slider__minmax{display:flex;justify-content:space-between;margin-top:.25em}.ea-range-slider__minmax-label{font-size:calc(var(--ea-range-slider-size, 1.125rem) * .67);color:var(--color-text-tertiary);font-variant-numeric:tabular-nums}.ea-range-slider--dragging .ea-range-slider__thumb{cursor:grabbing;transform:translateY(-50%) scale(1.1)}.ea-range-slider--disabled{opacity:.5;cursor:default}.ea-range-slider--disabled .ea-range-slider__track,.ea-range-slider--disabled .ea-range-slider__thumb{cursor:default}.ea-range-slider--error .ea-range-slider__fill{background-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb{border-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}\n"]
|
|
26750
|
+
template: "<div\n class=\"ea-range-slider-field\"\n [ngClass]=\"hostClasses()\">\n @if (label() || showValue()) {\n <div class=\"ea-range-slider-field__header\">\n @if (label(); as labelText) {\n <ea-field-label\n [text]=\"labelText\"\n [icon]=\"labelIcon()\"\n [help]=\"labelHelp()\"\n [labelId]=\"id() + '-label'\"\n [required]=\"required()\"\n [optional]=\"optional()\" />\n }\n @if (showValue()) {\n <span class=\"ea-range-slider-field__value\">\n <bdi>\n {{ formatDisplay(clampedValue()[0]) }} –\n {{ formatDisplay(clampedValue()[1]) }}\n </bdi>\n </span>\n }\n </div>\n }\n\n <div class=\"ea-range-slider\">\n @if (fieldAriaLabel(); as fieldName) {\n <span\n class=\"ea-range-slider__name\"\n [id]=\"id() + '-aria-label'\">\n {{ fieldName }}\n </span>\n }\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-low-label'\">\n {{ lowThumbLabel() }}\n </span>\n <span\n class=\"ea-range-slider__thumb-label\"\n [id]=\"id() + '-high-label'\">\n {{ highThumbLabel() }}\n </span>\n <div\n #trackEl\n class=\"ea-range-slider__track\"\n (pointerdown)=\"handleTrackPointerDown($event)\"\n (pointermove)=\"handleTrackPointerMove($event)\"\n (pointerup)=\"handleTrackPointerUp($event)\"\n (pointercancel)=\"handleTrackPointerUp($event)\">\n <div\n class=\"ea-range-slider__fill\"\n [style.inset-inline-start.%]=\"lowPercent()\"\n [style.inset-inline-end.%]=\"100 - highPercent()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--low\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-low'\"\n [attr.aria-labelledby]=\"lowThumbLabelledBy()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"clampedValue()[1]\"\n [attr.aria-valuenow]=\"clampedValue()[0]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[0])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"lowPercent()\"\n (keydown)=\"handleKeydown($event, 'low')\"\n (blur)=\"handleBlur()\">\n </div>\n <div\n class=\"ea-range-slider__thumb ea-range-slider__thumb--high\"\n role=\"slider\"\n tabindex=\"0\"\n [id]=\"id() + '-high'\"\n [attr.aria-labelledby]=\"highThumbLabelledBy()\"\n [attr.aria-valuemin]=\"clampedValue()[0]\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"clampedValue()[1]\"\n [attr.aria-valuetext]=\"formatDisplay(clampedValue()[1])\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"\n showError() ? id() + '-error' : showHint() ? id() + '-hint' : null\n \"\n [style.inset-inline-start.%]=\"highPercent()\"\n (keydown)=\"handleKeydown($event, 'high')\"\n (blur)=\"handleBlur()\">\n </div>\n </div>\n\n @if (showMinMaxLabels()) {\n <div class=\"ea-range-slider__minmax\">\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(min()) }}\n </span>\n <span class=\"ea-range-slider__minmax-label\">\n {{ formatDisplay(max()) }}\n </span>\n </div>\n }\n </div>\n\n <ea-field-messages\n [id]=\"id()\"\n [error]=\"errorText()\"\n [hint]=\"showHint() ? hint() : null\" />\n</div>\n",
|
|
26751
|
+
styles: [".ea-range-slider-field{display:flex;flex-direction:column;gap:.375em;font-family:var(--font-family-sans);color:var(--color-text-secondary);--ea-field-label-size: .875em;--ea-field-messages-size: .8125em}.ea-range-slider-field.ea-range-slider--2xs{font-size:var(--font-size-2xs)}.ea-range-slider-field.ea-range-slider--xs{font-size:var(--font-size-xs)}.ea-range-slider-field.ea-range-slider--sm{font-size:var(--font-size-sm)}.ea-range-slider-field.ea-range-slider--md{font-size:var(--font-size-md)}.ea-range-slider-field.ea-range-slider--lg{font-size:var(--font-size-lg)}.ea-range-slider-field.ea-range-slider--xl{font-size:var(--font-size-xl)}.ea-range-slider-field__header{display:flex;justify-content:space-between;align-items:baseline;gap:.5em}.ea-range-slider-field__value{margin-inline-start:auto;font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-range-slider{display:flex;flex-direction:column;gap:.25em;width:100%}.ea-range-slider--2xs .ea-range-slider{--ea-range-slider-size: .5rem}.ea-range-slider--xs .ea-range-slider{--ea-range-slider-size: .625rem}.ea-range-slider--sm .ea-range-slider{--ea-range-slider-size: .875rem}.ea-range-slider--md .ea-range-slider{--ea-range-slider-size: 1.125rem}.ea-range-slider--lg .ea-range-slider{--ea-range-slider-size: 1.375rem}.ea-range-slider--xl .ea-range-slider{--ea-range-slider-size: 1.625rem}.ea-range-slider__name,.ea-range-slider__thumb-label{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}.ea-range-slider__track{position:relative;width:100%;height:calc(var(--ea-range-slider-size, 1.125rem) / 3);background-color:var(--color-bg-muted);border-radius:var(--radius-full);cursor:pointer;touch-action:none}.ea-range-slider__fill{position:absolute;top:0;height:100%;background-color:var(--color-brand-default);border-radius:inherit;transition:var(--transition-colors)}@media(forced-colors:active){.ea-range-slider__fill{background-color:Highlight}}.ea-range-slider__thumb{position:absolute;top:50%;width:var(--ea-range-slider-size, 1.125rem);height:var(--ea-range-slider-size, 1.125rem);background-color:var(--color-neutral-0);border:var(--border-width-medium) solid var(--color-brand-default);border-radius:var(--radius-full);box-shadow:var(--shadow-sm);margin-inline-start:calc(var(--ea-range-slider-size, 1.125rem) / -2);cursor:grab;transform:translateY(-50%);transition:box-shadow var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}@media(forced-colors:active){.ea-range-slider__thumb{background-color:Canvas;border-color:CanvasText}}.ea-range-slider__thumb:focus-visible{z-index:1;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-range-slider__minmax{display:flex;justify-content:space-between;margin-top:.25em}.ea-range-slider__minmax-label{font-size:calc(var(--ea-range-slider-size, 1.125rem) * .67);color:var(--color-text-tertiary);font-variant-numeric:tabular-nums}.ea-range-slider--dragging .ea-range-slider__thumb{cursor:grabbing;transform:translateY(-50%) scale(1.1)}.ea-range-slider--disabled{opacity:.5;cursor:default}.ea-range-slider--disabled .ea-range-slider__track,.ea-range-slider--disabled .ea-range-slider__thumb{cursor:default}.ea-range-slider--error .ea-range-slider__fill{background-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb{border-color:var(--color-error-default)}.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:none;box-shadow:var(--shadow-focus-ring-error)}@media(forced-colors:active){.ea-range-slider--error .ea-range-slider__thumb:focus-visible{outline:2px solid Highlight;outline-offset:2px}}\n"]
|
|
26658
26752
|
}]
|
|
26659
26753
|
}],
|
|
26660
26754
|
propDecorators: {
|
|
@@ -26750,6 +26844,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
26750
26844
|
required: false
|
|
26751
26845
|
}]
|
|
26752
26846
|
}],
|
|
26847
|
+
ariaLabel: [{
|
|
26848
|
+
type: i0.Input,
|
|
26849
|
+
args: [{
|
|
26850
|
+
isSignal: true,
|
|
26851
|
+
alias: "aria-label",
|
|
26852
|
+
required: false
|
|
26853
|
+
}]
|
|
26854
|
+
}],
|
|
26753
26855
|
ariaLabelledby: [{
|
|
26754
26856
|
type: i0.Input,
|
|
26755
26857
|
args: [{
|
|
@@ -26962,6 +27064,10 @@ var RatingComponent = class RatingComponent extends LabelledFieldControlBase {
|
|
|
26962
27064
|
}
|
|
26963
27065
|
starsEl = viewChild("starsEl", ...ngDevMode ? [{ debugName: "starsEl" }] : /* istanbul ignore next */ []);
|
|
26964
27066
|
i18n = inject(EagamiI18nService);
|
|
27067
|
+
ariaLabel = input(void 0, {
|
|
27068
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
27069
|
+
alias: "aria-label"
|
|
27070
|
+
});
|
|
26965
27071
|
ariaLabelledby = input(void 0, {
|
|
26966
27072
|
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
26967
27073
|
alias: "aria-labelledby"
|
|
@@ -27013,7 +27119,7 @@ var RatingComponent = class RatingComponent extends LabelledFieldControlBase {
|
|
|
27013
27119
|
if (this.showHint()) ids.push(this.hintId());
|
|
27014
27120
|
return ids.length ? ids.join(" ") : null;
|
|
27015
27121
|
}, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
27016
|
-
resolvedAriaLabel = computed(() => this.label() ?? this.i18n.messages().rating.label, ...ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []);
|
|
27122
|
+
resolvedAriaLabel = computed(() => this.label() ?? this.ariaLabel() ?? this.i18n.messages().rating.label, ...ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []);
|
|
27017
27123
|
stateFor(pos) {
|
|
27018
27124
|
const v = this.displayValue();
|
|
27019
27125
|
if (v >= pos) return "full";
|
|
@@ -27138,6 +27244,13 @@ var RatingComponent = class RatingComponent extends LabelledFieldControlBase {
|
|
|
27138
27244
|
isStandalone: true,
|
|
27139
27245
|
selector: "ea-rating",
|
|
27140
27246
|
inputs: {
|
|
27247
|
+
ariaLabel: {
|
|
27248
|
+
classPropertyName: "ariaLabel",
|
|
27249
|
+
publicName: "aria-label",
|
|
27250
|
+
isSignal: true,
|
|
27251
|
+
isRequired: false,
|
|
27252
|
+
transformFunction: null
|
|
27253
|
+
},
|
|
27141
27254
|
ariaLabelledby: {
|
|
27142
27255
|
classPropertyName: "ariaLabelledby",
|
|
27143
27256
|
publicName: "aria-labelledby",
|
|
@@ -27326,6 +27439,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
27326
27439
|
type: i0.ViewChild,
|
|
27327
27440
|
args: ["starsEl", { isSignal: true }]
|
|
27328
27441
|
}],
|
|
27442
|
+
ariaLabel: [{
|
|
27443
|
+
type: i0.Input,
|
|
27444
|
+
args: [{
|
|
27445
|
+
isSignal: true,
|
|
27446
|
+
alias: "aria-label",
|
|
27447
|
+
required: false
|
|
27448
|
+
}]
|
|
27449
|
+
}],
|
|
27329
27450
|
ariaLabelledby: [{
|
|
27330
27451
|
type: i0.Input,
|
|
27331
27452
|
args: [{
|
|
@@ -32846,6 +32967,7 @@ var TreeComponent = class TreeComponent {
|
|
|
32846
32967
|
nodeClick = output();
|
|
32847
32968
|
listEl = viewChild("listEl", ...ngDevMode ? [{ debugName: "listEl" }] : /* istanbul ignore next */ []);
|
|
32848
32969
|
_focusedId = signal(null, ...ngDevMode ? [{ debugName: "_focusedId" }] : /* istanbul ignore next */ []);
|
|
32970
|
+
typeahead = new Typeahead();
|
|
32849
32971
|
expandedSet = computed(() => new Set(this.expandedIds()), ...ngDevMode ? [{ debugName: "expandedSet" }] : /* istanbul ignore next */ []);
|
|
32850
32972
|
focusedId = computed(() => {
|
|
32851
32973
|
const explicit = this._focusedId();
|
|
@@ -32893,6 +33015,13 @@ var TreeComponent = class TreeComponent {
|
|
|
32893
33015
|
if (visible.length === 0) return;
|
|
32894
33016
|
const currentId = this.focusedId();
|
|
32895
33017
|
const currentIdx = currentId ? visible.indexOf(currentId) : -1;
|
|
33018
|
+
if (this.typeahead.accepts(event)) {
|
|
33019
|
+
event.preventDefault();
|
|
33020
|
+
const labels = visible.map((id) => this.findNode(id)?.label ?? null);
|
|
33021
|
+
const idx = this.typeahead.match(event.key, labels, currentIdx);
|
|
33022
|
+
if (idx >= 0) this.focusNode(visible[idx]);
|
|
33023
|
+
return;
|
|
33024
|
+
}
|
|
32896
33025
|
const rtl = isRtl(event.currentTarget);
|
|
32897
33026
|
let key = event.key;
|
|
32898
33027
|
if (rtl && key === "ArrowRight") key = "ArrowLeft";
|