@m3e/web 2.0.5 → 2.1.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/dist/all.js +773 -473
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +52 -58
- package/dist/all.min.js.map +1 -1
- package/dist/autocomplete.js +342 -69
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/chips.js +18 -4
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core-a11y.js +3 -118
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +13 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +193 -1
- package/dist/core-anchoring.js.map +1 -1
- package/dist/core-anchoring.min.js +1 -1
- package/dist/core-anchoring.min.js.map +1 -1
- package/dist/core.js +119 -91
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +406 -326
- package/dist/custom-elements.json +4321 -3297
- package/dist/html-custom-data.json +169 -94
- package/dist/loading-indicator.js +1 -0
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +1 -1
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/option.js +94 -121
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/progress-indicator.js +2 -0
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +2 -2
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/select.js +59 -23
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +71 -2
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts +3 -0
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts.map +1 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts +12 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts.map +1 -0
- package/dist/src/autocomplete/index.d.ts +2 -0
- package/dist/src/autocomplete/index.d.ts.map +1 -1
- package/dist/src/chips/ChipElement.d.ts +2 -0
- package/dist/src/chips/ChipElement.d.ts.map +1 -1
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts +13 -0
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts.map +1 -0
- package/dist/src/chips/InputChipSetElement.d.ts +10 -0
- package/dist/src/chips/InputChipSetElement.d.ts.map +1 -1
- package/dist/src/chips/index.d.ts +1 -0
- package/dist/src/chips/index.d.ts.map +1 -1
- package/dist/src/core/a11y/FocusTrapElement.d.ts +1 -1
- package/dist/src/core/a11y/list-key/ListKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/Typeahead.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +74 -0
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -0
- package/dist/src/core/anchoring/index.d.ts +1 -0
- package/dist/src/core/anchoring/index.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/MutationController.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/ResizeController.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/AttachInternals.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts +9 -2
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts +3 -0
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts.map +1 -0
- package/dist/src/core/shared/primitives/index.d.ts +2 -1
- package/dist/src/core/shared/primitives/index.d.ts.map +1 -1
- package/dist/src/loading-indicator/LoadingIndicatorElement.d.ts.map +1 -1
- package/dist/src/menu/MenuItemElementBase.d.ts.map +1 -1
- package/dist/src/option/OptionElement.d.ts +21 -1
- package/dist/src/option/OptionElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts +11 -34
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelState.d.ts +3 -0
- package/dist/src/option/OptionPanelState.d.ts.map +1 -0
- package/dist/src/option/index.d.ts +1 -0
- package/dist/src/option/index.d.ts.map +1 -1
- package/dist/src/progress-indicator/CircularProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/LinearProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/select/SelectElement.d.ts +3 -2
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/toc/TocElement.d.ts.map +1 -1
- package/dist/toc.js +0 -1
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/datepicker.js +0 -2346
- package/dist/datepicker.js.map +0 -1
- package/dist/datepicker.min.js +0 -102
- package/dist/datepicker.min.js.map +0 -1
- package/dist/src/core/shared/decorators/component.d.ts +0 -19
- package/dist/src/core/shared/decorators/component.d.ts.map +0 -1
- package/dist/src/core/shared/decorators/element.d.ts +0 -19
- package/dist/src/core/shared/decorators/element.d.ts.map +0 -1
- package/dist/src/core/shared/utils/getState.d.ts +0 -15
- package/dist/src/core/shared/utils/getState.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarElement.d.ts +0 -203
- package/dist/src/datepicker/CalendarElement.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarView.d.ts +0 -3
- package/dist/src/datepicker/CalendarView.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarViewElementBase.d.ts +0 -28
- package/dist/src/datepicker/CalendarViewElementBase.d.ts.map +0 -1
- package/dist/src/datepicker/DateAdapter.d.ts +0 -4
- package/dist/src/datepicker/DateAdapter.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerElement.d.ts +0 -180
- package/dist/src/datepicker/DatepickerElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerToggleElement.d.ts +0 -21
- package/dist/src/datepicker/DatepickerToggleElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerVariant.d.ts +0 -3
- package/dist/src/datepicker/DatepickerVariant.d.ts.map +0 -1
- package/dist/src/datepicker/MonthViewElement.d.ts +0 -35
- package/dist/src/datepicker/MonthViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/MultiYearViewElement.d.ts +0 -27
- package/dist/src/datepicker/MultiYearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/YearViewElement.d.ts +0 -27
- package/dist/src/datepicker/YearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/index.d.ts +0 -10
- package/dist/src/datepicker/index.d.ts.map +0 -1
- package/dist/src/datepicker/utils.d.ts +0 -26
- package/dist/src/datepicker/utils.d.ts.map +0 -1
package/dist/all.js
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
6
|
import { unsafeCSS, css, LitElement, html, nothing, isServer, noChange, svg } from 'lit';
|
|
7
|
-
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, debounce as debounce$1, customElement as customElement$1, hasAssignedNodes as hasAssignedNodes$1, setCustomState as setCustomState$1,
|
|
8
|
-
import { ListKeyManager, M3eInteractivityChecker, isModifierAllowed, addAriaReferencedId, removeAriaReferencedId, selectionManager, SelectionManager, ListManager, RovingTabIndexManager, M3eAriaDescriber, typeaheadLabel } from '@m3e/web/core/a11y';
|
|
7
|
+
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, debounce as debounce$1, customElement as customElement$1, hasAssignedNodes as hasAssignedNodes$1, MutationController as MutationController$1, setCustomState as setCustomState$1, deleteCustomState as deleteCustomState$1, prefersReducedMotion as prefersReducedMotion$1, scrollIntoViewIfNeeded as scrollIntoViewIfNeeded$1, forcedColorsActive as forcedColorsActive$1, addCustomState as addCustomState$1, ActionElementBase as ActionElementBase$1, EventAttribute as EventAttribute$1, AttachInternals as AttachInternals$1, VelocityTracker as VelocityTracker$1, ScrollLockController as ScrollLockController$1, ResizeController as ResizeController$1, focusWhenReady as focusWhenReady$1, hasCustomState as hasCustomState$1, computeCssSize as computeCssSize$1, spaceSeparatedStringConverter as spaceSeparatedStringConverter$1, KeyboardClick as KeyboardClick$1, LinkButton as LinkButton$1, FormSubmitter as FormSubmitter$1, Focusable as Focusable$1, DisabledInteractive as DisabledInteractive$1, Disabled as Disabled$1, FocusController as FocusController$1, PressedController as PressedController$1, renderPseudoLink as renderPseudoLink$1, isSelectedMixin as isSelectedMixin$1, Labelled as Labelled$1, RequiredConstraintValidation as RequiredConstraintValidation$1, Dirty as Dirty$1, Touched as Touched$1, Required as Required$1, ConstraintValidation as ConstraintValidation$1, CheckedIndeterminate as CheckedIndeterminate$1, FormAssociated as FormAssociated$1, HoverController as HoverController$1, formValue as formValue$1, isDisabledMixin as isDisabledMixin$1, isDisabledInteractiveMixin as isDisabledInteractiveMixin$1, isLinkButtonMixin as isLinkButtonMixin$1, getTextContent as getTextContent$1, Vertical as Vertical$1, Selected as Selected$1, ScrollController as ScrollController$1, isReadOnlyMixin as isReadOnlyMixin$1, interceptProperty as interceptProperty$1, computeLineCount as computeLineCount$1, generateClipPaths as generateClipPaths$1, Checked as Checked$1, AnimationLoopController as AnimationLoopController$1, resolveFragmentUrl as resolveFragmentUrl$1, safeStyleMap as safeStyleMap$1, updateLabels as updateLabels$1, guid as guid$1, IntersectionController as IntersectionController$1, LongPressController as LongPressController$1 } from '@m3e/web/core';
|
|
8
|
+
import { ListKeyManager, M3eLiveAnnouncer, M3eInteractivityChecker, isModifierAllowed, addAriaReferencedId, removeAriaReferencedId, selectionManager, SelectionManager, ListManager, RovingTabIndexManager, M3eAriaDescriber, typeaheadLabel } from '@m3e/web/core/a11y';
|
|
9
|
+
import { M3eOptGroupElement as M3eOptGroupElement$1 } from '@m3e/web/option';
|
|
9
10
|
import { M3eDirectionality } from '@m3e/web/core/bidi';
|
|
10
|
-
import { positionAnchor } from '@m3e/web/core/anchoring';
|
|
11
|
+
import { positionAnchor, M3eFloatingPanelElement } from '@m3e/web/core/anchoring';
|
|
11
12
|
import { M3eIconButtonElement as M3eIconButtonElement$1 } from '@m3e/web/icon-button';
|
|
12
13
|
import { M3eBreakpointObserver, Breakpoint } from '@m3e/web/core/layout';
|
|
13
14
|
import { M3eNavBarElement as M3eNavBarElement$1 } from '@m3e/web/nav-bar';
|
|
14
15
|
import '@m3e/web/form-field';
|
|
15
16
|
import '@m3e/web/select';
|
|
16
|
-
import '@m3e/web/option';
|
|
17
17
|
import '@m3e/web/tooltip';
|
|
18
18
|
import { M3eButtonElement as M3eButtonElement$1 } from '@m3e/web/button';
|
|
19
19
|
import '@m3e/web/button-group';
|
|
@@ -65,9 +65,9 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
66
|
*/
|
|
67
67
|
const t$2 = globalThis,
|
|
68
|
-
e$
|
|
68
|
+
e$6 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
69
69
|
s$1 = Symbol(),
|
|
70
|
-
o$
|
|
70
|
+
o$5 = new WeakMap();
|
|
71
71
|
let n$3 = class n {
|
|
72
72
|
constructor(t, e, o) {
|
|
73
73
|
if (this._$cssResult$ = true, o !== s$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -76,9 +76,9 @@ let n$3 = class n {
|
|
|
76
76
|
get styleSheet() {
|
|
77
77
|
let t = this.o;
|
|
78
78
|
const s = this.t;
|
|
79
|
-
if (e$
|
|
79
|
+
if (e$6 && void 0 === t) {
|
|
80
80
|
const e = void 0 !== s && 1 === s.length;
|
|
81
|
-
e && (t = o$
|
|
81
|
+
e && (t = o$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$5.set(s, t));
|
|
82
82
|
}
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
@@ -88,13 +88,13 @@ let n$3 = class n {
|
|
|
88
88
|
};
|
|
89
89
|
const r$4 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$1),
|
|
90
90
|
S$1 = (s, o) => {
|
|
91
|
-
if (e$
|
|
91
|
+
if (e$6) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
|
|
92
92
|
const o = document.createElement("style"),
|
|
93
93
|
n = t$2.litNonce;
|
|
94
94
|
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
c$2 = e$
|
|
97
|
+
c$2 = e$6 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
98
98
|
let e = "";
|
|
99
99
|
for (const s of t.cssRules) e += s.cssText;
|
|
100
100
|
return r$4(e);
|
|
@@ -107,10 +107,10 @@ const r$4 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$1),
|
|
|
107
107
|
*/
|
|
108
108
|
const {
|
|
109
109
|
is: i$2,
|
|
110
|
-
defineProperty: e$
|
|
110
|
+
defineProperty: e$5,
|
|
111
111
|
getOwnPropertyDescriptor: h$1,
|
|
112
112
|
getOwnPropertyNames: r$3,
|
|
113
|
-
getOwnPropertySymbols: o$
|
|
113
|
+
getOwnPropertySymbols: o$4,
|
|
114
114
|
getPrototypeOf: n$2
|
|
115
115
|
} = Object,
|
|
116
116
|
a$1 = globalThis,
|
|
@@ -171,7 +171,7 @@ class y extends HTMLElement {
|
|
|
171
171
|
if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
172
172
|
const i = Symbol(),
|
|
173
173
|
h = this.getPropertyDescriptor(t, i, s);
|
|
174
|
-
void 0 !== h && e$
|
|
174
|
+
void 0 !== h && e$5(this.prototype, t, h);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
static getPropertyDescriptor(t, s, i) {
|
|
@@ -208,7 +208,7 @@ class y extends HTMLElement {
|
|
|
208
208
|
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
209
209
|
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
210
210
|
const t = this.properties,
|
|
211
|
-
s = [...r$3(t), ...o$
|
|
211
|
+
s = [...r$3(t), ...o$4(t)];
|
|
212
212
|
for (const i of s) this.createProperty(i, t[i]);
|
|
213
213
|
}
|
|
214
214
|
const t = this[Symbol.metadata];
|
|
@@ -375,14 +375,14 @@ y.elementStyles = [], y.shadowRootOptions = {
|
|
|
375
375
|
* Copyright 2017 Google LLC
|
|
376
376
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
377
377
|
*/
|
|
378
|
-
const o$
|
|
378
|
+
const o$3 = {
|
|
379
379
|
attribute: true,
|
|
380
380
|
type: String,
|
|
381
381
|
converter: u$1,
|
|
382
382
|
reflect: false,
|
|
383
383
|
hasChanged: f$1
|
|
384
384
|
},
|
|
385
|
-
r$2 = (t = o$
|
|
385
|
+
r$2 = (t = o$3, e, r) => {
|
|
386
386
|
const {
|
|
387
387
|
kind: n,
|
|
388
388
|
metadata: i
|
|
@@ -438,17 +438,17 @@ function r$1(r) {
|
|
|
438
438
|
* Copyright 2017 Google LLC
|
|
439
439
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
440
440
|
*/
|
|
441
|
-
const e$
|
|
441
|
+
const e$4 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
444
|
* @license
|
|
445
445
|
* Copyright 2017 Google LLC
|
|
446
446
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
447
447
|
*/
|
|
448
|
-
function e$
|
|
448
|
+
function e$3(e, r) {
|
|
449
449
|
return (n, s, i) => {
|
|
450
450
|
const o = t => t.renderRoot?.querySelector(e) ?? null;
|
|
451
|
-
return e$
|
|
451
|
+
return e$4(n, s, {
|
|
452
452
|
get() {
|
|
453
453
|
return o(this);
|
|
454
454
|
}
|
|
@@ -461,14 +461,14 @@ function e$4(e, r) {
|
|
|
461
461
|
* Copyright 2021 Google LLC
|
|
462
462
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
463
463
|
*/
|
|
464
|
-
function o$
|
|
464
|
+
function o$2(o) {
|
|
465
465
|
return (e, n) => {
|
|
466
466
|
const {
|
|
467
467
|
slot: r,
|
|
468
468
|
selector: s
|
|
469
469
|
} = o ?? {},
|
|
470
470
|
c = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
471
|
-
return e$
|
|
471
|
+
return e$4(e, n, {
|
|
472
472
|
get() {
|
|
473
473
|
const t = this.renderRoot?.querySelector(c),
|
|
474
474
|
e = t?.assignedElements(o) ?? [];
|
|
@@ -790,9 +790,9 @@ _M3eAppBarElement_getFrameScrollTop = function _M3eAppBarElement_getFrameScrollT
|
|
|
790
790
|
};
|
|
791
791
|
/** The styles of the element. */
|
|
792
792
|
M3eAppBarElement.styles = [AppBarStyle, AppBarSizeStyle];
|
|
793
|
-
__decorate([e$
|
|
794
|
-
__decorate([e$
|
|
795
|
-
__decorate([e$
|
|
793
|
+
__decorate([e$3(".base")], M3eAppBarElement.prototype, "_base", void 0);
|
|
794
|
+
__decorate([e$3(".leading-icon")], M3eAppBarElement.prototype, "_leadingIcon", void 0);
|
|
795
|
+
__decorate([e$3(".trailing-icon")], M3eAppBarElement.prototype, "_trailingIcon", void 0);
|
|
796
796
|
__decorate([n$1({
|
|
797
797
|
type: Boolean,
|
|
798
798
|
reflect: true
|
|
@@ -803,7 +803,7 @@ __decorate([n$1({
|
|
|
803
803
|
__decorate([debounce$1(40)], M3eAppBarElement.prototype, "_updateScroll", null);
|
|
804
804
|
M3eAppBarElement = __decorate([customElement$1("m3e-app-bar")], M3eAppBarElement);
|
|
805
805
|
|
|
806
|
-
var _M3eAutocompleteElement_instances, _M3eAutocompleteElement_id, _M3eAutocompleteElement_menuId, _M3eAutocompleteElement_ignoreFocusVisible, _M3eAutocompleteElement_menu,
|
|
806
|
+
var _M3eAutocompleteElement_instances, _M3eAutocompleteElement_id, _M3eAutocompleteElement_menuId, _M3eAutocompleteElement_clone, _M3eAutocompleteElement_ignoreFocusVisible, _M3eAutocompleteElement_menu, _M3eAutocompleteElement_ignoreHideMenuOnBlur, _M3eAutocompleteElement_inputChanged, _M3eAutocompleteElement_hasFocus, _M3eAutocompleteElement_mutationAbortController, _M3eAutocompleteElement_clickHandler, _M3eAutocompleteElement_formFieldPointerDownHandler, _M3eAutocompleteElement_focusHandler, _M3eAutocompleteElement_blurHandler, _M3eAutocompleteElement_keyDownHandler, _M3eAutocompleteElement_inputHandler, _M3eAutocompleteElement_changeHandler, _M3eAutocompleteElement_menuToggleHandler, _M3eAutocompleteElement_menuPointerDownHandler, _M3eAutocompleteElement_options_get, _M3eAutocompleteElement_input_get, _M3eAutocompleteElement_hasNoDataSlot_get, _M3eAutocompleteElement_hasLoadingSlot_get, _M3eAutocompleteElement_shouldShowMenu_get, _M3eAutocompleteElement_minMenuWidth_get, _M3eAutocompleteElement_formField_get, _M3eAutocompleteElement_handleMutation, _M3eAutocompleteElement_handleClick, _M3eAutocompleteElement_handleFormFieldPointerDown, _M3eAutocompleteElement_handleFocus, _M3eAutocompleteElement_handleBlur, _M3eAutocompleteElement_handleInput, _M3eAutocompleteElement_handleChange, _M3eAutocompleteElement_handleKeyDown, _M3eAutocompleteElement_handleMenuPointerDown, _M3eAutocompleteElement_handleMenuToggle, _M3eAutocompleteElement_destroyMenu, _M3eAutocompleteElement_showMenu, _M3eAutocompleteElement_updateMenuState, _M3eAutocompleteElement_hideMenu, _M3eAutocompleteElement_activateOption, _M3eAutocompleteElement_updateSelectionState, _M3eAutocompleteElement_selectOption, _M3eAutocompleteElement_filterOption, _M3eAutocompleteElement_filterOptions, _M3eAutocompleteElement_announceResults, _M3eAutocompleteElement_autoActivate, _M3eAutocompleteElement_deactivateOption;
|
|
807
807
|
var M3eAutocompleteElement_1;
|
|
808
808
|
/**
|
|
809
809
|
* Enhances a text input with suggested options.
|
|
@@ -832,30 +832,49 @@ var M3eAutocompleteElement_1;
|
|
|
832
832
|
* @tag m3e-autocomplete
|
|
833
833
|
*
|
|
834
834
|
* @attr auto-activate - Whether the first option should be automatically activated.
|
|
835
|
+
* @attr case-sensitive - Whether filtering is case sensitive.
|
|
836
|
+
* @attr filter - Mode in which to filter options.
|
|
835
837
|
* @attr hide-selection-indicator - Whether to hide the selection indicator.
|
|
838
|
+
* @attr hide-loading - Whether to hide the menu when loading options.
|
|
839
|
+
* @attr hide-no-data - Whether to hide the menu when there are no options to show.
|
|
840
|
+
* @attr loading - Whether options are being loaded.
|
|
841
|
+
* @attr loading-label - The text announced and presented when loading options.
|
|
842
|
+
* @attr no-data-label - The text announced and presented when no options are available for the current term.
|
|
836
843
|
* @attr required - Whether the user is required to make a selection when interacting with the autocomplete.
|
|
844
|
+
* @attr results-label - The text announced when available options change for the current term.
|
|
837
845
|
*
|
|
838
846
|
* @slot - Renders the options of the autocomplete.
|
|
847
|
+
* @slot loading - Renders content when loading options.
|
|
848
|
+
* @slot no-data - Renders content when there are no options to show.
|
|
839
849
|
*
|
|
840
850
|
* @fires toggle - Emitted when the options menu opens or closes.
|
|
851
|
+
* @fires query - Emitted when the input is focused or when the user modifies its value.
|
|
841
852
|
*/
|
|
842
853
|
let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteElement extends HtmlFor$1(LitElement) {
|
|
843
854
|
constructor() {
|
|
844
|
-
super(
|
|
855
|
+
super();
|
|
845
856
|
_M3eAutocompleteElement_instances.add(this);
|
|
846
857
|
/** @private */
|
|
847
858
|
_M3eAutocompleteElement_id.set(this, `m3e-autocomplete-${M3eAutocompleteElement_1.__nextId}`);
|
|
848
859
|
/** @private */
|
|
849
860
|
_M3eAutocompleteElement_menuId.set(this, `${__classPrivateFieldGet(this, _M3eAutocompleteElement_id, "f")}-menu`);
|
|
850
861
|
/** @private */
|
|
862
|
+
this._options = new Array();
|
|
863
|
+
/** @private */
|
|
864
|
+
_M3eAutocompleteElement_clone.set(this, void 0);
|
|
865
|
+
/** @private */
|
|
851
866
|
_M3eAutocompleteElement_ignoreFocusVisible.set(this, false);
|
|
852
867
|
/** @private */
|
|
853
868
|
_M3eAutocompleteElement_menu.set(this, void 0);
|
|
854
869
|
/** @private */
|
|
855
|
-
_M3eAutocompleteElement_textHighlight.set(this, void 0);
|
|
856
|
-
/** @private */
|
|
857
870
|
_M3eAutocompleteElement_ignoreHideMenuOnBlur.set(this, false);
|
|
858
871
|
/** @private */
|
|
872
|
+
_M3eAutocompleteElement_inputChanged.set(this, false);
|
|
873
|
+
/** @private */
|
|
874
|
+
_M3eAutocompleteElement_hasFocus.set(this, false);
|
|
875
|
+
/** @private */
|
|
876
|
+
_M3eAutocompleteElement_mutationAbortController.set(this, void 0);
|
|
877
|
+
/** @private */
|
|
859
878
|
_M3eAutocompleteElement_clickHandler.set(this, () => __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_handleClick).call(this));
|
|
860
879
|
/** @private */
|
|
861
880
|
_M3eAutocompleteElement_formFieldPointerDownHandler.set(this, () => __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_handleFormFieldPointerDown).call(this));
|
|
@@ -874,7 +893,7 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
874
893
|
/** @private */
|
|
875
894
|
_M3eAutocompleteElement_menuPointerDownHandler.set(this, e => __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_handleMenuPointerDown).call(this, e));
|
|
876
895
|
/** @private */
|
|
877
|
-
this._listKeyManager = new ListKeyManager().withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withSkipPredicate(item => item.disabled || item.
|
|
896
|
+
this._listKeyManager = new ListKeyManager().withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withSkipPredicate(item => item.disabled || item.hidden).onActiveItemChange(() => {
|
|
878
897
|
if (this._listKeyManager.activeItem) {
|
|
879
898
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_activateOption).call(this, this._listKeyManager.activeItem);
|
|
880
899
|
}
|
|
@@ -894,10 +913,57 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
894
913
|
* @default false
|
|
895
914
|
*/
|
|
896
915
|
this.autoActivate = false;
|
|
916
|
+
/**
|
|
917
|
+
* Whether filtering is case sensitive.
|
|
918
|
+
* @default false
|
|
919
|
+
*/
|
|
920
|
+
this.caseSensitive = false;
|
|
921
|
+
/**
|
|
922
|
+
* Mode in which to filter options.
|
|
923
|
+
* @default "contains"
|
|
924
|
+
*/
|
|
925
|
+
this.filter = "contains";
|
|
926
|
+
/**
|
|
927
|
+
* Whether options are being loaded.
|
|
928
|
+
* @default false
|
|
929
|
+
*/
|
|
930
|
+
this.loading = false;
|
|
931
|
+
/**
|
|
932
|
+
* Whether to hide the menu when there are no options to show.
|
|
933
|
+
* @default false
|
|
934
|
+
*/
|
|
935
|
+
this.hideNoData = false;
|
|
936
|
+
/**
|
|
937
|
+
* Whether to hide the menu when loading options.
|
|
938
|
+
* @default false
|
|
939
|
+
*/
|
|
940
|
+
this.hideLoading = false;
|
|
941
|
+
/**
|
|
942
|
+
* The text announced and presented when loading options.
|
|
943
|
+
* @default "Loading..."
|
|
944
|
+
*/
|
|
945
|
+
this.loadingLabel = "Loading...";
|
|
946
|
+
/**
|
|
947
|
+
* The text announced and presented when no options are available for the current term.
|
|
948
|
+
* @default "No options"
|
|
949
|
+
*/
|
|
950
|
+
this.noDataLabel = "No options";
|
|
951
|
+
/**
|
|
952
|
+
* The text announced when available options change for the current term.
|
|
953
|
+
* @default (count) => `${count} options`
|
|
954
|
+
*/
|
|
955
|
+
this.resultsLabel = count => `${count} options`;
|
|
956
|
+
new MutationController$1(this, {
|
|
957
|
+
config: {
|
|
958
|
+
childList: true,
|
|
959
|
+
subtree: true
|
|
960
|
+
},
|
|
961
|
+
callback: () => __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_handleMutation).call(this)
|
|
962
|
+
});
|
|
897
963
|
}
|
|
898
964
|
/** The options that can be selected. */
|
|
899
965
|
get options() {
|
|
900
|
-
return this.
|
|
966
|
+
return this._options ?? [];
|
|
901
967
|
}
|
|
902
968
|
/** @inheritdoc */
|
|
903
969
|
attach(control) {
|
|
@@ -938,9 +1004,6 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
938
1004
|
clear(restoreFocus = false) {
|
|
939
1005
|
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)) return;
|
|
940
1006
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).value = "";
|
|
941
|
-
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_textHighlight, "f")) {
|
|
942
|
-
__classPrivateFieldGet(this, _M3eAutocompleteElement_textHighlight, "f").term = "";
|
|
943
|
-
}
|
|
944
1007
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
945
1008
|
if (restoreFocus) {
|
|
946
1009
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).focus();
|
|
@@ -949,16 +1012,49 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
949
1012
|
}
|
|
950
1013
|
}
|
|
951
1014
|
/** @inheritdoc */
|
|
1015
|
+
connectedCallback() {
|
|
1016
|
+
super.connectedCallback();
|
|
1017
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_handleMutation).call(this);
|
|
1018
|
+
}
|
|
1019
|
+
/** @inheritdoc */
|
|
1020
|
+
update(changedProperties) {
|
|
1021
|
+
super.update(changedProperties);
|
|
1022
|
+
if (changedProperties.has("hideNoData") && this.hideNoData && __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
1023
|
+
setCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "-no-data", false);
|
|
1024
|
+
}
|
|
1025
|
+
if (changedProperties.has("loading")) {
|
|
1026
|
+
if (this.loading) {
|
|
1027
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_hasFocus, "f")) {
|
|
1028
|
+
if (this.loadingLabel) {
|
|
1029
|
+
M3eLiveAnnouncer.announce(this.loadingLabel, "polite");
|
|
1030
|
+
}
|
|
1031
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f") && __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) {
|
|
1032
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_showMenu).call(this);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f") && !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) {
|
|
1036
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_hideMenu).call(this);
|
|
1037
|
+
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
1038
|
+
deleteCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "-loading");
|
|
1039
|
+
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_hasFocus, "f")) {
|
|
1040
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_showMenu).call(this);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
/** @inheritdoc */
|
|
952
1045
|
render() {
|
|
953
|
-
return html`<div class="options"
|
|
1046
|
+
return html`<div class="options" aria-hidden="true"><slot></slot></div>`;
|
|
954
1047
|
}
|
|
955
1048
|
};
|
|
956
1049
|
_M3eAutocompleteElement_id = new WeakMap();
|
|
957
1050
|
_M3eAutocompleteElement_menuId = new WeakMap();
|
|
1051
|
+
_M3eAutocompleteElement_clone = new WeakMap();
|
|
958
1052
|
_M3eAutocompleteElement_ignoreFocusVisible = new WeakMap();
|
|
959
1053
|
_M3eAutocompleteElement_menu = new WeakMap();
|
|
960
|
-
_M3eAutocompleteElement_textHighlight = new WeakMap();
|
|
961
1054
|
_M3eAutocompleteElement_ignoreHideMenuOnBlur = new WeakMap();
|
|
1055
|
+
_M3eAutocompleteElement_inputChanged = new WeakMap();
|
|
1056
|
+
_M3eAutocompleteElement_hasFocus = new WeakMap();
|
|
1057
|
+
_M3eAutocompleteElement_mutationAbortController = new WeakMap();
|
|
962
1058
|
_M3eAutocompleteElement_clickHandler = new WeakMap();
|
|
963
1059
|
_M3eAutocompleteElement_formFieldPointerDownHandler = new WeakMap();
|
|
964
1060
|
_M3eAutocompleteElement_focusHandler = new WeakMap();
|
|
@@ -969,11 +1065,20 @@ _M3eAutocompleteElement_changeHandler = new WeakMap();
|
|
|
969
1065
|
_M3eAutocompleteElement_menuToggleHandler = new WeakMap();
|
|
970
1066
|
_M3eAutocompleteElement_menuPointerDownHandler = new WeakMap();
|
|
971
1067
|
_M3eAutocompleteElement_instances = new WeakSet();
|
|
1068
|
+
_M3eAutocompleteElement_options_get = function _M3eAutocompleteElement_options_get() {
|
|
1069
|
+
return this._listKeyManager?.items ?? [];
|
|
1070
|
+
};
|
|
972
1071
|
_M3eAutocompleteElement_input_get = function _M3eAutocompleteElement_input_get() {
|
|
973
1072
|
return this.control ? this.control : null;
|
|
974
1073
|
};
|
|
975
|
-
|
|
976
|
-
return this
|
|
1074
|
+
_M3eAutocompleteElement_hasNoDataSlot_get = function _M3eAutocompleteElement_hasNoDataSlot_get() {
|
|
1075
|
+
return (__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f")?.querySelector("[slot='no-data']") ?? null) !== null;
|
|
1076
|
+
};
|
|
1077
|
+
_M3eAutocompleteElement_hasLoadingSlot_get = function _M3eAutocompleteElement_hasLoadingSlot_get() {
|
|
1078
|
+
return (__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f")?.querySelector("[slot='loading']") ?? null) !== null;
|
|
1079
|
+
};
|
|
1080
|
+
_M3eAutocompleteElement_shouldShowMenu_get = function _M3eAutocompleteElement_shouldShowMenu_get() {
|
|
1081
|
+
return __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).some(x => !x.hidden) || this.loading && !this.hideLoading && this.loadingLabel.length > 0 || !this.loading && !this.hideNoData && this.noDataLabel.length > 0;
|
|
977
1082
|
};
|
|
978
1083
|
_M3eAutocompleteElement_minMenuWidth_get = function _M3eAutocompleteElement_minMenuWidth_get() {
|
|
979
1084
|
const formField = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get);
|
|
@@ -982,15 +1087,43 @@ _M3eAutocompleteElement_minMenuWidth_get = function _M3eAutocompleteElement_minM
|
|
|
982
1087
|
_M3eAutocompleteElement_formField_get = function _M3eAutocompleteElement_formField_get() {
|
|
983
1088
|
return this.control?.closest("m3e-form-field") ?? null;
|
|
984
1089
|
};
|
|
985
|
-
|
|
986
|
-
|
|
1090
|
+
_M3eAutocompleteElement_handleMutation = /** @private */
|
|
1091
|
+
async function _M3eAutocompleteElement_handleMutation() {
|
|
1092
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_mutationAbortController, "f")) {
|
|
1093
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_mutationAbortController, "f").abort();
|
|
1094
|
+
}
|
|
1095
|
+
const mutationAbortController = new AbortController();
|
|
1096
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_mutationAbortController, mutationAbortController, "f");
|
|
1097
|
+
const options = [...this.querySelectorAll("m3e-option")];
|
|
1098
|
+
for (const option of options) {
|
|
1099
|
+
if (mutationAbortController.signal.aborted) {
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
if (option.isUpdatePending) {
|
|
1103
|
+
await option.updateComplete;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
if (mutationAbortController.signal.aborted) {
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
this._options = options;
|
|
1110
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_clone, this.cloneNode(true), "f");
|
|
987
1111
|
const {
|
|
988
1112
|
added
|
|
989
|
-
} = this._listKeyManager.setItems([...this.querySelectorAll("m3e-option")]);
|
|
1113
|
+
} = this._listKeyManager.setItems([...__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f").querySelectorAll("m3e-option")]);
|
|
990
1114
|
added.forEach(x => {
|
|
991
1115
|
x.id = x.id || `${__classPrivateFieldGet(this, _M3eAutocompleteElement_id, "f")}-option-${this._listKeyManager.items.indexOf(x)}`;
|
|
992
1116
|
setCustomState$1(x, "-hide-selection-indicator", this.hideSelectionIndicator);
|
|
993
1117
|
});
|
|
1118
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
1119
|
+
const count = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
1120
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").replaceChildren(...__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f").childNodes);
|
|
1121
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) {
|
|
1122
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_hideMenu).call(this);
|
|
1123
|
+
} else {
|
|
1124
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_updateMenuState).call(this, __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), count);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
994
1127
|
};
|
|
995
1128
|
_M3eAutocompleteElement_handleClick = function _M3eAutocompleteElement_handleClick() {
|
|
996
1129
|
__classPrivateFieldSet(this, _M3eAutocompleteElement_ignoreFocusVisible, true, "f");
|
|
@@ -1000,10 +1133,21 @@ _M3eAutocompleteElement_handleFormFieldPointerDown = function _M3eAutocompleteEl
|
|
|
1000
1133
|
__classPrivateFieldSet(this, _M3eAutocompleteElement_ignoreHideMenuOnBlur, true, "f");
|
|
1001
1134
|
};
|
|
1002
1135
|
_M3eAutocompleteElement_handleFocus = function _M3eAutocompleteElement_handleFocus() {
|
|
1136
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_hasFocus, true, "f");
|
|
1003
1137
|
__classPrivateFieldSet(this, _M3eAutocompleteElement_ignoreFocusVisible, true, "f");
|
|
1138
|
+
if (this.options.length == 0 && !this.control.readOnly) {
|
|
1139
|
+
this.dispatchEvent(new CustomEvent("query", {
|
|
1140
|
+
detail: {
|
|
1141
|
+
term: __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)?.value ?? ""
|
|
1142
|
+
},
|
|
1143
|
+
bubbles: true,
|
|
1144
|
+
composed: true
|
|
1145
|
+
}));
|
|
1146
|
+
}
|
|
1004
1147
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_showMenu).call(this);
|
|
1005
1148
|
};
|
|
1006
1149
|
_M3eAutocompleteElement_handleBlur = function _M3eAutocompleteElement_handleBlur() {
|
|
1150
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_hasFocus, false, "f");
|
|
1007
1151
|
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_ignoreHideMenuOnBlur, "f")) {
|
|
1008
1152
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_hideMenu).call(this);
|
|
1009
1153
|
}
|
|
@@ -1011,19 +1155,30 @@ _M3eAutocompleteElement_handleBlur = function _M3eAutocompleteElement_handleBlur
|
|
|
1011
1155
|
};
|
|
1012
1156
|
_M3eAutocompleteElement_handleInput = function _M3eAutocompleteElement_handleInput(e) {
|
|
1013
1157
|
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get) || e.defaultPrevented) return;
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1158
|
+
this.dispatchEvent(new CustomEvent("query", {
|
|
1159
|
+
detail: {
|
|
1160
|
+
term: __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).value
|
|
1161
|
+
},
|
|
1162
|
+
bubbles: true,
|
|
1163
|
+
composed: true
|
|
1164
|
+
}));
|
|
1165
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_inputChanged, true, "f");
|
|
1166
|
+
try {
|
|
1167
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
1168
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_showMenu).call(this);
|
|
1169
|
+
} else {
|
|
1170
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
1171
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) {
|
|
1172
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_hideMenu).call(this);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
} finally {
|
|
1176
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_inputChanged, false, "f");
|
|
1177
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get)?.notifyControlStateChange(true);
|
|
1022
1178
|
}
|
|
1023
|
-
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get)?.notifyControlStateChange(true);
|
|
1024
1179
|
};
|
|
1025
1180
|
_M3eAutocompleteElement_handleChange = function _M3eAutocompleteElement_handleChange() {
|
|
1026
|
-
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get) && this.required && !this.
|
|
1181
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get) && this.required && !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).some(x => x.selected && !x.disabled)) {
|
|
1027
1182
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).value = "";
|
|
1028
1183
|
}
|
|
1029
1184
|
};
|
|
@@ -1098,7 +1253,7 @@ _M3eAutocompleteElement_handleMenuPointerDown = function _M3eAutocompleteElement
|
|
|
1098
1253
|
_M3eAutocompleteElement_handleMenuToggle = function _M3eAutocompleteElement_handleMenuToggle(e) {
|
|
1099
1254
|
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) return;
|
|
1100
1255
|
if (e.newState !== "closed") {
|
|
1101
|
-
const option = this.
|
|
1256
|
+
const option = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).find(x => x.selected && !x.disabled);
|
|
1102
1257
|
if (option) {
|
|
1103
1258
|
this._listKeyManager.setActiveItem(option);
|
|
1104
1259
|
scrollIntoViewIfNeeded$1(option, __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"));
|
|
@@ -1120,14 +1275,12 @@ _M3eAutocompleteElement_handleMenuToggle = function _M3eAutocompleteElement_hand
|
|
|
1120
1275
|
}
|
|
1121
1276
|
};
|
|
1122
1277
|
_M3eAutocompleteElement_destroyMenu = function _M3eAutocompleteElement_destroyMenu(e) {
|
|
1123
|
-
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")
|
|
1124
|
-
|
|
1125
|
-
__classPrivateFieldGet(this, _M3eAutocompleteElement_textHighlight, "f").remove();
|
|
1278
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) return;
|
|
1279
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f")?.replaceChildren(...__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").childNodes);
|
|
1126
1280
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").remove();
|
|
1127
1281
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").removeEventListener("toggle", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuToggleHandler, "f"));
|
|
1128
1282
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").removeEventListener("pointerdown", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuPointerDownHandler, "f"));
|
|
1129
1283
|
__classPrivateFieldSet(this, _M3eAutocompleteElement_menu, undefined, "f");
|
|
1130
|
-
__classPrivateFieldSet(this, _M3eAutocompleteElement_textHighlight, undefined, "f");
|
|
1131
1284
|
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)) {
|
|
1132
1285
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).ariaExpanded = "false";
|
|
1133
1286
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).removeAttribute("aria-controls");
|
|
@@ -1141,20 +1294,32 @@ _M3eAutocompleteElement_destroyMenu = function _M3eAutocompleteElement_destroyMe
|
|
|
1141
1294
|
}));
|
|
1142
1295
|
};
|
|
1143
1296
|
_M3eAutocompleteElement_showMenu = function _M3eAutocompleteElement_showMenu() {
|
|
1144
|
-
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f") || !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get) || __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).readOnly || __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).disabled
|
|
1145
|
-
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
1297
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f") || !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get) || __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).readOnly || __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).disabled) return;
|
|
1298
|
+
const count = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
1299
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) return;
|
|
1146
1300
|
__classPrivateFieldSet(this, _M3eAutocompleteElement_menu, document.createElement("m3e-option-panel"), "f");
|
|
1147
1301
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").id = __classPrivateFieldGet(this, _M3eAutocompleteElement_menuId, "f");
|
|
1148
1302
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").style.overflowX = "hidden";
|
|
1149
1303
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").style.minWidth = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_minMenuWidth_get);
|
|
1150
1304
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").addEventListener("toggle", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuToggleHandler, "f"));
|
|
1151
1305
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").addEventListener("pointerdown", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuPointerDownHandler, "f"));
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1306
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f")) {
|
|
1307
|
+
const children = [...__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f").childNodes];
|
|
1308
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_hasNoDataSlot_get) && this.noDataLabel) {
|
|
1309
|
+
const noDataSpan = document.createElement("span");
|
|
1310
|
+
noDataSpan.slot = "no-data";
|
|
1311
|
+
noDataSpan.textContent = this.noDataLabel;
|
|
1312
|
+
children.push(noDataSpan);
|
|
1313
|
+
}
|
|
1314
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_hasLoadingSlot_get) && this.loadingLabel) {
|
|
1315
|
+
const loadingSpan = document.createElement("span");
|
|
1316
|
+
loadingSpan.slot = "loading";
|
|
1317
|
+
loadingSpan.textContent = this.loadingLabel;
|
|
1318
|
+
children.push(loadingSpan);
|
|
1319
|
+
}
|
|
1320
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").replaceChildren(...children);
|
|
1321
|
+
}
|
|
1322
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_updateMenuState).call(this, __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), count);
|
|
1158
1323
|
(__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get) ?? __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)).insertAdjacentElement("afterend", __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"));
|
|
1159
1324
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).setAttribute("aria-controls", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuId, "f"));
|
|
1160
1325
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).setAttribute("aria-owns", __classPrivateFieldGet(this, _M3eAutocompleteElement_menuId, "f"));
|
|
@@ -1165,6 +1330,10 @@ _M3eAutocompleteElement_showMenu = function _M3eAutocompleteElement_showMenu() {
|
|
|
1165
1330
|
const input = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get);
|
|
1166
1331
|
setTimeout(() => __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")?.show(input, __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get)?.menuAnchor));
|
|
1167
1332
|
};
|
|
1333
|
+
_M3eAutocompleteElement_updateMenuState = function _M3eAutocompleteElement_updateMenuState(menu, count) {
|
|
1334
|
+
setCustomState$1(menu, "-loading", this.loading);
|
|
1335
|
+
setCustomState$1(menu, "-no-data", count == 0);
|
|
1336
|
+
};
|
|
1168
1337
|
_M3eAutocompleteElement_hideMenu = function _M3eAutocompleteElement_hideMenu() {
|
|
1169
1338
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")?.hide();
|
|
1170
1339
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)?.removeAttribute("aria-activedescendant");
|
|
@@ -1178,7 +1347,7 @@ _M3eAutocompleteElement_activateOption = function _M3eAutocompleteElement_activa
|
|
|
1178
1347
|
behavior: "instant"
|
|
1179
1348
|
});
|
|
1180
1349
|
const focusVisible = forceFocusVisible || !__classPrivateFieldGet(this, _M3eAutocompleteElement_ignoreFocusVisible, "f") && (__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).matches(":focus-visible") || forcedColorsActive$1());
|
|
1181
|
-
this.
|
|
1350
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).forEach(x => {
|
|
1182
1351
|
const active = x === option && focusVisible;
|
|
1183
1352
|
if (active) {
|
|
1184
1353
|
x.focusRing?.show();
|
|
@@ -1190,56 +1359,124 @@ _M3eAutocompleteElement_activateOption = function _M3eAutocompleteElement_activa
|
|
|
1190
1359
|
});
|
|
1191
1360
|
}
|
|
1192
1361
|
};
|
|
1193
|
-
|
|
1362
|
+
_M3eAutocompleteElement_updateSelectionState = /** @private */
|
|
1363
|
+
async function _M3eAutocompleteElement_updateSelectionState(clone) {
|
|
1364
|
+
const option = this._options[this._listKeyManager.items.indexOf(clone)];
|
|
1365
|
+
if (option) {
|
|
1366
|
+
option.selected = clone.selected;
|
|
1367
|
+
if (option.isUpdatePending) {
|
|
1368
|
+
await option.updateComplete;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
_M3eAutocompleteElement_selectOption = /** @private */
|
|
1373
|
+
async function _M3eAutocompleteElement_selectOption(option) {
|
|
1194
1374
|
if (option.selected) return;
|
|
1195
1375
|
option.selected = true;
|
|
1196
|
-
|
|
1376
|
+
await __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_updateSelectionState).call(this, option);
|
|
1377
|
+
if (option.isUpdatePending) {
|
|
1378
|
+
await option.updateComplete;
|
|
1379
|
+
}
|
|
1197
1380
|
this.requestUpdate();
|
|
1381
|
+
if (this.isUpdatePending) {
|
|
1382
|
+
await this.updateComplete;
|
|
1383
|
+
}
|
|
1198
1384
|
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)) {
|
|
1199
1385
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).value = option.value;
|
|
1200
1386
|
}
|
|
1201
1387
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_formField_get)?.notifyControlStateChange(true);
|
|
1202
1388
|
};
|
|
1389
|
+
_M3eAutocompleteElement_filterOption = function _M3eAutocompleteElement_filterOption(clone, option, term, exactTerm) {
|
|
1390
|
+
const value = this.caseSensitive ? option.value : option.value.toLowerCase();
|
|
1391
|
+
switch (this.filter) {
|
|
1392
|
+
case "starts-with":
|
|
1393
|
+
clone.term = exactTerm;
|
|
1394
|
+
clone.highlightMode = this.filter;
|
|
1395
|
+
return value.startsWith(term);
|
|
1396
|
+
case "ends-with":
|
|
1397
|
+
clone.term = exactTerm;
|
|
1398
|
+
clone.highlightMode = this.filter;
|
|
1399
|
+
return value.endsWith(term);
|
|
1400
|
+
case "contains":
|
|
1401
|
+
clone.term = exactTerm;
|
|
1402
|
+
clone.highlightMode = this.filter;
|
|
1403
|
+
return value.includes(term);
|
|
1404
|
+
case "none":
|
|
1405
|
+
clone.disableHighlight = true;
|
|
1406
|
+
return true;
|
|
1407
|
+
default:
|
|
1408
|
+
clone.disableHighlight = true;
|
|
1409
|
+
return this.filter(option, exactTerm);
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1203
1412
|
_M3eAutocompleteElement_filterOptions = function _M3eAutocompleteElement_filterOptions() {
|
|
1204
|
-
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)) return;
|
|
1205
|
-
const
|
|
1413
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get)) return 0;
|
|
1414
|
+
const oldCount = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).filter(x => !x.hidden).length;
|
|
1415
|
+
const shouldAnnounce = !this.loading && __classPrivateFieldGet(this, _M3eAutocompleteElement_inputChanged, "f");
|
|
1416
|
+
__classPrivateFieldSet(this, _M3eAutocompleteElement_inputChanged, false, "f");
|
|
1417
|
+
const exactTerm = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_input_get).value;
|
|
1418
|
+
const term = this.caseSensitive ? exactTerm : exactTerm.toLocaleLowerCase();
|
|
1419
|
+
let newCount = 0;
|
|
1206
1420
|
let first = false;
|
|
1207
1421
|
let last;
|
|
1208
|
-
for (
|
|
1209
|
-
const
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
if (hidden) {
|
|
1213
|
-
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_deactivateOption).call(this,
|
|
1214
|
-
deleteCustomState$1(
|
|
1215
|
-
deleteCustomState$1(
|
|
1216
|
-
} else if (!first) {
|
|
1217
|
-
addCustomState$1(option, "-first");
|
|
1218
|
-
first = true;
|
|
1219
|
-
addCustomState$1(option, "-last");
|
|
1220
|
-
last = option;
|
|
1422
|
+
for (let i = 0; i < __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).length; i++) {
|
|
1423
|
+
const clone = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get)[i];
|
|
1424
|
+
const option = this._options[i];
|
|
1425
|
+
clone.hidden = !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOption).call(this, clone, option, term, exactTerm);
|
|
1426
|
+
if (clone.hidden) {
|
|
1427
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_deactivateOption).call(this, clone);
|
|
1428
|
+
deleteCustomState$1(clone, "-first");
|
|
1429
|
+
deleteCustomState$1(clone, "-last");
|
|
1221
1430
|
} else {
|
|
1222
|
-
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1431
|
+
newCount++;
|
|
1432
|
+
if (!first && !(clone.parentElement instanceof M3eOptGroupElement$1)) {
|
|
1433
|
+
addCustomState$1(clone, "-first");
|
|
1434
|
+
first = true;
|
|
1435
|
+
addCustomState$1(clone, "-last");
|
|
1436
|
+
last = clone;
|
|
1437
|
+
} else {
|
|
1438
|
+
deleteCustomState$1(clone, "-first");
|
|
1439
|
+
if (last) {
|
|
1440
|
+
deleteCustomState$1(last, "-last");
|
|
1441
|
+
}
|
|
1442
|
+
addCustomState$1(clone, "-last");
|
|
1443
|
+
last = clone;
|
|
1225
1444
|
}
|
|
1226
|
-
addCustomState$1(option, "-last");
|
|
1227
|
-
last = option;
|
|
1228
1445
|
}
|
|
1229
|
-
if (
|
|
1230
|
-
|
|
1446
|
+
if (clone.selected && option.value !== exactTerm) {
|
|
1447
|
+
clone.selected = false;
|
|
1448
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_updateSelectionState).call(this, clone);
|
|
1231
1449
|
}
|
|
1232
1450
|
}
|
|
1233
|
-
|
|
1451
|
+
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
1452
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_updateMenuState).call(this, __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), newCount);
|
|
1453
|
+
}
|
|
1454
|
+
const groups = __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")?.querySelectorAll("m3e-optgroup") ?? __classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f")?.querySelectorAll("m3e-optgroup") ?? [];
|
|
1234
1455
|
for (const group of groups) {
|
|
1235
|
-
|
|
1236
|
-
|
|
1456
|
+
group.hidden = [...group.querySelectorAll("m3e-option")].every(x => x.hidden);
|
|
1457
|
+
}
|
|
1458
|
+
if (shouldAnnounce) {
|
|
1459
|
+
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_announceResults).call(this, oldCount, newCount);
|
|
1237
1460
|
}
|
|
1238
1461
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_autoActivate).call(this);
|
|
1462
|
+
return newCount;
|
|
1463
|
+
};
|
|
1464
|
+
_M3eAutocompleteElement_announceResults = function _M3eAutocompleteElement_announceResults(oldCount, newCount) {
|
|
1465
|
+
if (!__classPrivateFieldGet(this, _M3eAutocompleteElement_hasFocus, "f")) return;
|
|
1466
|
+
if (newCount == 0) {
|
|
1467
|
+
if (oldCount > 0 && this.noDataLabel) {
|
|
1468
|
+
M3eLiveAnnouncer.announce(this.noDataLabel, "polite");
|
|
1469
|
+
}
|
|
1470
|
+
} else if (oldCount != newCount) {
|
|
1471
|
+
const message = this.resultsLabel instanceof Function ? this.resultsLabel(newCount) : this.resultsLabel;
|
|
1472
|
+
if (message) {
|
|
1473
|
+
M3eLiveAnnouncer.announce(message, "polite");
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1239
1476
|
};
|
|
1240
1477
|
_M3eAutocompleteElement_autoActivate = function _M3eAutocompleteElement_autoActivate() {
|
|
1241
1478
|
if (this.autoActivate && (!this._listKeyManager.activeItem || !this._listKeyManager.activeItem.selected)) {
|
|
1242
|
-
const option = this.
|
|
1479
|
+
const option = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_options_get).find(x => !x.disabled && !x.hidden);
|
|
1243
1480
|
if (option) {
|
|
1244
1481
|
this._listKeyManager.setActiveItem(option);
|
|
1245
1482
|
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
@@ -1275,6 +1512,41 @@ __decorate([n$1({
|
|
|
1275
1512
|
attribute: "auto-activate",
|
|
1276
1513
|
type: Boolean
|
|
1277
1514
|
})], M3eAutocompleteElement.prototype, "autoActivate", void 0);
|
|
1515
|
+
__decorate([n$1({
|
|
1516
|
+
attribute: "case-sensitive",
|
|
1517
|
+
type: Boolean
|
|
1518
|
+
})], M3eAutocompleteElement.prototype, "caseSensitive", void 0);
|
|
1519
|
+
__decorate([n$1({
|
|
1520
|
+
converter: {
|
|
1521
|
+
fromAttribute(value) {
|
|
1522
|
+
if (value === null) return "contains";
|
|
1523
|
+
if (value === "starts-with" || value === "ends-with" || value === "contains" || value === "none") {
|
|
1524
|
+
return value;
|
|
1525
|
+
}
|
|
1526
|
+
return "contains";
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
})], M3eAutocompleteElement.prototype, "filter", void 0);
|
|
1530
|
+
__decorate([n$1({
|
|
1531
|
+
type: Boolean
|
|
1532
|
+
})], M3eAutocompleteElement.prototype, "loading", void 0);
|
|
1533
|
+
__decorate([n$1({
|
|
1534
|
+
attribute: "hide-no-data",
|
|
1535
|
+
type: Boolean
|
|
1536
|
+
})], M3eAutocompleteElement.prototype, "hideNoData", void 0);
|
|
1537
|
+
__decorate([n$1({
|
|
1538
|
+
attribute: "hide-loading",
|
|
1539
|
+
type: Boolean
|
|
1540
|
+
})], M3eAutocompleteElement.prototype, "hideLoading", void 0);
|
|
1541
|
+
__decorate([n$1({
|
|
1542
|
+
attribute: "loading-label"
|
|
1543
|
+
})], M3eAutocompleteElement.prototype, "loadingLabel", void 0);
|
|
1544
|
+
__decorate([n$1({
|
|
1545
|
+
attribute: "no-data-label"
|
|
1546
|
+
})], M3eAutocompleteElement.prototype, "noDataLabel", void 0);
|
|
1547
|
+
__decorate([n$1({
|
|
1548
|
+
attribute: "results-label"
|
|
1549
|
+
})], M3eAutocompleteElement.prototype, "resultsLabel", void 0);
|
|
1278
1550
|
M3eAutocompleteElement = M3eAutocompleteElement_1 = __decorate([customElement$1("m3e-autocomplete")], M3eAutocompleteElement);
|
|
1279
1551
|
|
|
1280
1552
|
/**
|
|
@@ -3566,11 +3838,11 @@ _M3eButtonElement_handlePressedChange = function _M3eButtonElement_handlePressed
|
|
|
3566
3838
|
};
|
|
3567
3839
|
/** The styles of the element. */
|
|
3568
3840
|
M3eButtonElement.styles = [ButtonSizeStyle, ButtonVariantStyle, ButtonStyle];
|
|
3569
|
-
__decorate([e$
|
|
3570
|
-
__decorate([e$
|
|
3571
|
-
__decorate([e$
|
|
3572
|
-
__decorate([e$
|
|
3573
|
-
__decorate([e$
|
|
3841
|
+
__decorate([e$3(".base")], M3eButtonElement.prototype, "_base", void 0);
|
|
3842
|
+
__decorate([e$3(".elevation")], M3eButtonElement.prototype, "_elevation", void 0);
|
|
3843
|
+
__decorate([e$3(".focus-ring")], M3eButtonElement.prototype, "_focusRing", void 0);
|
|
3844
|
+
__decorate([e$3(".state-layer")], M3eButtonElement.prototype, "_stateLayer", void 0);
|
|
3845
|
+
__decorate([e$3(".ripple")], M3eButtonElement.prototype, "_ripple", void 0);
|
|
3574
3846
|
__decorate([n$1({
|
|
3575
3847
|
reflect: true
|
|
3576
3848
|
})], M3eButtonElement.prototype, "variant", void 0);
|
|
@@ -3757,7 +4029,7 @@ _M3eButtonGroupElement_handleChange = function _M3eButtonGroupElement_handleChan
|
|
|
3757
4029
|
};
|
|
3758
4030
|
/** The styles of the element. */
|
|
3759
4031
|
M3eButtonGroupElement.styles = css`:host { display: flex; vertical-align: middle; flex-wrap: nowrap; align-items: center; } .base { display: flex; vertical-align: middle; flex-wrap: nowrap; align-items: center; } :host([variant="standard"]) { justify-content: center; } :host([variant="connected"]) .base { flex: 1 1 auto; } :host([variant="standard"]) .base { width: fit-content; flex: none; } :host([variant="standard"]) .base.pressed { justify-content: space-between; width: var(--_button-group-width); } :host([variant="standard"][size="extra-small"]) .base { column-gap: var(--m3e-standard-button-group-extra-small-spacing, 1.125rem); } :host([variant="standard"][size="small"]) .base { column-gap: var(--m3e-standard-button-group-small-spacing, 0.75rem); } :host([variant="standard"][size="medium"]).base { column-gap: var(--m3e-standard-button-group-medium-spacing, 0.5rem); } :host([variant="standard"][size="large"]) .base { column-gap: var(--m3e-standard-button-group-large-spacing, 0.5rem); } :host([variant="standard"][size="extra-large"]) .base { column-gap: var(--m3e-standard-button-group-extra-large-spacing, 0.5rem); } :host([variant="connected"]) .base { column-gap: var(--m3e-connected-button-group-spacing, 0.125rem); } :host([variant="connected"][size="extra-small"]) ::slotted(:state(-first)[size="extra-small"]), :host([variant="connected"][size="extra-small"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="extra-small"]) { --_button-rounded-end-shape: var( --m3e-connected-button-group-extra-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-end-shape: var( --m3e-connected-button-group-extra-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-end-pressed-shape: var( --m3e-connected-button-group-extra-small-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="extra-small"]) ::slotted(:state(-last)[size="extra-small"]), :host([variant="connected"][size="extra-small"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="extra-small"]) { --_button-rounded-start-shape: var( --m3e-connected-button-group-extra-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-start-shape: var( --m3e-connected-button-group-extra-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-start-pressed-shape: var( --m3e-connected-button-group-extra-small-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="small"]) ::slotted(:state(-first)[size="small"]), :host([variant="connected"][size="small"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="small"]) { --_button-rounded-end-shape: var( --m3e-connected-button-group-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-end-shape: var( --m3e-connected-button-group-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-end-shape-pressed-morph: var( --m3e-connected-button-group-small-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="small"]) ::slotted(:state(-last)[size="small"]), :host([variant="connected"][size="small"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="small"]) { --_button-rounded-start-shape: var( --m3e-connected-button-group-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-start-shape: var( --m3e-connected-button-group-small-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-start-shape-pressed-morph: var( --m3e-connected-button-group-small-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="medium"]) ::slotted(:state(-first)[size="medium"]), :host([variant="connected"][size="medium"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="medium"]) { --_button-rounded-end-shape: var( --m3e-connected-button-group-medium-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-end-shape: var( --m3e-connected-button-group-medium-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-end-pressed-shape: var( --m3e-connected-button-group-medium-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="medium"]) ::slotted(:state(-last)[size="medium"]), :host([variant="connected"][size="medium"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="medium"]) { --_button-rounded-start-shape: var( --m3e-connected-button-group-medium-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-start-shape: var( --m3e-connected-button-group-medium-inner-shape, ${DesignToken$1.shape.corner.small} ); --_button-square-start-pressed-shape: var( --m3e-connected-button-group-medium-inner-pressed-shape, ${DesignToken$1.shape.corner.extraSmall} ); } :host([variant="connected"][size="large"]) ::slotted(:state(-first)[size="large"]), :host([variant="connected"][size="large"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="large"]) { --_button-rounded-end-shape: var( --m3e-connected-button-group-large-inner-shape, ${DesignToken$1.shape.corner.large} ); --_button-square-end-shape: var( --m3e-connected-button-group-large-inner-shape, ${DesignToken$1.shape.corner.large} ); --_button-square-end-pressed-shape: var( --m3e-connected-button-group-large-inner-pressed-shape, ${DesignToken$1.shape.corner.medium} ); } :host([variant="connected"][size="large"]) ::slotted(:state(-last)[size="large"]), :host([variant="connected"][size="large"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="large"]) { --_button-rounded-start-shape: var( --m3e-connected-button-group-large-inner-shape, ${DesignToken$1.shape.corner.large} ); --_button-square-start-shape: var( --m3e-connected-button-group-large-inner-shape, ${DesignToken$1.shape.corner.large} ); --_button-square-start-pressed-shape: var( --m3e-connected-button-group-large-inner-pressed-shape, ${DesignToken$1.shape.corner.medium} ); } :host([variant="connected"][size="extra-large"]) ::slotted(:state(-first)[size="extra-large"]), :host([variant="connected"][size="extra-large"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="extra-large"]) { --_button-rounded-end-shape: var( --m3e-connected-button-group-extra-large-inner-shape, ${DesignToken$1.shape.corner.largeIncreased} ); --_button-square-end-shape: var( --m3e-connected-button-group-extra-large-inner-shape, ${DesignToken$1.shape.corner.largeIncreased} ); --_button-square-end-pressed-shape: var( --m3e-connected-button-group-extra-large-inner-pressed-shape, ${DesignToken$1.shape.corner.large} ); } :host([variant="connected"][size="extra-large"]) ::slotted(:state(-last)[size="extra-large"]), :host([variant="connected"][size="extra-large"]) ::slotted(:not(:state(-first)):not(:state(-last))[size="extra-large"]) { --_button-rounded-start-shape: var( --m3e-connected-button-group-extra-large-inner-shape, ${DesignToken$1.shape.corner.largeIncreased} ); --_button-square-start-shape: var( --m3e-connected-button-group-extra-large-inner-shape, ${DesignToken$1.shape.corner.largeIncreased} ); --_button-square-start-pressed-shape: var( --m3e-connected-button-group-extra-large-inner-pressed-shape, ${DesignToken$1.shape.corner.large} ); }`;
|
|
3760
|
-
__decorate([e$
|
|
4032
|
+
__decorate([e$3(".base")], M3eButtonGroupElement.prototype, "_base", void 0);
|
|
3761
4033
|
__decorate([n$1({
|
|
3762
4034
|
reflect: true
|
|
3763
4035
|
})], M3eButtonGroupElement.prototype, "variant", void 0);
|
|
@@ -3767,7 +4039,7 @@ __decorate([n$1({
|
|
|
3767
4039
|
__decorate([n$1({
|
|
3768
4040
|
type: Boolean
|
|
3769
4041
|
})], M3eButtonGroupElement.prototype, "multi", void 0);
|
|
3770
|
-
__decorate([o$
|
|
4042
|
+
__decorate([o$2({
|
|
3771
4043
|
slot: "",
|
|
3772
4044
|
selector: "m3e-button,m3e-icon-button",
|
|
3773
4045
|
flatten: true
|
|
@@ -4138,11 +4410,11 @@ _M3eCardElement_handleClick = function _M3eCardElement_handleClick(e) {
|
|
|
4138
4410
|
};
|
|
4139
4411
|
/** The styles of the element. */
|
|
4140
4412
|
M3eCardElement.styles = [CardVariantStyle, CardStyle];
|
|
4141
|
-
__decorate([e$
|
|
4142
|
-
__decorate([e$
|
|
4143
|
-
__decorate([e$
|
|
4144
|
-
__decorate([e$
|
|
4145
|
-
__decorate([e$
|
|
4413
|
+
__decorate([e$3(".base")], M3eCardElement.prototype, "_base", void 0);
|
|
4414
|
+
__decorate([e$3(".elevation")], M3eCardElement.prototype, "_elevation", void 0);
|
|
4415
|
+
__decorate([e$3(".focus-ring")], M3eCardElement.prototype, "_focusRing", void 0);
|
|
4416
|
+
__decorate([e$3(".state-layer")], M3eCardElement.prototype, "_stateLayer", void 0);
|
|
4417
|
+
__decorate([e$3(".ripple")], M3eCardElement.prototype, "_ripple", void 0);
|
|
4146
4418
|
__decorate([n$1({
|
|
4147
4419
|
type: Boolean
|
|
4148
4420
|
})], M3eCardElement.prototype, "inline", void 0);
|
|
@@ -4325,9 +4597,9 @@ _M3eCheckboxElement_handleClick = function _M3eCheckboxElement_handleClick(e) {
|
|
|
4325
4597
|
};
|
|
4326
4598
|
/** The styles of the element. */
|
|
4327
4599
|
M3eCheckboxElement.styles = css`:host { display: inline-block; outline: none; width: fit-content; height: fit-content; vertical-align: middle; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not([aria-disabled="true"])) { cursor: pointer; } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; border-radius: 50%; width: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken$1.density.calc(-3)}); height: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken$1.density.calc(-3)}); } .touch { position: absolute; height: 3rem; width: 3rem; margin: auto; } .wrapper { box-sizing: border-box; pointer-events: none; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 0.125rem); } :host(:not([checked]):not([indeterminate])) .wrapper { border-width: var(--m3e-checkbox-unselected-outline-thickness, 2px); border-style: solid; } :host(:not(:state(-touched):state(-invalid)):not([indeterminate]):not([checked])) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-focus-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-color: var(--m3e-checkbox-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } :host(:not(:state(-touched):state(-invalid))[checked]) .base, :host(:not(:state(-touched):state(-invalid))[indeterminate]) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-hover-color, ${DesignToken$1.color.primary}); --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-focus-color, ${DesignToken$1.color.primary}); --m3e-ripple-color: var(--m3e-checkbox-selected-ripple-color, ${DesignToken$1.color.primary}); } :host(:not([aria-disabled="true"]):not(:state(-touched):state(-invalid))[checked]) .wrapper, :host(:not([aria-disabled="true"]):not(:state(-touched):state(-invalid))[indeterminate]) .wrapper { background-color: var(--m3e-checkbox-selected-container-color, ${DesignToken$1.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${DesignToken$1.color.onPrimary}); } :host( :not([aria-disabled="true"]):not(:state(-touched):state(-invalid)):not([checked]):not([indeterminate]):not( :hover ) ) .wrapper { border-color: var(--m3e-checkbox-unselected-outline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not([aria-disabled="true"]):not(:state(-touched):state(-invalid)):not([checked]):not([indeterminate]):hover) .wrapper { border-color: var(--m3e-checkbox-unselected-hover-outline-color, ${DesignToken$1.color.onSurface}); } :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${DesignToken$1.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([aria-disabled="true"][checked]) .wrapper, :host([aria-disabled="true"][indeterminate]) .wrapper { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${DesignToken$1.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); } :host(:not([aria-disabled="true"]):state(-touched):state(-invalid):not([checked]):not([indeterminate])) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-error-hover-color, ${DesignToken$1.color.error}); --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-error-focus-color, ${DesignToken$1.color.error}); --m3e-ripple-color: var(--m3e-checkbox-unselected-error-ripple-color, ${DesignToken$1.color.error}); } :host(:not([aria-disabled="true"]):state(-touched):state(-invalid)[checked]) .base, :host(:not([aria-disabled="true"]):state(-touched):state(-invalid)[indeterminate]) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-error-hover-color, ${DesignToken$1.color.onError}); --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-error-focus-color, ${DesignToken$1.color.onError}); --m3e-ripple-color: var(--m3e-checkbox-selected-error-ripple-color, ${DesignToken$1.color.onError}); } :host(:not([aria-disabled="true"]):state(-touched):state(-invalid):not([checked]):not([indeterminate])) .wrapper { border-color: var(--m3e-checkbox-unselected-error-outline-color, ${DesignToken$1.color.error}); } @media (forced-colors: active) { :host(:not(:state(-touched):state(-invalid)):not([indeterminate]):not([checked])) .base, :host(:not(:state(-touched):state(-invalid))[checked]) .base, :host(:not(:state(-touched):state(-invalid))[indeterminate]) .base { --m3e-state-layer-hover-color: CanvasText; --m3e-state-layer-focus-color: CanvasText; --m3e-ripple-color: CanvasText; } :host( :not([aria-disabled="true"]):not(:state(-touched):state(-invalid)):not([checked]):not([indeterminate]):not( :hover ) ) .wrapper, :host( :not([aria-disabled="true"]):not(:state(-touched):state(-invalid)):not([checked]):not([indeterminate]):hover ) .wrapper { border-color: CanvasText; } :host(:not([aria-disabled="true"]):not(:state(-touched):state(-invalid))[checked]) .wrapper, :host(:not([aria-disabled="true"]):not(:state(-touched):state(-invalid))[indeterminate]) .wrapper { background-color: CanvasText; color: Canvas; } :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper { border-color: GrayText; } :host([aria-disabled="true"][checked]) .wrapper, :host([aria-disabled="true"][indeterminate]) .wrapper { background-color: GrayText; color: Canvas; } :host(:not([aria-disabled="true"]):state(-touched):state(-invalid):not([checked]):not([indeterminate])) .wrapper { border-color: Highlight; } :host(:not([aria-disabled="true"]):state(-touched):state(-invalid):not([checked]):not([indeterminate])) .base, :host(:not([aria-disabled="true"]):state(-touched):state(-invalid)[checked]) .base, :host(:not([aria-disabled="true"]):state(-touched):state(-invalid)[indeterminate]) .base { --m3e-state-layer-hover-color: Highlight; --m3e-state-layer-focus-color: Highlight; --m3e-ripple-color: Highlight; } }`;
|
|
4328
|
-
__decorate([e$
|
|
4329
|
-
__decorate([e$
|
|
4330
|
-
__decorate([e$
|
|
4600
|
+
__decorate([e$3(".focus-ring")], M3eCheckboxElement.prototype, "_focusRing", void 0);
|
|
4601
|
+
__decorate([e$3(".state-layer")], M3eCheckboxElement.prototype, "_stateLayer", void 0);
|
|
4602
|
+
__decorate([e$3(".ripple")], M3eCheckboxElement.prototype, "_ripple", void 0);
|
|
4331
4603
|
__decorate([n$1()], M3eCheckboxElement.prototype, "value", void 0);
|
|
4332
4604
|
M3eCheckboxElement = __decorate([customElement$1("m3e-checkbox")], M3eCheckboxElement);
|
|
4333
4605
|
|
|
@@ -4401,6 +4673,10 @@ let M3eChipElement = class M3eChipElement extends AttachInternals$1(LitElement)
|
|
|
4401
4673
|
set value(value) {
|
|
4402
4674
|
__classPrivateFieldSet(this, _M3eChipElement_value, value, "f");
|
|
4403
4675
|
}
|
|
4676
|
+
/** The textual label of the chip. */
|
|
4677
|
+
get label() {
|
|
4678
|
+
return __classPrivateFieldGet(this, _M3eChipElement_textContent, "f");
|
|
4679
|
+
}
|
|
4404
4680
|
/** @inheritdoc */
|
|
4405
4681
|
firstUpdated(_changedProperties) {
|
|
4406
4682
|
super.firstUpdated(_changedProperties);
|
|
@@ -4449,10 +4725,10 @@ _M3eChipElement_handleSlotChange = function _M3eChipElement_handleSlotChange(e)
|
|
|
4449
4725
|
};
|
|
4450
4726
|
/** The styles of the element. */
|
|
4451
4727
|
M3eChipElement.styles = css`:host { display: inline-block; vertical-align: middle; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; border-radius: var(--m3e-chip-container-shape, ${DesignToken$1.shape.corner.small}); height: calc(var(--m3e-chip-container-height, 2rem) + ${DesignToken$1.density.calc(-2)}); font-size: var(--m3e-chip-label-text-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-chip-label-text-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-chip-label-text-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-chip-label-text-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } :host(:not(m3e-chip):not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host(:not(m3e-chip):not(:disabled)[disabled-interactive]) { cursor: not-allowed; } :host(:not(m3e-chip):not(:disabled):not([disabled-interactive])) .base { user-select: none; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; column-gap: var(--m3e-chip-spacing, 0.5rem); } .label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } :host([variant="elevated"]) .base { background-color: var(--m3e-elevated-chip-container-color, ${DesignToken$1.color.surfaceContainerLow}); --m3e-elevation-level: var(--m3e-elevated-chip-elevation, ${DesignToken$1.elevation.level1}); --m3e-elevation-hover-level: var(--m3e-elevated-chip-hover-elevation, ${DesignToken$1.elevation.level2}); --m3e-elevation-focus-level: var(--m3e-elevated-chip-elevation, ${DesignToken$1.elevation.level1}); --m3e-elevation-pressed-level: var(--m3e-elevated-chip-elevation, ${DesignToken$1.elevation.level1}); } :host([variant="outlined"]) .base { outline-width: var(--m3e-outlined-chip-outline-thickness, 1px); outline-style: solid; outline-offset: calc(0px - var(--m3e-outlined-chip-outline-thickness, 1px)); } :host(:not(:disabled):not([disabled-interactive])[variant="outlined"]) .base { outline-color: var(--m3e-outlined-chip-outline-color, ${DesignToken$1.color.outlineVariant}); } :host(:disabled[variant="outlined"]) .base, :host([disabled-interactive][variant="outlined"]) .base { outline-color: color-mix( in srgb, var(--m3e-outlined-chip-disabled-outline-color, ${DesignToken$1.color.onSurface}) var(--m3e-outlined-chip-disabled-outline-opacity, 12%), transparent ); } :host(:state(-with-icon)) .wrapper { padding-inline-start: var(--m3e-chip-with-icon-padding-start, 0.5rem); } :host(:not(:state(-with-icon))) .wrapper { padding-inline-start: var(--m3e-chip-padding-start, 1rem); } :host(:state(-with-trailing-icon)) .wrapper { padding-inline-end: var(--m3e-chip-with-icon-padding-end, 0.5rem); } :host(:not(:state(-with-trailing-icon))) .wrapper { padding-inline-end: var(--m3e-chip-padding-end, 1rem); } ::slotted([slot="icon"]), ::slotted([slot="trailing-icon"]) { flex: none; width: 1em; font-size: var(--m3e-chip-icon-size, 1.125rem) !important; } :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base { color: var(--m3e-chip-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-icon-color, ${DesignToken$1.color.primary}); } :host(:disabled) .base, :host([disabled-interactive]) .base { color: color-mix( in srgb, var(--m3e-chip-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-chip-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="icon"]), :host([disabled-interactive]) ::slotted([slot="icon"]), :host(:disabled) ::slotted([slot="trailing-icon"]), :host([disabled-interactive]) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-chip-disabled-icon-color, ${DesignToken$1.color.onSurface}) var(--m3e-chip-disabled-icon-opacity, 38%), transparent ); } :host([variant="elevated"]:disabled) .base, :host([variant="elevated"][disabled-interactive]) .base { background-color: color-mix( in srgb, var(--m3e-elevated-chip-disabled-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-elevated-chip-disabled-container-opacity, 12%), transparent ); --m3e-elevation-level: var(--m3e-elevated-chip-disabled-elevation, ${DesignToken$1.elevation.level0}); } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { transition: none; } :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base, :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: CanvasText; } :host(:not(:disabled):not([disabled-interactive])[variant="outlined"]) .base { outline-color: CanvasText; } :host(:disabled) .base, :host([disabled-interactive]) .base, :host(:disabled) ::slotted([slot="icon"]), :host([disabled-interactive]) ::slotted([slot="icon"]), :host(:disabled) ::slotted([slot="trailing-icon"]), :host([disabled-interactive]) ::slotted([slot="trailing-icon"]) { color: GrayText; } :host(:disabled[variant="outlined"]) .base, :host([disabled-interactive][variant="outlined"]) .base { outline-color: GrayText; } }`;
|
|
4452
|
-
__decorate([e$
|
|
4453
|
-
__decorate([e$
|
|
4454
|
-
__decorate([e$
|
|
4455
|
-
__decorate([e$
|
|
4728
|
+
__decorate([e$3(".elevation")], M3eChipElement.prototype, "_elevation", void 0);
|
|
4729
|
+
__decorate([e$3(".focus-ring")], M3eChipElement.prototype, "_focusRing", void 0);
|
|
4730
|
+
__decorate([e$3(".state-layer")], M3eChipElement.prototype, "_stateLayer", void 0);
|
|
4731
|
+
__decorate([e$3(".ripple")], M3eChipElement.prototype, "_ripple", void 0);
|
|
4456
4732
|
__decorate([n$1({
|
|
4457
4733
|
reflect: true
|
|
4458
4734
|
})], M3eChipElement.prototype, "variant", void 0);
|
|
@@ -4880,10 +5156,10 @@ const t$1 = globalThis,
|
|
|
4880
5156
|
s = i$1 ? i$1.createPolicy("lit-html", {
|
|
4881
5157
|
createHTML: t => t
|
|
4882
5158
|
}) : void 0,
|
|
4883
|
-
e$
|
|
5159
|
+
e$2 = "$lit$",
|
|
4884
5160
|
h = `lit$${Math.random().toFixed(9).slice(2)}$`,
|
|
4885
|
-
o$
|
|
4886
|
-
n = `<${o$
|
|
5161
|
+
o$1 = "?" + h,
|
|
5162
|
+
n = `<${o$1}>`,
|
|
4887
5163
|
r = document,
|
|
4888
5164
|
l = () => r.createComment(""),
|
|
4889
5165
|
c = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
@@ -4919,7 +5195,7 @@ const V = (t, i) => {
|
|
|
4919
5195
|
y = 0;
|
|
4920
5196
|
for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
|
|
4921
5197
|
const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
|
|
4922
|
-
l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e$
|
|
5198
|
+
l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e$2 + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
|
|
4923
5199
|
}
|
|
4924
5200
|
return [P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), o];
|
|
4925
5201
|
};
|
|
@@ -4941,7 +5217,7 @@ class N {
|
|
|
4941
5217
|
}
|
|
4942
5218
|
for (; null !== (r = C.nextNode()) && d.length < u;) {
|
|
4943
5219
|
if (1 === r.nodeType) {
|
|
4944
|
-
if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e$
|
|
5220
|
+
if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e$2)) {
|
|
4945
5221
|
const i = v[a++],
|
|
4946
5222
|
s = r.getAttribute(t).split(h),
|
|
4947
5223
|
e = /([.?@])?(.*)/.exec(i);
|
|
@@ -4968,7 +5244,7 @@ class N {
|
|
|
4968
5244
|
r.append(t[s], l());
|
|
4969
5245
|
}
|
|
4970
5246
|
}
|
|
4971
|
-
} else if (8 === r.nodeType) if (r.data === o$
|
|
5247
|
+
} else if (8 === r.nodeType) if (r.data === o$1) d.push({
|
|
4972
5248
|
type: 2,
|
|
4973
5249
|
index: c
|
|
4974
5250
|
});else {
|
|
@@ -5167,7 +5443,7 @@ j?.(N, R), (t$1.litHtmlVersions ??= []).push("3.3.1");
|
|
|
5167
5443
|
* Copyright 2018 Google LLC
|
|
5168
5444
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5169
5445
|
*/
|
|
5170
|
-
const o
|
|
5446
|
+
const o = o => o ?? E;
|
|
5171
5447
|
|
|
5172
5448
|
var _M3eInputChipElement_instances, _M3eInputChipElement_handleAvatarSlotChange, _M3eInputChipElement_handleRemoveButtonClick, _M3eInputChipElement_handleKeyDown;
|
|
5173
5449
|
/**
|
|
@@ -5275,7 +5551,7 @@ let M3eInputChipElement = class M3eInputChipElement extends EventAttribute$1(Dis
|
|
|
5275
5551
|
}
|
|
5276
5552
|
/** @inheritdoc */
|
|
5277
5553
|
render() {
|
|
5278
|
-
return html`<div class="base"><m3e-elevation class="elevation" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-elevation><m3e-state-layer class="state-layer" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-state-layer><m3e-focus-ring class="focus-ring" for="cell" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-ripple><div class="wrapper"><div id="cell" class="cell" role="gridcell" tabindex="${o
|
|
5554
|
+
return html`<div class="base"><m3e-elevation class="elevation" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-elevation><m3e-state-layer class="state-layer" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-state-layer><m3e-focus-ring class="focus-ring" for="cell" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" for="cell" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-ripple><div class="wrapper"><div id="cell" class="cell" role="gridcell" tabindex="${o(this.disabled ? undefined : "-1")}" @keydown="${__classPrivateFieldGet(this, _M3eInputChipElement_instances, "m", _M3eInputChipElement_handleKeyDown)}"><slot name="avatar" @slotchange="${__classPrivateFieldGet(this, _M3eInputChipElement_instances, "m", _M3eInputChipElement_handleAvatarSlotChange)}"></slot>${this._renderIcon()}<div class="label">${this._renderSlot()}</div><div class="touch" aria-hidden="true"></div></div>${this._renderTrailingIcon()}</div></div>`;
|
|
5279
5555
|
}
|
|
5280
5556
|
/** @internal @inheritdoc */
|
|
5281
5557
|
_renderTrailingIcon() {
|
|
@@ -5304,8 +5580,8 @@ _M3eInputChipElement_handleKeyDown = function _M3eInputChipElement_handleKeyDown
|
|
|
5304
5580
|
M3eInputChipElement.formAssociated = true;
|
|
5305
5581
|
/** The styles of the element. */
|
|
5306
5582
|
M3eInputChipElement.styles = [M3eChipElement.styles, css`.cell { display: inline-flex; align-items: center; outline: none; column-gap: var(--m3e-chip-spacing, 0.5rem); min-width: 0; } .remove-button { --m3e-icon-button-extra-small-container-height: 1.5rem; --m3e-icon-button-extra-small-icon-size: var(--m3e-chip-icon-size, 1.125rem); width: 1.5rem; } .remove-icon { flex: none; width: var(--m3e-chip-icon-size, 1.125rem); height: var(--m3e-chip-icon-size, 1.125rem); } .touch { top: calc( 0px - calc(calc(3rem - calc(var(--m3e-chip-container-height, 2rem) + ${DesignToken$1.density.calc(-2)})) / 2) ); } .wrapper { height: 100%; overflow: visible; min-width: 0; } ::slotted([slot="avatar"]) { flex: none; font-size: var(--m3e-chip-avatar-size, 1.5rem); } ::slotted(m3e-avatar[slot="avatar"]) { --m3e-icon-size: var(--m3e-chip-avatar-icon-size, 1.125rem); --m3e-avatar-size: var(--m3e-chip-avatar-size, 1.5rem); --m3e-avatar-font-size: var( --m3e-chip-avatar-font-size, ${DesignToken$1.typescale.standard.title.small.fontSize} ); --m3e-avatar-font-weight: var( --m3e-chip-avatar-font-height, ${DesignToken$1.typescale.standard.title.small.fontWeight} ); --m3e-avatar-line-height: var( --m3e-chip-avatar-line-height, ${DesignToken$1.typescale.standard.title.small.lineHeight} ); --m3e-avatar-tracking: var(--m3e-chip-avatar-tracking, ${DesignToken$1.typescale.standard.title.small.tracking}); } :host(:disabled) ::slotted([slot="avatar"]), :host([disabled-interactive]) ::slotted([slot="avatar"]) { opacity: var(--m3e-chip-disabled-avatar-opacity, 38%); color: var(--m3e-chip-disabled-icon-color, ${DesignToken$1.color.onSurface}); } :host(:state(-with-avatar)) ::slotted([slot="icon"]) { display: none; } :host(:state(-with-avatar)) .wrapper { padding-inline-start: var(--m3e-chip-with-avatar-padding-start, 0.25rem); } @media (forced-colors: active) { :host(:disabled) ::slotted([slot="avatar"]), :host([disabled-interactive]) ::slotted([slot="avatar"]) { color: CanvasText; } }`];
|
|
5307
|
-
__decorate([e$
|
|
5308
|
-
__decorate([e$
|
|
5583
|
+
__decorate([e$3(".cell")], M3eInputChipElement.prototype, "cell", void 0);
|
|
5584
|
+
__decorate([e$3(".remove-button")], M3eInputChipElement.prototype, "removeButton", void 0);
|
|
5309
5585
|
__decorate([n$1({
|
|
5310
5586
|
type: Boolean
|
|
5311
5587
|
})], M3eInputChipElement.prototype, "removable", void 0);
|
|
@@ -5529,8 +5805,13 @@ _M3eInputChipSetElement_handleChipRemove = function _M3eInputChipSetElement_hand
|
|
|
5529
5805
|
if (!__classPrivateFieldGet(this, _M3eInputChipSetElement_listKeyManager, "f").activeItem) {
|
|
5530
5806
|
__classPrivateFieldGet(this, _M3eInputChipSetElement_input, "f")?.focus();
|
|
5531
5807
|
}
|
|
5532
|
-
this.dispatchEvent(new
|
|
5533
|
-
bubbles: true
|
|
5808
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
5809
|
+
bubbles: true,
|
|
5810
|
+
detail: {
|
|
5811
|
+
type: "remove",
|
|
5812
|
+
value: chip.value,
|
|
5813
|
+
chip: chip
|
|
5814
|
+
}
|
|
5534
5815
|
}));
|
|
5535
5816
|
};
|
|
5536
5817
|
_M3eInputChipSetElement_handleChipClick = function _M3eInputChipSetElement_handleChipClick(e) {
|
|
@@ -5555,8 +5836,13 @@ async function _M3eInputChipSetElement_handleInputChange() {
|
|
|
5555
5836
|
__classPrivateFieldSet(this, _M3eInputChipSetElement_ignoreInputChange, false, "f");
|
|
5556
5837
|
}
|
|
5557
5838
|
}
|
|
5558
|
-
this.dispatchEvent(new
|
|
5559
|
-
bubbles: true
|
|
5839
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
5840
|
+
bubbles: true,
|
|
5841
|
+
detail: {
|
|
5842
|
+
type: "add",
|
|
5843
|
+
value: value,
|
|
5844
|
+
chip: chip
|
|
5845
|
+
}
|
|
5560
5846
|
}));
|
|
5561
5847
|
};
|
|
5562
5848
|
_M3eInputChipSetElement_handleInputKeyDown = function _M3eInputChipSetElement_handleInputKeyDown(e) {
|
|
@@ -6646,7 +6932,7 @@ _LongPressController_callback = new WeakMap(), _LongPressController_threshold =
|
|
|
6646
6932
|
}
|
|
6647
6933
|
};
|
|
6648
6934
|
|
|
6649
|
-
var
|
|
6935
|
+
var _MutationController_callback, _MutationController_skipInitial, _MutationController_config, _MutationController_observer, _MutationController_unobservedUpdate;
|
|
6650
6936
|
/**
|
|
6651
6937
|
* A `ReactiveController` that integrates a `MutationObserver` with an element's reactive update lifecycle
|
|
6652
6938
|
* to detect arbitrary changes to DOM, including nodes being added or removed and attributes changing.
|
|
@@ -6660,8 +6946,6 @@ class MutationController extends MonitorControllerBase {
|
|
|
6660
6946
|
constructor(host, options) {
|
|
6661
6947
|
super(host, options);
|
|
6662
6948
|
/** @private */
|
|
6663
|
-
_MutationController_host.set(this, void 0);
|
|
6664
|
-
/** @private */
|
|
6665
6949
|
_MutationController_callback.set(this, void 0);
|
|
6666
6950
|
/** @private */
|
|
6667
6951
|
_MutationController_skipInitial.set(this, false);
|
|
@@ -6671,7 +6955,6 @@ class MutationController extends MonitorControllerBase {
|
|
|
6671
6955
|
_MutationController_observer.set(this, void 0);
|
|
6672
6956
|
/** @private */
|
|
6673
6957
|
_MutationController_unobservedUpdate.set(this, true);
|
|
6674
|
-
__classPrivateFieldSet(this, _MutationController_host, host, "f");
|
|
6675
6958
|
__classPrivateFieldSet(this, _MutationController_callback, options.callback, "f");
|
|
6676
6959
|
__classPrivateFieldSet(this, _MutationController_skipInitial, options.skipInitial ?? false, "f");
|
|
6677
6960
|
__classPrivateFieldSet(this, _MutationController_config, options.config, "f");
|
|
@@ -6680,10 +6963,7 @@ class MutationController extends MonitorControllerBase {
|
|
|
6680
6963
|
console.warn("MutationController error: the browser does not support MutationObserver.");
|
|
6681
6964
|
return;
|
|
6682
6965
|
}
|
|
6683
|
-
__classPrivateFieldSet(this, _MutationController_observer, new MutationObserver((records, observer) =>
|
|
6684
|
-
__classPrivateFieldGet(this, _MutationController_callback, "f").call(this, records, observer);
|
|
6685
|
-
__classPrivateFieldGet(this, _MutationController_host, "f").requestUpdate();
|
|
6686
|
-
}), "f");
|
|
6966
|
+
__classPrivateFieldSet(this, _MutationController_observer, new MutationObserver((records, observer) => __classPrivateFieldGet(this, _MutationController_callback, "f").call(this, records, observer)), "f");
|
|
6687
6967
|
}
|
|
6688
6968
|
/** @inheritdoc */
|
|
6689
6969
|
async hostUpdated() {
|
|
@@ -6704,7 +6984,6 @@ class MutationController extends MonitorControllerBase {
|
|
|
6704
6984
|
_observe(target) {
|
|
6705
6985
|
__classPrivateFieldGet(this, _MutationController_observer, "f")?.observe(target, __classPrivateFieldGet(this, _MutationController_config, "f"));
|
|
6706
6986
|
__classPrivateFieldSet(this, _MutationController_unobservedUpdate, true, "f");
|
|
6707
|
-
__classPrivateFieldGet(this, _MutationController_host, "f").requestUpdate();
|
|
6708
6987
|
}
|
|
6709
6988
|
/** @inheritdoc */
|
|
6710
6989
|
_unobserve() {
|
|
@@ -6714,7 +6993,7 @@ class MutationController extends MonitorControllerBase {
|
|
|
6714
6993
|
}
|
|
6715
6994
|
}
|
|
6716
6995
|
}
|
|
6717
|
-
|
|
6996
|
+
_MutationController_callback = new WeakMap(), _MutationController_skipInitial = new WeakMap(), _MutationController_config = new WeakMap(), _MutationController_observer = new WeakMap(), _MutationController_unobservedUpdate = new WeakMap();
|
|
6718
6997
|
|
|
6719
6998
|
var _PressedController_instances, _PressedController_capture, _PressedController_callback, _PressedController_isPressedKey, _PressedController_pressedTargets, _PressedController_minPressedDuration, _PressedController_pointerDownHandler, _PressedController_pointerUpHandler, _PressedController_touchEndHandler, _PressedController_keyDownHandler, _PressedController_keyUpHandler, _PressedController_handlePointerDown, _PressedController_handlePointerUp, _PressedController_handleTouchEnd, _PressedController_handleKeyDown, _PressedController_handleKeyUp, _PressedController_clearPressedTargets;
|
|
6720
6999
|
/** A `ReactiveController` used to monitor the pressed state of one or more elements. */
|
|
@@ -6891,7 +7170,7 @@ _PressedController_capture = new WeakMap(), _PressedController_callback = new We
|
|
|
6891
7170
|
}
|
|
6892
7171
|
};
|
|
6893
7172
|
|
|
6894
|
-
var
|
|
7173
|
+
var _ResizeController_callback, _ResizeController_skipInitial, _ResizeController_config, _ResizeController_observer, _ResizeController_unobservedUpdate;
|
|
6895
7174
|
/** A `ReactiveController` used to monitor when an element is resized. */
|
|
6896
7175
|
class ResizeController extends MonitorControllerBase {
|
|
6897
7176
|
/**
|
|
@@ -6902,8 +7181,6 @@ class ResizeController extends MonitorControllerBase {
|
|
|
6902
7181
|
constructor(host, options) {
|
|
6903
7182
|
super(host, options);
|
|
6904
7183
|
/** @private */
|
|
6905
|
-
_ResizeController_host.set(this, void 0);
|
|
6906
|
-
/** @private */
|
|
6907
7184
|
_ResizeController_callback.set(this, void 0);
|
|
6908
7185
|
/** @private */
|
|
6909
7186
|
_ResizeController_skipInitial.set(this, void 0);
|
|
@@ -6913,7 +7190,6 @@ class ResizeController extends MonitorControllerBase {
|
|
|
6913
7190
|
_ResizeController_observer.set(this, void 0);
|
|
6914
7191
|
/** @private */
|
|
6915
7192
|
_ResizeController_unobservedUpdate.set(this, true);
|
|
6916
|
-
__classPrivateFieldSet(this, _ResizeController_host, host, "f");
|
|
6917
7193
|
__classPrivateFieldSet(this, _ResizeController_callback, options.callback, "f");
|
|
6918
7194
|
__classPrivateFieldSet(this, _ResizeController_skipInitial, options.skipInitial ?? false, "f");
|
|
6919
7195
|
__classPrivateFieldSet(this, _ResizeController_config, options.config, "f");
|
|
@@ -6922,10 +7198,7 @@ class ResizeController extends MonitorControllerBase {
|
|
|
6922
7198
|
console.warn("ResizeController error: the browser does not support ResizeObserver.");
|
|
6923
7199
|
return;
|
|
6924
7200
|
}
|
|
6925
|
-
__classPrivateFieldSet(this, _ResizeController_observer, new ResizeObserver((entries, observer) =>
|
|
6926
|
-
__classPrivateFieldGet(this, _ResizeController_callback, "f").call(this, entries, observer);
|
|
6927
|
-
__classPrivateFieldGet(this, _ResizeController_host, "f").requestUpdate();
|
|
6928
|
-
}), "f");
|
|
7201
|
+
__classPrivateFieldSet(this, _ResizeController_observer, new ResizeObserver((entries, observer) => __classPrivateFieldGet(this, _ResizeController_callback, "f").call(this, entries, observer)), "f");
|
|
6929
7202
|
}
|
|
6930
7203
|
/** @inheritdoc */
|
|
6931
7204
|
async hostUpdated() {
|
|
@@ -6941,7 +7214,6 @@ class ResizeController extends MonitorControllerBase {
|
|
|
6941
7214
|
_observe(target) {
|
|
6942
7215
|
__classPrivateFieldGet(this, _ResizeController_observer, "f")?.observe(target, __classPrivateFieldGet(this, _ResizeController_config, "f"));
|
|
6943
7216
|
__classPrivateFieldSet(this, _ResizeController_unobservedUpdate, true, "f");
|
|
6944
|
-
__classPrivateFieldGet(this, _ResizeController_host, "f").requestUpdate();
|
|
6945
7217
|
}
|
|
6946
7218
|
/**
|
|
6947
7219
|
* Stops observing the specified element.
|
|
@@ -6951,7 +7223,7 @@ class ResizeController extends MonitorControllerBase {
|
|
|
6951
7223
|
__classPrivateFieldGet(this, _ResizeController_observer, "f")?.unobserve(target);
|
|
6952
7224
|
}
|
|
6953
7225
|
}
|
|
6954
|
-
|
|
7226
|
+
_ResizeController_callback = new WeakMap(), _ResizeController_skipInitial = new WeakMap(), _ResizeController_config = new WeakMap(), _ResizeController_observer = new WeakMap(), _ResizeController_unobservedUpdate = new WeakMap();
|
|
6955
7227
|
|
|
6956
7228
|
/**
|
|
6957
7229
|
* Class decorator factory that defines the decorated class as a custom element.
|
|
@@ -7151,9 +7423,8 @@ const spaceSeparatedStringConverter = {
|
|
|
7151
7423
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7152
7424
|
*/
|
|
7153
7425
|
const t = {
|
|
7154
|
-
ATTRIBUTE: 1,
|
|
7155
|
-
|
|
7156
|
-
e$2 = t => (...e) => ({
|
|
7426
|
+
ATTRIBUTE: 1},
|
|
7427
|
+
e$1 = t => (...e) => ({
|
|
7157
7428
|
_$litDirective$: t,
|
|
7158
7429
|
values: e
|
|
7159
7430
|
});
|
|
@@ -7246,7 +7517,7 @@ class SafeStyleMapDirective extends i {
|
|
|
7246
7517
|
* @param styleInfo
|
|
7247
7518
|
* @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}
|
|
7248
7519
|
*/
|
|
7249
|
-
const safeStyleMap = e$
|
|
7520
|
+
const safeStyleMap = e$1(SafeStyleMapDirective);
|
|
7250
7521
|
|
|
7251
7522
|
/**
|
|
7252
7523
|
* Determines whether an object has keys for a given type.
|
|
@@ -7295,7 +7566,7 @@ function AttachInternals(base, formAssociated) {
|
|
|
7295
7566
|
* @returns {boolean} Whether `element` has `state`.
|
|
7296
7567
|
*/
|
|
7297
7568
|
function hasCustomState(element, state) {
|
|
7298
|
-
return
|
|
7569
|
+
return element[internals].states.has(state);
|
|
7299
7570
|
}
|
|
7300
7571
|
/**
|
|
7301
7572
|
* Convenience function used to add custom state to an element.
|
|
@@ -7303,9 +7574,8 @@ function hasCustomState(element, state) {
|
|
|
7303
7574
|
* @param {string} state The custom state to add.
|
|
7304
7575
|
*/
|
|
7305
7576
|
function addCustomState(element, state) {
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
}
|
|
7577
|
+
element[internals]?.states.add(state);
|
|
7578
|
+
element[internals]?.states.has(state); // flush
|
|
7309
7579
|
}
|
|
7310
7580
|
/**
|
|
7311
7581
|
* Convenience function used to delete custom state from an element.
|
|
@@ -7314,7 +7584,11 @@ function addCustomState(element, state) {
|
|
|
7314
7584
|
* @returns {boolean} Whether `state` was removed from `element`.
|
|
7315
7585
|
*/
|
|
7316
7586
|
function deleteCustomState(element, state) {
|
|
7317
|
-
|
|
7587
|
+
if (element[internals]?.states.delete(state)) {
|
|
7588
|
+
element[internals]?.states.has(state); // flush
|
|
7589
|
+
return true;
|
|
7590
|
+
}
|
|
7591
|
+
return false;
|
|
7318
7592
|
}
|
|
7319
7593
|
/**
|
|
7320
7594
|
* Convenience function used to add or delete custom state for an element.
|
|
@@ -9046,7 +9320,7 @@ function LinkButton(base) {
|
|
|
9046
9320
|
[(__LinkButtonMixin_instances = new WeakSet(), _a = _clickHandler, renderPseudoLink)]() {
|
|
9047
9321
|
const disabled = isDisabledMixin(this) && this.disabled;
|
|
9048
9322
|
const disabledInteractive = isDisabledInteractiveMixin(this) && this.disabledInteractive;
|
|
9049
|
-
return !disabled && !disabledInteractive && this.href ? html`<a href="${this.href}" target="${o
|
|
9323
|
+
return !disabled && !disabledInteractive && this.href ? html`<a href="${this.href}" target="${o(this.target || undefined)}" rel="${o(this.rel || undefined)}" download="${o(this.download || undefined)}" tabindex="-1" aria-hidden="true" @pointerdown="${__classPrivateFieldGet(this, __LinkButtonMixin_instances, "m", __LinkButtonMixin_handleLinkPointerDown)}" @focus="${__classPrivateFieldGet(this, __LinkButtonMixin_instances, "m", __LinkButtonMixin_handleLinkFocus)}" @blur="${__classPrivateFieldGet(this, __LinkButtonMixin_instances, "m", __LinkButtonMixin_handleLinkBlur)}"></a>` : nothing;
|
|
9050
9324
|
}
|
|
9051
9325
|
}
|
|
9052
9326
|
__LinkButtonMixin_handleLinkPointerDown = function __LinkButtonMixin_handleLinkPointerDown(e) {
|
|
@@ -9592,7 +9866,7 @@ _M3eElevationElement_handlePressedChange = function _M3eElevationElement_handleP
|
|
|
9592
9866
|
};
|
|
9593
9867
|
/** The styles of the element. */
|
|
9594
9868
|
M3eElevationElement.styles = css`:host { display: block; } :host, .shadow { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .shadow.resting, .shadow.focus, .shadow.pressed { will-change: box-shadow; transition: ${unsafeCSS(`box-shadow ${ElevationToken.settleDuration} ${ElevationToken.settleEasing};`)}; } .shadow.hover { will-change: box-shadow; transition: ${unsafeCSS(`box-shadow ${ElevationToken.liftDuration} ${ElevationToken.liftEasing};`)}; } .shadow { box-shadow: ${ElevationToken.level}; } .shadow.focus { box-shadow: ${ElevationToken.focusLevel}; } .shadow.hover { box-shadow: ${ElevationToken.hoverLevel}; } .shadow.pressed { box-shadow: ${ElevationToken.pressedLevel}; } :host([level="0"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level0}; --m3e-elevation-hover-level: ${DesignToken.elevation.level1}; } :host([level="1"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level1}; --m3e-elevation-hover-level: ${DesignToken.elevation.level2}; } :host([level="2"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level2}; --m3e-elevation-hover-level: ${DesignToken.elevation.level3}; } :host([level="3"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level3}; --m3e-elevation-hover-level: ${DesignToken.elevation.level4}; } :host([level="4"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level4}; --m3e-elevation-hover-level: ${DesignToken.elevation.level5}; } :host([level="5"]) .shadow { --m3e-elevation-level: ${DesignToken.elevation.level5}; --m3e-elevation-hover-level: ${ElevationToken.level}; } :host([level]) .shadow { --m3e-elevation-focus-level: ${ElevationToken.level}; --m3e-elevation-pressed-level: ${ElevationToken.level}; } @media (prefers-reduced-motion) { .shadow.resting, .shadow.pressed, .shadow.focus, .shadow.hover { transition: none; } } @media (forced-colors: active) { .shadow { display: none; } }`;
|
|
9595
|
-
__decorate([e$
|
|
9869
|
+
__decorate([e$3(".shadow")], M3eElevationElement.prototype, "_shadow", void 0);
|
|
9596
9870
|
__decorate([n$1({
|
|
9597
9871
|
type: Boolean,
|
|
9598
9872
|
reflect: true
|
|
@@ -9738,7 +10012,7 @@ _M3eFocusRingElement_handleFocusChange = function _M3eFocusRingElement_handleFoc
|
|
|
9738
10012
|
};
|
|
9739
10013
|
/** The styles of the element. */
|
|
9740
10014
|
M3eFocusRingElement.styles = css`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; outline: none; } .outline { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; z-index: 1; outline-color: ${FocusRingToken.color}; outline-width: ${FocusRingToken.thickness}; visibility: ${FocusRingToken.visibility}; } .outline.visible { outline-style: solid; } :host(:not([inward])) .outline { outline-offset: ${FocusRingToken.outwardOffset}; } :host([inward]) .outline { outline-offset: calc(${FocusRingToken.inwardOffset} - ${FocusRingToken.thickness}); } :host(:not([inward])) .outline.visible { animation: grow-shrink ${FocusRingToken.duration}; } :host([inward]) .outline.visible { animation: shrink-grow ${FocusRingToken.duration}; } @keyframes grow-shrink { 50% { outline-width: calc(${FocusRingToken.thickness} * ${FocusRingToken.growthFactor}); } } @keyframes shrink-grow { 50% { outline-offset: calc( ${FocusRingToken.inwardOffset} - calc(${FocusRingToken.thickness} * ${FocusRingToken.growthFactor}) ); outline-width: calc(${FocusRingToken.thickness} * ${FocusRingToken.growthFactor}); } } @media (prefers-reduced-motion) { :host(:not([inward])) .outline.visible, :host([inward]) .outline.visible { animation: none; } } @media (forced-colors: active) { .outline { outline-color: Highlight; } }`;
|
|
9741
|
-
__decorate([e$
|
|
10015
|
+
__decorate([e$3(".outline")], M3eFocusRingElement.prototype, "_outline", void 0);
|
|
9742
10016
|
__decorate([n$1({
|
|
9743
10017
|
type: Boolean,
|
|
9744
10018
|
reflect: true
|
|
@@ -10385,7 +10659,7 @@ _M3eStateLayerElement_handleFocusChange = function _M3eStateLayerElement_handleF
|
|
|
10385
10659
|
};
|
|
10386
10660
|
/** The styles of the element. */
|
|
10387
10661
|
M3eStateLayerElement.styles = css`:host { display: block; } :host, .layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .layer { will-change: background-color; transition: ${unsafeCSS(`background-color ${StateLayerToken.duration} ${StateLayerToken.easing}`)}; } .layer.focused { background-color: color-mix(in srgb, ${StateLayerToken.focusColor} ${StateLayerToken.focusOpacity}, transparent); } .layer.hover { background-color: color-mix(in srgb, ${StateLayerToken.hoverColor} ${StateLayerToken.hoverOpacity}, transparent); } @media (prefers-reduced-motion) { .layer { transition: none; } } @media (forced-colors: active) { .layer { display: none; } }`;
|
|
10388
|
-
__decorate([e$
|
|
10662
|
+
__decorate([e$3(".layer")], M3eStateLayerElement.prototype, "_layer", void 0);
|
|
10389
10663
|
__decorate([n$1({
|
|
10390
10664
|
type: Boolean,
|
|
10391
10665
|
reflect: true
|
|
@@ -10397,41 +10671,6 @@ __decorate([n$1({
|
|
|
10397
10671
|
})], M3eStateLayerElement.prototype, "disableHover", void 0);
|
|
10398
10672
|
M3eStateLayerElement = __decorate([customElement("m3e-state-layer")], M3eStateLayerElement);
|
|
10399
10673
|
|
|
10400
|
-
/**
|
|
10401
|
-
* An inline container which presents an ellipsis when content overflows.
|
|
10402
|
-
*
|
|
10403
|
-
* @description
|
|
10404
|
-
* The `m3e-text-overflow` component truncates inline content with an ellipsis when it
|
|
10405
|
-
* exceeds the available width. It's intended for use inside flex or otherwise
|
|
10406
|
-
* constrained containers to preserve layout while providing predictable, single-line
|
|
10407
|
-
* truncation behavior for long text.
|
|
10408
|
-
*
|
|
10409
|
-
* @example
|
|
10410
|
-
* A typical usage inside a flex container where the heading and trailing actions are
|
|
10411
|
-
* constrained, allowing the center text to truncate with an ellipsis.
|
|
10412
|
-
*
|
|
10413
|
-
* ```html
|
|
10414
|
-
* <div style="display:flex;align-items:center;gap:12px;">
|
|
10415
|
-
* <m3e-icon name="menu"></m3e-icon>
|
|
10416
|
-
* <m3e-text-overflow>Very long title or breadcrumb that should truncate gracefully</m3e-text-overflow>
|
|
10417
|
-
* <m3e-icon name="more_vert"></m3e-icon>
|
|
10418
|
-
* </div>
|
|
10419
|
-
* ```
|
|
10420
|
-
*
|
|
10421
|
-
* @tag m3e-text-overflow
|
|
10422
|
-
*
|
|
10423
|
-
* @slot - Renders the content to truncate with an ellipsis.
|
|
10424
|
-
*/
|
|
10425
|
-
let M3eTextOverflowElement = class M3eTextOverflowElement extends LitElement {
|
|
10426
|
-
/** @inheritdoc */
|
|
10427
|
-
render() {
|
|
10428
|
-
return html`<span class="base"><slot></slot></span>`;
|
|
10429
|
-
}
|
|
10430
|
-
};
|
|
10431
|
-
/** The styles of the element. */
|
|
10432
|
-
M3eTextOverflowElement.styles = css`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
|
|
10433
|
-
M3eTextOverflowElement = __decorate([customElement("m3e-text-overflow")], M3eTextOverflowElement);
|
|
10434
|
-
|
|
10435
10674
|
var _M3eTextHighlightElement_instances, _M3eTextHighlightElement_id, _M3eTextHighlightElement_ranges, _M3eTextHighlightElement_styles, _M3eTextHighlightElement_isTextNode, _M3eTextHighlightElement_findTextNodes, _M3eTextHighlightElement_highlight;
|
|
10436
10675
|
var M3eTextHighlightElement_1;
|
|
10437
10676
|
/**
|
|
@@ -10455,8 +10694,9 @@ var M3eTextHighlightElement_1;
|
|
|
10455
10694
|
*
|
|
10456
10695
|
* @slot - Renders the content to highlight.
|
|
10457
10696
|
*
|
|
10458
|
-
* @attr case-sensitive -
|
|
10697
|
+
* @attr case-sensitive - Whether matching is case sensitive.
|
|
10459
10698
|
* @attr disabled - A value indicating whether text highlighting is disabled.
|
|
10699
|
+
* @attr mode - The mode in which to highlight text.
|
|
10460
10700
|
* @attr term - The term to highlight.
|
|
10461
10701
|
*
|
|
10462
10702
|
* @fires highlight - Emitted when content is highlighted.
|
|
@@ -10487,10 +10727,15 @@ let M3eTextHighlightElement = M3eTextHighlightElement_1 = class M3eTextHighlight
|
|
|
10487
10727
|
*/
|
|
10488
10728
|
this.term = "";
|
|
10489
10729
|
/**
|
|
10490
|
-
*
|
|
10730
|
+
* Whether matching is case sensitive.
|
|
10491
10731
|
* @default false
|
|
10492
10732
|
*/
|
|
10493
10733
|
this.caseSensitive = false;
|
|
10734
|
+
/**
|
|
10735
|
+
* The mode in which to highlight text.
|
|
10736
|
+
* @default "contains"
|
|
10737
|
+
*/
|
|
10738
|
+
this.mode = "contains";
|
|
10494
10739
|
if (this.isSupported) {
|
|
10495
10740
|
__classPrivateFieldSet(this, _M3eTextHighlightElement_styles, new CSSStyleSheet(), "f");
|
|
10496
10741
|
__classPrivateFieldGet(this, _M3eTextHighlightElement_styles, "f").replaceSync(css`::highlight(${unsafeCSS(__classPrivateFieldGet(this, _M3eTextHighlightElement_id, "f"))}) { background-color: var(--m3e-text-highlight-container-color, ${DesignToken.color.secondaryContainer}); color: var(--m3e-text-highlight-color, ${DesignToken.color.onSecondaryContainer}); text-decoration: var(--m3e-text-highlight-decoration); text-shadow: var(--m3e-text-highlight-shadow); }`.toString());
|
|
@@ -10528,11 +10773,11 @@ _M3eTextHighlightElement_ranges = new WeakMap();
|
|
|
10528
10773
|
_M3eTextHighlightElement_styles = new WeakMap();
|
|
10529
10774
|
_M3eTextHighlightElement_instances = new WeakSet();
|
|
10530
10775
|
_M3eTextHighlightElement_isTextNode = function _M3eTextHighlightElement_isTextNode(node) {
|
|
10531
|
-
return
|
|
10776
|
+
return !/^\s*$/.test(node.data);
|
|
10532
10777
|
};
|
|
10533
10778
|
_M3eTextHighlightElement_findTextNodes = function _M3eTextHighlightElement_findTextNodes(parent, nodes) {
|
|
10534
10779
|
if (parent instanceof HTMLSlotElement) {
|
|
10535
|
-
parent.
|
|
10780
|
+
parent.assignedNodes({
|
|
10536
10781
|
flatten: true
|
|
10537
10782
|
}).forEach(x => {
|
|
10538
10783
|
switch (x.nodeType) {
|
|
@@ -10576,33 +10821,65 @@ _M3eTextHighlightElement_highlight = function _M3eTextHighlightElement_highlight
|
|
|
10576
10821
|
}
|
|
10577
10822
|
const texts = new Array();
|
|
10578
10823
|
__classPrivateFieldGet(this, _M3eTextHighlightElement_instances, "m", _M3eTextHighlightElement_findTextNodes).call(this, this, texts);
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10824
|
+
if (texts.length > 0) {
|
|
10825
|
+
const term = !this.caseSensitive ? this.term.toLowerCase() : this.term;
|
|
10826
|
+
switch (this.mode) {
|
|
10827
|
+
case "starts-with":
|
|
10828
|
+
{
|
|
10829
|
+
const first = texts[0];
|
|
10830
|
+
const text = (this.caseSensitive ? first.textContent : first.textContent?.toLowerCase()) ?? "";
|
|
10831
|
+
if (text.startsWith(term)) {
|
|
10832
|
+
const range = new Range();
|
|
10833
|
+
range.setStart(first, 0);
|
|
10834
|
+
range.setEnd(first, term.length);
|
|
10835
|
+
__classPrivateFieldGet(this, _M3eTextHighlightElement_ranges, "f").push(range);
|
|
10836
|
+
}
|
|
10837
|
+
}
|
|
10838
|
+
break;
|
|
10839
|
+
case "ends-with":
|
|
10840
|
+
{
|
|
10841
|
+
const last = texts[texts.length - 1];
|
|
10842
|
+
const text = (this.caseSensitive ? last.textContent : last.textContent?.toLowerCase()) ?? "";
|
|
10843
|
+
if (text.endsWith(term)) {
|
|
10844
|
+
const start = text.length - term.length;
|
|
10845
|
+
const end = start + term.length;
|
|
10846
|
+
const range = new Range();
|
|
10847
|
+
range.setStart(last, start);
|
|
10848
|
+
range.setEnd(last, end);
|
|
10849
|
+
__classPrivateFieldGet(this, _M3eTextHighlightElement_ranges, "f").push(range);
|
|
10850
|
+
}
|
|
10851
|
+
}
|
|
10852
|
+
break;
|
|
10853
|
+
case "contains":
|
|
10854
|
+
__classPrivateFieldSet(this, _M3eTextHighlightElement_ranges, texts.map(x => {
|
|
10855
|
+
return {
|
|
10856
|
+
el: x,
|
|
10857
|
+
text: (!this.caseSensitive ? x.textContent?.toLowerCase() : x.textContent) ?? ""
|
|
10858
|
+
};
|
|
10859
|
+
}).map(({
|
|
10860
|
+
el,
|
|
10861
|
+
text
|
|
10862
|
+
}) => {
|
|
10863
|
+
const indices = new Array();
|
|
10864
|
+
let startPos = 0;
|
|
10865
|
+
while (startPos < text.length) {
|
|
10866
|
+
const index = text.indexOf(term, startPos);
|
|
10867
|
+
if (index === -1) break;
|
|
10868
|
+
indices.push(index);
|
|
10869
|
+
startPos = index + term.length;
|
|
10870
|
+
}
|
|
10871
|
+
return indices.map(index => {
|
|
10872
|
+
const range = new Range();
|
|
10873
|
+
range.setStart(el, index);
|
|
10874
|
+
range.setEnd(el, index + term.length);
|
|
10875
|
+
return range;
|
|
10876
|
+
});
|
|
10877
|
+
}).flat(), "f");
|
|
10878
|
+
break;
|
|
10879
|
+
}
|
|
10880
|
+
if (__classPrivateFieldGet(this, _M3eTextHighlightElement_ranges, "f").length > 0) {
|
|
10881
|
+
CSS.highlights.set(__classPrivateFieldGet(this, _M3eTextHighlightElement_id, "f"), new Highlight(...__classPrivateFieldGet(this, _M3eTextHighlightElement_ranges, "f")));
|
|
10882
|
+
}
|
|
10606
10883
|
}
|
|
10607
10884
|
this.dispatchEvent(new CustomEvent("highlight", {
|
|
10608
10885
|
detail: [...__classPrivateFieldGet(this, _M3eTextHighlightElement_ranges, "f")],
|
|
@@ -10623,8 +10900,44 @@ __decorate([n$1({
|
|
|
10623
10900
|
attribute: "case-sensitive",
|
|
10624
10901
|
type: Boolean
|
|
10625
10902
|
})], M3eTextHighlightElement.prototype, "caseSensitive", void 0);
|
|
10903
|
+
__decorate([n$1()], M3eTextHighlightElement.prototype, "mode", void 0);
|
|
10626
10904
|
M3eTextHighlightElement = M3eTextHighlightElement_1 = __decorate([customElement("m3e-text-highlight")], M3eTextHighlightElement);
|
|
10627
10905
|
|
|
10906
|
+
/**
|
|
10907
|
+
* An inline container which presents an ellipsis when content overflows.
|
|
10908
|
+
*
|
|
10909
|
+
* @description
|
|
10910
|
+
* The `m3e-text-overflow` component truncates inline content with an ellipsis when it
|
|
10911
|
+
* exceeds the available width. It's intended for use inside flex or otherwise
|
|
10912
|
+
* constrained containers to preserve layout while providing predictable, single-line
|
|
10913
|
+
* truncation behavior for long text.
|
|
10914
|
+
*
|
|
10915
|
+
* @example
|
|
10916
|
+
* A typical usage inside a flex container where the heading and trailing actions are
|
|
10917
|
+
* constrained, allowing the center text to truncate with an ellipsis.
|
|
10918
|
+
*
|
|
10919
|
+
* ```html
|
|
10920
|
+
* <div style="display:flex;align-items:center;gap:12px;">
|
|
10921
|
+
* <m3e-icon name="menu"></m3e-icon>
|
|
10922
|
+
* <m3e-text-overflow>Very long title or breadcrumb that should truncate gracefully</m3e-text-overflow>
|
|
10923
|
+
* <m3e-icon name="more_vert"></m3e-icon>
|
|
10924
|
+
* </div>
|
|
10925
|
+
* ```
|
|
10926
|
+
*
|
|
10927
|
+
* @tag m3e-text-overflow
|
|
10928
|
+
*
|
|
10929
|
+
* @slot - Renders the content to truncate with an ellipsis.
|
|
10930
|
+
*/
|
|
10931
|
+
let M3eTextOverflowElement = class M3eTextOverflowElement extends LitElement {
|
|
10932
|
+
/** @inheritdoc */
|
|
10933
|
+
render() {
|
|
10934
|
+
return html`<span class="base"><slot></slot></span>`;
|
|
10935
|
+
}
|
|
10936
|
+
};
|
|
10937
|
+
/** The styles of the element. */
|
|
10938
|
+
M3eTextOverflowElement.styles = css`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
|
|
10939
|
+
M3eTextOverflowElement = __decorate([customElement("m3e-text-overflow")], M3eTextOverflowElement);
|
|
10940
|
+
|
|
10628
10941
|
/**
|
|
10629
10942
|
* An element, nested within a clickable element, used to close a parenting dialog.
|
|
10630
10943
|
* @tag m3e-dialog-action
|
|
@@ -10830,7 +11143,7 @@ let M3eDialogElement = M3eDialogElement_1 = class M3eDialogElement extends Event
|
|
|
10830
11143
|
}
|
|
10831
11144
|
/** @inheritdoc */
|
|
10832
11145
|
render() {
|
|
10833
|
-
return html`<dialog class="base" role="${o
|
|
11146
|
+
return html`<dialog class="base" role="${o(this.alert ? "alertdialog" : undefined)}" aria-labelledby="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header" .returnvalue="${this.returnValue}" @close="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClose)}" @cancel="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleCancel)}" @click="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClick)}" @keydown="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleKeyDown)}"><m3e-elevation level="3"></m3e-elevation><m3e-focus-trap ?disabled="${this.noFocusTrap}"><div class="header"><slot name="header" id="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header"></slot>${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_renderCloseButton).call(this)}</div><m3e-scroll-container class="content" dividers="${this._withActions ? "above-below" : "above"}"><slot></slot></m3e-scroll-container><div class="actions"><slot name="actions" @slotchange="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleActionsSlotChange)}"></slot></div></m3e-focus-trap></dialog>`;
|
|
10834
11147
|
}
|
|
10835
11148
|
};
|
|
10836
11149
|
_M3eDialogElement_id = new WeakMap();
|
|
@@ -10894,8 +11207,8 @@ M3eDialogElement.styles = css`:host { display: contents; } .base { font: inherit
|
|
|
10894
11207
|
/** @private */
|
|
10895
11208
|
M3eDialogElement.__nextId = 0;
|
|
10896
11209
|
__decorate([r$1()], M3eDialogElement.prototype, "_withActions", void 0);
|
|
10897
|
-
__decorate([e$
|
|
10898
|
-
__decorate([e$
|
|
11210
|
+
__decorate([e$3(".base")], M3eDialogElement.prototype, "_base", void 0);
|
|
11211
|
+
__decorate([e$3(".content")], M3eDialogElement.prototype, "_content", void 0);
|
|
10899
11212
|
__decorate([n$1({
|
|
10900
11213
|
type: Boolean
|
|
10901
11214
|
})], M3eDialogElement.prototype, "alert", void 0);
|
|
@@ -11648,8 +11961,8 @@ _M3eExpansionHeaderElement_renderToggle = function _M3eExpansionHeaderElement_re
|
|
|
11648
11961
|
};
|
|
11649
11962
|
/** The styles of the element. */
|
|
11650
11963
|
M3eExpansionHeaderElement.styles = ExpansionHeaderStyle;
|
|
11651
|
-
__decorate([e$
|
|
11652
|
-
__decorate([e$
|
|
11964
|
+
__decorate([e$3(".focus-ring")], M3eExpansionHeaderElement.prototype, "_focusRing", void 0);
|
|
11965
|
+
__decorate([e$3(".state-layer")], M3eExpansionHeaderElement.prototype, "_stateLayer", void 0);
|
|
11653
11966
|
__decorate([n$1({
|
|
11654
11967
|
attribute: "toggle-direction",
|
|
11655
11968
|
reflect: true
|
|
@@ -11864,7 +12177,7 @@ _M3eExpansionPanelElement_updateHeaderToggleRotation = function _M3eExpansionPan
|
|
|
11864
12177
|
M3eExpansionPanelElement.styles = ExpansionPanelStyle;
|
|
11865
12178
|
/** @private */
|
|
11866
12179
|
M3eExpansionPanelElement.__nextId = 0;
|
|
11867
|
-
__decorate([e$
|
|
12180
|
+
__decorate([e$3("m3e-expansion-header")], M3eExpansionPanelElement.prototype, "_header", void 0);
|
|
11868
12181
|
__decorate([n$1({
|
|
11869
12182
|
type: Boolean,
|
|
11870
12183
|
reflect: true
|
|
@@ -12925,11 +13238,11 @@ _M3eFabElement_handleSlotChange = function _M3eFabElement_handleSlotChange() {
|
|
|
12925
13238
|
};
|
|
12926
13239
|
/** The styles of the element. */
|
|
12927
13240
|
M3eFabElement.styles = [FabSizeStyle, FabVariantStyle, FabStyle];
|
|
12928
|
-
__decorate([e$
|
|
12929
|
-
__decorate([e$
|
|
12930
|
-
__decorate([e$
|
|
12931
|
-
__decorate([e$
|
|
12932
|
-
__decorate([e$
|
|
13241
|
+
__decorate([e$3(".base")], M3eFabElement.prototype, "_base", void 0);
|
|
13242
|
+
__decorate([e$3(".elevation")], M3eFabElement.prototype, "_elevation", void 0);
|
|
13243
|
+
__decorate([e$3(".focus-ring")], M3eFabElement.prototype, "_focusRing", void 0);
|
|
13244
|
+
__decorate([e$3(".state-layer")], M3eFabElement.prototype, "_stateLayer", void 0);
|
|
13245
|
+
__decorate([e$3(".ripple")], M3eFabElement.prototype, "_ripple", void 0);
|
|
12933
13246
|
__decorate([n$1({
|
|
12934
13247
|
reflect: true
|
|
12935
13248
|
})], M3eFabElement.prototype, "variant", void 0);
|
|
@@ -13032,10 +13345,10 @@ _M3eFabMenuItemElement_handleClick = function _M3eFabMenuItemElement_handleClick
|
|
|
13032
13345
|
};
|
|
13033
13346
|
/** The styles of the element. */
|
|
13034
13347
|
M3eFabMenuItemElement.styles = css`:host { display: inline-block; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; height: var(--m3e-fab-menu-item-height, 3.5rem); font-size: var(--m3e-fab-menu-item-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-fab-menu-item-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-fab-menu-item-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-fab-menu-item-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); border-radius: var(--m3e-fab-menu-item-shape, ${DesignToken$1.shape.corner.full}); } :host(:not(:disabled)) .label, :host(:not(:disabled)) .icon { color: var(--_fab-menu-item-color); } :host(:not(:disabled)) .base { background-color: var(--_fab-menu-item-container-color); --m3e-state-layer-hover-color: var(--_fab-menu-background-hover-color); --m3e-state-layer-focus-color: var(--_fab-menu-background-focus-color); --m3e-ripple-color: var(--_fab-menu-ripple-color); } :host(:disabled) .base { background-color: color-mix( in srgb, var(--m3e-fab-menu-item-disabled-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-fab-menu-item-disabled-container-opacity, 10%), transparent ); } :host(:disabled) .label, :host(:disabled) .icon { color: color-mix( in srgb, var(--m3e-fab-menu-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-fab-menu-item-disabled-opacity, 38%), transparent ); } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; padding-inline-start: var(--m3e-fab-menu-item-leading-space, 1.5rem); padding-inline-end: var(--m3e-fab-menu-item-trailing-space, 1.5rem); column-gap: var(--m3e-fab-menu-item-spacing, 0.5rem); } .label { justify-self: center; flex: 1 1 auto; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .icon { font-size: var(--m3e-fab-menu-item-icon-size, 1.5rem); transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled)) { cursor: pointer; } ::slotted([slot="icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]) { width: 1em; height: 1em; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (prefers-reduced-motion) { .base, .label, .icon { transition: none; } } @media (forced-colors: active) { .base, .label, .icon { transition: none; } :host(:not(:disabled)) .base { background-color: Menu; } :host(:not(:disabled)) .label, :host(:not(:disabled)) .icon { color: MenuText; } :host(:disabled) .label, :host(:disabled) .icon { color: GrayText; } }`;
|
|
13035
|
-
__decorate([e$
|
|
13036
|
-
__decorate([e$
|
|
13037
|
-
__decorate([e$
|
|
13038
|
-
__decorate([e$
|
|
13348
|
+
__decorate([e$3(".elevation")], M3eFabMenuItemElement.prototype, "_elevation", void 0);
|
|
13349
|
+
__decorate([e$3(".focus-ring")], M3eFabMenuItemElement.prototype, "_focusRing", void 0);
|
|
13350
|
+
__decorate([e$3(".state-layer")], M3eFabMenuItemElement.prototype, "_stateLayer", void 0);
|
|
13351
|
+
__decorate([e$3(".ripple")], M3eFabMenuItemElement.prototype, "_ripple", void 0);
|
|
13039
13352
|
M3eFabMenuItemElement = __decorate([customElement$1("m3e-fab-menu-item")], M3eFabMenuItemElement);
|
|
13040
13353
|
|
|
13041
13354
|
var _M3eFabMenuElement_instances, _M3eFabMenuElement_fabTabIndex, _M3eFabMenuElement_trigger, _M3eFabMenuElement_anchoringCleanup, _M3eFabMenuElement_listManager, _M3eFabMenuElement_keyDownHandler, _M3eFabMenuElement_documentClickHandler, _M3eFabMenuElement_scrollController, _M3eFabMenuElement_toggleHandler, _M3eFabMenuElement_handleSlotChange, _M3eFabMenuElement_handleKeyDown, _M3eFabMenuElement_handleDocumentClick, _M3eFabMenuElement_attachFab, _M3eFabMenuElement_detachFab;
|
|
@@ -13788,10 +14101,10 @@ M3eFormFieldElement.styles = css`:host { display: inline-flex; flex-direction: c
|
|
|
13788
14101
|
line-height ${DesignToken$1.motion.duration.short4}`)}; } :host(:state(-with-select)) .label { margin-inline-end: 1.5rem; } ::slotted([slot="label"]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .subscript { display: inline-flex; width: 100%; margin-top: 0.25rem; font-size: var(--m3e-form-field-subscript-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${DesignToken$1.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${DesignToken$1.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${DesignToken$1.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(:state(-invalid))) .subscript { opacity: 0; margin-top: 0px; margin-bottom: 0.25rem; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short4},
|
|
13789
14102
|
margin-top ${DesignToken$1.motion.duration.short4},
|
|
13790
14103
|
margin-bottom ${DesignToken$1.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:state(-invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:state(-invalid)):state(-pressed)) .subscript { opacity: 1; margin-top: 0.25rem; margin-bottom: 0; } :host(:state(-invalid)) .hint { display: none; } :host(:not(:state(-invalid))) .error { display: none; } ::slotted(input), ::slotted(textarea), ::slotted(select) { outline: unset; border: unset; background-color: transparent; box-shadow: none; font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(:state(-float-label)):not(:state(-pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:state(-float-label)):state(-with-label)) .prefix-text, :host([float-label="auto"]:not(:state(-float-label)):state(-with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:state(-with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:state(-with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:state(-with-suffix):state(-with-select)) .suffix { margin-inline-start: unset; } :host(:state(-with-select)) .suffix-text { display: none; } :host([variant="outlined"]) .label { margin-top: calc(0px - var(--_form-field-label-line-height) / 2); } :host([variant="outlined"]) .outline { position: absolute; display: flex; pointer-events: none; left: 0; top: 0; bottom: 0; right: 0; } :host([variant="outlined"]) .pseudo-label { visibility: hidden; margin-inline-end: 0.5rem; font-size: var(--_form-field-label-font-size); line-height: var(--_form-field-label-line-height); letter-spacing: var(--_form-field-label-tracking); max-width: 100%; transition-property: max-width, margin-inline-end; transition-duration: 1ms; } :host([variant="outlined"]:state(-required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host([variant="outlined"][float-label="auto"]:not(:state(-float-label)):not(:state(-pressed))) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${DesignToken$1.motion.duration.short2}; } :host([variant="outlined"]) .outline-start, :host([variant="outlined"]) .outline-notch, :host([variant="outlined"]) .outline-end { box-sizing: border-box; border-width: var(--_form-field-outline-size, 1px); border-color: var(--_form-field-outline-color); transition: border-color ${DesignToken$1.motion.duration.short4}; } :host([variant="outlined"]:not(:state(-with-label))) .outline-notch { display: none; } :host([variant="outlined"]) .outline-start { min-width: 0.75rem; border-top-style: solid; border-inline-start-style: solid; border-bottom-style: solid; border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken$1.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken$1.shape.corner.extraSmall}); } :host([variant="outlined"]) .outline-notch { border-bottom-style: solid; } :host([variant="outlined"]) .outline-end { flex-grow: 1; min-width: 1rem; border-top-style: solid; border-inline-end-style: solid; border-bottom-style: solid; border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken$1.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken$1.shape.corner.extraSmall}); } :host([variant="outlined"]:state(-with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:state(-disabled))) .base:hover .outline, :host([variant="outlined"]:not(:state(-disabled)):focus-within) .outline, :host([variant="outlined"]:not(:state(-disabled)):state(-pressed)) .outline { --_form-field-outline-size: 2px; } :host([variant="outlined"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="outlined"]) .content { min-height: calc(3.5rem + ${DesignToken$1.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize} ); } :host([variant="outlined"][float-label="auto"]:not(:state(-float-label)):not(:state(-pressed))) .label { margin-top: unset; line-height: calc(3.5rem + ${DesignToken$1.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize} ); } :host([variant="filled"]) .base { --_select-arrow-margin-top: calc( 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1)) ); } :host([variant="filled"]) .base::before { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; border-bottom-style: solid; border-width: 1px; border-radius: var(--m3e-form-field-container-shape, ${DesignToken$1.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(:state(-disabled))) .base:hover::before, :host([variant="filled"]:not(:state(-disabled)):focus-within) .base::before, :host([variant="filled"]:not(:state(-disabled)):state(-pressed)) .base::before { border-width: 3px; } :host([variant="filled"]) .base::after { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--_form-field-hover-container-color); transition: background-color ${DesignToken$1.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${DesignToken$1.density.calc(-2)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: calc(0.5rem + ${DesignToken$1.density.calc(-2)}); } :host([variant="filled"][float-label="auto"]:not(:state(-float-label)):not(:state(-pressed))) .label { top: 0px; line-height: calc(3.5rem + ${DesignToken$1.density.calc(-2)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize} ); } :host(:not(:state(-disabled)):not(:focus-within):not(:state(-pressed))) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(:state(-disabled)):not(:state(-invalid))) { color: var(--m3e-form-field-color, ${DesignToken$1.color.onSurface}); } :host([variant="outlined"]:not(:state(-disabled)):not(:state(-invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken$1.color.outline}); } :host([variant="filled"]:not(:state(-disabled)):not(:state(-invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host([variant="outlined"]:not(:state(-disabled)):not(:state(-invalid)):focus-within) .base, :host([variant="outlined"]:not(:state(-disabled)):not(:state(-invalid)):state(-pressed)) .base, :host([variant="filled"]:not(:state(-disabled)):not(:state(-invalid)):focus-within) .base, :host([variant="filled"]:not(:state(-disabled)):not(:state(-invalid)):state(-pressed)) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${DesignToken$1.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${DesignToken$1.color.primary}); } :host(:not(:state(-disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${DesignToken$1.color.surfaceContainerHighest} ); } :host(:not(:state(-disabled)):state(-invalid)) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${DesignToken$1.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${DesignToken$1.color.error}); } :host(:not(:state(-disabled)):state(-invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${DesignToken$1.color.error}); } :host(:state(-disabled)) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(:state(-disabled)) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(:state(-no-animate)) *, :host(:state(-no-animate)) *::before, :host(:state(-no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:state(-disabled)) { --_form-field-input-color: GrayText; --_form-field-color: GrayText; --_form-field-label-color: GrayText; --_form-field-outline-color: GrayText; } } @media (prefers-reduced-motion) { .base::before, .prefix-text, .suffix-text, .label, .subscript, .outline-start, .outline-notch, .outline-end, .pseudo-label { transition: none !important; } }`;
|
|
13791
|
-
__decorate([e$
|
|
13792
|
-
__decorate([e$
|
|
13793
|
-
__decorate([e$
|
|
13794
|
-
__decorate([e$
|
|
14104
|
+
__decorate([e$3(".base")], M3eFormFieldElement.prototype, "_base", void 0);
|
|
14105
|
+
__decorate([e$3(".prefix")], M3eFormFieldElement.prototype, "_prefix", void 0);
|
|
14106
|
+
__decorate([e$3(".error")], M3eFormFieldElement.prototype, "_error", void 0);
|
|
14107
|
+
__decorate([e$3(".hint")], M3eFormFieldElement.prototype, "_hint", void 0);
|
|
13795
14108
|
__decorate([r$1()], M3eFormFieldElement.prototype, "_pseudoLabel", void 0);
|
|
13796
14109
|
__decorate([r$1()], M3eFormFieldElement.prototype, "_required", void 0);
|
|
13797
14110
|
__decorate([r$1()], M3eFormFieldElement.prototype, "_invalid", void 0);
|
|
@@ -14096,7 +14409,7 @@ let M3eIconElement = class M3eIconElement extends Role$1(LitElement, "img") {
|
|
|
14096
14409
|
};
|
|
14097
14410
|
/** The styles of the element. */
|
|
14098
14411
|
M3eIconElement.styles = css`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; }`;
|
|
14099
|
-
__decorate([e$
|
|
14412
|
+
__decorate([e$3(".icon")], M3eIconElement.prototype, "_icon", void 0);
|
|
14100
14413
|
__decorate([n$1()], M3eIconElement.prototype, "name", void 0);
|
|
14101
14414
|
__decorate([n$1({
|
|
14102
14415
|
reflect: true
|
|
@@ -15124,11 +15437,11 @@ _M3eIconButtonElement_handleSelectedIconSlotChange = function _M3eIconButtonElem
|
|
|
15124
15437
|
};
|
|
15125
15438
|
/** The styles of the element. */
|
|
15126
15439
|
M3eIconButtonElement.styles = [IconButtonSizeStyle, IconButtonVariantStyle, IconButtonStyle];
|
|
15127
|
-
__decorate([e$
|
|
15128
|
-
__decorate([e$
|
|
15129
|
-
__decorate([e$
|
|
15130
|
-
__decorate([e$
|
|
15131
|
-
__decorate([e$
|
|
15440
|
+
__decorate([e$3(".base")], M3eIconButtonElement.prototype, "_base", void 0);
|
|
15441
|
+
__decorate([e$3(".elevation")], M3eIconButtonElement.prototype, "_elevation", void 0);
|
|
15442
|
+
__decorate([e$3(".focus-ring")], M3eIconButtonElement.prototype, "_focusRing", void 0);
|
|
15443
|
+
__decorate([e$3(".state-layer")], M3eIconButtonElement.prototype, "_stateLayer", void 0);
|
|
15444
|
+
__decorate([e$3(".ripple")], M3eIconButtonElement.prototype, "_ripple", void 0);
|
|
15132
15445
|
__decorate([n$1({
|
|
15133
15446
|
reflect: true
|
|
15134
15447
|
})], M3eIconButtonElement.prototype, "variant", void 0);
|
|
@@ -15688,7 +16001,7 @@ __decorate([n$1({
|
|
|
15688
16001
|
type: Boolean,
|
|
15689
16002
|
reflect: true
|
|
15690
16003
|
})], M3eExpandableListItemElement.prototype, "open", void 0);
|
|
15691
|
-
__decorate([e$
|
|
16004
|
+
__decorate([e$3(".header")], M3eExpandableListItemElement.prototype, "button", void 0);
|
|
15692
16005
|
M3eExpandableListItemElement = M3eExpandableListItemElement_1 = __decorate([customElement$1("m3e-expandable-list-item")], M3eExpandableListItemElement);
|
|
15693
16006
|
|
|
15694
16007
|
var _M3eActionListElement_keyDownHandler, _a$8;
|
|
@@ -15881,7 +16194,7 @@ let M3eListActionElement = class M3eListActionElement extends LinkButton$1(M3eLi
|
|
|
15881
16194
|
}
|
|
15882
16195
|
/** @inheritdoc */
|
|
15883
16196
|
render() {
|
|
15884
|
-
return html`<m3e-list-item-button class="button" ?disabled="${this.disabled}" href="${o
|
|
16197
|
+
return html`<m3e-list-item-button class="button" ?disabled="${this.disabled}" href="${o(this.href || undefined)}" target="${o(this.target || undefined)}" download="${o(this.download || undefined)}" rel="${o(this.rel || undefined)}" @click="${__classPrivateFieldGet(this, _M3eListActionElement_instances, "m", _M3eListActionElement_handleClick)}"><slot name="leading" slot="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><slot name="overline" slot="overline"></slot><slot></slot><slot name="supporting-text" slot="supporting-text"></slot><slot name="trailing" slot="trailing" @slotchange="${this._handleTrailingSlotChange}"></slot></m3e-list-item-button>`;
|
|
15885
16198
|
}
|
|
15886
16199
|
};
|
|
15887
16200
|
_M3eListActionElement_instances = new WeakSet();
|
|
@@ -15892,7 +16205,7 @@ _M3eListActionElement_handleClick = function _M3eListActionElement_handleClick(e
|
|
|
15892
16205
|
};
|
|
15893
16206
|
/** The styles of the element. */
|
|
15894
16207
|
M3eListActionElement.styles = css`:host { display: block; } .button { width: 100%; }`;
|
|
15895
|
-
__decorate([e$
|
|
16208
|
+
__decorate([e$3(".button")], M3eListActionElement.prototype, "button", void 0);
|
|
15896
16209
|
__decorate([n$1({
|
|
15897
16210
|
type: Boolean,
|
|
15898
16211
|
reflect: true
|
|
@@ -15928,9 +16241,9 @@ let M3eListItemButtonElement = class M3eListItemButtonElement extends KeyboardCl
|
|
|
15928
16241
|
};
|
|
15929
16242
|
/** The styles of the element. */
|
|
15930
16243
|
M3eListItemButtonElement.styles = [M3eListItemElement.styles, css`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } :host(:not(:disabled)) { cursor: pointer; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } slot[name="trailing"] { align-self: var(--_list-item-button-trailing-align-self, auto); }`];
|
|
15931
|
-
__decorate([e$
|
|
15932
|
-
__decorate([e$
|
|
15933
|
-
__decorate([e$
|
|
16244
|
+
__decorate([e$3(".focus-ring")], M3eListItemButtonElement.prototype, "_focusRing", void 0);
|
|
16245
|
+
__decorate([e$3(".state-layer")], M3eListItemButtonElement.prototype, "_stateLayer", void 0);
|
|
16246
|
+
__decorate([e$3(".ripple")], M3eListItemButtonElement.prototype, "_ripple", void 0);
|
|
15934
16247
|
M3eListItemButtonElement = __decorate([customElement$1("m3e-list-item-button")], M3eListItemButtonElement);
|
|
15935
16248
|
|
|
15936
16249
|
var _M3eListOptionElement_instances, _M3eListOptionElement_value, _M3eListOptionElement_textContent, _M3eListOptionElement_clickHandler, _M3eListOptionElement_handleSlotChange, _M3eListOptionElement_handleClick;
|
|
@@ -16116,9 +16429,9 @@ _M3eListOptionElement_handleClick = function _M3eListOptionElement_handleClick(e
|
|
|
16116
16429
|
};
|
|
16117
16430
|
/** The styles of the element. */
|
|
16118
16431
|
M3eListOptionElement.styles = [M3eListItemElement.styles, css`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } .indicator { min-width: 1.5rem; min-height: 1.5rem; display: flex; align-items: center; justify-content: center; } :host(:not(:disabled)) { cursor: pointer; } :host(:state(-three-line)) .indicator { align-self: flex-start; margin-top: var(--m3e-list-item-three-line-top-offset, 0.25rem); } :host([selected]) .base, :host([selected]) .state-layer, :host([selected]) .ripple, :host([selected]) .focus-ring { border-radius: var(--m3e-list-item-selected-container-shape, ${DesignToken$1.shape.corner.large}); } :host([selected]:not(:disabled)) .base { color: var(--m3e-list-item-selected-label-text-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-selected-overline-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-selected-supporting-text-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="leading"]) { color: var(--m3e-list-item-selected-leading-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: var(--m3e-list-item-selected-trailing-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) .base { background-color: var(--m3e-list-item-selected-container-color, ${DesignToken$1.color.secondaryContainer}); } :host([selected]:disabled) .base { background-color: color-mix( in srgb, var(--m3e-list-item-selected-disabled-container-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-selected-disabled-container-opacity, 10%), transparent ); } :host([selected]:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var( --m3e-list-item-selected-hover-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-opacity: var( --m3e-list-item-selected-hover-state-layer-opacity, ${DesignToken$1.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var( --m3e-list-item-selected-focus-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-focus-opacity: var( --m3e-list-item-selected-focus-state-layer-opacity, ${DesignToken$1.state.focusStateLayerOpacity} ); } :host([selected]:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-selected-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-selected-pressed-state-layer-opacity, ${DesignToken$1.state.pressedStateLayerOpacity} ); } :host(:state(-hide-selection)) .indicator, :host(:not(:state(-hide-selection))) ::slotted([slot="trailing"]) { display: none; } @media (forced-colors: active) { :host([selected]:not(:disabled)) .content, :host([selected]:not(:disabled)) ::slotted([slot="overline"]), :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]), :host([selected]:not(:disabled)) ::slotted([slot="leading"]), :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: HighlightText; forced-color-adjust: none; } :host([selected]:not(:disabled)) .base { background-color: Highlight; } }`];
|
|
16119
|
-
__decorate([e$
|
|
16120
|
-
__decorate([e$
|
|
16121
|
-
__decorate([e$
|
|
16432
|
+
__decorate([e$3(".focus-ring")], M3eListOptionElement.prototype, "_focusRing", void 0);
|
|
16433
|
+
__decorate([e$3(".state-layer")], M3eListOptionElement.prototype, "_stateLayer", void 0);
|
|
16434
|
+
__decorate([e$3(".ripple")], M3eListOptionElement.prototype, "_ripple", void 0);
|
|
16122
16435
|
__decorate([n$1()], M3eListOptionElement.prototype, "value", null);
|
|
16123
16436
|
M3eListOptionElement = __decorate([customElement$1("m3e-list-option")], M3eListOptionElement);
|
|
16124
16437
|
|
|
@@ -16345,6 +16658,7 @@ let M3eLoadingIndicatorElement = class M3eLoadingIndicatorElement extends Role$1
|
|
|
16345
16658
|
super.connectedCallback();
|
|
16346
16659
|
this.ariaValueMin = this.ariaValueMin || "0";
|
|
16347
16660
|
this.ariaValueMax = this.ariaValueMax || "100";
|
|
16661
|
+
this._activeIndicator?.classList.toggle("animate", true);
|
|
16348
16662
|
}
|
|
16349
16663
|
/** @inheritdoc */
|
|
16350
16664
|
disconnectedCallback() {
|
|
@@ -16363,7 +16677,7 @@ let M3eLoadingIndicatorElement = class M3eLoadingIndicatorElement extends Role$1
|
|
|
16363
16677
|
};
|
|
16364
16678
|
/** The styles of the element. */
|
|
16365
16679
|
M3eLoadingIndicatorElement.styles = css`:host { display: inline-block; aspect-ratio: 1 / 1; contain: strict; vertical-align: middle; content-visibility: auto; } :host([variant="uncontained"]) { width: ${LoadingIndicatorToken.activeIndicatorSize}; } :host([variant="contained"]) { width: ${LoadingIndicatorToken.containerSize}; } :host([variant="uncontained"]) .active-indicator { background-color: ${LoadingIndicatorToken.activeIndicatorColor}; } :host([variant="contained"]) .active-indicator { background-color: ${LoadingIndicatorToken.containedActiveIndicatorColor}; } :host([variant="contained"]) .container { background-color: ${LoadingIndicatorToken.containedContainerColor}; } .container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: ${LoadingIndicatorToken.containerShape}; } .active-indicator { margin: auto; aspect-ratio: 1 / 1; width: calc(${LoadingIndicatorToken.activeIndicatorSize} * 0.842); transform-origin: center; transition: clip-path ${DesignToken$1.motion.spring.slowEffects}; will-change: transform, clip-path; --_polygon-soft-burst: polygon(${ShapePolygon$1["soft-burst"]}); --_polygon-7-sided-cookie: polygon(${ShapePolygon$1["7-sided-cookie"]}); --_polygon-pentagon: polygon(${ShapePolygon$1["pentagon"]}); --_polygon-pill: polygon(${ShapePolygon$1["pill"]}); --_polygon-very-sunny: polygon(${ShapePolygon$1["very-sunny"]}); --_polygon-4-sided-cookie: polygon(${ShapePolygon$1["4-sided-cookie"]}); --_polygon-oval: polygon(${ShapePolygon$1["oval"]}); } .active-indicator.animate { animation: rotate 4998ms infinite; } @keyframes rotate { 0% { clip-path: var(--_polygon-soft-burst); transform: rotate(0deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 14% { clip-path: var(--_polygon-7-sided-cookie); transform: rotate(154deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 29% { clip-path: var(--_polygon-pentagon); transform: rotate(309deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 43% { clip-path: var(--_polygon-pill); transform: rotate(463deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 57% { clip-path: var(--_polygon-very-sunny); transform: rotate(617deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 71% { clip-path: var(--_polygon-4-sided-cookie); transform: rotate(771deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 83% { clip-path: var(--_polygon-oval); transform: rotate(926deg); animation-timing-function: cubic-bezier(0.5, 0.2, 0, 0.8); } 100% { clip-path: var(--_polygon-soft-burst); transform: rotate(1080deg); } } @media (forced-colors: active) { .active-indicator { background-color: CanvasText !important; } }`;
|
|
16366
|
-
__decorate([e$
|
|
16680
|
+
__decorate([e$3(".active-indicator")], M3eLoadingIndicatorElement.prototype, "_activeIndicator", void 0);
|
|
16367
16681
|
__decorate([n$1({
|
|
16368
16682
|
reflect: true
|
|
16369
16683
|
})], M3eLoadingIndicatorElement.prototype, "variant", void 0);
|
|
@@ -16396,10 +16710,10 @@ class MenuItemElementBase extends KeyboardClick$1(Focusable$1(AttachInternals$1(
|
|
|
16396
16710
|
}
|
|
16397
16711
|
}
|
|
16398
16712
|
/** The styles of the element. */
|
|
16399
|
-
MenuItemElementBase.styles = css`:host { display: inline-block; outline: none; user-select: none; flex: none; height: var(--m3e-menu-item-container-height, 2.75rem); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)
|
|
16400
|
-
__decorate([e$
|
|
16401
|
-
__decorate([e$
|
|
16402
|
-
__decorate([e$
|
|
16713
|
+
MenuItemElementBase.styles = css`:host { display: inline-block; outline: none; user-select: none; flex: none; height: var(--m3e-menu-item-container-height, 2.75rem); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)) .base { color: var(--m3e-menu-item-color, ${DesignToken$1.color.onSurface}); } :host(:not([aria-expanded="true"])) .base { --m3e-state-layer-hover-color: var(--m3e-menu-item-container-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-menu-item-container-focus-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-color: var(--m3e-menu-item-ripple-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled)[aria-expanded="true"]) .base { background-color: color-mix( in srgb, var(--m3e-menu-item-active-state-layer-color, ${DesignToken$1.color.onSurface}) var(--m3e-menu-active-state-layer-opacity, 8%), transparent ); } :host([aria-expanded="true"]) .state-layer { display: none; } :host(:not(:disabled)[checked]) .base { color: var(--m3e-menu-item-selected-color, ${DesignToken$1.color.onTertiaryContainer}); background-color: var(--m3e-menu-item-selected-container-color, ${DesignToken$1.color.tertiaryContainer}); } :host([checked]) .base { --m3e-state-layer-hover-color: var( --m3e-menu-item-selected-container-hover-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-menu-item-selected-container-focus-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-ripple-color: var(--m3e-menu-item-selected-ripple-color, ${DesignToken$1.color.onTertiaryContainer}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-menu-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-menu-item-disabled-opacity, 38%), transparent ); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; position: relative; width: 100%; height: 100%; border-radius: var(--m3e-menu-item-shape, ${DesignToken$1.shape.corner.extraSmall}); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } :host([checked]:not(:state(-first))) .base { border-top-left-radius: var(--m3e-menu-item-selected-shape, ${DesignToken$1.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-selected-shape, ${DesignToken$1.shape.corner.medium}); } :host([checked]:not(:state(-last))) .base { border-bottom-left-radius: var(--m3e-menu-item-selected-shape, ${DesignToken$1.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-selected-shape, ${DesignToken$1.shape.corner.medium}); } :host(:state(-first)) .base { border-top-left-radius: var(--m3e-menu-item-first-child-shape, ${DesignToken$1.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-first-child-shape, ${DesignToken$1.shape.corner.medium}); } :host(:state(-last)) .base { border-bottom-left-radius: var(--m3e-menu-item-last-child-shape, ${DesignToken$1.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-last-child-shape, ${DesignToken$1.shape.corner.medium}); } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { flex: 1 1 auto; display: inline-flex; align-items: center; column-gap: var(--m3e-menu-item-icon-label-space, 0.5rem); padding-inline-start: var(--m3e-menu-item-padding-start, 0.75rem); padding-inline-end: var(--m3e-menu-item-padding-end, 0.75rem); font-size: var(--m3e-menu-item-label-text-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-menu-item-label-text-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-menu-item-label-text-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-menu-item-label-text-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } .focus-ring { border-radius: var(--m3e-menu-item-focus-ring-shape, inherit); } .content { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="trailing-icon"]), .trailing-icon { flex: none; width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { background-color: Menu; color: MenuText; } :host(:disabled) .base { color: GrayText; } }`;
|
|
16714
|
+
__decorate([e$3(".focus-ring")], MenuItemElementBase.prototype, "_focusRing", void 0);
|
|
16715
|
+
__decorate([e$3(".state-layer")], MenuItemElementBase.prototype, "_stateLayer", void 0);
|
|
16716
|
+
__decorate([e$3(".ripple")], MenuItemElementBase.prototype, "_ripple", void 0);
|
|
16403
16717
|
|
|
16404
16718
|
/**
|
|
16405
16719
|
* An element, nested within a clickable element, used to open a menu.
|
|
@@ -17702,9 +18016,9 @@ _M3eNavItemElement_handleClick = function _M3eNavItemElement_handleClick(e) {
|
|
|
17702
18016
|
};
|
|
17703
18017
|
/** The styles of the element. */
|
|
17704
18018
|
M3eNavItemElement.styles = css`:host { display: inline-block; vertical-align: middle; position: relative; outline: none; user-select: none; flex: 1; font-size: var(--m3e-nav-item-label-text-font-size, ${DesignToken$1.typescale.standard.label.medium.fontSize}); font-weight: var( --m3e-nav-item-label-text-font-weight, ${DesignToken$1.typescale.standard.label.medium.fontWeight} ); line-height: var( --m3e-nav-item-label-text-line-height, ${DesignToken$1.typescale.standard.label.medium.lineHeight} ); letter-spacing: var(--m3e-nav-item-label-text-tracking, ${DesignToken$1.typescale.standard.label.medium.tracking}); border-radius: var(--m3e-nav-item-shape, ${DesignToken$1.shape.corner.full}); min-width: var(--_nav-item-min-width); align-self: var(--_nav-item-align-self); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host([orientation="horizontal"]) { max-width: fit-content; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } .outer { height: 100%; } .outer, .inner { display: flex; align-items: center; justify-content: var(--_nav-item-justify-content, center); position: relative; border-radius: inherit; } .icon-wrapper { position: relative; flex: none; } .base { justify-content: unset; box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; } .icon { position: absolute; } .label { vertical-align: middle; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]) { width: 1em; font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-inactive-hover-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-inactive-focus-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-inactive-pressed-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-inactive-label-text-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-inactive-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-active-hover-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-active-focus-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-active-pressed-state-layer-color, ${DesignToken$1.color.onSecondaryContainer} ); } :host([selected]:not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-active-label-text-color, ${DesignToken$1.color.secondary}); } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: var(--m3e-nav-item-active-container-color, ${DesignToken$1.color.secondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-active-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([orientation="vertical"]) .outer { align-self: stretch; align-items: flex-start; } :host([orientation="vertical"]) .label { text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; } :host([orientation="vertical"]) .base { flex-direction: column; row-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="vertical"]) .base { margin-block: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple { top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); bottom: unset; } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { height: var(--m3e-vertical-nav-item-active-indicator-height, 2rem); } :host([orientation="vertical"]) .icon { top: calc( calc(var(--m3e-vertical-nav-item-active-indicator-height, 2rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); left: calc( calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); } :host([orientation="vertical"]) .focus-ring { border-radius: var(--m3e-nav-item-focus-ring-shape, ${DesignToken$1.shape.corner.medium}); } :host([orientation="horizontal"]) .icon-wrapper { width: var(--m3e-nav-item-icon-size, 1.5rem); height: var(--m3e-nav-item-icon-size, 1.5rem); } :host([orientation="horizontal"]) .base { padding: var(--m3e-horizontal-nav-item-padding, 1rem); } :host([orientation="horizontal"]) .label { flex: 1 1 auto; } :host([orientation="horizontal"]) .base { column-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizontal"]) .inner { height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem); width: fit-content; } .state-layer, .ripple { margin-inline: auto; } :host(:disabled) .label, :host([disabled-interactive]) .label { color: color-mix( in srgb, var(--m3e-nav-item-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-nav-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: color-mix( in srgb, var(--m3e-nav-item-disabled-icon-color, ${DesignToken$1.color.onSurface}) var(--m3e-nav-item-disabled-icon-opacity, 38%), transparent ); } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { :host(:disabled) .label, :host([disabled-interactive]) .label, :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: GrayText; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label, :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ButtonText; } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: ButtonText; } :host([orientation="vertical"][selected]:not(:disabled):not([disabled-interactive])) .label { color: ButtonText; } :host([orientation="horizontal"][selected]:not(:disabled):not([disabled-interactive])) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { forced-color-adjust: none; color: ButtonFace; } }`;
|
|
17705
|
-
__decorate([e$
|
|
17706
|
-
__decorate([e$
|
|
17707
|
-
__decorate([e$
|
|
18019
|
+
__decorate([e$3(".focus-ring")], M3eNavItemElement.prototype, "_focusRing", void 0);
|
|
18020
|
+
__decorate([e$3(".state-layer")], M3eNavItemElement.prototype, "_stateLayer", void 0);
|
|
18021
|
+
__decorate([e$3(".ripple")], M3eNavItemElement.prototype, "_ripple", void 0);
|
|
17708
18022
|
__decorate([n$1({
|
|
17709
18023
|
reflect: true
|
|
17710
18024
|
})], M3eNavItemElement.prototype, "orientation", void 0);
|
|
@@ -17956,7 +18270,7 @@ let M3eNavMenuItemElement = M3eNavMenuItemElement_1 = class M3eNavMenuItemElemen
|
|
|
17956
18270
|
}
|
|
17957
18271
|
/** @inheritdoc */
|
|
17958
18272
|
render() {
|
|
17959
|
-
return html`<div class="base" @click="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleClick)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="icon" aria-hidden="true">${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_renderIcon).call(this)}</div><div class="label"><slot name="label" @slotchange="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleSlotChange)}"></slot></div><slot name="badge"></slot><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${o
|
|
18273
|
+
return html`<div class="base" @click="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleClick)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="icon" aria-hidden="true">${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_renderIcon).call(this)}</div><div class="label"><slot name="label" @slotchange="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleSlotChange)}"></slot></div><slot name="badge"></slot><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${o(this._hasChildItems ? undefined : "true")}" ?open="${this._hasChildItems && this.open}" @opening="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleCollapsibleEvent)}" @opened="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleCollapsibleEvent)}" @closing="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleCollapsibleEvent)}" @closed="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleCollapsibleEvent)}"><slot @slotchange="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleItemSlotChange)}"></slot></m3e-collapsible>`;
|
|
17960
18274
|
}
|
|
17961
18275
|
};
|
|
17962
18276
|
_M3eNavMenuItemElement_items = new WeakMap();
|
|
@@ -18028,10 +18342,10 @@ _M3eNavMenuItemElement_handleCollapsibleEvent = function _M3eNavMenuItemElement_
|
|
|
18028
18342
|
M3eNavMenuItemElement.styles = css`:host { display: block; flex: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; position: relative; padding-inline: var(--m3e-nav-menu-item-padding, 1.5rem); height: calc(var(--m3e-nav-menu-item-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); column-gap: var(--m3e-nav-menu-item-spacing, 0.75rem); font-size: var(--m3e-nav-menu-item-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
|
|
18029
18343
|
background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-nav-menu-item-shape, ${DesignToken$1.shape.corner.full}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .icon, .toggle { flex: none; display: flex; align-items: center; justify-content: center; position: relative; vertical-align: middle; } ::slotted([slot="badge"]) { flex: none; position: relative; font-size: var(--m3e-nav-menu-item-badge-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-badge-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-badge-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-badge-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } .toggle { transition: ${unsafeCSS(`transform var(--m3e-collapsible-animation-duration, ${DesignToken$1.motion.duration.medium1})
|
|
18030
18344
|
${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:state(-with-icon))) .icon { display: none; } .icon { margin-inline-start: -0.5rem; } .toggle { margin-inline-end: -0.5rem; } .group { padding-inline-start: var(--m3e-nav-menu-item-inset, 1rem); } :host([open]) .toggle { transform: rotate(180deg); } :host(:not(:state(-with-items))) .toggle, :host(:not(:state(-with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-nav-menu-item-icon-size, 1.5rem); } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-nav-menu-item-label-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-nav-menu-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-nav-menu-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:state(-with-items)):not(:disabled)) .base { color: var(--m3e-nav-menu-item-selected-label-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-nav-menu-item-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-nav-menu-item-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected]):not(:state(-with-items)):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-unselected-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-unselected-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } .state-layer { margin-inline: auto; } :host([selected]:state(-with-items):not(:disabled)) .base { background-color: var(--m3e-nav-menu-item-open-container-color, ${DesignToken$1.color.surfaceContainerHighest}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-open-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-open-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-open-ripple-color, ${DesignToken$1.color.onSurface}); } ::slotted(a[slot="label"]) { all: unset; } @media (prefers-reduced-motion) { .base, .toggle, .state-layer { transition: none !important; } } @media (forced-colors: active) { .base, .state-layer { transition: none !important; } :host(:disabled) .base { color: GrayText; } :host(:not([selected]):not(:disabled)) .base { color: ButtonText; } :host([selected]:not(:state(-with-items)):not(:disabled)) .base { forced-color-adjust: none; color: ButtonFace; background-color: ButtonText; } :host([selected]:state(-with-items):not(:disabled)) .base { background-color: unset; color: ButtonText; } }`;
|
|
18031
|
-
__decorate([e$
|
|
18032
|
-
__decorate([e$
|
|
18033
|
-
__decorate([e$
|
|
18034
|
-
__decorate([e$
|
|
18345
|
+
__decorate([e$3(".state-layer")], M3eNavMenuItemElement.prototype, "stateLayer", void 0);
|
|
18346
|
+
__decorate([e$3(".focus-ring")], M3eNavMenuItemElement.prototype, "focusRing", void 0);
|
|
18347
|
+
__decorate([e$3(".ripple")], M3eNavMenuItemElement.prototype, "ripple", void 0);
|
|
18348
|
+
__decorate([e$3(".base")], M3eNavMenuItemElement.prototype, "_base", void 0);
|
|
18035
18349
|
__decorate([r$1()], M3eNavMenuItemElement.prototype, "_hasChildItems", void 0);
|
|
18036
18350
|
__decorate([n$1({
|
|
18037
18351
|
type: Boolean,
|
|
@@ -18668,7 +18982,10 @@ var _M3eOptionElement_instances, _M3eOptionElement_value, _M3eOptionElement_text
|
|
|
18668
18982
|
* @slot - Renders the label of the option.
|
|
18669
18983
|
*
|
|
18670
18984
|
* @attr disabled - Whether the element is disabled.
|
|
18985
|
+
* @attr disable-highlight - Whether text highlighting is disabled.
|
|
18986
|
+
* @attr highlight-mode - The mode in which to highlight a term.
|
|
18671
18987
|
* @attr selected - Whether the element is selected.
|
|
18988
|
+
* @attr term - The search term to highlight.
|
|
18672
18989
|
* @attr value - A string representing the value of the option.
|
|
18673
18990
|
*
|
|
18674
18991
|
* @cssprop --m3e-option-container-height - The height of the option container.
|
|
@@ -18705,6 +19022,21 @@ let M3eOptionElement = class M3eOptionElement extends Selected$1(Disabled$1(Atta
|
|
|
18705
19022
|
_M3eOptionElement_value.set(this, void 0);
|
|
18706
19023
|
/** @private */
|
|
18707
19024
|
_M3eOptionElement_textContent.set(this, "");
|
|
19025
|
+
/**
|
|
19026
|
+
* The search term to highlight.
|
|
19027
|
+
* @default ""
|
|
19028
|
+
*/
|
|
19029
|
+
this.term = "";
|
|
19030
|
+
/**
|
|
19031
|
+
* The mode in which to highlight a term.
|
|
19032
|
+
* @default "contains"
|
|
19033
|
+
*/
|
|
19034
|
+
this.highlightMode = "contains";
|
|
19035
|
+
/**
|
|
19036
|
+
* Whether text highlighting is disabled.
|
|
19037
|
+
* @default false
|
|
19038
|
+
*/
|
|
19039
|
+
this.disableHighlight = false;
|
|
18708
19040
|
}
|
|
18709
19041
|
/** A string representing the value of the option. */
|
|
18710
19042
|
get value() {
|
|
@@ -18713,9 +19045,13 @@ let M3eOptionElement = class M3eOptionElement extends Selected$1(Disabled$1(Atta
|
|
|
18713
19045
|
set value(value) {
|
|
18714
19046
|
__classPrivateFieldSet(this, _M3eOptionElement_value, value, "f");
|
|
18715
19047
|
}
|
|
19048
|
+
/** The textual label of the option. */
|
|
19049
|
+
get label() {
|
|
19050
|
+
return __classPrivateFieldGet(this, _M3eOptionElement_textContent, "f");
|
|
19051
|
+
}
|
|
18716
19052
|
/** @internal */
|
|
18717
19053
|
[(_M3eOptionElement_value = new WeakMap(), _M3eOptionElement_textContent = new WeakMap(), _M3eOptionElement_instances = new WeakSet(), typeaheadLabel)]() {
|
|
18718
|
-
return
|
|
19054
|
+
return this.label;
|
|
18719
19055
|
}
|
|
18720
19056
|
/** Whether the option represents an empty option. */
|
|
18721
19057
|
get isEmpty() {
|
|
@@ -18735,7 +19071,7 @@ let M3eOptionElement = class M3eOptionElement extends Selected$1(Disabled$1(Atta
|
|
|
18735
19071
|
update(changedProperties) {
|
|
18736
19072
|
super.update(changedProperties);
|
|
18737
19073
|
if (changedProperties.has("selected") && this.selected) {
|
|
18738
|
-
const panel = this.closest("[role='listbox']") ?? this.closest("m3e-select");
|
|
19074
|
+
const panel = this.closest("[role='listbox']") ?? this.closest("m3e-autocomplete") ?? this.closest("m3e-select");
|
|
18739
19075
|
if (panel && panel.ariaMultiSelectable !== "true" && !panel.hasAttribute("multi")) {
|
|
18740
19076
|
panel.querySelectorAll("m3e-option").forEach(x => {
|
|
18741
19077
|
if (x !== this && x.selected) {
|
|
@@ -18747,7 +19083,7 @@ let M3eOptionElement = class M3eOptionElement extends Selected$1(Disabled$1(Atta
|
|
|
18747
19083
|
}
|
|
18748
19084
|
/** @inheritdoc */
|
|
18749
19085
|
render() {
|
|
18750
|
-
return html`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="wrapper"><div class="icon" aria-hidden="true"><svg class="check" viewBox="0 -960 960 960"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg></div><m3e-text-overflow class="label"><slot @slotchange="${__classPrivateFieldGet(this, _M3eOptionElement_instances, "m", _M3eOptionElement_handleSlotChange)}"></slot></m3e-text-overflow></div></div>`;
|
|
19086
|
+
return html`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="wrapper"><div class="icon" aria-hidden="true"><svg class="check" viewBox="0 -960 960 960"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg></div><m3e-text-overflow class="label"><m3e-text-highlight term="${this.term}" mode="${this.highlightMode}" ?disabled="${this.disableHighlight}"><slot @slotchange="${__classPrivateFieldGet(this, _M3eOptionElement_instances, "m", _M3eOptionElement_handleSlotChange)}"></slot></m3e-text-highlight></m3e-text-overflow></div></div>`;
|
|
18751
19087
|
}
|
|
18752
19088
|
};
|
|
18753
19089
|
_M3eOptionElement_handleSlotChange = function _M3eOptionElement_handleSlotChange(e) {
|
|
@@ -18756,10 +19092,18 @@ _M3eOptionElement_handleSlotChange = function _M3eOptionElement_handleSlotChange
|
|
|
18756
19092
|
};
|
|
18757
19093
|
/** The styles of the element. */
|
|
18758
19094
|
M3eOptionElement.styles = css`:host { display: block; outline: none; user-select: none; flex: none; height: var(--m3e-option-container-height, 2.75rem); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not([aria-disabled="true"])) .base { color: var(--m3e-option-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-color: var(--m3e-option-container-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-option-container-focus-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-color: var(--m3e-option-ripple-color, ${DesignToken$1.color.onSurface}); } :host(:not([aria-disabled="true"]):not(:state(-empty))[selected]) .base { color: var(--m3e-option-selected-color, ${DesignToken$1.color.onTertiaryContainer}); background-color: var(--m3e-option-selected-container-color, ${DesignToken$1.color.tertiaryContainer}); --m3e-state-layer-hover-color: var( --m3e-option-selected-container-hover-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-option-selected-container-focus-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-ripple-color: var(--m3e-option-selected-ripple-color, ${DesignToken$1.color.onTertiaryContainer}); } :host(:not([aria-disabled="true"])) { cursor: pointer; } :host([aria-disabled="true"]) .base { color: color-mix( in srgb, var(--m3e-option-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-option-disabled-opacity, 38%), transparent ); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; position: relative; width: 100%; height: 100%; border-radius: var(--m3e-option-shape, ${DesignToken$1.shape.corner.extraSmall}); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } :host([selected]:not(:state(-first))) .base { border-top-left-radius: var(--m3e-option-selected-shape, ${DesignToken$1.shape.corner.medium}); border-top-right-radius: var(--m3e-option-selected-shape, ${DesignToken$1.shape.corner.medium}); } :host([selected]:not(:state(-last))) .base { border-bottom-left-radius: var(--m3e-option-selected-shape, ${DesignToken$1.shape.corner.medium}); border-bottom-right-radius: var(--m3e-option-selected-shape, ${DesignToken$1.shape.corner.medium}); } :host(:state(-first)) .base { border-top-left-radius: var(--m3e-option-first-child-shape, ${DesignToken$1.shape.corner.medium}); border-top-right-radius: var(--m3e-option-first-child-shape, ${DesignToken$1.shape.corner.medium}); } :host(:state(-last)) .base { border-bottom-left-radius: var(--m3e-option-last-child-shape, ${DesignToken$1.shape.corner.medium}); border-bottom-right-radius: var(--m3e-option-last-child-shape, ${DesignToken$1.shape.corner.medium}); } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { flex: 1 1 auto; display: inline-flex; align-items: center; width: 100%; overflow: hidden; column-gap: var(--m3e-option-icon-label-space, 0.5rem); padding-inline-start: var(--_option-padding-start, var(--m3e-option-padding-start, 0.75rem)); padding-inline-end: var(--m3e-option-padding-end, 0.75rem); font-size: var(--m3e-option-label-text-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-option-label-text-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-option-label-text-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-option-label-text-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } .focus-ring { border-radius: var(--m3e-option-focus-ring-shape, inherit); } .icon { margin-inline-start: calc(0px - var(--m3e-option-icon-label-space, 0.5rem)); transition: ${unsafeCSS(`margin-inline-start ${DesignToken$1.motion.spring.fastEffects}, width ${DesignToken$1.motion.spring.fastEffects}`)}; } :host([selected]) .icon { margin-inline-start: 0; width: var(--m3e-option-icon-size, 1.25rem); } .icon { flex: none; width: 0px; font-size: var(--m3e-option-icon-size, 1.25rem); } :host(:state(-empty)) .icon, :host(:state(-hide-selection-indicator)) .icon, :host(:not([selected])) .check { display: none; } @media (forced-colors: active) { .base { background-color: Menu; color: MenuText; } :host([aria-disabled="true"]) .base { color: GrayText; } } @media (prefers-reduced-motion) { .icon, .base { transition: none; } }`;
|
|
18759
|
-
__decorate([e$
|
|
18760
|
-
__decorate([e$
|
|
18761
|
-
__decorate([e$
|
|
19095
|
+
__decorate([e$3(".focus-ring")], M3eOptionElement.prototype, "focusRing", void 0);
|
|
19096
|
+
__decorate([e$3(".state-layer")], M3eOptionElement.prototype, "stateLayer", void 0);
|
|
19097
|
+
__decorate([e$3(".ripple")], M3eOptionElement.prototype, "_ripple", void 0);
|
|
18762
19098
|
__decorate([n$1()], M3eOptionElement.prototype, "value", null);
|
|
19099
|
+
__decorate([n$1()], M3eOptionElement.prototype, "term", void 0);
|
|
19100
|
+
__decorate([n$1({
|
|
19101
|
+
attribute: "highlight-mode"
|
|
19102
|
+
})], M3eOptionElement.prototype, "highlightMode", void 0);
|
|
19103
|
+
__decorate([n$1({
|
|
19104
|
+
attribute: "disable-highlight",
|
|
19105
|
+
type: Boolean
|
|
19106
|
+
})], M3eOptionElement.prototype, "disableHighlight", void 0);
|
|
18763
19107
|
M3eOptionElement = __decorate([customElement$1("m3e-option")], M3eOptionElement);
|
|
18764
19108
|
|
|
18765
19109
|
var _M3eOptGroupElement_instances, _M3eOptGroupElement_labelId, _M3eOptGroupElement_label, _M3eOptGroupElement_handleLabelSlotChange;
|
|
@@ -18829,8 +19173,7 @@ M3eOptGroupElement.styles = css`:host { display: block; --_option-padding-start:
|
|
|
18829
19173
|
M3eOptGroupElement.__nextId = 0;
|
|
18830
19174
|
M3eOptGroupElement = M3eOptGroupElement_1 = __decorate([customElement$1("m3e-optgroup")], M3eOptGroupElement);
|
|
18831
19175
|
|
|
18832
|
-
var _M3eOptionPanelElement_instances,
|
|
18833
|
-
var M3eOptionPanelElement_1;
|
|
19176
|
+
var _M3eOptionPanelElement_instances, _M3eOptionPanelElement_scrollController, _M3eOptionPanelElement_handleNoDataSlotChange, _M3eOptionPanelElement_handleLoadingSlotChange, _M3eOptionPanelElement_handleMutation;
|
|
18834
19177
|
/**
|
|
18835
19178
|
* Presents a list of options on a temporary surface.
|
|
18836
19179
|
*
|
|
@@ -18859,151 +19202,96 @@ var M3eOptionPanelElement_1;
|
|
|
18859
19202
|
* @cssprop --m3e-option-panel-text-highlight-container-color - Background color used for text highlight matches.
|
|
18860
19203
|
* @cssprop --m3e-option-panel-text-highlight-color - Text color used for text highlight matches.
|
|
18861
19204
|
*/
|
|
18862
|
-
let M3eOptionPanelElement =
|
|
19205
|
+
let M3eOptionPanelElement = class M3eOptionPanelElement extends Role$1(M3eFloatingPanelElement, "listbox") {
|
|
18863
19206
|
constructor() {
|
|
18864
|
-
super(
|
|
19207
|
+
super();
|
|
18865
19208
|
_M3eOptionPanelElement_instances.add(this);
|
|
18866
19209
|
/** @private */
|
|
18867
|
-
_M3eOptionPanelElement_trigger.set(this, void 0);
|
|
18868
|
-
/** @private */
|
|
18869
|
-
_M3eOptionPanelElement_anchor.set(this, void 0);
|
|
18870
|
-
/** @private */
|
|
18871
|
-
_M3eOptionPanelElement_anchorCleanup.set(this, void 0);
|
|
18872
|
-
/** @private */
|
|
18873
|
-
_M3eOptionPanelElement_documentClickHandler.set(this, e => __classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m", _M3eOptionPanelElement_handleDocumentClick).call(this, e));
|
|
18874
|
-
/** @private */
|
|
18875
19210
|
_M3eOptionPanelElement_scrollController.set(this, new ScrollController$1(this, {
|
|
18876
19211
|
target: null,
|
|
18877
19212
|
callback: () => this.hide(false)
|
|
18878
19213
|
}));
|
|
18879
|
-
/**
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
19214
|
+
/**
|
|
19215
|
+
* The state for which to present content.
|
|
19216
|
+
* @default "content"
|
|
19217
|
+
*/
|
|
19218
|
+
this.state = "content";
|
|
19219
|
+
new MutationController$1(this, {
|
|
19220
|
+
config: {
|
|
19221
|
+
childList: true,
|
|
19222
|
+
subtree: true
|
|
19223
|
+
},
|
|
19224
|
+
callback: () => __classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m", _M3eOptionPanelElement_handleMutation).call(this)
|
|
18885
19225
|
});
|
|
18886
19226
|
}
|
|
18887
|
-
/** Whether the panel is open. */
|
|
18888
|
-
get isOpen() {
|
|
18889
|
-
return __classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f") !== undefined;
|
|
18890
|
-
}
|
|
18891
|
-
/** @inheritdoc */
|
|
18892
|
-
connectedCallback() {
|
|
18893
|
-
super.connectedCallback();
|
|
18894
|
-
addCustomState$1(this, "-no-animate");
|
|
18895
|
-
this.setAttribute("popover", "manual");
|
|
18896
|
-
this.addEventListener("toggle", __classPrivateFieldGet(this, _M3eOptionPanelElement_toggleHandler, "f"));
|
|
18897
|
-
document.addEventListener("click", __classPrivateFieldGet(this, _M3eOptionPanelElement_documentClickHandler, "f"));
|
|
18898
|
-
}
|
|
18899
19227
|
/** @inheritdoc */
|
|
18900
|
-
disconnectedCallback() {
|
|
18901
|
-
super.disconnectedCallback();
|
|
18902
|
-
this.removeEventListener("toggle", __classPrivateFieldGet(this, _M3eOptionPanelElement_toggleHandler, "f"));
|
|
18903
|
-
document.removeEventListener("click", __classPrivateFieldGet(this, _M3eOptionPanelElement_documentClickHandler, "f"));
|
|
18904
|
-
}
|
|
18905
|
-
/**
|
|
18906
|
-
* Opens the panel.
|
|
18907
|
-
* @param {HTMLElement} trigger The element that triggered the panel.
|
|
18908
|
-
* @param {HTMLElement | undefined} anchor The element used to position the panel.
|
|
18909
|
-
* @returns {Promise<void>} A `Promise` that resolves when the panel is opened.
|
|
18910
|
-
*/
|
|
18911
19228
|
async show(trigger, anchor) {
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
}
|
|
18915
|
-
__classPrivateFieldSet(this, _M3eOptionPanelElement_anchorCleanup, await positionAnchor(this, anchor ?? trigger, {
|
|
18916
|
-
position: "bottom-start",
|
|
18917
|
-
inline: true,
|
|
18918
|
-
flip: true
|
|
18919
|
-
}, (x, y, position) => {
|
|
18920
|
-
setCustomState$1(this, "-top", position.includes("top"));
|
|
18921
|
-
setCustomState$1(this, "-bottom", position.includes("bottom"));
|
|
18922
|
-
if (M3eDirectionality.current === "rtl") {
|
|
18923
|
-
this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
|
|
18924
|
-
this.style.left = "";
|
|
18925
|
-
} else {
|
|
18926
|
-
this.style.left = `${x}px`;
|
|
18927
|
-
this.style.right = "";
|
|
18928
|
-
}
|
|
18929
|
-
this.style.top = `${y}px`;
|
|
18930
|
-
}), "f");
|
|
18931
|
-
this.showPopover();
|
|
18932
|
-
__classPrivateFieldSet(this, _M3eOptionPanelElement_trigger, trigger, "f");
|
|
18933
|
-
__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f").ariaExpanded = "true";
|
|
18934
|
-
__classPrivateFieldSet(this, _M3eOptionPanelElement_anchor, anchor, "f");
|
|
18935
|
-
__classPrivateFieldGet(this, _M3eOptionPanelElement_scrollController, "f").observe(__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f"));
|
|
18936
|
-
}
|
|
18937
|
-
/**
|
|
18938
|
-
* Hides the panel.
|
|
18939
|
-
* @param {boolean} [restoreFocus=false] Whether to restore focus to the panel's trigger.
|
|
18940
|
-
*/
|
|
18941
|
-
hide(restoreFocus = false) {
|
|
18942
|
-
this.hidePopover();
|
|
18943
|
-
if (__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f")) {
|
|
18944
|
-
__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f").ariaExpanded = "false";
|
|
18945
|
-
if (restoreFocus) {
|
|
18946
|
-
__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f").focus();
|
|
18947
|
-
}
|
|
18948
|
-
__classPrivateFieldGet(this, _M3eOptionPanelElement_scrollController, "f").unobserve(__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f"));
|
|
18949
|
-
__classPrivateFieldSet(this, _M3eOptionPanelElement_trigger, undefined, "f");
|
|
18950
|
-
}
|
|
19229
|
+
await super.show(trigger, anchor);
|
|
19230
|
+
__classPrivateFieldGet(this, _M3eOptionPanelElement_scrollController, "f").observe(trigger);
|
|
18951
19231
|
}
|
|
18952
|
-
/**
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
* @returns {Promise<void>} A `Promise` that resolves when the panel is opened or closed.
|
|
18957
|
-
*/
|
|
18958
|
-
async toggle(trigger, anchor) {
|
|
18959
|
-
if (__classPrivateFieldGet(this, _M3eOptionPanelElement_trigger, "f")) {
|
|
18960
|
-
this.hide();
|
|
18961
|
-
} else {
|
|
18962
|
-
await this.show(trigger, anchor);
|
|
19232
|
+
/** @inheritdoc */
|
|
19233
|
+
hide(restoreFocus) {
|
|
19234
|
+
if (this.trigger) {
|
|
19235
|
+
__classPrivateFieldGet(this, _M3eOptionPanelElement_scrollController, "f").unobserve(this.trigger);
|
|
18963
19236
|
}
|
|
19237
|
+
super.hide(restoreFocus);
|
|
18964
19238
|
}
|
|
18965
19239
|
/** @inheritdoc */
|
|
18966
|
-
|
|
18967
|
-
super.
|
|
18968
|
-
|
|
19240
|
+
connectedCallback() {
|
|
19241
|
+
super.connectedCallback();
|
|
19242
|
+
__classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m", _M3eOptionPanelElement_handleMutation).call(this);
|
|
18969
19243
|
}
|
|
18970
19244
|
/** @inheritdoc */
|
|
18971
19245
|
render() {
|
|
18972
|
-
return html`<div class="base"><slot @slotchange="${__classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m",
|
|
19246
|
+
return html`<div class="base"><slot></slot><div class="no-data" aria-hidden="true"><slot name="no-data" @slotchange="${__classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m", _M3eOptionPanelElement_handleNoDataSlotChange)}"></slot></div><div class="loading" aria-hidden="true"><slot name="loading" @slotchange="${__classPrivateFieldGet(this, _M3eOptionPanelElement_instances, "m", _M3eOptionPanelElement_handleLoadingSlotChange)}"></slot></div></div>`;
|
|
18973
19247
|
}
|
|
18974
19248
|
};
|
|
18975
|
-
_M3eOptionPanelElement_trigger = new WeakMap();
|
|
18976
|
-
_M3eOptionPanelElement_anchor = new WeakMap();
|
|
18977
|
-
_M3eOptionPanelElement_anchorCleanup = new WeakMap();
|
|
18978
|
-
_M3eOptionPanelElement_documentClickHandler = new WeakMap();
|
|
18979
19249
|
_M3eOptionPanelElement_scrollController = new WeakMap();
|
|
18980
|
-
_M3eOptionPanelElement_toggleHandler = new WeakMap();
|
|
18981
19250
|
_M3eOptionPanelElement_instances = new WeakSet();
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
options.forEach((x, i) => {
|
|
18985
|
-
setCustomState$1(x, "-first", i === 0 && !(x.parentElement instanceof M3eOptGroupElement));
|
|
18986
|
-
setCustomState$1(x, "-last", i === options.length - 1);
|
|
18987
|
-
});
|
|
19251
|
+
_M3eOptionPanelElement_handleNoDataSlotChange = function _M3eOptionPanelElement_handleNoDataSlotChange(e) {
|
|
19252
|
+
setCustomState$1(this, "-with-no-data", hasAssignedNodes$1(e.target));
|
|
18988
19253
|
};
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
19254
|
+
_M3eOptionPanelElement_handleLoadingSlotChange = function _M3eOptionPanelElement_handleLoadingSlotChange(e) {
|
|
19255
|
+
setCustomState$1(this, "-with-loading", hasAssignedNodes$1(e.target));
|
|
19256
|
+
setCustomState$1(this, "-with-loading-indicator", this.querySelector("m3e-loading-indicator[slot='loading'], m3e-circular-progress-indicator[slot='loading']") !== null);
|
|
19257
|
+
};
|
|
19258
|
+
_M3eOptionPanelElement_handleMutation = function _M3eOptionPanelElement_handleMutation() {
|
|
19259
|
+
const options = this.querySelectorAll("m3e-option");
|
|
19260
|
+
let first = false;
|
|
19261
|
+
let last;
|
|
19262
|
+
for (let i = 0; i < options.length; i++) {
|
|
19263
|
+
const option = options[i];
|
|
19264
|
+
if (option.hidden) {
|
|
19265
|
+
deleteCustomState$1(option, "-first");
|
|
19266
|
+
deleteCustomState$1(option, "-last");
|
|
19267
|
+
} else if (!first && !(option.parentElement instanceof M3eOptGroupElement)) {
|
|
19268
|
+
addCustomState$1(option, "-first");
|
|
19269
|
+
first = true;
|
|
19270
|
+
addCustomState$1(option, "-last");
|
|
19271
|
+
last = option;
|
|
19272
|
+
} else {
|
|
19273
|
+
deleteCustomState$1(option, "-first");
|
|
19274
|
+
if (last) {
|
|
19275
|
+
deleteCustomState$1(last, "-last");
|
|
19276
|
+
}
|
|
19277
|
+
addCustomState$1(option, "-last");
|
|
19278
|
+
last = option;
|
|
19279
|
+
}
|
|
18992
19280
|
}
|
|
18993
19281
|
};
|
|
18994
19282
|
(() => {
|
|
18995
19283
|
if (typeof window !== "undefined") {
|
|
18996
19284
|
const lightDomStyle = new CSSStyleSheet();
|
|
18997
|
-
lightDomStyle.replaceSync(css`m3e-option-panel > m3e-divider { margin-block: var(--m3e-option-panel-divider-spacing, 0.5rem); }`.toString());
|
|
19285
|
+
lightDomStyle.replaceSync(css`m3e-option-panel > m3e-divider { margin-block: var(--m3e-option-panel-divider-spacing, 0.5rem); } m3e-option-panel m3e-option[hidden], m3e-option-panel m3e-optgroup[hidden] { display: none; }`.toString());
|
|
18998
19286
|
document.adoptedStyleSheets = [...document.adoptedStyleSheets, lightDomStyle];
|
|
18999
19287
|
}
|
|
19000
19288
|
})();
|
|
19001
19289
|
/** The styles of the element. */
|
|
19002
|
-
M3eOptionPanelElement.styles = css`:host {
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
M3eOptionPanelElement =
|
|
19290
|
+
M3eOptionPanelElement.styles = [M3eFloatingPanelElement.styles, css`:host { --m3e-floating-panel-container-shape: var( --m3e-option-panel-container-shape, ${DesignToken$1.shape.corner.large} ); --m3e-floating-panel-container-min-width: var(--m3e-option-panel-container-min-width, 7rem); --m3e-floating-panel-container-max-width: var(--m3e-option-panel-container-max-width, 17.5rem); --m3e-floating-panel-container-max-height: var(--m3e-option-panel-container-max-height, 17.5rem); --m3e-floating-panel-container-color: var( --m3e-option-panel-container-color, ${DesignToken$1.color.surfaceContainer} ); --m3e-floating-panel-container-elevation: var( --m3e-option-panel-container-elevation, ${DesignToken$1.elevation.level3} ); --m3e-floating-panel-container-padding-inline: var(--m3e-option-panel-container-padding-inline, 0.25rem); --m3e-floating-panel-container-padding-block: var(--m3e-option-panel-container-padding-block, 0.25rem); } .base { row-gap: var(--m3e-option-panel-gap, 0.125rem); --m3e-text-highlight-container-color: var( --m3e-option-panel-text-highlight-container-color, ${DesignToken$1.color.tertiaryContainer} ); --m3e-text-highlight-color: var( --m3e-option-panel-text-highlight-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-focus-ring-outward-offset: 0px; --m3e-focus-ring-growth-factor: 1.5; } .no-data { display: flex; align-items: center; box-sizing: border-box; min-height: var(--m3e-option-panel-no-data-container-height, 2.75rem); padding: var(--m3e-option-panel-no-data-container-padding, 0.75rem); color: var(--m3e-option-panel-no-data-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var(--m3e-option-panel-no-data-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-option-panel-no-data-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-option-panel-no-data-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var( --m3e-option-panel-no-data-tracking, ${DesignToken$1.typescale.standard.label.large.tracking} ); } .loading { display: flex; align-items: center; box-sizing: border-box; min-height: var(--m3e-option-panel-loading-container-height, 2.75rem); padding: var(--m3e-option-panel-loading-container-padding, 0.75rem); color: var(--m3e-option-panel-loading-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var(--m3e-option-panel-loading-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-option-panel-loading-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-option-panel-loading-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var( --m3e-option-panel-loading-tracking, ${DesignToken$1.typescale.standard.label.large.tracking} ); } :host(:state(-no-data)) slot:not([name]), :host(:state(-loading)) slot:not([name]), :host(:state(-loading)) .no-data, :host(:not(:state(-no-data))) .no-data, :host(:not(:state(-with-no-data))) .no-data, :host(:not(:state(-loading))) .loading, :host(:not(:state(-with-loading))) .loading { display: none; } :host(:state(-no-data)) .base, :host(:state(-loading)) .base { overflow-y: hidden; } :host(:state(-with-loading-indicator)) .loading { padding: 0; justify-content: center; }`];
|
|
19291
|
+
__decorate([n$1({
|
|
19292
|
+
reflect: true
|
|
19293
|
+
})], M3eOptionPanelElement.prototype, "state", void 0);
|
|
19294
|
+
M3eOptionPanelElement = __decorate([customElement$1("m3e-option-panel")], M3eOptionPanelElement);
|
|
19007
19295
|
|
|
19008
19296
|
/**
|
|
19009
19297
|
* Adapted from Angular Material Paginator
|
|
@@ -19294,7 +19582,7 @@ M3ePaginatorElement = M3ePaginatorElement_1 = __decorate([customElement$1("m3e-p
|
|
|
19294
19582
|
* Copyright 2018 Google LLC
|
|
19295
19583
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19296
19584
|
*/
|
|
19297
|
-
const e
|
|
19585
|
+
const e = e$1(class extends i {
|
|
19298
19586
|
constructor(t$1) {
|
|
19299
19587
|
if (super(t$1), t$1.type !== t.ATTRIBUTE || "class" !== t$1.name || t$1.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
19300
19588
|
}
|
|
@@ -19432,6 +19720,7 @@ let M3eCircularProgressIndicatorElement = M3eCircularProgressIndicatorElement_1
|
|
|
19432
19720
|
callback: () => {
|
|
19433
19721
|
__classPrivateFieldGet(this, _M3eCircularProgressIndicatorElement_instances, "m", _M3eCircularProgressIndicatorElement_updateDiameterAndStroke).call(this);
|
|
19434
19722
|
__classPrivateFieldGet(this, _M3eCircularProgressIndicatorElement_instances, "m", _M3eCircularProgressIndicatorElement_updateAmplitudeAndWavelength).call(this);
|
|
19723
|
+
queueMicrotask(() => this.requestUpdate());
|
|
19435
19724
|
}
|
|
19436
19725
|
}));
|
|
19437
19726
|
/** @private */
|
|
@@ -19570,9 +19859,9 @@ _M3eCircularProgressIndicatorElement_renderWavyIndicator = function _M3eCircular
|
|
|
19570
19859
|
/>
|
|
19571
19860
|
</mask>
|
|
19572
19861
|
</defs>` : nothing}
|
|
19573
|
-
<g class="active-track" mask="${o
|
|
19862
|
+
<g class="active-track" mask="${o(amplitude > 0 ? resolveFragmentUrl$1(__classPrivateFieldGet(this, _M3eCircularProgressIndicatorElement_maskId, "f")) : undefined)}">
|
|
19574
19863
|
<path
|
|
19575
|
-
class="${e
|
|
19864
|
+
class="${e({
|
|
19576
19865
|
wave: amplitude > 0
|
|
19577
19866
|
})}"
|
|
19578
19867
|
d="${active.path}"
|
|
@@ -19810,6 +20099,7 @@ let M3eLinearProgressIndicatorElement = M3eLinearProgressIndicatorElement_1 = cl
|
|
|
19810
20099
|
callback: () => {
|
|
19811
20100
|
__classPrivateFieldGet(this, _M3eLinearProgressIndicatorElement_instances, "m", _M3eLinearProgressIndicatorElement_updateStroke).call(this);
|
|
19812
20101
|
__classPrivateFieldGet(this, _M3eLinearProgressIndicatorElement_instances, "m", _M3eLinearProgressIndicatorElement_updateAmplitudeAndWavelength).call(this);
|
|
20102
|
+
queueMicrotask(() => this.requestUpdate());
|
|
19813
20103
|
}
|
|
19814
20104
|
}));
|
|
19815
20105
|
/**
|
|
@@ -20111,9 +20401,9 @@ _M3eRadioElement_notifySelectionChange = function _M3eRadioElement_notifySelecti
|
|
|
20111
20401
|
};
|
|
20112
20402
|
/** The styles of the element. */
|
|
20113
20403
|
M3eRadioElement.styles = css`:host { display: inline-block; outline: none; width: fit-content; height: fit-content; vertical-align: middle; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not([aria-disabled="true"])) { cursor: pointer; } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; border-radius: 50%; width: calc(var(--m3e-radio-container-size, 2.5rem) + ${DesignToken$1.density.calc(-3)}); height: calc(var(--m3e-radio-container-size, 2.5rem) + ${DesignToken$1.density.calc(-3)}); } .touch { position: absolute; height: 3rem; width: 3rem; margin: auto; } .wrapper { box-sizing: border-box; pointer-events: none; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) .base { --m3e-state-layer-hover-color: var(--m3e-radio-unselected-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-radio-unselected-focus-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-color: var(--m3e-radio-unselected-ripple-color, ${DesignToken$1.color.onSurface}); color: var(--m3e-radio-unselected-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host([checked]) .base { --m3e-state-layer-hover-color: var(--m3e-radio-selected-hover-color, ${DesignToken$1.color.primary}); --m3e-state-layer-focus-color: var(--m3e-radio-selected-focus-color, ${DesignToken$1.color.primary}); --m3e-ripple-color: var(--m3e-radio-selected-ripple-color, ${DesignToken$1.color.primary}); color: var(--m3e-radio-selected-icon-color, ${DesignToken$1.color.primary}); } :host([aria-disabled="true"]) .base { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${DesignToken$1.color.onSurface}) 38%, transparent); } :host(:state(-touched):state(-invalid)) .base { --m3e-state-layer-hover-color: var(--m3e-radio-error-hover-color, ${DesignToken$1.color.error}); --m3e-state-layer-focus-color: var(--m3e-radio-error-focus-color, ${DesignToken$1.color.error}); --m3e-ripple-color: var(--m3e-radio-error-ripple-color, ${DesignToken$1.color.error}); color: var(--m3e-radio-error-icon-color, ${DesignToken$1.color.error}); } @media (forced-colors: active) { :host(:not([checked])) .base, :host([checked]) .base { --m3e-state-layer-hover-color: var(--_radio-forced-color, CanvasText); --m3e-state-layer-focus-color: var(--_radio-forced-color, CanvasText); --m3e-ripple-color: var(--_radio-forced-color, CanvasText); color: var(--_radio-forced-color, CanvasText); } :host([aria-disabled="true"]) .base { color: GrayText; } :host(:state(-touched):state(-invalid)) .base { --_radio-forced-color: Highlight; color: Highlight; } }`;
|
|
20114
|
-
__decorate([e$
|
|
20115
|
-
__decorate([e$
|
|
20116
|
-
__decorate([e$
|
|
20404
|
+
__decorate([e$3(".focus-ring")], M3eRadioElement.prototype, "_focusRing", void 0);
|
|
20405
|
+
__decorate([e$3(".state-layer")], M3eRadioElement.prototype, "_stateLayer", void 0);
|
|
20406
|
+
__decorate([e$3(".ripple")], M3eRadioElement.prototype, "_ripple", void 0);
|
|
20117
20407
|
__decorate([n$1()], M3eRadioElement.prototype, "value", void 0);
|
|
20118
20408
|
M3eRadioElement = __decorate([customElement$1("m3e-radio")], M3eRadioElement);
|
|
20119
20409
|
|
|
@@ -20427,9 +20717,9 @@ _M3eButtonSegmentElement_handleClick = function _M3eButtonSegmentElement_handleC
|
|
|
20427
20717
|
};
|
|
20428
20718
|
/** The styles of the element. */
|
|
20429
20719
|
M3eButtonSegmentElement.styles = css`:host { display: inline-block; position: relative; vertical-align: middle; outline: none; user-select: none; flex: 1 1 auto; min-width: 0; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: inline-flex; vertical-align: middle; align-items: center; width: 100%; height: calc(var(--m3e-segmented-button-height, 2.5rem) + ${DesignToken$1.density.calc(-3)}); box-sizing: border-box; border-width: var(--m3e-segmented-button-outline-thickness, 1px); border-color: var(--m3e-segmented-button-outline-color, ${DesignToken$1.color.outline}); border-style: solid; border-radius: inherit; border-inline-start-style: var(--_segmented-button-left-border, solid); transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; padding-inline-start: var(--m3e-segmented-button-padding-start, 1rem); padding-inline-end: var(--m3e-segmented-button-padding-end, 1rem); column-gap: var(--m3e-segmented-button-spacing, 0.5rem); } .label { font-size: var(--m3e-segmented-button-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-segmented-button-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-segmented-button-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-segmented-button-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); justify-self: center; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .icon { display: flex; align-items: center; justify-content: center; transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled)) { cursor: pointer; } :host([checked]:not(:state(-hide-selection))) .wrapper, :host(:state(-with-icon)) .wrapper { padding-inline-start: var(--m3e-segmented-button-with-icon-padding-start, 0.75rem); } :host(:not(:disabled)[checked]) .base { background-color: var(--m3e-segmented-button-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-hover-color: var( --m3e-segmented-button-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-segmented-button-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-segmented-button-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled)[checked]) .label { color: var(--m3e-segmented-button-selected-label-text-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled)[checked]) .icon { color: var(--m3e-segmented-button-selected-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled):not([checked])) .base { --m3e-state-layer-hover-color: var( --m3e-segmented-button-unselected-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-focus-color: var( --m3e-segmented-button-unselected-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-segmented-button-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([checked])) .label { color: var(--m3e-segmented-button-unselected-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([checked])) .icon { color: var(--m3e-segmented-button-unselected-icon-color, ${DesignToken$1.color.onSurface}); } :host(:not(:state(-with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-segmented-button-spacing, 0.5rem)); transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } .check, ::slotted([slot="icon"]) { width: 1em; font-size: var(--m3e-segmented-button-icon-size, 1.125rem) !important; } :host(:not([checked])) .check, :host(:state(-hide-selection)) .check, :host(:state(-hide-selection):not(:state(-with-icon))) .icon { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]:not(:state(-hide-selection))) ::slotted([slot="icon"]) { display: none !important; } :host(:disabled) .base { border-color: color-mix( in srgb, var(--m3e-segmented-button-disabled-outline-color, ${DesignToken$1.color.onSurface}) var(--m3e-segmented-button-disabled-outline-opacity, 12%), transparent ); border-inline-end-color: var( --_segmented-button-disabled-outline-color, color-mix( in srgb, var(--m3e-segmented-button-disabled-outline-color, ${DesignToken$1.color.onSurface}) var(--m3e-segmented-button-disabled-outline-opacity, 12%), transparent ) ); } :host(:disabled) .label { color: color-mix( in srgb, var(--m3e-segmented-button-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-segmented-button-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) .icon { color: color-mix( in srgb, var(--m3e-segmented-button-disabled-icon-color, ${DesignToken$1.color.onSurface}) var(--m3e-segmented-button-disabled-icon-opacity, 38%), transparent ); } @media (prefers-reduced-motion) { .base, .icon, .label { transition: none; } } @media (forced-colors: active) { .base, .icon, .label { transition: none !important; } :host(:disabled) .label, :host(:disabled) .icon { color: GrayText; } :host(:not([selected]):not(:disabled)) .label, :host(:not([selected]):not(:disabled)) .icon { color: ButtonText; } :host(:not(:disabled)[checked]) .base { background-color: ButtonText; } :host(:not(:disabled)[checked]) .label, :host(:not(:disabled)[checked]) .icon { forced-color-adjust: none; color: ButtonFace; } :host { --m3e-segmented-button-outline-color: ButtonText; } }`;
|
|
20430
|
-
__decorate([e$
|
|
20431
|
-
__decorate([e$
|
|
20432
|
-
__decorate([e$
|
|
20720
|
+
__decorate([e$3(".focus-ring")], M3eButtonSegmentElement.prototype, "_focusRing", void 0);
|
|
20721
|
+
__decorate([e$3(".state-layer")], M3eButtonSegmentElement.prototype, "_stateLayer", void 0);
|
|
20722
|
+
__decorate([e$3(".ripple")], M3eButtonSegmentElement.prototype, "_ripple", void 0);
|
|
20433
20723
|
__decorate([n$1()], M3eButtonSegmentElement.prototype, "value", void 0);
|
|
20434
20724
|
M3eButtonSegmentElement = M3eButtonSegmentElement_1 = __decorate([customElement$1("m3e-button-segment")], M3eButtonSegmentElement);
|
|
20435
20725
|
|
|
@@ -20598,33 +20888,7 @@ __decorate([n$1({
|
|
|
20598
20888
|
})], M3eSegmentedButtonElement.prototype, "hideSelectionIndicator", void 0);
|
|
20599
20889
|
M3eSegmentedButtonElement = __decorate([customElement$1("m3e-segmented-button")], M3eSegmentedButtonElement);
|
|
20600
20890
|
|
|
20601
|
-
|
|
20602
|
-
* @license
|
|
20603
|
-
* Copyright 2017 Google LLC
|
|
20604
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
20605
|
-
*/
|
|
20606
|
-
class e extends i {
|
|
20607
|
-
constructor(i) {
|
|
20608
|
-
if (super(i), this.it = E, i.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
20609
|
-
}
|
|
20610
|
-
render(r) {
|
|
20611
|
-
if (r === E || null == r) return this._t = void 0, this.it = r;
|
|
20612
|
-
if (r === T) return r;
|
|
20613
|
-
if ("string" != typeof r) throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
20614
|
-
if (r === this.it) return this._t;
|
|
20615
|
-
this.it = r;
|
|
20616
|
-
const s = [r];
|
|
20617
|
-
return s.raw = s, this._t = {
|
|
20618
|
-
_$litType$: this.constructor.resultType,
|
|
20619
|
-
strings: s,
|
|
20620
|
-
values: []
|
|
20621
|
-
};
|
|
20622
|
-
}
|
|
20623
|
-
}
|
|
20624
|
-
e.directiveName = "unsafeHTML", e.resultType = 1;
|
|
20625
|
-
const o = e$2(e);
|
|
20626
|
-
|
|
20627
|
-
var _M3eSelectElement_instances, _M3eSelectElement_menu, _M3eSelectElement_ignoreKeyUp, _M3eSelectElement_ignoreFocusVisible, _M3eSelectElement_id, _M3eSelectElement_listId, _M3eSelectElement_clickHandler, _M3eSelectElement_keyDownHandler, _M3eSelectElement_keyUpHandler, _M3eSelectElement_menuToggleHandler, _M3eSelectElement_menuPointerDownHandler, _M3eSelectElement_minMenuWidth_get, _M3eSelectElement_formField_get, _M3eSelectElement_handleSlotChange, _M3eSelectElement_handleClick, _M3eSelectElement_handleKeyDown, _M3eSelectElement_handleKeyUp, _M3eSelectElement_handleMenuPointerDown, _M3eSelectElement_handleMenuToggle, _M3eSelectElement_destroyMenu, _M3eSelectElement_toggleMenu, _M3eSelectElement_showMenu, _M3eSelectElement_hideMenu, _M3eSelectElement_activateOption, _M3eSelectElement_selectOption;
|
|
20891
|
+
var _M3eSelectElement_instances, _M3eSelectElement_clone, _M3eSelectElement_menu, _M3eSelectElement_ignoreKeyUp, _M3eSelectElement_ignoreFocusVisible, _M3eSelectElement_id, _M3eSelectElement_listId, _M3eSelectElement_clickHandler, _M3eSelectElement_keyDownHandler, _M3eSelectElement_keyUpHandler, _M3eSelectElement_menuToggleHandler, _M3eSelectElement_menuPointerDownHandler, _M3eSelectElement_options_get, _M3eSelectElement_selected_get, _M3eSelectElement_minMenuWidth_get, _M3eSelectElement_formField_get, _M3eSelectElement_handleMutation, _M3eSelectElement_handleClick, _M3eSelectElement_handleKeyDown, _M3eSelectElement_handleKeyUp, _M3eSelectElement_handleMenuPointerDown, _M3eSelectElement_handleMenuToggle, _M3eSelectElement_destroyMenu, _M3eSelectElement_toggleMenu, _M3eSelectElement_showMenu, _M3eSelectElement_hideMenu, _M3eSelectElement_activateOption, _M3eSelectElement_updateSelectionState, _M3eSelectElement_selectOption;
|
|
20628
20892
|
var M3eSelectElement_1;
|
|
20629
20893
|
/**
|
|
20630
20894
|
* A form control that allows users to select a value from a set of predefined options.
|
|
@@ -20683,6 +20947,10 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20683
20947
|
super();
|
|
20684
20948
|
_M3eSelectElement_instances.add(this);
|
|
20685
20949
|
/** @private */
|
|
20950
|
+
this._options = new Array();
|
|
20951
|
+
/** @private */
|
|
20952
|
+
_M3eSelectElement_clone.set(this, void 0);
|
|
20953
|
+
/** @private */
|
|
20686
20954
|
_M3eSelectElement_menu.set(this, void 0);
|
|
20687
20955
|
/** @private */
|
|
20688
20956
|
_M3eSelectElement_ignoreKeyUp.set(this, false);
|
|
@@ -20725,15 +20993,22 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20725
20993
|
}
|
|
20726
20994
|
}
|
|
20727
20995
|
});
|
|
20996
|
+
new MutationController$1(this, {
|
|
20997
|
+
config: {
|
|
20998
|
+
childList: true,
|
|
20999
|
+
subtree: true
|
|
21000
|
+
},
|
|
21001
|
+
callback: () => __classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_handleMutation).call(this)
|
|
21002
|
+
});
|
|
21003
|
+
}
|
|
21004
|
+
/** The options that can be selected. */
|
|
21005
|
+
get options() {
|
|
21006
|
+
return this._options ?? [];
|
|
20728
21007
|
}
|
|
20729
21008
|
/** The selected option(s). */
|
|
20730
21009
|
get selected() {
|
|
20731
21010
|
return this.options.filter(x => x.selected);
|
|
20732
21011
|
}
|
|
20733
|
-
/** The options that can be selected. */
|
|
20734
|
-
get options() {
|
|
20735
|
-
return this._listKeyManager?.items ?? [];
|
|
20736
|
-
}
|
|
20737
21012
|
/** The selected (enabled) value(s). */
|
|
20738
21013
|
get value() {
|
|
20739
21014
|
const values = this.selected.filter(x => !x.disabled).map(x => x.value);
|
|
@@ -20747,7 +21022,11 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20747
21022
|
}
|
|
20748
21023
|
}
|
|
20749
21024
|
/** @inheritdoc @internal */
|
|
20750
|
-
get [(_M3eSelectElement_menu = new WeakMap(), _M3eSelectElement_ignoreKeyUp = new WeakMap(), _M3eSelectElement_ignoreFocusVisible = new WeakMap(), _M3eSelectElement_id = new WeakMap(), _M3eSelectElement_listId = new WeakMap(), _M3eSelectElement_clickHandler = new WeakMap(), _M3eSelectElement_keyDownHandler = new WeakMap(), _M3eSelectElement_keyUpHandler = new WeakMap(), _M3eSelectElement_menuToggleHandler = new WeakMap(), _M3eSelectElement_menuPointerDownHandler = new WeakMap(), _M3eSelectElement_instances = new WeakSet(),
|
|
21025
|
+
get [(_M3eSelectElement_clone = new WeakMap(), _M3eSelectElement_menu = new WeakMap(), _M3eSelectElement_ignoreKeyUp = new WeakMap(), _M3eSelectElement_ignoreFocusVisible = new WeakMap(), _M3eSelectElement_id = new WeakMap(), _M3eSelectElement_listId = new WeakMap(), _M3eSelectElement_clickHandler = new WeakMap(), _M3eSelectElement_keyDownHandler = new WeakMap(), _M3eSelectElement_keyUpHandler = new WeakMap(), _M3eSelectElement_menuToggleHandler = new WeakMap(), _M3eSelectElement_menuPointerDownHandler = new WeakMap(), _M3eSelectElement_instances = new WeakSet(), _M3eSelectElement_options_get = function _M3eSelectElement_options_get() {
|
|
21026
|
+
return this._listKeyManager?.items ?? [];
|
|
21027
|
+
}, _M3eSelectElement_selected_get = function _M3eSelectElement_selected_get() {
|
|
21028
|
+
return __classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_options_get).filter(x => x.selected);
|
|
21029
|
+
}, formValue$1)]() {
|
|
20751
21030
|
const values = this.value;
|
|
20752
21031
|
if (Array.isArray(values)) {
|
|
20753
21032
|
const data = new FormData();
|
|
@@ -20775,10 +21054,13 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20775
21054
|
* @param [restoreFocus=false] Whether to restore input focus.
|
|
20776
21055
|
*/
|
|
20777
21056
|
clear(restoreFocus = false) {
|
|
20778
|
-
const selected = this
|
|
21057
|
+
const selected = __classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_selected_get);
|
|
20779
21058
|
const willChange = selected.length > 0;
|
|
20780
21059
|
if (willChange) {
|
|
20781
|
-
selected.forEach(x =>
|
|
21060
|
+
selected.forEach(x => {
|
|
21061
|
+
x.selected = false;
|
|
21062
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, x);
|
|
21063
|
+
});
|
|
20782
21064
|
this.requestUpdate();
|
|
20783
21065
|
}
|
|
20784
21066
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_hideMenu).call(this);
|
|
@@ -20799,6 +21081,7 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20799
21081
|
this.addEventListener("click", __classPrivateFieldGet(this, _M3eSelectElement_clickHandler, "f"));
|
|
20800
21082
|
this.addEventListener("keydown", __classPrivateFieldGet(this, _M3eSelectElement_keyDownHandler, "f"));
|
|
20801
21083
|
this.addEventListener("keyup", __classPrivateFieldGet(this, _M3eSelectElement_keyUpHandler, "f"));
|
|
21084
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_handleMutation).call(this);
|
|
20802
21085
|
}
|
|
20803
21086
|
/** @inheritdoc */
|
|
20804
21087
|
disconnectedCallback() {
|
|
@@ -20811,7 +21094,7 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20811
21094
|
update(changedProperties) {
|
|
20812
21095
|
super.update(changedProperties);
|
|
20813
21096
|
if (changedProperties.has("hideSelectionIndicator")) {
|
|
20814
|
-
this.
|
|
21097
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_options_get).forEach(x => setCustomState$1(x, "-hide-selection-indicator", this.hideSelectionIndicator));
|
|
20815
21098
|
}
|
|
20816
21099
|
}
|
|
20817
21100
|
/** @inheritdoc */
|
|
@@ -20824,7 +21107,7 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
20824
21107
|
}
|
|
20825
21108
|
/** @inheritdoc */
|
|
20826
21109
|
render() {
|
|
20827
|
-
return html`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(x => !x.isEmpty).map((x, i) => i > 0 ? html`<span>, </span>${
|
|
21110
|
+
return html`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(x => !x.isEmpty).map((x, i) => i > 0 ? html`<span>, </span>${x[typeaheadLabel]()}` : x[typeaheadLabel]())}</slot></m3e-text-overflow><div class="arrow-wrapper" aria-hidden="true"><slot name="arrow"><svg class="arrow" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><div class="options" aria-hidden="true"><slot></slot></div>`;
|
|
20828
21111
|
}
|
|
20829
21112
|
};
|
|
20830
21113
|
_M3eSelectElement_minMenuWidth_get = function _M3eSelectElement_minMenuWidth_get() {
|
|
@@ -20834,16 +21117,23 @@ _M3eSelectElement_minMenuWidth_get = function _M3eSelectElement_minMenuWidth_get
|
|
|
20834
21117
|
_M3eSelectElement_formField_get = function _M3eSelectElement_formField_get() {
|
|
20835
21118
|
return this.closest("m3e-form-field");
|
|
20836
21119
|
};
|
|
20837
|
-
|
|
20838
|
-
|
|
21120
|
+
_M3eSelectElement_handleMutation = function _M3eSelectElement_handleMutation() {
|
|
21121
|
+
__classPrivateFieldSet(this, _M3eSelectElement_clone, this.cloneNode(true), "f");
|
|
20839
21122
|
const {
|
|
20840
21123
|
added
|
|
20841
|
-
} = this._listKeyManager.setItems([...this.querySelectorAll("m3e-option")]);
|
|
21124
|
+
} = this._listKeyManager.setItems([...__classPrivateFieldGet(this, _M3eSelectElement_clone, "f").querySelectorAll("m3e-option")]);
|
|
20842
21125
|
added.forEach(x => {
|
|
20843
21126
|
x.id = x.id || `${__classPrivateFieldGet(this, _M3eSelectElement_id, "f")}-option-${this._listKeyManager.items.indexOf(x)}`;
|
|
20844
21127
|
setCustomState$1(x, "-hide-selection-indicator", this.hideSelectionIndicator);
|
|
20845
21128
|
});
|
|
21129
|
+
this._options = [...this.querySelectorAll("m3e-option")];
|
|
20846
21130
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
21131
|
+
if (__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")) {
|
|
21132
|
+
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").replaceChildren(...__classPrivateFieldGet(this, _M3eSelectElement_clone, "f").childNodes);
|
|
21133
|
+
if (this._options.length == 0) {
|
|
21134
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_hideMenu).call(this);
|
|
21135
|
+
}
|
|
21136
|
+
}
|
|
20847
21137
|
};
|
|
20848
21138
|
_M3eSelectElement_handleClick = function _M3eSelectElement_handleClick(e) {
|
|
20849
21139
|
if (e.defaultPrevented || this.disabled) return;
|
|
@@ -20936,7 +21226,7 @@ _M3eSelectElement_handleMenuPointerDown = function _M3eSelectElement_handleMenuP
|
|
|
20936
21226
|
_M3eSelectElement_handleMenuToggle = function _M3eSelectElement_handleMenuToggle(e) {
|
|
20937
21227
|
if (!__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")) return;
|
|
20938
21228
|
if (e.newState !== "closed") {
|
|
20939
|
-
const option = this.
|
|
21229
|
+
const option = __classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_selected_get).find(x => !x.disabled) ?? this._listKeyManager.items.find(x => !x.disabled);
|
|
20940
21230
|
this._listKeyManager.setActiveItem(option);
|
|
20941
21231
|
if (option) {
|
|
20942
21232
|
scrollIntoViewIfNeeded$1(option, __classPrivateFieldGet(this, _M3eSelectElement_menu, "f"), {
|
|
@@ -20960,7 +21250,7 @@ _M3eSelectElement_handleMenuToggle = function _M3eSelectElement_handleMenuToggle
|
|
|
20960
21250
|
};
|
|
20961
21251
|
_M3eSelectElement_destroyMenu = function _M3eSelectElement_destroyMenu(e) {
|
|
20962
21252
|
if (!__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")) return;
|
|
20963
|
-
|
|
21253
|
+
__classPrivateFieldGet(this, _M3eSelectElement_clone, "f")?.replaceChildren(...__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").childNodes);
|
|
20964
21254
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").remove();
|
|
20965
21255
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").removeEventListener("toggle", __classPrivateFieldGet(this, _M3eSelectElement_menuToggleHandler, "f"));
|
|
20966
21256
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").removeEventListener("pointerdown", __classPrivateFieldGet(this, _M3eSelectElement_menuPointerDownHandler, "f"));
|
|
@@ -20985,7 +21275,7 @@ _M3eSelectElement_toggleMenu = function _M3eSelectElement_toggleMenu() {
|
|
|
20985
21275
|
}
|
|
20986
21276
|
};
|
|
20987
21277
|
_M3eSelectElement_showMenu = function _M3eSelectElement_showMenu() {
|
|
20988
|
-
if (__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")) return;
|
|
21278
|
+
if (__classPrivateFieldGet(this, _M3eSelectElement_menu, "f") || this._options.length == 0) return;
|
|
20989
21279
|
__classPrivateFieldSet(this, _M3eSelectElement_menu, document.createElement("m3e-option-panel"), "f");
|
|
20990
21280
|
if (this.multi) {
|
|
20991
21281
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").ariaMultiSelectable = "true";
|
|
@@ -20995,8 +21285,8 @@ _M3eSelectElement_showMenu = function _M3eSelectElement_showMenu() {
|
|
|
20995
21285
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").style.minWidth = __classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_minMenuWidth_get);
|
|
20996
21286
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").addEventListener("toggle", __classPrivateFieldGet(this, _M3eSelectElement_menuToggleHandler, "f"));
|
|
20997
21287
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").addEventListener("pointerdown", __classPrivateFieldGet(this, _M3eSelectElement_menuPointerDownHandler, "f"));
|
|
20998
|
-
|
|
20999
|
-
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").
|
|
21288
|
+
if (__classPrivateFieldGet(this, _M3eSelectElement_clone, "f")) {
|
|
21289
|
+
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").replaceChildren(...__classPrivateFieldGet(this, _M3eSelectElement_clone, "f").childNodes);
|
|
21000
21290
|
}
|
|
21001
21291
|
(__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get) ?? this).insertAdjacentElement("afterend", __classPrivateFieldGet(this, _M3eSelectElement_menu, "f"));
|
|
21002
21292
|
this.ariaExpanded = "true";
|
|
@@ -21022,7 +21312,7 @@ _M3eSelectElement_activateOption = function _M3eSelectElement_activateOption(opt
|
|
|
21022
21312
|
behavior: "instant"
|
|
21023
21313
|
});
|
|
21024
21314
|
const focusVisible = !__classPrivateFieldGet(this, _M3eSelectElement_ignoreFocusVisible, "f") && (this.matches(":focus-visible") || forcedColorsActive$1());
|
|
21025
|
-
this.
|
|
21315
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_options_get).forEach(x => {
|
|
21026
21316
|
const active = x === option && focusVisible;
|
|
21027
21317
|
if (active) {
|
|
21028
21318
|
x.focusRing?.show();
|
|
@@ -21034,17 +21324,27 @@ _M3eSelectElement_activateOption = function _M3eSelectElement_activateOption(opt
|
|
|
21034
21324
|
});
|
|
21035
21325
|
}
|
|
21036
21326
|
};
|
|
21327
|
+
_M3eSelectElement_updateSelectionState = function _M3eSelectElement_updateSelectionState(clone) {
|
|
21328
|
+
const option = this._options[this._listKeyManager.items.indexOf(clone)];
|
|
21329
|
+
if (option) {
|
|
21330
|
+
option.selected = clone.selected;
|
|
21331
|
+
}
|
|
21332
|
+
};
|
|
21037
21333
|
_M3eSelectElement_selectOption = function _M3eSelectElement_selectOption(option) {
|
|
21038
21334
|
const selected = this.multi ? !option.selected : true;
|
|
21039
21335
|
if (option.selected === selected) return;
|
|
21040
21336
|
option.selected = selected;
|
|
21337
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, option);
|
|
21041
21338
|
if (this.dispatchEvent(new Event("input", {
|
|
21042
21339
|
bubbles: true,
|
|
21043
21340
|
composed: true,
|
|
21044
21341
|
cancelable: true
|
|
21045
21342
|
}))) {
|
|
21046
21343
|
if (!this.multi) {
|
|
21047
|
-
this.
|
|
21344
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_selected_get).filter(x => x !== option).forEach(x => {
|
|
21345
|
+
x.selected = false;
|
|
21346
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, x);
|
|
21347
|
+
});
|
|
21048
21348
|
}
|
|
21049
21349
|
this.requestUpdate();
|
|
21050
21350
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
@@ -21053,13 +21353,14 @@ _M3eSelectElement_selectOption = function _M3eSelectElement_selectOption(option)
|
|
|
21053
21353
|
}));
|
|
21054
21354
|
} else {
|
|
21055
21355
|
option.selected = !selected;
|
|
21356
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, option);
|
|
21056
21357
|
}
|
|
21057
21358
|
};
|
|
21058
21359
|
/** The styles of the element. */
|
|
21059
21360
|
M3eSelectElement.styles = css`:host { display: inline-flex; vertical-align: middle; outline: none; position: relative; font-size: var(--m3e-form-field-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); min-height: var(--m3e-form-field-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); border-radius: var(--m3e-select-container-shape, ${DesignToken$1.shape.corner.extraSmall}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) { color: color-mix( in srgb, var(--m3e-select-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-select-disabled-color-opacity, 38%), transparent ); } .options { display: none; } .base { flex: 1 1 auto; display: inline-flex; align-items: center; overflow: hidden; } .arrow-wrapper { display: flex; align-items: center; justify-content: center; margin-top: var(--_select-arrow-margin-top); } ::slotted([slot="arrow"]), .arrow { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-select-icon-size, 1.5rem); } :host(:state(-open)) .focus-ring { display: none; }`;
|
|
21060
21361
|
/** @private */
|
|
21061
21362
|
M3eSelectElement.__nextId = 0;
|
|
21062
|
-
__decorate([e$
|
|
21363
|
+
__decorate([e$3(".focus-ring")], M3eSelectElement.prototype, "_focusRing", void 0);
|
|
21063
21364
|
__decorate([n$1({
|
|
21064
21365
|
attribute: "hide-selection-indicator",
|
|
21065
21366
|
type: Boolean
|
|
@@ -21375,7 +21676,7 @@ _M3eSlideGroupElement_pageEnd = function _M3eSlideGroupElement_pageEnd() {
|
|
|
21375
21676
|
};
|
|
21376
21677
|
/** The styles of the element. */
|
|
21377
21678
|
M3eSlideGroupElement.styles = css`:host { display: flex; flex-wrap: nowrap; overflow: hidden; } :host([vertical]) { flex-direction: column; } .prev-button, .next-button { flex: none; --m3e-icon-button-small-shape-round: 0px; --m3e-icon-button-small-shape-square: 0px; --m3e-icon-button-small-shape-pressed-morph: 0px; --m3e-focus-ring-visibility: hidden; } ::slotted(prev-icon), ::slotted(next-icon), .icon { width: 1em; font-size: var(--m3e-slide-group-button-icon-size, var(--m3e-icon-button-small-icon-size, 1.5rem)) !important; } :host(:not([vertical])) .prev-button, :host(:not([vertical])) .next-button { --m3e-icon-button-small-container-height: 100%; width: var(--m3e-slide-group-button-size, 2.5rem); } :host([vertical]) .prev-button, :host([vertical]) .next-button { width: unset; --m3e-icon-button-small-container-height: var(--m3e-slide-group-button-size, 2.5rem); } :host([vertical]) .prev-button .icon, :host([vertical]) .next-button .icon { transform: rotate(90deg); } .content { flex: 1 1 auto; display: inherit; flex-wrap: inherit; flex-direction: inherit; overflow: inherit; position: relative; border-top: var(--m3e-slide-group-divider-top); border-bottom: var(--m3e-slide-group-divider-bottom); }`;
|
|
21378
|
-
__decorate([e$
|
|
21679
|
+
__decorate([e$3(".content")], M3eSlideGroupElement.prototype, "scrollContainer", void 0);
|
|
21379
21680
|
__decorate([r$1()], M3eSlideGroupElement.prototype, "_canPage", void 0);
|
|
21380
21681
|
__decorate([r$1()], M3eSlideGroupElement.prototype, "_canPageStart", void 0);
|
|
21381
21682
|
__decorate([r$1()], M3eSlideGroupElement.prototype, "_canPageEnd", void 0);
|
|
@@ -21499,7 +21800,7 @@ _M3eSliderThumbElement_labelText_get = function _M3eSliderThumbElement_labelText
|
|
|
21499
21800
|
M3eSliderThumbElement.styles = css`:host { display: block; box-sizing: border-box; position: absolute; outline: none; top: 0; bottom: 0; border-radius: var(--m3e-slider-thumb-shape, ${DesignToken$1.shape.corner.full}); user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; height: 100%; border-radius: inherit; } .touch { position: absolute; height: 3rem; left: 0; right: 0; touch-action: none; } .wrapper { display: inline-flex; justify-content: center; height: 100%; border-radius: inherit; width: calc(var(--m3e-slider-thumb-width, 0.25rem) + calc(var(--m3e-slider-thumb-padding, 0.375em) * 2)); } .focus-ring { top: calc(0px - var(--m3e-focus-ring-thickness, 3px)); bottom: calc(0px - var(--m3e-focus-ring-thickness, 3px)); left: var(--m3e-focus-ring-thickness, 3px); right: var(--m3e-focus-ring-thickness, 3px); } .label { user-select: none; position: absolute; display: flex; align-items: center; justify-content: center; visibility: var(--_slider-label-visibility, hidden); opacity: var(--_slider-label-opacity, 0); transform: var(--_slider-label-transform, scale(0)); transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
21500
21801
|
transform ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
21501
21802
|
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; width: var(--m3e-slider-label-width, 3rem); height: var(--_m3e-slider-label-height, 2.75rem); top: calc(0px - var(--_m3e-slider-label-height, 2.75rem) - var(--_m3e-slider-label-margin, 0.25rem)); inset-inline-start: calc(0px - 100%); border-radius: var(--m3e-slider-label-shape, ${DesignToken$1.shape.corner.full}); background-color: var(--m3e-slider-label-container-color, ${DesignToken$1.color.inverseSurface}); color: var(--m3e-slider-label-color, ${DesignToken$1.color.inverseOnSurface}); font-size: var(--m3e-slider-label-font-size, ${DesignToken$1.typescale.standard.label.medium.fontSize}); font-weight: var(--m3e-slider-label-font-weight, ${DesignToken$1.typescale.standard.label.medium.fontWeight}); line-height: var(--m3e-slider-label-line-height, ${DesignToken$1.typescale.standard.label.medium.lineHeight}); letter-spacing: var(--m3e-slider-label-tracking, ${DesignToken$1.typescale.standard.label.medium.tracking}); } @starting-style { .label { opacity: 0; transform: scale(0); } } .handle { height: 100%; width: var(--m3e-slider-thumb-width, 0.25rem); border-radius: inherit; transition: ${unsafeCSS(`width ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:active:not([aria-disabled="true"])) .handle { width: var(--m3e-slider-thumb-pressed-width, 2px); } :host(:not([aria-disabled="true"])) .handle { background-color: var(--m3e-slider-thumb-color, ${DesignToken$1.color.primary}); } :host([aria-disabled="true"]) .handle { opacity: var(--m3e-slider-thumb-disabled-opacity, 38%); background-color: var(--m3e-slider-thumb-disabled-color, ${DesignToken$1.color.onSurface}); } @media (prefers-reduced-motion) { .label { transition: none; } } @media (forced-colors: active) { .label { forced-color-adjust: none; background-color: CanvasText; color: Canvas; } :host(:not([aria-disabled="true"])) .handle { background-color: CanvasText; } :host([aria-disabled="true"]) .handle { opacity: unset; background-color: GrayText; } }`;
|
|
21502
|
-
__decorate([e$
|
|
21803
|
+
__decorate([e$3(".focus-ring")], M3eSliderThumbElement.prototype, "_focusRing", void 0);
|
|
21503
21804
|
__decorate([n$1({
|
|
21504
21805
|
type: Number,
|
|
21505
21806
|
reflect: true
|
|
@@ -21678,7 +21979,7 @@ let M3eSliderElement = class M3eSliderElement extends AttachInternals$1(LitEleme
|
|
|
21678
21979
|
}
|
|
21679
21980
|
/** @inheritdoc */
|
|
21680
21981
|
render() {
|
|
21681
|
-
return html`<div class="base" tabindex="${o
|
|
21982
|
+
return html`<div class="base" tabindex="${o(!this.disabled ? "-1" : undefined)}" @pointerdown="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handlePointerDown)}" @pointermove="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handlePointerMove)}" @pointerup="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handlePointerUp)}" @keydown="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handleKeyDown)}" @value-change="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handleThumbChange)}"><div class="track" aria-hidden="true"><div class="track-inactive start"></div><div class="track-active"></div><div class="track-inactive end"></div></div><div class="ticks" aria-hidden="true">${this._ticks.map(x => __classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_renderTick).call(this, x))}</div><slot @slotchange="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handleSlotChange)}"></slot></div>`;
|
|
21682
21983
|
}
|
|
21683
21984
|
};
|
|
21684
21985
|
_M3eSliderElement_directionalitySubscription = new WeakMap();
|
|
@@ -21955,7 +22256,7 @@ _M3eSliderElement_changeThumb = function _M3eSliderElement_changeThumb(thumb, va
|
|
|
21955
22256
|
/** The styles of the element. */
|
|
21956
22257
|
M3eSliderElement.styles = css`:host { display: inline-block; vertical-align: middle; min-inline-size: var(--m3e-slider-min-width, 12.5rem); user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not([disabled])) { cursor: pointer; } :host([size="extra-small"]), :host([size="small"]) { height: var(--m3e-slider-small-height, 2.75rem); } :host(:not(:dir(rtl))[size="extra-small"]) .base, :host(:not(:dir(rtl))[size="small"]) .base { --_slider-active-track-shape: var(--m3e-slider-small-active-track-shape, ${DesignToken$1.shape.corner.smallStart}); --_slider-inactive-track-start-shape: var( --m3e-slider-small-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.smallStart} ); --_slider-inactive-track-end-shape: var( --m3e-slider-small-inactive-track-end-shape, ${DesignToken$1.shape.corner.smallEnd} ); } :host(:dir(rtl)[size="extra-small"]) .base, :host(:dir(rtl)[size="small"]) .base { --_slider-active-track-shape: var(--m3e-slider-small-active-track-shape, ${DesignToken$1.shape.corner.smallEnd}); --_slider-inactive-track-start-shape: var( --m3e-slider-small-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.smallEnd} ); --_slider-inactive-track-end-shape: var( --m3e-slider-small-inactive-track-end-shape, ${DesignToken$1.shape.corner.smallStart} ); } :host([size="extra-small"]) .track { height: calc(var(--m3e-slider-extra-small-track-height, 1rem)); } :host([size="small"]) .track { height: calc(var(--m3e-slider-small-track-height, 1.5rem)); } :host([size="medium"]) { height: var(--m3e-slider-medium-height, 3.25rem); } :host(:not(:dir(rtl))[size="medium"]) .base { --_slider-active-track-shape: var( --m3e-slider-medium-active-track-shape, ${DesignToken$1.shape.corner.mediumStart} ); --_slider-inactive-track-start-shape: var( --m3e-slider-medium-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.mediumStart} ); --_slider-inactive-track-end-shape: var( --m3e-slider-medium-inactive-track-end-shape, ${DesignToken$1.shape.corner.mediumEnd} ); } :host(:dir(rtl)[size="medium"]) .base { --_slider-active-track-shape: var(--m3e-slider-medium-active-track-shape, ${DesignToken$1.shape.corner.mediumEnd}); --_slider-inactive-track-start-shape: var( --m3e-slider-medium-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.mediumEnd} ); --_slider-inactive-track-end-shape: var( --m3e-slider-medium-inactive-track-end-shape, ${DesignToken$1.shape.corner.mediumStart} ); } :host([size="medium"]) .track { height: var(--m3e-slider-medium-track-height, 2.5rem); } :host([size="large"]) { height: var(--m3e-slider-large-height, 4.25rem); } :host(:not(:dir(rtl))[size="large"]) .base { --_slider-active-track-shape: var(--m3e-slider-large-active-track-shape, ${DesignToken$1.shape.corner.largeStart}); --_slider-inactive-track-start-shape: var( --m3e-slider-large-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.largeStart} ); --_slider-inactive-track-end-shape: var( --m3e-slider-large-inactive-track-end-shape, ${DesignToken$1.shape.corner.largeEnd} ); } :host(:dir(rtl)[size="large"]) .base { --_slider-active-track-shape: var(--m3e-slider-large-active-track-shape, ${DesignToken$1.shape.corner.largeEnd}); --_slider-inactive-track-start-shape: var( --m3e-slider-large-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.largeEnd} ); --_slider-inactive-track-end-shape: var( --m3e-slider-large-inactive-track-end-shape, ${DesignToken$1.shape.corner.largeStart} ); } :host([size="large"]) .track { height: var(--m3e-slider-large-track-height, 3.5rem); } :host([size="extra-large"]) { height: var(--m3e-slider-extra-large-height, 6.75rem); } :host(:not(:dir(rtl))[size="extra-large"]) .base { --_slider-active-track-shape: var( --m3e-slider-extra-large-active-track-shape, ${DesignToken$1.shape.corner.extraLargeStart} ); --_slider-inactive-track-start-shape: var( --m3e-slider-extra-large-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.extraLargeStart} ); --_slider-inactive-track-end-shape: var( --m3e-slider-extra-large-inactive-track-end-shape, ${DesignToken$1.shape.corner.extraLargeEnd} ); } :host(:dir(rtl)[size="extra-large"]) .base { --_slider-active-track-shape: var( --m3e-slider-extra-large-active-track-shape, ${DesignToken$1.shape.corner.extraLargeEnd} ); --_slider-inactive-track-start-shape: var( --m3e-slider-extra-large-inactive-active-track-start-shape, ${DesignToken$1.shape.corner.extraLargeEnd} ); --_slider-inactive-track-end-shape: var( --m3e-slider-extra-large-inactive-track-end-shape, ${DesignToken$1.shape.corner.extraLargeStart} ); } :host([size="extra-large"]) .track { height: var(--m3e-slider-extra-large-track-height, 6rem); } :host(:state(-animating)) .track-active, :host(:state(-animating)) .track-inactive.start, :host(:state(-animating)) .track-inactive.end { transition: ${unsafeCSS(`margin-inline-start ${DesignToken$1.motion.spring.fastEffects},
|
|
21957
22258
|
width ${DesignToken$1.motion.spring.fastEffects}`)}; } .base { display: inline-flex; align-items: center; position: relative; width: 100%; height: 100%; border-radius: inherit; outline: none; touch-action: none; } .track { position: relative; flex: 1 1 auto; touch-action: none; } .track-inactive, .track-active { position: absolute; height: 100%; touch-action: none; } .track-active { margin-inline-start: var(--_slider-active-track-offset, 0px); width: var(--_slider-active-track-size, 0px); border-radius: var(--_slider-active-track-middle-shape, var(--_slider-active-track-shape)); } .track-inactive.start { width: var(--_slider-inactive-track-before-size, 0px); border-radius: var(--_slider-inactive-track-start-shape); } .track-inactive.end { margin-inline-start: var(--_slider-inactive-track-after-offset, 0px); width: var(--_slider-inactive-track-after-size, 0px); border-radius: var(--_slider-inactive-track-end-shape); } .ticks { position: absolute; width: 100%; height: var(--m3e-slider-tick-size, 0.25rem); overflow: visible; touch-action: none; } .tick { position: absolute; top: 0; touch-action: none; inset-inline-start: calc(var(--m3e-slider-tick-size, 0.25rem) + calc(var(--m3e-slider-tick-size, 0.25rem) / 2)); width: var(--m3e-slider-tick-size, 0.25rem); height: var(--m3e-slider-tick-size, 0.25rem); border-radius: var(--m3e-slider-tick-shape, ${DesignToken$1.shape.corner.full}); } :host(:not([disabled])) .track-inactive { background-color: var(--m3e-slider-inactive-track-color, ${DesignToken$1.color.secondaryContainer}); } :host([disabled]) .track-inactive { background-color: color-mix( in srgb, var(--m3e-slider-disabled-inactive-track-color, ${DesignToken$1.color.onSurface}) var(--m3e-slider-disabled-inactive-track-opacity, 12%), transparent ); } :host(:not([disabled])) .track-active { background-color: var(--m3e-slider-active-track-color, ${DesignToken$1.color.primary}); } :host([disabled]) .track-active { background-color: color-mix( in srgb, var(--m3e-slider-disabled-active-track-color, ${DesignToken$1.color.onSurface}) var(--m3e-slider-disabled-active-track-opacity, 38%), transparent ); } :host(:not([disabled])) .tick.active { background-color: var(--m3e-slider-tick-active-color, ${DesignToken$1.color.onPrimary}); } :host([disabled]) .tick.active { background-color: var(--m3e-slider-disabled-tick-active-color, ${DesignToken$1.color.inverseOnSurface}); } :host(:not([disabled])) .tick.inactive { background-color: var(--m3e-slider-tick-inactive-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([disabled]) .tick.inactive { background-color: var(--m3e-slider-disabled-tick-inactive-color, ${DesignToken$1.color.onSurface}); } :host(:not([discrete])) .tick.active { display: none; } :host(:hover[labelled]) .base, :host(:focus-within[labelled]) .base { --_slider-label-visibility: visible; --_slider-label-opacity: 1; --_slider-label-transform: scale(1); } @media (forced-colors: active) { :host(:not([disabled])) .track-inactive { background-color: unset; } :host(:not([disabled])) .base.range .track-inactive.start, :host(:not([disabled])) .track-inactive.end { border: 1px solid CanvasText; box-sizing: border-box; } :host(:not([disabled])) .tick.inactive { background-color: CanvasText; } :host(:not([disabled])) .tick.active { background-color: Canvas; } :host(:not([disabled])) .track-active { background-color: CanvasText; } :host([disabled]) .base.range .track-inactive.start, :host([disabled]) .track-inactive.end { border: 1px solid GrayText; box-sizing: border-box; } :host([disabled]) .track-active { background-color: GrayText; } :host([disabled]) .tick.inactive { background-color: GrayText; } :host([disabled]) .tick.active { background-color: Canvas; } }`;
|
|
21958
|
-
__decorate([e$
|
|
22259
|
+
__decorate([e$3(".base")], M3eSliderElement.prototype, "_base", void 0);
|
|
21959
22260
|
__decorate([r$1()], M3eSliderElement.prototype, "_ticks", void 0);
|
|
21960
22261
|
__decorate([n$1({
|
|
21961
22262
|
reflect: true
|
|
@@ -22403,7 +22704,7 @@ _M3eSplitButtonElement_updateButtonShape = function _M3eSplitButtonElement_updat
|
|
|
22403
22704
|
};
|
|
22404
22705
|
/** The styles of the element. */
|
|
22405
22706
|
M3eSplitButtonElement.styles = css`:host { display: inline-flex; vertical-align: middle; } ::slotted([slot="leading-button"]) { flex: 1 1 auto; min-width: 0; --_button-start-shape-pressed-morph: var(--_leading-button-shape, ${DesignToken$1.shape.corner.full}); } ::slotted([slot="trailing-button"]:not([aria-expanded="true"])) { --m3e-icon-button-extra-small-default-leading-space: var( --m3e-split-button-extra-small-trailing-button-unselected-leading-space, 0.75rem ); --m3e-icon-button-extra-small-default-trailing-space: var( --m3e-split-button-extra-small-trailing-button-unselected-trailing-space, 0.875rem ); --m3e-icon-button-small-default-leading-space: var( --m3e-split-button-small-trailing-button-unselected-leading-space, 0.75rem ); --m3e-icon-button-small-default-trailing-space: var( --m3e-split-button-small-trailing-button-unselected-trailing-space, 0.875rem ); --m3e-icon-button-medium-default-leading-space: var( --m3e-split-button-medium-trailing-button-unselected-leading-space, 0.8125rem ); --m3e-icon-button-medium-default-trailing-space: var( --m3e-split-button-medium-trailing-button-unselected-trailing-space, 1.0625rem ); --m3e-icon-button-large-default-leading-space: var( --m3e-split-button-large-trailing-button-unselected-leading-space, 1.625rem ); --m3e-icon-button-large-default-trailing-space: var( --m3e-split-button-large-trailing-button-unselected-trailing-space, 2rem ); --m3e-icon-button-extra-large-default-leading-space: var( --m3e-split-button-extra-large-trailing-button-unselected-leading-space, 2.3125rem ); --m3e-icon-button-extra-large-default-trailing-space: var( --m3e-split-button-extra-large-trailing-button-unselected-trailing-space, 3.0625rem ); } ::slotted([slot="trailing-button"][aria-expanded="true"]) { --m3e-icon-button-extra-small-default-leading-space: var( --m3e-split-button-extra-small-trailing-button-selected-leading-space, 0.8125rem ); --m3e-icon-button-extra-small-default-trailing-space: var( --m3e-split-button-extra-small-trailing-button-selected-trailing-space, 0.8125rem ); --m3e-icon-button-small-default-leading-space: var( --m3e-split-button-small-trailing-button-selected-leading-space, 0.8125rem ); --m3e-icon-button-small-default-trailing-space: var( --m3e-split-button-small-trailing-button-selected-trailing-space, 0.8125rem ); --m3e-icon-button-medium-default-leading-space: var( --m3e-split-button-medium-trailing-button-selected-leading-space, 0.9375rem ); --m3e-icon-button-medium-default-trailing-space: var( --m3e-split-button-medium-trailing-button-selected-trailing-space, 0.9375rem ); --m3e-icon-button-large-default-leading-space: var( --m3e-split-button-large-trailing-button-selected-leading-space, 1.8125rem ); --m3e-icon-button-large-default-trailing-space: var( --m3e-split-button-large-trailing-button-selected-trailing-space, 1.8125rem ); --m3e-icon-button-extra-large-default-leading-space: var( --m3e-split-button-extra-large-trailing-button-selected-leading-space, 2.6875rem ); --m3e-icon-button-extra-large-default-trailing-space: var( --m3e-split-button-extra-large-trailing-button-selected-trailing-space, 2.6875rem ); } ::slotted([slot="leading-button"]:not(:hover)), ::slotted([slot="leading-button"]:disabled), ::slotted([slot="leading-button"][disabled-interactive]) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-size, ${DesignToken$1.shape.corner.small} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-size, ${DesignToken$1.shape.corner.medium} ); } ::slotted([slot="leading-button"]:hover:not(:disabled):not([disabled-interactive])), ::slotted([slot="trailing-button"]:not([aria-expanded="true"]):hover:not(:disabled):not([disabled-interactive])) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-hover-size, ${DesignToken$1.shape.corner.small} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-hover-size, ${DesignToken$1.shape.corner.medium} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-hover-size, ${DesignToken$1.shape.corner.medium} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-hover-size, ${DesignToken$1.shape.corner.largeIncreased} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-hover-size, ${DesignToken$1.shape.corner.largeIncreased} ); } ::slotted([slot="leading-button"]), ::slotted([slot="trailing-button"]) { --m3e-connected-button-group-extra-small-inner-pressed-shape: var( --m3e-split-button-extra-small-inner-corner-pressed-size, ${DesignToken$1.shape.corner.small} ); --m3e-connected-button-group-small-inner-pressed-shape: var( --m3e-split-button-small-inner-corner-pressed-size, ${DesignToken$1.shape.corner.medium} ); --m3e-connected-button-group-medium-inner-pressed-shape: var( --m3e-split-button-medium-inner-corner-pressed-size, ${DesignToken$1.shape.corner.medium} ); --m3e-connected-button-group-large-inner-pressed-shape: var( --m3e-split-button-large-inner-corner-pressed-size, ${DesignToken$1.shape.corner.largeIncreased} ); --m3e-connected-button-group-extra-large-inner-pressed-shape: var( --m3e-split-button-extra-large-inner-corner-pressed-size, ${DesignToken$1.shape.corner.largeIncreased} ); } ::slotted([slot="trailing-button"]:not([aria-expanded="true"]):not(:hover)), ::slotted([slot="trailing-button"]:disabled), ::slotted([slot="trailing-button"][disabled-interactive]) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-size, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-size, ${DesignToken$1.shape.corner.small} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-size, ${DesignToken$1.shape.corner.medium} ); } ::slotted([slot="trailing-button"][aria-expanded="true"]) { --_icon-button-icon-transform: rotate(180deg); --_button-rounded-start-shape: var(--_trailing-button-shape, ${DesignToken$1.shape.corner.full}); --_button-rounded-end-shape: var(--_trailing-button-shape, ${DesignToken$1.shape.corner.full}); } ::slotted([slot="trailing-button"]) { --_button-end-shape-pressed-morph: var(--_trailing-button-shape, ${DesignToken$1.shape.corner.full}); } .base { --m3e-icon-button-extra-small-icon-size: calc( var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken$1.density.calc(0)} ); --m3e-button-extra-small-icon-size: calc( var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken$1.density.calc(0)} ); --m3e-icon-button-small-icon-size: calc( var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken$1.density.calc(-1)} ); --m3e-button-small-icon-size: calc( var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken$1.density.calc(-1)} ); --m3e-icon-button-medium-icon-size: calc( var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken$1.density.calc(-2)} ); --m3e-button-medium-icon-size: calc( var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken$1.density.calc(-2)} ); --m3e-icon-button-large-icon-size: calc( var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken$1.density.calc(-3)} ); --m3e-button-large-icon-size: calc( var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken$1.density.calc(-3)} ); --m3e-icon-button-extra-large-icon-size: calc( var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken$1.density.calc(-3)} ); --m3e-button-extra-large-icon-size: calc( var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken$1.density.calc(-3)} ); } :host([size="extra-small"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-small-between-spacing, 0.125rem); } :host([size="small"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-small-between-spacing, 0.125rem); } :host([size="medium"]).base { --m3e-connected-button-group-spacing: var(--m3e-split-button-medium-between-spacing, 0.125rem); } :host([size="large"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-large-between-spacing, 0.125rem); } :host([size="extra-large"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-large-between-spacing, 0.125rem); }`;
|
|
22406
|
-
__decorate([e$
|
|
22707
|
+
__decorate([e$3(".base")], M3eSplitButtonElement.prototype, "_base", void 0);
|
|
22407
22708
|
__decorate([n$1({
|
|
22408
22709
|
reflect: true
|
|
22409
22710
|
})], M3eSplitButtonElement.prototype, "variant", void 0);
|
|
@@ -22722,9 +23023,9 @@ _M3eStepElement_handleClick = function _M3eStepElement_handleClick(e) {
|
|
|
22722
23023
|
M3eStepElement.styles = css`:host { display: block; outline: none; min-width: 0px; position: relative; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { min-width: inherit; position: relative; border-radius: var(--m3e-step-shape, ${DesignToken$1.shape.corner.medium}); padding: var(--m3e-step-padding, 1.5rem); } :host(:not([aria-disabled="true"])) { cursor: pointer; } .icon { flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--m3e-step-icon-shape, 50%); width: var(--m3e-step-icon-size, 1.5rem); height: var(--m3e-step-icon-size, 1.5rem); } .icon svg, ::slotted([slot="icon"]), ::slotted([slot="edit-icon"]), ::slotted([slot="done-icon"]), ::slotted([slot="error-icon"]) { width: 1em; font-size: var(--m3e-step-icon-size, 1.5rem) !important; } :host(:not([aria-disabled="true"])[selected]) .icon { background-color: var(--m3e-step-selected-icon-container-color, ${DesignToken$1.color.primary}); color: var(--m3e-step-selected-icon-color, ${DesignToken$1.color.onPrimary}); } :host(:not([aria-disabled="true"])[completed]:not([invalid])) .icon { background-color: var(--m3e-step-completed-icon-container-color, ${DesignToken$1.color.primary}); color: var(--m3e-step-completed-icon-color, ${DesignToken$1.color.onPrimary}); } :host(:not([aria-disabled="true"]):not([selected]):not([completed]):not([invalid])) .icon { background-color: var(--m3e-step-unselected-icon-container-color, ${DesignToken$1.color.inverseSurface}); color: var(--m3e-step-unselected-icon-color, ${DesignToken$1.color.inverseOnSurface}); } :host(:not([aria-disabled="true"]):not([selected])[invalid]) .icon { color: var(--m3e-step-icon-error-color, ${DesignToken$1.color.error}); } :host([aria-disabled="true"]) .icon { background-color: color-mix( in srgb, var(--m3e-step-disabled-icon-container-color, ${DesignToken$1.color.onSurface}) 10%, transparent ); color: color-mix(in srgb, var(--m3e-step-disabled-icon-color, ${DesignToken$1.color.onSurface}) 38%, transparent); } :host(:not([aria-disabled="true"])) .label { color: var(--m3e-step-label-color, ${DesignToken$1.color.onSurface}); } :host(:not([aria-disabled="true"]):not([selected])[invalid]) .label { color: var(--m3e-step-label-error-color, ${DesignToken$1.color.error}); } :host([aria-disabled="true"]) .label { color: color-mix(in srgb, var(--m3e-step-disabled-label-color, ${DesignToken$1.color.onSurface}) 38%, transparent); } .wrapper { display: flex; align-items: center; height: 100%; border-radius: inherit; font-size: var(--m3e-step-font-size, ${DesignToken$1.typescale.standard.title.small.fontSize}); font-weight: var(--m3e-step-font-weight, ${DesignToken$1.typescale.standard.title.small.fontWeight}); line-height: var(--m3e-step-line-height, ${DesignToken$1.typescale.standard.title.small.lineHeight}); letter-spacing: var(--m3e-step-tracking, ${DesignToken$1.typescale.standard.title.small.tracking}); flex-direction: var(--_step-direction, row); gap: var(--m3e-step-icon-label-space, 0.5rem); justify-content: flex-start; } .label { display: flex; flex-direction: column; align-items: var(--_step-label-align-items, flex-start); } ::slotted([slot="hint"]), .hint, ::slotted([slot="error"]) { font-size: var(--m3e-step-hint-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-step-hint-font-weight, ${DesignToken$1.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-step-hint-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-step-hint-tracking, ${DesignToken$1.typescale.standard.body.small.tracking}); } :host(:not([aria-disabled="true"]):not([invalid])) ::slotted([slot="hint"]), :host(:not([aria-disabled="true"]):not([invalid])) .hint { color: var(--m3e-step-hint-color, ${DesignToken$1.color.onSurfaceVariant}); } :host([aria-disabled="true"]) ::slotted([slot="hint"]), :host([aria-disabled="true"]) .hint { color: color-mix(in srgb, var(--m3e-step-disabled-hint-color, ${DesignToken$1.color.onSurface}) 38%, transparent); }`;
|
|
22723
23024
|
/** @private */
|
|
22724
23025
|
M3eStepElement.__nextId = 0;
|
|
22725
|
-
__decorate([e$
|
|
22726
|
-
__decorate([e$
|
|
22727
|
-
__decorate([e$
|
|
23026
|
+
__decorate([e$3(".focus-ring")], M3eStepElement.prototype, "_focusRing", void 0);
|
|
23027
|
+
__decorate([e$3(".state-layer")], M3eStepElement.prototype, "_stateLayer", void 0);
|
|
23028
|
+
__decorate([e$3(".ripple")], M3eStepElement.prototype, "_ripple", void 0);
|
|
22728
23029
|
__decorate([n$1({
|
|
22729
23030
|
type: Boolean,
|
|
22730
23031
|
reflect: true
|
|
@@ -22994,7 +23295,7 @@ let M3eStepperElement = class M3eStepperElement extends AttachInternals$1(LitEle
|
|
|
22994
23295
|
}
|
|
22995
23296
|
}
|
|
22996
23297
|
if (!this[selectionManager].vertical) {
|
|
22997
|
-
return html`${this.headerPosition === "above" ? __classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_renderHeader).call(this) : nothing}<m3e-slide class="steps" selected-index="${o
|
|
23298
|
+
return html`${this.headerPosition === "above" ? __classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_renderHeader).call(this) : nothing}<m3e-slide class="steps" selected-index="${o(panelIndex)}"><slot name="panel"></slot></m3e-slide>${this.headerPosition === "below" ? __classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_renderHeader).call(this) : nothing}`;
|
|
22998
23299
|
}
|
|
22999
23300
|
return html`${__classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_renderHeader).call(this)}<slot name="panel"></slot>`;
|
|
23000
23301
|
}
|
|
@@ -23003,7 +23304,7 @@ _M3eStepperElement_breakpointUnobserve = new WeakMap();
|
|
|
23003
23304
|
_M3eStepperElement_instances = new WeakSet();
|
|
23004
23305
|
_a$3 = selectionManager;
|
|
23005
23306
|
_M3eStepperElement_renderHeader = function _M3eStepperElement_renderHeader() {
|
|
23006
|
-
return html`<div class="header" role="tablist" aria-orientation="${o
|
|
23307
|
+
return html`<div class="header" role="tablist" aria-orientation="${o(this[selectionManager].vertical ? "vertical" : undefined)}" @change="${__classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_handleChange)}"><slot name="step" @slotchange="${__classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_handleSlotChange)}" @keydown="${__classPrivateFieldGet(this, _M3eStepperElement_instances, "m", _M3eStepperElement_handleKeyDown)}"></slot></div>`;
|
|
23007
23308
|
};
|
|
23008
23309
|
_M3eStepperElement_handleChange = function _M3eStepperElement_handleChange(e) {
|
|
23009
23310
|
e.stopPropagation();
|
|
@@ -23467,9 +23768,9 @@ _M3eSwitchElement_handleClick = function _M3eSwitchElement_handleClick(e) {
|
|
|
23467
23768
|
};
|
|
23468
23769
|
/** The styles of the element. */
|
|
23469
23770
|
M3eSwitchElement.styles = [SwitchStyle, SwitchStateLayerStyle, SwitchTrackStyle, SwitchHandleStyle, SwitchIconStyle];
|
|
23470
|
-
__decorate([e$
|
|
23471
|
-
__decorate([e$
|
|
23472
|
-
__decorate([e$
|
|
23771
|
+
__decorate([e$3(".track")], M3eSwitchElement.prototype, "_track", void 0);
|
|
23772
|
+
__decorate([e$3(".focus-ring")], M3eSwitchElement.prototype, "_focusRing", void 0);
|
|
23773
|
+
__decorate([e$3(".state-layer")], M3eSwitchElement.prototype, "_stateLayer", void 0);
|
|
23473
23774
|
__decorate([n$1({
|
|
23474
23775
|
reflect: true
|
|
23475
23776
|
})], M3eSwitchElement.prototype, "icons", void 0);
|
|
@@ -23607,10 +23908,10 @@ _M3eTabElement_handleClick = function _M3eTabElement_handleClick(e) {
|
|
|
23607
23908
|
M3eTabElement.styles = css`:host { display: inline-block; outline: none; user-select: none; height: calc(var(--_tab-height) + ${DesignToken$1.density.calc(-3)}); font-size: var(--m3e-tab-font-size, ${DesignToken$1.typescale.standard.title.small.fontSize}); font-weight: var(--m3e-tab-font-weight, ${DesignToken$1.typescale.standard.title.small.fontWeight}); line-height: var(--m3e-tab-line-height, ${DesignToken$1.typescale.standard.title.small.lineHeight}); letter-spacing: var(--m3e-tab-tracking, ${DesignToken$1.typescale.standard.title.small.tracking}); flex-grow: var(--_tab-grow); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)) { cursor: pointer; } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; height: 100%; padding-inline-start: var(--m3e-tab-padding-start, 1.5rem); padding-inline-end: var(--m3e-tab-padding-end, 1.5rem); } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .focus-ring { border-radius: var(--m3e-tab-focus-ring-shape, ${DesignToken$1.shape.corner.large}); } :host([selected]:focus-within) .focus-ring { top: var(--_tab-focus-ring-top-offset, 0); bottom: var(--_tab-focus-ring-bottom-offset, 0); } :host([selected]:not(:disabled)) .base { color: var(--m3e-tab-selected-color, var(--_tab-selected-color, ${DesignToken$1.color.primary})); --m3e-state-layer-hover-color: var( --m3e-tab-selected-container-hover-color, var(--_tab-selected-container-hover-color, ${DesignToken$1.color.primary}) ); --m3e-state-layer-focus-color: var( --_tab-selected-container-focus-color, var(--m3e-tab-selected-container-focus-color, ${DesignToken$1.color.primary}) ); --m3e-ripple-color: var( --_tab-selected-ripple-color, var(--m3e-tab-selected-ripple-color, ${DesignToken$1.color.primary}) ); } :host(:not([selected]):not(:disabled)) .base { color: var(--m3e-tab-unselected-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-state-layer-hover-color: var(--m3e-tab-unselected-container-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-tab-unselected-container-focus-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-color: var(--m3e-tab-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-tab-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-tab-disabled-opacity, 38%), transparent ); } .wrapper { display: inline-flex; align-items: center; white-space: nowrap; flex-direction: var(--_tab-direction); justify-content: center; column-gap: var(--m3e-tab-spacing, 0.5rem); } ::slotted([slot="icon"]) { width: 1em; font-size: var(--m3e-tab-icon-size, 1.5rem) !important; } @media (forced-colors: active) { :host([selected]:not(:disabled)) .base { color: ButtonText; } :host(:not([selected]):not(:disabled)) .base { color: ButtonText; } :host(:disabled) .base { color: GrayText; } }`;
|
|
23608
23909
|
/** @private */
|
|
23609
23910
|
M3eTabElement.__nextId = 0;
|
|
23610
|
-
__decorate([e$
|
|
23611
|
-
__decorate([e$
|
|
23612
|
-
__decorate([e$
|
|
23613
|
-
__decorate([e$
|
|
23911
|
+
__decorate([e$3(".focus-ring")], M3eTabElement.prototype, "_focusRing", void 0);
|
|
23912
|
+
__decorate([e$3(".state-layer")], M3eTabElement.prototype, "_stateLayer", void 0);
|
|
23913
|
+
__decorate([e$3(".ripple")], M3eTabElement.prototype, "_ripple", void 0);
|
|
23914
|
+
__decorate([e$3(".label")], M3eTabElement.prototype, "label", void 0);
|
|
23614
23915
|
M3eTabElement = M3eTabElement_1 = __decorate([customElement$1("m3e-tab")], M3eTabElement);
|
|
23615
23916
|
|
|
23616
23917
|
/**
|
|
@@ -23808,7 +24109,7 @@ let M3eTabsElement = class M3eTabsElement extends AttachInternals$1(LitElement)
|
|
|
23808
24109
|
panelIndex = undefined;
|
|
23809
24110
|
}
|
|
23810
24111
|
}
|
|
23811
|
-
return html`${this.headerPosition === "before" ? __classPrivateFieldGet(this, _M3eTabsElement_instances, "m", _M3eTabsElement_renderHeader).call(this) : nothing}<m3e-slide class="tabs" selected-index="${o
|
|
24112
|
+
return html`${this.headerPosition === "before" ? __classPrivateFieldGet(this, _M3eTabsElement_instances, "m", _M3eTabsElement_renderHeader).call(this) : nothing}<m3e-slide class="tabs" selected-index="${o(panelIndex)}"><slot name="panel"></slot></m3e-slide>${this.headerPosition === "after" ? __classPrivateFieldGet(this, _M3eTabsElement_instances, "m", _M3eTabsElement_renderHeader).call(this) : nothing}`;
|
|
23812
24113
|
}
|
|
23813
24114
|
};
|
|
23814
24115
|
_M3eTabsElement_directionalitySubscription = new WeakMap();
|
|
@@ -23866,7 +24167,7 @@ _M3eTabsElement_updateInkBar = function _M3eTabsElement_updateInkBar() {
|
|
|
23866
24167
|
/** The styles of the element. */
|
|
23867
24168
|
M3eTabsElement.styles = css`:host { display: flex; flex-direction: column; position: relative; } .tablist { position: relative; box-sizing: border-box; flex: none; } ::slotted(prev-icon), ::slotted(next-icon), .icon { width: 1em; font-size: var(--m3e-tabs-paginator-button-icon-size, var(--m3e-icon-button-icon-size, 1.5rem)) !important; } .header { display: flex; flex-direction: column; } .tabs { display: flex; flex-wrap: nowrap; align-items: center; } .ink-bar { box-sizing: border-box; height: var(--_tabs-active-indicator-thickness); } .active-indicator { position: relative; height: var(--_tabs-active-indicator-thickness); left: calc(var(--_tabs-active-tab-position) + var(--_tabs-activate-indicator-inset, 0px)); width: calc(var(--_tabs-active-tab-size) - calc(var(--_tabs-activate-indicator-inset, 0px) * 2)); background-color: var(--m3e-tabs-active-indicator-color, ${DesignToken$1.color.primary}); transition: ${unsafeCSS(`left var(--m3e-slide-animation-duration, ${DesignToken$1.motion.duration.long2}) ${DesignToken$1.motion.easing.standard},
|
|
23868
24169
|
width var(--m3e-slide-animation-duration, ${DesignToken$1.motion.duration.long2}) ${DesignToken$1.motion.easing.standard}`)}; } :host([header-position="after"]) .header { flex-direction: column-reverse; } :host([header-position="before"]) .ink-bar { margin-top: calc(0px - var(--_tabs-active-indicator-thickness)); } :host([header-position="before"]) .tablist { --m3e-slide-group-divider-bottom: var(--m3e-divider-thickness, 1px) solid var(--m3e-divider-color, ${DesignToken$1.color.outlineVariant}); } :host([header-position="after"]) .ink-bar { margin-bottom: calc(0px - var(--_tabs-active-indicator-thickness)); } :host([header-position="after"]) .tablist { --m3e-slide-group-divider-top: var(--m3e-divider-thickness, 1px) solid var(--m3e-divider-color, ${DesignToken$1.color.outlineVariant}); } :host([header-position="before"][variant="primary"]) .active-indicator { border-radius: var(--m3e-tabs-primary-before-active-indicator-shape, ${DesignToken$1.shape.corner.extraSmallTop}); } :host([header-position="after"][variant="primary"]) .active-indicator { border-radius: var(--m3e-tabs-primary-after-active-indicator-shape, ${DesignToken$1.shape.corner.extraSmallBottom}); } .tabs { flex: 1 1 auto; } :host([variant="primary"]) .tablist { --_tabs-activate-indicator-inset: var(--m3e-tabs-primary-active-indicator-inset, 0.125rem); --_tabs-active-indicator-thickness: var(--m3e-tabs-primary-active-indicator-thickness, 3px); --_tab-height: 4rem; } :host([header-position="before"]) .tablist { --_tab-focus-ring-bottom-offset: calc(var(--_tabs-active-indicator-thickness) + 1px); } :host([header-position="after"]) .tablist { --_tab-focus-ring-top-offset: calc(var(--_tabs-active-indicator-thickness) + 2px); } :host([header-position="before"][variant="primary"]) .tablist { --_tab-direction: column; } :host([header-position="after"][variant="primary"]) .tablist { --_tab-direction: column-reverse; } :host([variant="secondary"]) .tablist { --_tabs-active-indicator-thickness: var(--m3e-tabs-secondary-active-indicator-thickness, 2px); --_tab-height: 3rem; --_tab-selected-color: ${DesignToken$1.color.onSurface}; --_tab-selected-container-hover-color: ${DesignToken$1.color.onSurface}; --_tab-selected-container-focus-color: ${DesignToken$1.color.onSurface}; --_tab-selected-ripple-color: ${DesignToken$1.color.onSurface}; } :host([stretch]) .header { width: 100%; --_tab-grow: 1; } :host(:state(-no-animate)) .active-indicator { transition: none; } @media (prefers-reduced-motion) { .active-indicator { transition: none; } } @media (forced-colors: active) { .active-indicator { background-color: ButtonText; --m3e-divider-color: GrayText; } }`;
|
|
23869
|
-
__decorate([e$
|
|
24170
|
+
__decorate([e$3(".tablist")], M3eTabsElement.prototype, "_tablist", void 0);
|
|
23870
24171
|
__decorate([r$1()], M3eTabsElement.prototype, "_selectedIndex", void 0);
|
|
23871
24172
|
__decorate([n$1({
|
|
23872
24173
|
attribute: "disable-pagination",
|
|
@@ -27503,8 +27804,8 @@ let M3eTocItemElement = class M3eTocItemElement extends Selected$1(Disabled$1(At
|
|
|
27503
27804
|
};
|
|
27504
27805
|
/** The styles of the element. */
|
|
27505
27806
|
M3eTocItemElement.styles = css`:host { display: inline-block; position: relative; user-select: none; outline: none; border-radius: var(--m3e-toc-item-shape, ${DesignToken$1.shape.corner.largeIncreased}); padding-block: var(--m3e-toc-item-padding-block, 0.5rem); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)) { cursor: pointer; } .base { padding-inline-start: calc( var(--m3e-toc-item-padding, 1rem) + calc(var(--m3e-toc-item-inset, 0.75rem) * var(--_level, 0)) ); padding-inline-end: var(--m3e-toc-item-padding, 1rem); transition: ${unsafeCSS(`color var(--m3e-toc-active-indicator-animation-duration, ${DesignToken$1.motion.duration.long1}) ${DesignToken$1.motion.easing.standard}`)}; } :host(:not([selected])) { font-size: var(--m3e-toc-item-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-toc-item-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-toc-item-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-toc-item-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); color: var(--m3e-toc-item-color, ${DesignToken$1.color.onSurfaceVariant}); } :host([selected]) { font-size: var(--m3e-toc-item-selected-font-size, ${DesignToken$1.typescale.emphasized.body.large.fontSize}); font-weight: var(--m3e-toc-item-selected-font-weight, ${DesignToken$1.typescale.emphasized.body.large.fontWeight}); line-height: var(--m3e-toc-item-selected-line-height, ${DesignToken$1.typescale.emphasized.body.large.lineHeight}); letter-spacing: var(--m3e-toc-item-selected-tracking, ${DesignToken$1.typescale.emphasized.body.large.tracking}); color: var(--m3e-toc-item-selected-color, ${DesignToken$1.color.onSecondaryContainer}); } .base { justify-content: unset; } .state-layer { --m3e-state-layer-focus-opacity: 0; } @media (prefers-reduced-motion) { .base { transition: none; } }`;
|
|
27506
|
-
__decorate([e$
|
|
27507
|
-
__decorate([e$
|
|
27807
|
+
__decorate([e$3(".base")], M3eTocItemElement.prototype, "_base", void 0);
|
|
27808
|
+
__decorate([e$3(".state-layer")], M3eTocItemElement.prototype, "_stateLayer", void 0);
|
|
27508
27809
|
__decorate([r$1()], M3eTocItemElement.prototype, "node", void 0);
|
|
27509
27810
|
M3eTocItemElement = __decorate([customElement$1("m3e-toc-item")], M3eTocItemElement);
|
|
27510
27811
|
|
|
@@ -27768,7 +28069,6 @@ _M3eTocElement_handleClick = function _M3eTocElement_handleClick(e) {
|
|
|
27768
28069
|
};
|
|
27769
28070
|
_M3eTocElement_generateToc = function _M3eTocElement_generateToc() {
|
|
27770
28071
|
this._toc = this.control ? TocGenerator.generate(this.control, Math.max(1, Math.min(this.maxDepth, 6))) : [];
|
|
27771
|
-
this.requestUpdate();
|
|
27772
28072
|
};
|
|
27773
28073
|
/** The styles of the element. */
|
|
27774
28074
|
M3eTocElement.styles = css`:host { display: inline-block; position: relative; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; width: var(--m3e-toc-width, 9.75rem); } ul { list-style: none; padding-inline-start: unset; margin-block-start: unset; margin-block-end: unset; } ul, li { display: flex; flex-direction: column; align-items: stretch; } m3e-toc-item { flex: none; } .active-indicator { position: absolute; pointer-events: none; box-sizing: border-box; left: 0; right: 0; border-radius: var(--m3e-toc-item-shape, ${DesignToken$1.shape.corner.largeIncreased}); border: 1px solid var(--m3e-toc-active-indicator-color, ${DesignToken$1.color.outline}); transition: ${unsafeCSS(`visibility var(--m3e-toc-active-indicator-animation-duration, ${DesignToken$1.motion.duration.long1})
|
|
@@ -27778,7 +28078,7 @@ M3eTocElement.styles = css`:host { display: inline-block; position: relative; ov
|
|
|
27778
28078
|
top var(--m3e-toc-active-indicator-animation-duration, ${DesignToken$1.motion.duration.long1})
|
|
27779
28079
|
${DesignToken$1.motion.easing.standard}`)}; } .header { display: flex; flex-direction: column; align-items: stretch; padding-inline-start: var(--m3e-toc-item-padding, 1rem); padding-block-end: var(--m3e-toc-header-space, 0.5rem); row-gap: var(--m3e-toc-header-space, 0.5rem); } .overline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; } :host(:not(:state(-with-overline))) .overline, :host(:not(:state(-with-title))) .title, :host(:not(:state(-with-overline)):not(:state(-with-title))) .header { display: none; } ::slotted([slot="overline"]) { font-size: var(--m3e-toc-overline-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-toc-overline-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-toc-overline-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-toc-overline-tracking, ${DesignToken$1.typescale.standard.label.small.tracking}); color: var(--m3e-toc-overline-color, ${DesignToken$1.color.onSurfaceVariant}); } ::slotted([slot="title"]) { font-size: var(--m3e-toc-title-font-size, ${DesignToken$1.typescale.standard.headline.small.fontSize}); font-weight: var(--m3e-toc-title-font-weight, ${DesignToken$1.typescale.standard.headline.small.fontWeight}); line-height: var(--m3e-toc-title-line-height, ${DesignToken$1.typescale.standard.headline.small.lineHeight}); letter-spacing: var(--m3e-toc-title-tracking, ${DesignToken$1.typescale.standard.headline.small.tracking}); color: var(--m3e-toc-title-color, ${DesignToken$1.color.onSurface}); } :host(:state(-no-animate)) .active-indicator { transition: none; } @media (prefers-reduced-motion) { .active-indicator { transition: none; } }`;
|
|
27780
28080
|
__decorate([r$1()], M3eTocElement.prototype, "_toc", void 0);
|
|
27781
|
-
__decorate([e$
|
|
28081
|
+
__decorate([e$3(".active-indicator")], M3eTocElement.prototype, "_activeIndicator", void 0);
|
|
27782
28082
|
__decorate([n$1({
|
|
27783
28083
|
attribute: "max-depth",
|
|
27784
28084
|
type: Number
|
|
@@ -28130,7 +28430,7 @@ _a = TooltipElementBase, _TooltipElementBase_for = new WeakMap(), _TooltipElemen
|
|
|
28130
28430
|
};
|
|
28131
28431
|
/** @private */
|
|
28132
28432
|
TooltipElementBase.__openTooltips = new Array();
|
|
28133
|
-
__decorate([e$
|
|
28433
|
+
__decorate([e$3(".base")], TooltipElementBase.prototype, "_base", void 0);
|
|
28134
28434
|
__decorate([n$1({
|
|
28135
28435
|
type: Boolean,
|
|
28136
28436
|
reflect: true
|
|
@@ -28266,7 +28566,7 @@ let M3eRichTooltipElement = M3eRichTooltipElement_1 = class M3eRichTooltipElemen
|
|
|
28266
28566
|
/** @inheritdoc */
|
|
28267
28567
|
render() {
|
|
28268
28568
|
const subheadId = this._interactive && this._hasSubhead ? `m3e-rich-tooltip-${__classPrivateFieldGet(this, _M3eRichTooltipElement_id, "f")}-subhead` : undefined;
|
|
28269
|
-
return html`<div class="base" popover="manual" role="${o
|
|
28569
|
+
return html`<div class="base" popover="manual" role="${o(this._interactive ? "dialog" : undefined)}" aria-labelledby="${o(subheadId)}" @keydown="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleKeyDown)}" @beforetoggle="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleBeforeToggle)}" @toggle="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleToggle)}"><m3e-elevation level="3"></m3e-elevation><div class="subhead" id="${o(subheadId)}"><slot name="subhead" @slotchange="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleSubheadSlotChange)}"></slot></div><div class="content"><slot @slotchange="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleContentSlotChange)}"></slot></div><div class="actions"><slot name="actions" @slotchange="${__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_handleActionsSlotChange)}"></slot></div></div>`;
|
|
28270
28570
|
}
|
|
28271
28571
|
/** @inheritdoc */
|
|
28272
28572
|
show() {
|