@m3e/web 2.5.4 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/all.js +667 -532
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +56 -56
- package/dist/all.min.js.map +1 -1
- package/dist/autocomplete.js +15 -15
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/bottom-sheet.js +15 -18
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/breadcrumb.js +5 -5
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumb.min.js +1 -1
- package/dist/breadcrumb.min.js.map +1 -1
- package/dist/button-group.js +5 -5
- package/dist/button-group.js.map +1 -1
- package/dist/button-group.min.js +1 -1
- package/dist/button-group.min.js.map +1 -1
- package/dist/button.js +22 -23
- package/dist/button.js.map +1 -1
- package/dist/button.min.js +1 -1
- package/dist/button.min.js.map +1 -1
- package/dist/calendar.js +1 -1
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.min.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/card.min.js.map +1 -1
- package/dist/checkbox.js +11 -10
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.min.js +1 -1
- package/dist/checkbox.min.js.map +1 -1
- package/dist/chips.js +26 -25
- 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 +5 -3
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +4 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +4 -4
- 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 +82 -45
- 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 +523 -508
- package/dist/custom-elements.json +4405 -4011
- package/dist/datepicker.js +38 -14
- package/dist/datepicker.js.map +1 -1
- package/dist/datepicker.min.js +1 -1
- package/dist/datepicker.min.js.map +1 -1
- package/dist/dialog.js +7 -7
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.min.js +1 -1
- package/dist/dialog.min.js.map +1 -1
- package/dist/drawer-container.js +15 -15
- package/dist/drawer-container.js.map +1 -1
- package/dist/drawer-container.min.js +1 -1
- package/dist/drawer-container.min.js.map +1 -1
- package/dist/expansion-panel.js +7 -7
- package/dist/expansion-panel.js.map +1 -1
- package/dist/expansion-panel.min.js +1 -1
- package/dist/expansion-panel.min.js.map +1 -1
- package/dist/fab-menu.js +5 -5
- package/dist/fab-menu.js.map +1 -1
- package/dist/fab-menu.min.js +1 -1
- package/dist/fab-menu.min.js.map +1 -1
- package/dist/fab.js +3 -3
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +1 -1
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +19 -19
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +2 -2
- package/dist/form-field.min.js.map +1 -1
- package/dist/html-custom-data.json +183 -168
- package/dist/icon-button.js +22 -23
- package/dist/icon-button.js.map +1 -1
- package/dist/icon-button.min.js +1 -1
- package/dist/icon-button.min.js.map +1 -1
- package/dist/list.js +33 -32
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +1 -1
- package/dist/list.min.js.map +1 -1
- package/dist/menu.js +23 -23
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +52 -19
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +1 -1
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-menu.js +13 -13
- package/dist/nav-menu.js.map +1 -1
- package/dist/nav-menu.min.js +1 -1
- package/dist/nav-menu.min.js.map +1 -1
- package/dist/nav-rail.js +18 -12
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +1 -1
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +13 -13
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/paginator.js +1 -1
- package/dist/paginator.js.map +1 -1
- package/dist/paginator.min.js.map +1 -1
- package/dist/radio-group.js +14 -11
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.min.js +1 -1
- package/dist/radio-group.min.js.map +1 -1
- package/dist/search.js +12 -12
- package/dist/search.js.map +1 -1
- package/dist/search.min.js +1 -1
- package/dist/search.min.js.map +1 -1
- package/dist/segmented-button.js +19 -18
- package/dist/segmented-button.js.map +1 -1
- package/dist/segmented-button.min.js +1 -1
- package/dist/segmented-button.min.js.map +1 -1
- package/dist/select.js +15 -15
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/slider.js +49 -28
- package/dist/slider.js.map +1 -1
- package/dist/slider.min.js +1 -1
- package/dist/slider.min.js.map +1 -1
- package/dist/split-pane.js +27 -29
- package/dist/split-pane.js.map +1 -1
- package/dist/split-pane.min.js +1 -1
- package/dist/split-pane.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +3 -3
- package/dist/src/autocomplete/AutocompleteQueryEventDetail.d.ts +1 -1
- package/dist/src/autocomplete/QueryEventDetail.d.ts +1 -1
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts +6 -6
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
- package/dist/src/breadcrumb/BreadcrumbItemElement.d.ts +1 -1
- package/dist/src/button/ButtonElement.d.ts +2 -1
- package/dist/src/button/ButtonElement.d.ts.map +1 -1
- package/dist/src/button/styles/ButtonSizeStyle.d.ts.map +1 -1
- package/dist/src/button/styles/ButtonStyle.d.ts.map +1 -1
- package/dist/src/button/styles/ButtonVariantStyle.d.ts.map +1 -1
- package/dist/src/button-group/ButtonGroupElement.d.ts.map +1 -1
- package/dist/src/calendar/CalendarElement.d.ts +1 -1
- package/dist/src/card/CardElement.d.ts +1 -1
- package/dist/src/checkbox/CheckboxElement.d.ts +5 -4
- package/dist/src/checkbox/CheckboxElement.d.ts.map +1 -1
- package/dist/src/chips/AssistChipElement.d.ts +1 -1
- package/dist/src/chips/FilterChipElement.d.ts +4 -3
- package/dist/src/chips/FilterChipElement.d.ts.map +1 -1
- package/dist/src/chips/FilterChipSetElement.d.ts +3 -2
- package/dist/src/chips/FilterChipSetElement.d.ts.map +1 -1
- package/dist/src/chips/InputChipElement.d.ts +2 -2
- package/dist/src/chips/InputChipSetElement.d.ts +1 -1
- package/dist/src/chips/SuggestionChipElement.d.ts +1 -1
- package/dist/src/core/a11y/InteractivityChecker.d.ts +2 -1
- package/dist/src/core/a11y/InteractivityChecker.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +1 -1
- package/dist/src/core/shared/mixins/SuppressInitialAnimation.d.ts +9 -2
- package/dist/src/core/shared/mixins/SuppressInitialAnimation.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/CollapsibleElement.d.ts +17 -4
- package/dist/src/core/shared/primitives/CollapsibleElement.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/CollapsibleOrientation.d.ts +3 -0
- package/dist/src/core/shared/primitives/CollapsibleOrientation.d.ts.map +1 -0
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts +1 -1
- package/dist/src/core/shared/primitives/index.d.ts +1 -0
- package/dist/src/core/shared/primitives/index.d.ts.map +1 -1
- package/dist/src/datepicker/DatepickerElement.d.ts +7 -1
- package/dist/src/datepicker/DatepickerElement.d.ts.map +1 -1
- package/dist/src/dialog/DialogElement.d.ts +5 -5
- package/dist/src/drawer-container/DrawerContainerElement.d.ts +1 -1
- package/dist/src/drawer-container/styles/DrawerContainerStyle.d.ts.map +1 -1
- package/dist/src/expansion-panel/ExpansionHeaderElement.d.ts +1 -1
- package/dist/src/expansion-panel/ExpansionPanelElement.d.ts +4 -4
- package/dist/src/fab/FabElement.d.ts +1 -1
- package/dist/src/fab/FabElement.d.ts.map +1 -1
- package/dist/src/fab/styles/FabStyle.d.ts.map +1 -1
- package/dist/src/fab-menu/FabMenuElement.d.ts +1 -1
- package/dist/src/fab-menu/FabMenuItemElement.d.ts +1 -1
- package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
- package/dist/src/icon-button/IconButtonElement.d.ts +2 -1
- package/dist/src/icon-button/IconButtonElement.d.ts.map +1 -1
- package/dist/src/icon-button/styles/IconButtonSizeStyle.d.ts.map +1 -1
- package/dist/src/icon-button/styles/IconButtonStyle.d.ts.map +1 -1
- package/dist/src/icon-button/styles/IconButtonVariantStyle.d.ts.map +1 -1
- package/dist/src/list/ExpandableListItemElement.d.ts +4 -4
- package/dist/src/list/ListActionElement.d.ts +1 -1
- package/dist/src/list/ListOptionElement.d.ts +4 -3
- package/dist/src/list/ListOptionElement.d.ts.map +1 -1
- package/dist/src/list/SelectionListElement.d.ts +3 -2
- package/dist/src/list/SelectionListElement.d.ts.map +1 -1
- package/dist/src/menu/MenuElement.d.ts +1 -1
- package/dist/src/menu/MenuItemCheckboxElement.d.ts +1 -1
- package/dist/src/menu/MenuItemElement.d.ts +1 -1
- package/dist/src/menu/MenuItemRadioElement.d.ts +1 -1
- package/dist/src/nav-bar/NavBarElement.d.ts +3 -1
- package/dist/src/nav-bar/NavBarElement.d.ts.map +1 -1
- package/dist/src/nav-bar/NavItemElement.d.ts +11 -4
- package/dist/src/nav-bar/NavItemElement.d.ts.map +1 -1
- package/dist/src/nav-menu/NavMenuItemElement.d.ts +5 -5
- package/dist/src/nav-rail/NavRailElement.d.ts +13 -6
- package/dist/src/nav-rail/NavRailElement.d.ts.map +1 -1
- package/dist/src/paginator/PageEventDetail.d.ts +1 -1
- package/dist/src/paginator/PaginatorElement.d.ts +1 -1
- package/dist/src/paginator/PaginatorPageEventDetail.d.ts +1 -1
- package/dist/src/paginator/PaginatorPageEventDetail.d.ts.map +1 -1
- package/dist/src/radio-group/RadioElement.d.ts +4 -3
- package/dist/src/radio-group/RadioElement.d.ts.map +1 -1
- package/dist/src/radio-group/RadioGroupElement.d.ts +3 -1
- package/dist/src/radio-group/RadioGroupElement.d.ts.map +1 -1
- package/dist/src/search/SearchViewQueryEventDetail.d.ts +1 -1
- package/dist/src/search/styles/SearchBarStyle.d.ts.map +1 -1
- package/dist/src/segmented-button/ButtonSegmentElement.d.ts +4 -3
- package/dist/src/segmented-button/ButtonSegmentElement.d.ts.map +1 -1
- package/dist/src/segmented-button/SegmentedButtonElement.d.ts +3 -2
- package/dist/src/segmented-button/SegmentedButtonElement.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/slider/SliderElement.d.ts +4 -0
- package/dist/src/slider/SliderElement.d.ts.map +1 -1
- package/dist/src/slider/SliderThumbElement.d.ts +4 -3
- package/dist/src/slider/SliderThumbElement.d.ts.map +1 -1
- package/dist/src/split-pane/SplitPaneElement.d.ts +3 -2
- package/dist/src/split-pane/SplitPaneElement.d.ts.map +1 -1
- package/dist/src/stepper/StepElement.d.ts +4 -3
- package/dist/src/stepper/StepElement.d.ts.map +1 -1
- package/dist/src/stepper/StepperElement.d.ts +5 -1
- package/dist/src/stepper/StepperElement.d.ts.map +1 -1
- package/dist/src/switch/SwitchElement.d.ts +4 -3
- package/dist/src/switch/SwitchElement.d.ts.map +1 -1
- package/dist/src/tabs/TabElement.d.ts +4 -3
- package/dist/src/tabs/TabElement.d.ts.map +1 -1
- package/dist/src/tabs/TabsElement.d.ts +3 -1
- package/dist/src/tabs/TabsElement.d.ts.map +1 -1
- package/dist/src/toc/TocItemElement.d.ts +1 -1
- package/dist/src/toolbar/ToolbarElement.d.ts.map +1 -1
- package/dist/src/tree/TreeElement.d.ts +1 -1
- package/dist/src/tree/TreeItemElement.d.ts +5 -5
- package/dist/stepper.js +32 -23
- package/dist/stepper.js.map +1 -1
- package/dist/stepper.min.js +1 -1
- package/dist/stepper.min.js.map +1 -1
- package/dist/switch.js +9 -8
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js +1 -1
- package/dist/switch.min.js.map +1 -1
- package/dist/tabs.js +17 -14
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.min.js +1 -1
- package/dist/tabs.min.js.map +1 -1
- package/dist/toc.js +8 -8
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/dist/toolbar.js +2 -1
- package/dist/toolbar.js.map +1 -1
- package/dist/toolbar.min.js +1 -1
- package/dist/toolbar.min.js.map +1 -1
- package/dist/tooltip.js +3 -3
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/dist/tree.js +13 -13
- package/dist/tree.js.map +1 -1
- package/dist/tree.min.js +1 -1
- package/dist/tree.min.js.map +1 -1
- package/package.json +1 -1
package/dist/all.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { __classPrivateFieldGet, __decorate, __classPrivateFieldSet } from 'tslib';
|
|
7
7
|
import { unsafeCSS, css, LitElement, html, nothing, isServer, noChange, svg } from 'lit';
|
|
8
8
|
import { query, property, queryAssignedElements, state } from 'lit/decorators.js';
|
|
9
|
-
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, hasAssignedNodes as hasAssignedNodes$1, debounce as debounce$1, customElement as customElement$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, ReconnectedCallback as ReconnectedCallback$1, SuppressInitialAnimation as SuppressInitialAnimation$1, AttachInternals as AttachInternals$1, VelocityTracker as VelocityTracker$1, ScrollLockController as ScrollLockController$1, InertController as InertController$1, ResizeController as ResizeController$1, focusWhenReady as focusWhenReady$1, hasCustomState as hasCustomState$1, computeCssSize as computeCssSize$1, registerStyleSheet as registerStyleSheet$1, spaceSeparatedStringConverter as spaceSeparatedStringConverter$1, KeyboardClick as KeyboardClick$1, LinkButton as LinkButton$1, Focusable as Focusable$1, Disabled as Disabled$1, renderPseudoLink as renderPseudoLink$1, FormSubmitter as FormSubmitter$1, DisabledInteractive as DisabledInteractive$1, FocusController as FocusController$1, PressedController as PressedController$1, isSelectedMixin as isSelectedMixin$1, dateConverter as dateConverter$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, getScrollbarWidth as getScrollbarWidth$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, waitForUpgrade as waitForUpgrade$1, guid as guid$1, IntersectionController as IntersectionController$1, LongPressController as LongPressController$1 } from '@m3e/web/core';
|
|
9
|
+
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, hasAssignedNodes as hasAssignedNodes$1, debounce as debounce$1, customElement as customElement$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, ReconnectedCallback as ReconnectedCallback$1, SuppressInitialAnimation as SuppressInitialAnimation$1, AttachInternals as AttachInternals$1, VelocityTracker as VelocityTracker$1, ScrollLockController as ScrollLockController$1, InertController as InertController$1, ResizeController as ResizeController$1, focusWhenReady as focusWhenReady$1, hasCustomState as hasCustomState$1, computeCssSize as computeCssSize$1, registerStyleSheet as registerStyleSheet$1, spaceSeparatedStringConverter as spaceSeparatedStringConverter$1, KeyboardClick as KeyboardClick$1, LinkButton as LinkButton$1, Focusable as Focusable$1, Disabled as Disabled$1, renderPseudoLink as renderPseudoLink$1, FormSubmitter as FormSubmitter$1, DisabledInteractive as DisabledInteractive$1, FocusController as FocusController$1, PressedController as PressedController$1, isSelectedMixin as isSelectedMixin$1, dateConverter as dateConverter$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, getScrollbarWidth as getScrollbarWidth$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, resumeAnimation as resumeAnimation$1, AnimationLoopController as AnimationLoopController$1, resolveFragmentUrl as resolveFragmentUrl$1, safeStyleMap as safeStyleMap$1, updateLabels as updateLabels$1, waitForUpgrade as waitForUpgrade$1, guid as guid$1, IntersectionController as IntersectionController$1, LongPressController as LongPressController$1 } from '@m3e/web/core';
|
|
10
10
|
import { ListKeyManager, M3eLiveAnnouncer, M3eInteractivityChecker, isModifierAllowed, addAriaReferencedId, removeAriaReferencedId, selectionManager, SelectionManager, ListManager, RovingTabIndexManager, M3eAriaDescriber, typeaheadLabel } from '@m3e/web/core/a11y';
|
|
11
11
|
import { M3eOptGroupElement as M3eOptGroupElement$1 } from '@m3e/web/option';
|
|
12
12
|
import { M3eDirectionality } from '@m3e/web/core/bidi';
|
|
@@ -403,9 +403,9 @@ var M3eAutocompleteElement_1;
|
|
|
403
403
|
* @slot loading - Renders content when loading options.
|
|
404
404
|
* @slot no-data - Renders content when there are no options to show.
|
|
405
405
|
*
|
|
406
|
-
* @fires toggle -
|
|
407
|
-
* @fires query -
|
|
408
|
-
* @fires change -
|
|
406
|
+
* @fires toggle - Dispatched when the options menu opens or closes.
|
|
407
|
+
* @fires query - Dispatched when the input is focused or when the user modifies its value.
|
|
408
|
+
* @fires change - Dispatched when the committed value changes due to selecting an option or clearing the input.
|
|
409
409
|
*/
|
|
410
410
|
let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteElement extends HtmlFor$1(LitElement) {
|
|
411
411
|
constructor() {
|
|
@@ -600,7 +600,7 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
600
600
|
update(changedProperties) {
|
|
601
601
|
super.update(changedProperties);
|
|
602
602
|
if (changedProperties.has("hideNoData") && this.hideNoData && __classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
603
|
-
setCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "
|
|
603
|
+
setCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "--no-data", false);
|
|
604
604
|
}
|
|
605
605
|
if (changedProperties.has("loading")) {
|
|
606
606
|
if (this.loading) {
|
|
@@ -615,7 +615,7 @@ let M3eAutocompleteElement = M3eAutocompleteElement_1 = class M3eAutocompleteEle
|
|
|
615
615
|
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f") && !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "a", _M3eAutocompleteElement_shouldShowMenu_get)) {
|
|
616
616
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_hideMenu).call(this);
|
|
617
617
|
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
618
|
-
deleteCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "
|
|
618
|
+
deleteCustomState$1(__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f"), "--loading");
|
|
619
619
|
} else if (__classPrivateFieldGet(this, _M3eAutocompleteElement_hasFocus, "f")) {
|
|
620
620
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_showMenu).call(this);
|
|
621
621
|
}
|
|
@@ -691,7 +691,7 @@ async function _M3eAutocompleteElement_handleMutation() {
|
|
|
691
691
|
} = this._listKeyManager.setItems([...__classPrivateFieldGet(this, _M3eAutocompleteElement_clone, "f").querySelectorAll("m3e-option")]);
|
|
692
692
|
added.forEach(x => {
|
|
693
693
|
x.id = x.id || `${__classPrivateFieldGet(this, _M3eAutocompleteElement_id, "f")}-option-${this._listKeyManager.items.indexOf(x)}`;
|
|
694
|
-
setCustomState$1(x, "
|
|
694
|
+
setCustomState$1(x, "--hide-selection-indicator", this.hideSelectionIndicator);
|
|
695
695
|
});
|
|
696
696
|
if (__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")) {
|
|
697
697
|
const count = __classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOptions).call(this);
|
|
@@ -947,8 +947,8 @@ _M3eAutocompleteElement_projectClone = function _M3eAutocompleteElement_projectC
|
|
|
947
947
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f").replaceChildren(...children);
|
|
948
948
|
};
|
|
949
949
|
_M3eAutocompleteElement_updateMenuState = function _M3eAutocompleteElement_updateMenuState(menu, count) {
|
|
950
|
-
setCustomState$1(menu, "
|
|
951
|
-
setCustomState$1(menu, "
|
|
950
|
+
setCustomState$1(menu, "--loading", this.loading);
|
|
951
|
+
setCustomState$1(menu, "--no-data", count == 0);
|
|
952
952
|
};
|
|
953
953
|
_M3eAutocompleteElement_hideMenu = function _M3eAutocompleteElement_hideMenu() {
|
|
954
954
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_menu, "f")?.hide();
|
|
@@ -1043,21 +1043,21 @@ _M3eAutocompleteElement_filterOptions = function _M3eAutocompleteElement_filterO
|
|
|
1043
1043
|
clone.hidden = !__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_filterOption).call(this, clone, option, term, exactTerm);
|
|
1044
1044
|
if (clone.hidden === true) {
|
|
1045
1045
|
__classPrivateFieldGet(this, _M3eAutocompleteElement_instances, "m", _M3eAutocompleteElement_deactivateOption).call(this, clone);
|
|
1046
|
-
deleteCustomState$1(clone, "
|
|
1047
|
-
deleteCustomState$1(clone, "
|
|
1046
|
+
deleteCustomState$1(clone, "--first");
|
|
1047
|
+
deleteCustomState$1(clone, "--last");
|
|
1048
1048
|
} else {
|
|
1049
1049
|
newCount++;
|
|
1050
1050
|
if (!first && !(clone.parentElement instanceof M3eOptGroupElement$1)) {
|
|
1051
|
-
addCustomState$1(clone, "
|
|
1051
|
+
addCustomState$1(clone, "--first");
|
|
1052
1052
|
first = true;
|
|
1053
|
-
addCustomState$1(clone, "
|
|
1053
|
+
addCustomState$1(clone, "--last");
|
|
1054
1054
|
last = clone;
|
|
1055
1055
|
} else {
|
|
1056
|
-
deleteCustomState$1(clone, "
|
|
1056
|
+
deleteCustomState$1(clone, "--first");
|
|
1057
1057
|
if (last) {
|
|
1058
|
-
deleteCustomState$1(last, "
|
|
1058
|
+
deleteCustomState$1(last, "--last");
|
|
1059
1059
|
}
|
|
1060
|
-
addCustomState$1(clone, "
|
|
1060
|
+
addCustomState$1(clone, "--last");
|
|
1061
1061
|
last = clone;
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
@@ -1407,7 +1407,7 @@ let M3eBottomSheetActionElement = class M3eBottomSheetActionElement extends Acti
|
|
|
1407
1407
|
};
|
|
1408
1408
|
M3eBottomSheetActionElement = __decorate([customElement$1("m3e-bottom-sheet-action")], M3eBottomSheetActionElement);
|
|
1409
1409
|
|
|
1410
|
-
var _M3eBottomSheetElement_instances, _M3eBottomSheetElement_documentClickHandler, _M3eBottomSheetElement_documentKeyDownHandler, _M3eBottomSheetElement_windowResizeHandler, _M3eBottomSheetElement_velocityTracker, _M3eBottomSheetElement_scrollLockController, _M3eBottomSheetElement_inertController, _M3eBottomSheetElement_resizeController, _M3eBottomSheetElement_trigger, _M3eBottomSheetElement_dragState, _M3eBottomSheetElement_dragged, _M3eBottomSheetElement_activeDetent, _M3eBottomSheetElement_requestDetent, _M3eBottomSheetElement_cachedContentHeight, _M3eBottomSheetElement_cachedHeaderHeight, _M3eBottomSheetElement_snapAnimation, _M3eBottomSheetElement_initialize,
|
|
1410
|
+
var _M3eBottomSheetElement_instances, _M3eBottomSheetElement_documentClickHandler, _M3eBottomSheetElement_documentKeyDownHandler, _M3eBottomSheetElement_windowResizeHandler, _M3eBottomSheetElement_velocityTracker, _M3eBottomSheetElement_scrollLockController, _M3eBottomSheetElement_inertController, _M3eBottomSheetElement_resizeController, _M3eBottomSheetElement_trigger, _M3eBottomSheetElement_dragState, _M3eBottomSheetElement_dragged, _M3eBottomSheetElement_activeDetent, _M3eBottomSheetElement_requestDetent, _M3eBottomSheetElement_cachedContentHeight, _M3eBottomSheetElement_cachedHeaderHeight, _M3eBottomSheetElement_snapAnimation, _M3eBottomSheetElement_initialize, _M3eBottomSheetElement_handleHeaderPointerDown, _M3eBottomSheetElement_handleHeaderPointerMove, _M3eBottomSheetElement_handleHeaderPointerUp, _M3eBottomSheetElement_handleDocumentClick, _M3eBottomSheetElement_handleDocumentKeyDown, _M3eBottomSheetElement_handleWindowResize, _M3eBottomSheetElement_handleDragHandleClick, _M3eBottomSheetElement_handleDragHandleKeyDown, _M3eBottomSheetElement_getNextHigherDetent, _M3eBottomSheetElement_getNextLowerDetent, _M3eBottomSheetElement_getClosestDetent, _M3eBottomSheetElement_computeDetentHeight, _M3eBottomSheetElement_computeMaxHeight, _M3eBottomSheetElement_computeMinHeight, _M3eBottomSheetElement_computePeekHeight, _M3eBottomSheetElement_computeFitHeight, _M3eBottomSheetElement_handleSectionResize, _M3eBottomSheetElement_snapToDetent, _M3eBottomSheetElement_snapToHeight, _M3eBottomSheetElement_updateHeight;
|
|
1411
1411
|
var M3eBottomSheetElement_1;
|
|
1412
1412
|
/**
|
|
1413
1413
|
* A sheet used to show secondary content anchored to the bottom of the screen.
|
|
@@ -1468,11 +1468,11 @@ var M3eBottomSheetElement_1;
|
|
|
1468
1468
|
* @attr open - Whether the bottom sheet is open.
|
|
1469
1469
|
* @attr overshoot-limit - A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
|
|
1470
1470
|
*
|
|
1471
|
-
* @fires opening -
|
|
1472
|
-
* @fires opened -
|
|
1473
|
-
* @fires cancel -
|
|
1474
|
-
* @fires closing -
|
|
1475
|
-
* @fires closed -
|
|
1471
|
+
* @fires opening - Dispatched when the sheet begins to open.
|
|
1472
|
+
* @fires opened - Dispatched when the sheet has opened.
|
|
1473
|
+
* @fires cancel - Dispatched when the sheet is cancelled.
|
|
1474
|
+
* @fires closing - Dispatched when the sheet begins to close.
|
|
1475
|
+
* @fires closed - Dispatched when the sheet has closed.
|
|
1476
1476
|
*
|
|
1477
1477
|
* @cssprop --m3e-bottom-sheet-width - The width of the sheet.
|
|
1478
1478
|
* @cssprop --m3e-bottom-sheet-max-width - The maximum width of the sheet.
|
|
@@ -1731,7 +1731,7 @@ let M3eBottomSheetElement = M3eBottomSheetElement_1 = class M3eBottomSheetElemen
|
|
|
1731
1731
|
}
|
|
1732
1732
|
/** @inheritdoc */
|
|
1733
1733
|
render() {
|
|
1734
|
-
return html`<m3e-focus-trap ?disabled="${!this.modal}"><div class="base"><m3e-elevation class="elevation"></m3e-elevation><div class="header" @pointerdown="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerDown)}" @pointermove="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerMove)}" @pointerup="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerUp)}">${this.handle ? html`<div class="handle-row"><div id="handle" class="handle" role="button" aria-label="${this.handleLabel}" tabindex="0" @click="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleDragHandleClick)}" @keydown="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleDragHandleKeyDown)}"><m3e-focus-ring class="focus-ring" for="handle"></m3e-focus-ring><div class="handle-touch" aria-hidden="true"></div></div></div>` : nothing}<slot name="header"
|
|
1734
|
+
return html`<m3e-focus-trap ?disabled="${!this.modal}"><div class="base"><m3e-elevation class="elevation"></m3e-elevation><div class="header" @pointerdown="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerDown)}" @pointermove="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerMove)}" @pointerup="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleHeaderPointerUp)}">${this.handle ? html`<div class="handle-row"><div id="handle" class="handle" role="button" aria-label="${this.handleLabel}" tabindex="0" @click="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleDragHandleClick)}" @keydown="${__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_handleDragHandleKeyDown)}"><m3e-focus-ring class="focus-ring" for="handle"></m3e-focus-ring><div class="handle-touch" aria-hidden="true"></div></div></div>` : nothing}<slot name="header"></slot></div><div class="body"><div class="content"><slot></slot></div></div></div></m3e-focus-trap>`;
|
|
1735
1735
|
}
|
|
1736
1736
|
};
|
|
1737
1737
|
_M3eBottomSheetElement_documentClickHandler = new WeakMap();
|
|
@@ -1762,9 +1762,6 @@ _M3eBottomSheetElement_initialize = function _M3eBottomSheetElement_initialize()
|
|
|
1762
1762
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_resizeController, "f").observe(header);
|
|
1763
1763
|
}
|
|
1764
1764
|
};
|
|
1765
|
-
_M3eBottomSheetElement_handleHeaderSlotChange = function _M3eBottomSheetElement_handleHeaderSlotChange(e) {
|
|
1766
|
-
setCustomState$1(this, "has-header", hasAssignedNodes$1(e.target));
|
|
1767
|
-
};
|
|
1768
1765
|
_M3eBottomSheetElement_handleHeaderPointerDown = function _M3eBottomSheetElement_handleHeaderPointerDown(e) {
|
|
1769
1766
|
if (e.target instanceof HTMLElement && M3eInteractivityChecker.isFocusable(e.target)) {
|
|
1770
1767
|
return;
|
|
@@ -1882,7 +1879,7 @@ _M3eBottomSheetElement_handleWindowResize = function _M3eBottomSheetElement_hand
|
|
|
1882
1879
|
return;
|
|
1883
1880
|
}
|
|
1884
1881
|
const maxHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computeMaxHeight).call(this);
|
|
1885
|
-
if (hasCustomState$1(this, "
|
|
1882
|
+
if (hasCustomState$1(this, "--full")) {
|
|
1886
1883
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_updateHeight).call(this, maxHeight);
|
|
1887
1884
|
} else if (this.clientHeight > maxHeight) {
|
|
1888
1885
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_updateHeight).call(this, maxHeight);
|
|
@@ -2059,7 +2056,7 @@ async function _M3eBottomSheetElement_snapToHeight(height) {
|
|
|
2059
2056
|
};
|
|
2060
2057
|
_M3eBottomSheetElement_updateHeight = function _M3eBottomSheetElement_updateHeight(height) {
|
|
2061
2058
|
this.style.setProperty("--_bottom-sheet-height", `${height}px`);
|
|
2062
|
-
setCustomState$1(this, "
|
|
2059
|
+
setCustomState$1(this, "--full", height === __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computeMaxHeight).call(this));
|
|
2063
2060
|
const content = this.shadowRoot?.querySelector(".content");
|
|
2064
2061
|
if (content) {
|
|
2065
2062
|
content.inert = height <= __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computePeekHeight).call(this);
|
|
@@ -2069,15 +2066,15 @@ _M3eBottomSheetElement_updateHeight = function _M3eBottomSheetElement_updateHeig
|
|
|
2069
2066
|
registerStyleSheet$1(css`@property --_bottom-sheet-height { syntax: "<length>"; inherits: false; initial-value: 50vh; } m3e-bottom-sheet > [slot="header"] { margin-block-end: var(--m3e-bottom-sheet-padding-block, 0.5rem); margin-inline: var(--m3e-bottom-sheet-padding-inline, 1rem); }</length>`);
|
|
2070
2067
|
})();
|
|
2071
2068
|
/** The styles of the element. */
|
|
2072
|
-
M3eBottomSheetElement.styles = css`:host { display: block; position: fixed; left: 50%; top: calc(100vh - var(--_bottom-sheet-height)); margin: 0; padding: 0; outline: none; overflow: hidden; border: none; box-sizing: border-box; width: var(--m3e-bottom-sheet-width, 100%); max-width: var(--m3e-bottom-sheet-max-width, 40rem); height: var(--_bottom-sheet-height); color: var(--m3e-bottom-sheet-color, ${DesignToken$1.color.onSurface}); background-color: var(--m3e-bottom-sheet-container-color, ${DesignToken$1.color.surfaceContainerLow}); } :host(:not(:state(-no-animate))) { transition: ${unsafeCSS(`transform ${DesignToken$1.motion.duration.medium2} ${DesignToken$1.motion.easing.standardDecelerate},
|
|
2073
|
-
border-radius ${DesignToken$1.motion.duration.medium2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not([modal]):not(:state(
|
|
2069
|
+
M3eBottomSheetElement.styles = css`:host { display: block; position: fixed; left: 50%; top: calc(100vh - var(--_bottom-sheet-height)); margin: 0; padding: 0; outline: none; overflow: hidden; border: none; box-sizing: border-box; width: var(--m3e-bottom-sheet-width, 100%); max-width: var(--m3e-bottom-sheet-max-width, 40rem); height: var(--_bottom-sheet-height); color: var(--m3e-bottom-sheet-color, ${DesignToken$1.color.onSurface}); background-color: var(--m3e-bottom-sheet-container-color, ${DesignToken$1.color.surfaceContainerLow}); } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${unsafeCSS(`transform ${DesignToken$1.motion.duration.medium2} ${DesignToken$1.motion.easing.standardDecelerate},
|
|
2070
|
+
border-radius ${DesignToken$1.motion.duration.medium2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not([modal]):not(:is(:state(--full), :--full))) .elevation { --m3e-elevation-level: var(--m3e-bottom-sheet-elevation, ${DesignToken$1.elevation.level1}); } :host([modal]:not(:is(:state(--full), :--full))) .elevation { --m3e-elevation-level: var(--m3e-bottom-sheet-modal-elevation, ${DesignToken$1.elevation.level1}); } :host(:is(:state(--full), :--full)) .elevation { --m3e-elevation-level: var(--m3e-bottom-sheet-full-elevation, ${DesignToken$1.elevation.level1}); } :host(:not([modal])) { z-index: var(--m3e-bottom-sheet-z-index, 10); } :host(:not([modal]):not([open])), :host([modal]:not(:popover-open)) { border-radius: var(--m3e-bottom-sheet-minimized-container-shape, ${DesignToken$1.shape.corner.none}); transform: translateX(-50%) translateY(100%); } :host(:not([modal])[open]:not(:is(:state(--full), :--full))), :host([modal]:not(:is(:state(--full), :--full)):popover-open) { border-radius: var(--m3e-bottom-sheet-container-shape, ${DesignToken$1.shape.corner.extraLargeTop}); } :host(:not([modal])[open]:is(:state(--full), :--full)), :host([modal]:is(:state(--full), :--full):popover-open) { border-radius: var(--m3e-bottom-sheet-full-container-shape, ${DesignToken$1.shape.corner.extraLargeTop}); } :host(:not([modal])[open]), :host([modal]:popover-open) { transform: translateX(-50%) translateY(0); } :host([modal]:not(:is(:state(--no-animate), :--no-animate)))::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
2074
2071
|
overlay ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
2075
|
-
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host([modal]:popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-bottom-sheet-scrim-color, ${DesignToken$1.color.scrim}) var(--m3e-bottom-sheet-scrim-opacity, 32%), transparent ); } :host([modal]:popover-open:not(:state(-no-animate)))::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
2072
|
+
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host([modal]:popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-bottom-sheet-scrim-color, ${DesignToken$1.color.scrim}) var(--m3e-bottom-sheet-scrim-opacity, 32%), transparent ); } :host([modal]:popover-open:not(:is(:state(--no-animate), :--no-animate)))::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
2076
2073
|
overlay ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
2077
|
-
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { :host([modal]:popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-bottom-sheet-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent ); } } .base { display: flex; border-radius: inherit; flex-direction: column; height: 100%; --_bottom-sheet-peek-height: var(--m3e-bottom-sheet-peek-height, 0); --_bottom-sheet-top-space: var(--m3e-bottom-sheet-compact-top-space, 4.5rem); } @media (max-height: 640px) { .base { --_bottom-sheet-top-space: var(--m3e-bottom-sheet-top-space, 3.5rem); } } .body { flex: 1 1 auto; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; padding-block-end: var(--m3e-bottom-sheet-padding-block, 0.5rem); padding-inline: var(--m3e-bottom-sheet-padding-inline, 1rem); font-size: var(--m3e-bottom-sheet-content-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-bottom-sheet-content-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-bottom-sheet-content-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var(--m3e-bottom-sheet-content-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking}); } .content { height: fit-content; } :host(:not([handle])) .header { display: none; } :host(:not([handle])) .body, .header { border-top-left-radius: inherit; border-top-right-radius: inherit; padding-block-start: var(--m3e-bottom-sheet-padding-block, 0.5rem); font-size: var(--m3e-bottom-sheet-header-font-size, ${DesignToken$1.typescale.standard.title.large.fontSize}); font-weight: var(--m3e-bottom-sheet-header-font-weight, ${DesignToken$1.typescale.standard.title.large.fontWeight}); line-height: var(--m3e-bottom-sheet-header-line-height, ${DesignToken$1.typescale.standard.title.large.lineHeight}); letter-spacing: var(--m3e-bottom-sheet-header-tracking, ${DesignToken$1.typescale.standard.title.large.tracking}); } .header { cursor: grab; touch-action: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; flex: none; display: flex; flex-direction: column; min-height: 3rem; --m3e-app-bar-container-color: var(--m3e-bottom-sheet-container-color, ${DesignToken$1.color.surfaceContainerLow}); } .handle-row { position: relative; flex: none; display: flex; align-items: center; justify-content: center; opacity: 1; visibility: visible; height: var(--m3e-bottom-sheet-handle-container-height, 1.5rem); } :host(:not(:state(-no-animate))) .handle-row { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
2074
|
+
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { :host([modal]:popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-bottom-sheet-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent ); } } .base { display: flex; border-radius: inherit; flex-direction: column; height: 100%; --_bottom-sheet-peek-height: var(--m3e-bottom-sheet-peek-height, 0); --_bottom-sheet-top-space: var(--m3e-bottom-sheet-compact-top-space, 4.5rem); } @media (max-height: 640px) { .base { --_bottom-sheet-top-space: var(--m3e-bottom-sheet-top-space, 3.5rem); } } .body { flex: 1 1 auto; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; padding-block-end: var(--m3e-bottom-sheet-padding-block, 0.5rem); padding-inline: var(--m3e-bottom-sheet-padding-inline, 1rem); font-size: var(--m3e-bottom-sheet-content-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-bottom-sheet-content-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-bottom-sheet-content-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var(--m3e-bottom-sheet-content-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking}); } .content { height: fit-content; } :host(:not([handle])) .header { display: none; } :host(:not([handle])) .body, .header { border-top-left-radius: inherit; border-top-right-radius: inherit; padding-block-start: var(--m3e-bottom-sheet-padding-block, 0.5rem); font-size: var(--m3e-bottom-sheet-header-font-size, ${DesignToken$1.typescale.standard.title.large.fontSize}); font-weight: var(--m3e-bottom-sheet-header-font-weight, ${DesignToken$1.typescale.standard.title.large.fontWeight}); line-height: var(--m3e-bottom-sheet-header-line-height, ${DesignToken$1.typescale.standard.title.large.lineHeight}); letter-spacing: var(--m3e-bottom-sheet-header-tracking, ${DesignToken$1.typescale.standard.title.large.tracking}); } .header { cursor: grab; touch-action: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; flex: none; display: flex; flex-direction: column; min-height: 3rem; --m3e-app-bar-container-color: var(--m3e-bottom-sheet-container-color, ${DesignToken$1.color.surfaceContainerLow}); } .handle-row { position: relative; flex: none; display: flex; align-items: center; justify-content: center; opacity: 1; visibility: visible; height: var(--m3e-bottom-sheet-handle-container-height, 1.5rem); } :host(:not(:is(:state(--no-animate), :--no-animate))) .handle-row { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
2078
2075
|
padding ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
2079
2076
|
height ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
2080
|
-
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } .handle { position: relative; width: var(--m3e-bottom-sheet-handle-width, 2rem); height: var(--m3e-bottom-sheet-handle-height, 4px); border-radius: var(--m3e-bottom-sheet-handle-shape, ${DesignToken$1.shape.corner.full}); background-color: var(--m3e-bottom-sheet-handle-color, ${DesignToken$1.color.onSurfaceVariant}); } .handle-touch { position: absolute; aspect-ratio: 1 / 1; height: 3rem; left: calc(0px - calc(calc(3rem - var(--m3e-bottom-sheet-handle-width, 2rem)) / 2)); right: calc(0px - calc(calc(3rem - var(--m3e-bottom-sheet-handle-width, 2rem)) / 2)); top: calc( 0px - calc( calc(3rem - var(--m3e-bottom-sheet-handle-container-height, 1.5rem)) - calc( var(--m3e-bottom-sheet-handle-height, 4px) / 2 ) ) ); } @media (prefers-reduced-motion) { :host(:not(:state(-no-animate))), :host([modal]:not(:state(-no-animate)))::backdrop, :host([modal]:popover-open:not(:state(-no-animate)))::backdrop, :host(:not(:state(-no-animate))) .handle-row { transition: none; } } @media (forced-colors: active) { :host([modal]:not(:state(-no-animate)))::backdrop, :host([modal]:popover-open:not(:state(-no-animate)))::backdrop { transition: none; } .base { border-style: solid; border-width: 1px; border-color: CanvasText; } .handle { background-color: ButtonText; } }`;
|
|
2077
|
+
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } .handle { position: relative; width: var(--m3e-bottom-sheet-handle-width, 2rem); height: var(--m3e-bottom-sheet-handle-height, 4px); border-radius: var(--m3e-bottom-sheet-handle-shape, ${DesignToken$1.shape.corner.full}); background-color: var(--m3e-bottom-sheet-handle-color, ${DesignToken$1.color.onSurfaceVariant}); } .handle-touch { position: absolute; aspect-ratio: 1 / 1; height: 3rem; left: calc(0px - calc(calc(3rem - var(--m3e-bottom-sheet-handle-width, 2rem)) / 2)); right: calc(0px - calc(calc(3rem - var(--m3e-bottom-sheet-handle-width, 2rem)) / 2)); top: calc( 0px - calc( calc(3rem - var(--m3e-bottom-sheet-handle-container-height, 1.5rem)) - calc( var(--m3e-bottom-sheet-handle-height, 4px) / 2 ) ) ); } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))), :host([modal]:not(:is(:state(--no-animate), :--no-animate)))::backdrop, :host([modal]:popover-open:not(:is(:state(--no-animate), :--no-animate)))::backdrop, :host(:not(:is(:state(--no-animate), :--no-animate))) .handle-row { transition: none; } } @media (forced-colors: active) { :host([modal]:not(:is(:state(--no-animate), :--no-animate)))::backdrop, :host([modal]:popover-open:not(:is(:state(--no-animate), :--no-animate)))::backdrop { transition: none; } .base { border-style: solid; border-width: 1px; border-color: CanvasText; } .handle { background-color: ButtonText; } }`;
|
|
2081
2078
|
__decorate([property({
|
|
2082
2079
|
type: Boolean,
|
|
2083
2080
|
reflect: true
|
|
@@ -2321,7 +2318,7 @@ let M3eBreadcrumbItemButtonElement = class M3eBreadcrumbItemButtonElement extend
|
|
|
2321
2318
|
_M3eBreadcrumbItemButtonElement_clickHandler = new WeakMap();
|
|
2322
2319
|
_M3eBreadcrumbItemButtonElement_instances = new WeakSet();
|
|
2323
2320
|
_M3eBreadcrumbItemButtonElement_handleSlotChange = function _M3eBreadcrumbItemButtonElement_handleSlotChange(e) {
|
|
2324
|
-
setCustomState$1(this, "
|
|
2321
|
+
setCustomState$1(this, "--icon-only", isIconOnly(e.target));
|
|
2325
2322
|
};
|
|
2326
2323
|
_M3eBreadcrumbItemButtonElement_handleClick = function _M3eBreadcrumbItemButtonElement_handleClick(e) {
|
|
2327
2324
|
// If current and link, disable default link click handler behavior.
|
|
@@ -2330,7 +2327,7 @@ _M3eBreadcrumbItemButtonElement_handleClick = function _M3eBreadcrumbItemButtonE
|
|
|
2330
2327
|
}
|
|
2331
2328
|
};
|
|
2332
2329
|
/** The styles of the element. */
|
|
2333
|
-
M3eBreadcrumbItemButtonElement.styles = css`:host { display: block; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; justify-content: center; position: relative; border-radius: var(--m3e-breadcrumb-item-shape, ${DesignToken$1.shape.corner.full}); height: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); column-gap: var(--m3e-breadcrumb-item-icon-label-space, 0.5rem); } .icon { font-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); --m3e-icon-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); } ::slotted([slot="icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]) { width: 1em; height: 1em; } :host(:state(-icon-only)) .overflow { flex: none; } :host(:not(:state(-icon-only))), :host(:not(:state(-icon-only))) .base { min-width: 0; } :host(:state(-icon-only):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:state(-icon-only)) .base { width: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); padding-inline: var(--m3e-breadcrumb-item-icon-padding-inline, 0px); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-icon-hover-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-icon-focus-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-icon-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); } :host(:not(:state(-icon-only)):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-label-color, ${DesignToken$1.color.primary}); } :host(:not(:state(-icon-only))) .base { font-size: var(--m3e-breadcrumb-item-label-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-breadcrumb-item-label-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-breadcrumb-item-label-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-breadcrumb-item-label-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } :host(:not(:state(-icon-only))) .base { padding-inline: var(--m3e-breadcrumb-item-label-padding-inline, 0.75rem); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-label-hover-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-label-focus-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-label-pressed-state-layer-color, ${DesignToken$1.color.primary}); } :host([current]) .base { color: var(--m3e-breadcrumb-item-last-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([current])) { cursor: pointer; user-select: none; } :host(:disabled:not([current])) .base { color: color-mix( in srgb, var(--m3e-breadcrumb-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-breadcrumb-item-disabled-opacity, 38%), transparent ); } .touch { position: absolute; height: 3rem; width: max(3rem, 100%); margin: auto; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { :host(:state(-icon-only):not([current]):not(:disabled)) .base, :host(:not(:state(-icon-only)):not([current]):not(:disabled)) .base { color: LinkText; outline: 1px solid LinkText; } :host(:disabled) .base { color: GrayText; } }`;
|
|
2330
|
+
M3eBreadcrumbItemButtonElement.styles = css`:host { display: block; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; justify-content: center; position: relative; border-radius: var(--m3e-breadcrumb-item-shape, ${DesignToken$1.shape.corner.full}); height: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); column-gap: var(--m3e-breadcrumb-item-icon-label-space, 0.5rem); } .icon { font-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); --m3e-icon-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); } ::slotted([slot="icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]) { width: 1em; height: 1em; } :host(:is(:state(--icon-only), :--icon-only)) .overflow { flex: none; } :host(:not(:is(:state(--icon-only), :--icon-only))), :host(:not(:is(:state(--icon-only), :--icon-only))) .base { min-width: 0; } :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:is(:state(--icon-only), :--icon-only)) .base { width: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); padding-inline: var(--m3e-breadcrumb-item-icon-padding-inline, 0px); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-icon-hover-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-icon-focus-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-icon-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); } :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-label-color, ${DesignToken$1.color.primary}); } :host(:not(:is(:state(--icon-only), :--icon-only))) .base { font-size: var(--m3e-breadcrumb-item-label-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-breadcrumb-item-label-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-breadcrumb-item-label-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-breadcrumb-item-label-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } :host(:not(:is(:state(--icon-only), :--icon-only))) .base { padding-inline: var(--m3e-breadcrumb-item-label-padding-inline, 0.75rem); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-label-hover-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-label-focus-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-label-pressed-state-layer-color, ${DesignToken$1.color.primary}); } :host([current]) .base { color: var(--m3e-breadcrumb-item-last-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([current])) { cursor: pointer; user-select: none; } :host(:disabled:not([current])) .base { color: color-mix( in srgb, var(--m3e-breadcrumb-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-breadcrumb-item-disabled-opacity, 38%), transparent ); } .touch { position: absolute; height: 3rem; width: max(3rem, 100%); margin: auto; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base, :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base { color: LinkText; outline: 1px solid LinkText; } :host(:disabled) .base { color: GrayText; } }`;
|
|
2334
2331
|
__decorate([query(".focus-ring")], M3eBreadcrumbItemButtonElement.prototype, "_focusRing", void 0);
|
|
2335
2332
|
__decorate([query(".state-layer")], M3eBreadcrumbItemButtonElement.prototype, "_stateLayer", void 0);
|
|
2336
2333
|
__decorate([query(".ripple")], M3eBreadcrumbItemButtonElement.prototype, "_ripple", void 0);
|
|
@@ -2361,7 +2358,7 @@ var _M3eBreadcrumbItemElement_instances, _M3eBreadcrumbItemElement_defaultSepara
|
|
|
2361
2358
|
* @attr download - A value indicating whether the internal link target will be downloaded, optionally specifying a file name.
|
|
2362
2359
|
* @attr rel - The relationship between the internal link target and the document.
|
|
2363
2360
|
*
|
|
2364
|
-
* @fires click -
|
|
2361
|
+
* @fires click - Dispatched when the element is clicked.
|
|
2365
2362
|
*
|
|
2366
2363
|
* @cssprop --m3e-breadcrumb-item-shape - Shape of the internal breadcrumb item button.
|
|
2367
2364
|
* @cssprop --m3e-breadcrumb-item-container-height - Height of the internal breadcrumb item button container.
|
|
@@ -2449,14 +2446,14 @@ _M3eBreadcrumbItemElement_handleIconSlotChange = function _M3eBreadcrumbItemElem
|
|
|
2449
2446
|
__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_updateIconFilled).call(this);
|
|
2450
2447
|
};
|
|
2451
2448
|
_M3eBreadcrumbItemElement_handleSlotChange = function _M3eBreadcrumbItemElement_handleSlotChange(e) {
|
|
2452
|
-
setCustomState$1(this, "
|
|
2449
|
+
setCustomState$1(this, "--icon-only", isIconOnly(e.target));
|
|
2453
2450
|
__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_updateIconFilled).call(this);
|
|
2454
2451
|
};
|
|
2455
2452
|
_M3eBreadcrumbItemElement_updateIconFilled = function _M3eBreadcrumbItemElement_updateIconFilled() {
|
|
2456
2453
|
this.querySelectorAll("m3e-icon").forEach(x => x.filled = this.current !== undefined && this.current !== null);
|
|
2457
2454
|
};
|
|
2458
2455
|
/** The styles of the element. */
|
|
2459
|
-
M3eBreadcrumbItemElement.styles = css`:host { display: block; } .base { display: flex; align-items: center; height: 100%; } :host(:not(:state(-icon-only))[current]), :host(:not(:state(-icon-only))[current]) .base { min-width: 0; } .button { flex: 1 1 auto; } .separator { flex: none; display: flex; justify-content: center; align-items: center; min-width: 0.5rem; --m3e-icon-size: var(--m3e-breadcrumb-separator-icon-size, 1.5rem); } .separator-icon { width: 1em; height: 1em; font-size: var(--m3e-icon-size); vertical-align: middle; }`;
|
|
2456
|
+
M3eBreadcrumbItemElement.styles = css`:host { display: block; } .base { display: flex; align-items: center; height: 100%; } :host(:not(:is(:state(--icon-only), :--icon-only))[current]), :host(:not(:is(:state(--icon-only), :--icon-only))[current]) .base { min-width: 0; } .button { flex: 1 1 auto; } .separator { flex: none; display: flex; justify-content: center; align-items: center; min-width: 0.5rem; --m3e-icon-size: var(--m3e-breadcrumb-separator-icon-size, 1.5rem); } .separator-icon { width: 1em; height: 1em; font-size: var(--m3e-icon-size); vertical-align: middle; }`;
|
|
2460
2457
|
__decorate([query(".button")], M3eBreadcrumbItemElement.prototype, "_button", void 0);
|
|
2461
2458
|
__decorate([property({
|
|
2462
2459
|
attribute: "item-label"
|
|
@@ -2564,7 +2561,7 @@ const ButtonSizeToken = {
|
|
|
2564
2561
|
|
|
2565
2562
|
/** @private */
|
|
2566
2563
|
function buttonStyle(size) {
|
|
2567
|
-
return css`:host([size="${unsafeCSS(size)}"]) .base { height: ${ButtonSizeToken[size].containerHeight}; } :host([size="${unsafeCSS(size)}"]) .wrapper { padding-inline-start: ${ButtonSizeToken[size].leadingSpace}; padding-inline-end: ${ButtonSizeToken[size].trailingSpace}; column-gap: ${ButtonSizeToken[size].iconLabelSpace}; } :host( [size="${unsafeCSS(size)}"]:state(
|
|
2564
|
+
return css`:host([size="${unsafeCSS(size)}"]) .base { height: ${ButtonSizeToken[size].containerHeight}; } :host([size="${unsafeCSS(size)}"]) .wrapper { padding-inline-start: ${ButtonSizeToken[size].leadingSpace}; padding-inline-end: ${ButtonSizeToken[size].trailingSpace}; column-gap: ${ButtonSizeToken[size].iconLabelSpace}; } :host( [size="${unsafeCSS(size)}"]:is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--adjacent-pressed), :--adjacent-pressed ):not(:is(:state(--pressed), :--pressed)) ) .wrapper { padding-inline-start: calc( ${ButtonSizeToken[size].leadingSpace} - calc( calc(var(--_adjacent-button-width) * var(--m3e-standard-button-group-width-multiplier, 0.15)) / 4.25 ) ); padding-inline-end: calc( ${ButtonSizeToken[size].trailingSpace} - calc( calc(var(--_adjacent-button-width) * var(--m3e-standard-button-group-width-multiplier, 0.15)) / 4.25 ) ); } :host([size="${unsafeCSS(size)}"]) .label { font-size: ${ButtonSizeToken[size].labelTextFontSize}; font-weight: ${ButtonSizeToken[size].labelTextFontWeight}; line-height: ${ButtonSizeToken[size].labelTextLineHeight}; letter-spacing: ${ButtonSizeToken[size].labelTextTracking}; } :host([size="${unsafeCSS(size)}"]) .icon { font-size: ${ButtonSizeToken[size].iconSize}; --m3e-icon-size: ${ButtonSizeToken[size].iconSize}; } :host([size="${unsafeCSS(size)}"]) .base { outline-offset: calc(0px - ${ButtonSizeToken[size].outlineThickness}); outline-width: ${ButtonSizeToken[size].outlineThickness}; } :host(:not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="rounded"]) .base { border-radius: var(--_button-shape, ${ButtonSizeToken[size].shapeRound}); } :host( :not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="rounded"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: ${ButtonSizeToken[size].selectedShapeRound}; } :host(:not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="square"]) .base { border-radius: ${ButtonSizeToken[size].shapeSquare}; } :host( :not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="square"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: var(--_button-shape, ${ButtonSizeToken[size].selectedShapeSquare}); } :host(:not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"]:is(:state(--pressed), :--pressed)) .base { border-radius: ${ButtonSizeToken[size].shapePressedMorph}; } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="rounded"]) .base { border-start-start-radius: var( --_button-rounded-start-shape, var(--_button-shape, ${ButtonSizeToken[size].shapeRound}) ); border-end-start-radius: var( --_button-rounded-start-shape, var(--_button-shape, ${ButtonSizeToken[size].shapeRound}) ); border-start-end-radius: var( --_button-rounded-end-shape, var(--_button-shape, ${ButtonSizeToken[size].shapeRound}) ); border-end-end-radius: var( --_button-rounded-end-shape, var(--_button-shape, ${ButtonSizeToken[size].shapeRound}) ); } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="square"]) .base { border-start-start-radius: var(--_button-square-start-shape, ${ButtonSizeToken[size].shapeSquare}); border-end-start-radius: var(--_button-square-start-shape, ${ButtonSizeToken[size].shapeSquare}); border-start-end-radius: var(--_button-square-end-shape, ${ButtonSizeToken[size].shapeSquare}); border-end-end-radius: var(--_button-square-end-shape, ${ButtonSizeToken[size].shapeSquare}); } :host( :is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="square"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: var(--_button-shape, ${ButtonSizeToken[size].selectedShapeSquare}); } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"]:is(:state(--pressed), :--pressed)) .base { border-start-start-radius: var(--_button-start-shape-pressed-morph, ${ButtonSizeToken[size].shapePressedMorph}); border-end-start-radius: var(--_button-start-shape-pressed-morph, ${ButtonSizeToken[size].shapePressedMorph}); border-start-end-radius: var(--_button-end-shape-pressed-morph, ${ButtonSizeToken[size].shapePressedMorph}); border-end-end-radius: var(--_button-end-shape-pressed-morph, ${ButtonSizeToken[size].shapePressedMorph}); }`;
|
|
2568
2565
|
}
|
|
2569
2566
|
/**
|
|
2570
2567
|
* Size variant styles for `M3eButtonElement`.
|
|
@@ -2576,8 +2573,8 @@ const ButtonSizeStyle = [buttonStyle("extra-small"), buttonStyle("small"), butto
|
|
|
2576
2573
|
* Baseline styles for `M3eButtonElement`.
|
|
2577
2574
|
* @internal
|
|
2578
2575
|
*/
|
|
2579
|
-
const ButtonStyle = 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}`)}; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } :host(:state(
|
|
2580
|
-
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; } .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 { transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]), ::slotted([slot="trailing-icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]), ::slotted(svg[slot="selected-icon"]), ::slotted(svg[slot="trailing-icon"]) { width: 1em; height: 1em; } :host([toggle]:not([selected])) .base.with-selected-icon slot[name="selected-icon"], :host([toggle][selected]) .base.with-selected-icon slot[name="icon"] { display: none; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } :host(:state(
|
|
2576
|
+
const ButtonStyle = 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}`)}; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
|
|
2577
|
+
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; } .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 { transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]), ::slotted([slot="trailing-icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]), ::slotted(svg[slot="selected-icon"]), ::slotted(svg[slot="trailing-icon"]) { width: 1em; height: 1em; } :host([toggle]:not([selected])) .base.with-selected-icon slot[name="selected-icon"], :host([toggle][selected]) .base.with-selected-icon slot[name="icon"] { display: none; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } :host(:is(:state(--grouped), :--grouped):is(:state(--connected), :--connected)) { flex: 1 1 auto; } :host(:is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected))) { transition: ${unsafeCSS(`padding-inline ${DesignToken$1.motion.spring.fastEffects}`)}; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):not( :is(:state(--adjacent-pressed), :--adjacent-pressed) ):not(:is(:state(--pressed), :--pressed)) ) { flex-shrink: 0; flex-grow: 0; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--adjacent-pressed), :--adjacent-pressed ):not(:is(:state(--pressed), :--pressed)) ) { flex-shrink: 1; min-width: 0; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--adjacent-pressed), :--adjacent-pressed ):not(:is(:state(--pressed), :--pressed)) ) .label { text-overflow: clip; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--pressed), :--pressed ):not([disabled-interactive]):not(:disabled) ) { flex-shrink: 0; flex-basis: calc( var(--_button-width) + calc(var(--_button-width) * var(--m3e-standard-button-group-width-multiplier, 0.15)) ); } @media (forced-colors: active) { .base, .label, .icon { transition: none; } :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base { transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } :host([variant]:not(:disabled):not([disabled-interactive]):not([toggle])) .base { background-color: ButtonFace; outline-color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive]):not([toggle])) .label, :host([variant]:not(:disabled):not([disabled-interactive]):not([toggle])) .icon { color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .base { background-color: ButtonFace; outline-color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .label, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .label, :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected]):focus) .label, :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .icon, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .icon, :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected]):focus) .icon { color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]) .base { background-color: ButtonText; outline: none; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]) .label, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle][selected]) .label, :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]:focus) .label, :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]) .icon, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle][selected]) .icon, :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]:focus) .icon { forced-color-adjust: none; color: ButtonFace; background-color: ButtonText; } :host([variant]:disabled) .base, :host([variant][disabled-interactive]) .base { outline-color: GrayText; background-color: unset; } :host([variant]:disabled) .label, :host([variant][disabled-interactive]) .label, :host([variant]:disabled) .icon, :host([variant][disabled-interactive]) .icon { color: GrayText; } .base { outline-style: solid; } :host([size="extra-small"]) .base { outline-offset: calc(0px - var(--m3e-button-extra-small-outline-thickness, 1px)); outline-width: var(--m3e-button-extra-small-outline-thickness, 1px); } :host([size="small"]) .base { outline-offset: calc(0px - var(--m3e-button-small-outline-thickness, 1px)); outline-width: var(--m3e-button-small-outline-thickness, 1px); } :host([size="medium"]) .base { outline-offset: calc(0px - var(--m3e-button-medium-outline-thickness, 1px)); outline-width: var(--m3e-button-medium-outline-thickness, 1px); } :host([size="large"]) .base { outline-offset: calc(0px - var(--m3e-button-large-outline-thickness, 2px)); outline-width: var(--m3e-button-large-outline-thickness, 2px); } :host([size="extra-large"]) .base { outline-offset: calc(0px - var(--m3e-button-extra-large-outline-thickness, 3px)); outline-width: var(--m3e-button-extra-large-outline-thickness, 3px); } } @media (prefers-reduced-motion) { :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base, .base, .label, .icon { transition: none; } }`;
|
|
2581
2578
|
|
|
2582
2579
|
/**
|
|
2583
2580
|
* Component design tokens that control the appearance variants of `M3eButtonElement`.
|
|
@@ -3143,7 +3140,7 @@ const ButtonVariantToken = {
|
|
|
3143
3140
|
|
|
3144
3141
|
/** @private */
|
|
3145
3142
|
function buttonVariantStyle(variant) {
|
|
3146
|
-
return css`:host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].containerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.stateLayerColor}; --m3e-state-layer-hover-opacity: ${ButtonVariantToken[variant].hover.stateLayerOpacity}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.stateLayerColor}; --m3e-state-layer-focus-opacity: ${ButtonVariantToken[variant].focus.stateLayerOpacity}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.stateLayerColor}; --m3e-ripple-opacity: ${ButtonVariantToken[variant].pressed.stateLayerOpacity}; --m3e-elevation-level: ${ButtonVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-hover-level: ${ButtonVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-focus-level: ${ButtonVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-pressed-level: ${ButtonVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].unselectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.unselectedStateLayerColor}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.unselectedStateLayerColor}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.unselectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].selectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.selectedStateLayerColor}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.selectedStateLayerColor}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.selectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:state(
|
|
3143
|
+
return css`:host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].containerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.stateLayerColor}; --m3e-state-layer-hover-opacity: ${ButtonVariantToken[variant].hover.stateLayerOpacity}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.stateLayerColor}; --m3e-state-layer-focus-opacity: ${ButtonVariantToken[variant].focus.stateLayerOpacity}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.stateLayerColor}; --m3e-ripple-opacity: ${ButtonVariantToken[variant].pressed.stateLayerOpacity}; --m3e-elevation-level: ${ButtonVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-hover-level: ${ButtonVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-focus-level: ${ButtonVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-pressed-level: ${ButtonVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].unselectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.unselectedStateLayerColor}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.unselectedStateLayerColor}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.unselectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .base { background-color: ${ButtonVariantToken[variant].selectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${ButtonVariantToken[variant].hover.selectedStateLayerColor}; --m3e-state-layer-focus-color: ${ButtonVariantToken[variant].focus.selectedStateLayerColor}; --m3e-ripple-color: ${ButtonVariantToken[variant].pressed.selectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .base { outline-color: ${ButtonVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")}; } :host( [variant="${unsafeCSS(variant)}"]:is(:state(--pressed), :--pressed):not(:disabled):not([disabled-interactive]) ) .base { outline-color: ${ButtonVariantToken[variant].pressed.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].labelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].unselectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].selectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].focus.labelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):focus:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].focus.unselectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:focus:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].focus.selectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].hover.labelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):hover:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].hover.unselectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:hover:not(:disabled):not([disabled-interactive])) .label { color: ${ButtonVariantToken[variant].hover.selectedLabelTextColor}; } :host( [variant="${unsafeCSS(variant)}"]:is(:state(--pressed), :--pressed):not(:disabled):not([disabled-interactive]) ) .label { color: ${ButtonVariantToken[variant].pressed.labelTextColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle]:not([selected]):is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .label { color: ${ButtonVariantToken[variant].pressed.unselectedLabelTextColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle][selected]:is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .label { color: ${ButtonVariantToken[variant].pressed.selectedLabelTextColor}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].focus.iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):focus:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].focus.unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:focus:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].focus.selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].hover.iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):hover:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].hover.unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:hover:not(:disabled):not([disabled-interactive])) .icon { color: ${ButtonVariantToken[variant].hover.selectedIconColor}; } :host( [variant="${unsafeCSS(variant)}"]:is(:state(--pressed), :--pressed):not(:disabled):not([disabled-interactive]) ) .icon { color: ${ButtonVariantToken[variant].pressed.iconColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle]:not([selected]):is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .icon { color: ${ButtonVariantToken[variant].pressed.unselectedIconColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle][selected]:is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .icon { color: ${ButtonVariantToken[variant].pressed.selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:disabled) .base, :host([variant="${unsafeCSS(variant)}"][disabled-interactive]) .base { --m3e-elevation-level: ${ButtonVariantToken[variant].disabled.containerElevation ?? unsafeCSS("unset")}; outline-color: ${ButtonVariantToken[variant].disabled.outlineColor ?? unsafeCSS("unset")}; background-color: color-mix( in srgb, ${ButtonVariantToken[variant].disabled.containerColor} ${ButtonVariantToken[variant].disabled.containerOpacity}, transparent ); } :host([variant="${unsafeCSS(variant)}"]:disabled) .label, :host([variant="${unsafeCSS(variant)}"][disabled-interactive]) .label { color: color-mix( in srgb, ${ButtonVariantToken[variant].disabled.labelTextColor} ${ButtonVariantToken[variant].disabled.labelTextOpacity}, transparent ); } :host([variant="${unsafeCSS(variant)}"]:disabled) .icon, :host([variant="${unsafeCSS(variant)}"][disabled-interactive]) .icon { color: color-mix( in srgb, ${ButtonVariantToken[variant].disabled.iconColor} ${ButtonVariantToken[variant].disabled.iconOpacity}, transparent ); }`;
|
|
3147
3144
|
}
|
|
3148
3145
|
/**
|
|
3149
3146
|
* Appearance variant styles for `M3eButtonElement`.
|
|
@@ -3199,9 +3196,10 @@ var _M3eButtonElement_instances, _M3eButtonElement_clickHandler, _M3eButtonEleme
|
|
|
3199
3196
|
* @attr value - The value associated with the element's name when it's submitted with form data.
|
|
3200
3197
|
* @attr variant - The appearance variant of the button.
|
|
3201
3198
|
*
|
|
3199
|
+
* @fires beforeinput - Dispatched before a toggle button's selected state changes.
|
|
3202
3200
|
* @fires input - Dispatched when a toggle button's selected state changes.
|
|
3203
3201
|
* @fires change - Dispatched when a toggle button's selected state changes.
|
|
3204
|
-
* @fires click -
|
|
3202
|
+
* @fires click - Dispatched when the element is clicked.
|
|
3205
3203
|
*
|
|
3206
3204
|
* @cssprop --m3e-button-container-height - Height of the button container, for all size variants.
|
|
3207
3205
|
* @cssprop --m3e-button-outline-thickness - Thickness of the button outline, for all size variants.
|
|
@@ -3655,7 +3653,7 @@ let M3eButtonElement = class M3eButtonElement extends KeyboardClick$1(LinkButton
|
|
|
3655
3653
|
}
|
|
3656
3654
|
/** Whether the button is contained by a button group. */
|
|
3657
3655
|
get grouped() {
|
|
3658
|
-
return hasCustomState$1(this, "
|
|
3656
|
+
return hasCustomState$1(this, "--grouped");
|
|
3659
3657
|
}
|
|
3660
3658
|
/** @inheritdoc */
|
|
3661
3659
|
render() {
|
|
@@ -3669,11 +3667,11 @@ let M3eButtonElement = class M3eButtonElement extends KeyboardClick$1(LinkButton
|
|
|
3669
3667
|
/** @inheritdoc */
|
|
3670
3668
|
disconnectedCallback() {
|
|
3671
3669
|
super.disconnectedCallback();
|
|
3672
|
-
["
|
|
3670
|
+
["--pressed", "--resting", "--grouped", "--connected"].forEach(x => deleteCustomState$1(this, x));
|
|
3673
3671
|
this._base?.style.removeProperty("--_button-shape");
|
|
3674
3672
|
this.style.removeProperty("--_button-width");
|
|
3675
3673
|
this.style.removeProperty("--_adjacent-button-width");
|
|
3676
|
-
deleteCustomState$1(this, "
|
|
3674
|
+
deleteCustomState$1(this, "--adjacent-pressed");
|
|
3677
3675
|
this.removeEventListener("click", __classPrivateFieldGet(this, _M3eButtonElement_clickHandler, "f"));
|
|
3678
3676
|
}
|
|
3679
3677
|
/** @inheritdoc */
|
|
@@ -3685,8 +3683,8 @@ let M3eButtonElement = class M3eButtonElement extends KeyboardClick$1(LinkButton
|
|
|
3685
3683
|
updated(_changedProperties) {
|
|
3686
3684
|
super.updated(_changedProperties);
|
|
3687
3685
|
if (_changedProperties.has("disabled") && this.disabled || _changedProperties.has("disabledInteractive") && this.disabledInteractive) {
|
|
3688
|
-
deleteCustomState$1(this, "
|
|
3689
|
-
deleteCustomState$1(this, "
|
|
3686
|
+
deleteCustomState$1(this, "--pressed");
|
|
3687
|
+
deleteCustomState$1(this, "--resting");
|
|
3690
3688
|
}
|
|
3691
3689
|
if (_changedProperties.has("toggle") || _changedProperties.has("selected")) {
|
|
3692
3690
|
this.ariaPressed = this.toggle ? `${this.selected}` : null;
|
|
@@ -3699,7 +3697,7 @@ let M3eButtonElement = class M3eButtonElement extends KeyboardClick$1(LinkButton
|
|
|
3699
3697
|
}
|
|
3700
3698
|
/** @private */
|
|
3701
3699
|
_handleResize() {
|
|
3702
|
-
if (this.grouped && !hasCustomState$1(this, "
|
|
3700
|
+
if (this.grouped && !hasCustomState$1(this, "--pressed")) {
|
|
3703
3701
|
this.style.setProperty("--_button-width", `${this.clientWidth}px`);
|
|
3704
3702
|
__classPrivateFieldGet(this, _M3eButtonElement_instances, "m", _M3eButtonElement_updateButtonShape).call(this, true);
|
|
3705
3703
|
}
|
|
@@ -3713,19 +3711,17 @@ _M3eButtonElement_handleClick = function _M3eButtonElement_handleClick(e) {
|
|
|
3713
3711
|
e.stopImmediatePropagation();
|
|
3714
3712
|
}
|
|
3715
3713
|
if (this.toggle && !e.defaultPrevented) {
|
|
3716
|
-
this.
|
|
3717
|
-
// Dispatch an input event and if not prevented, dispatch a change event.
|
|
3718
|
-
// Otherwise, reset the selected state.
|
|
3719
|
-
if (this.dispatchEvent(new Event("input", {
|
|
3714
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
3720
3715
|
bubbles: true,
|
|
3721
|
-
composed: true,
|
|
3722
3716
|
cancelable: true
|
|
3723
3717
|
}))) {
|
|
3718
|
+
this.selected = !this.selected;
|
|
3719
|
+
this.dispatchEvent(new Event("input", {
|
|
3720
|
+
bubbles: true
|
|
3721
|
+
}));
|
|
3724
3722
|
this.dispatchEvent(new Event("change", {
|
|
3725
3723
|
bubbles: true
|
|
3726
3724
|
}));
|
|
3727
|
-
} else {
|
|
3728
|
-
this.selected = !this.selected;
|
|
3729
3725
|
}
|
|
3730
3726
|
}
|
|
3731
3727
|
};
|
|
@@ -3743,8 +3739,8 @@ _M3eButtonElement_updateButtonShape = function _M3eButtonElement_updateButtonSha
|
|
|
3743
3739
|
}
|
|
3744
3740
|
};
|
|
3745
3741
|
_M3eButtonElement_handlePressedChange = function _M3eButtonElement_handlePressedChange(pressed) {
|
|
3746
|
-
setCustomState$1(this, "
|
|
3747
|
-
setCustomState$1(this, "
|
|
3742
|
+
setCustomState$1(this, "--pressed", pressed);
|
|
3743
|
+
setCustomState$1(this, "--resting", !pressed);
|
|
3748
3744
|
const group = this.closest("m3e-button-group");
|
|
3749
3745
|
if (group) {
|
|
3750
3746
|
const clientWidth = this.getBoundingClientRect().width;
|
|
@@ -3754,13 +3750,13 @@ _M3eButtonElement_handlePressedChange = function _M3eButtonElement_handlePressed
|
|
|
3754
3750
|
const button = buttons[i];
|
|
3755
3751
|
if (i === index - 1) {
|
|
3756
3752
|
button.style.setProperty("--_adjacent-button-width", `${clientWidth}px`);
|
|
3757
|
-
setCustomState$1(button, "
|
|
3753
|
+
setCustomState$1(button, "--adjacent-pressed", pressed);
|
|
3758
3754
|
} else if (i === index + 1) {
|
|
3759
3755
|
button.style.setProperty("--_adjacent-button-width", `${clientWidth}px`);
|
|
3760
|
-
setCustomState$1(button, "
|
|
3756
|
+
setCustomState$1(button, "--adjacent-pressed", pressed);
|
|
3761
3757
|
} else {
|
|
3762
3758
|
button.style.removeProperty("--_adjacent-button-width");
|
|
3763
|
-
deleteCustomState$1(button, "
|
|
3759
|
+
deleteCustomState$1(button, "--adjacent-pressed");
|
|
3764
3760
|
}
|
|
3765
3761
|
}
|
|
3766
3762
|
}
|
|
@@ -3927,10 +3923,10 @@ _M3eButtonGroupElement_updateButtons = function _M3eButtonGroupElement_updateBut
|
|
|
3927
3923
|
const buttonRole = this.role === "radiogroup" ? "radio" : "button";
|
|
3928
3924
|
buttons.forEach((button, i) => {
|
|
3929
3925
|
__classPrivateFieldGet(this, _M3eButtonGroupElement_pressedController, "f").observe(button);
|
|
3930
|
-
setCustomState$1(button, "
|
|
3931
|
-
addCustomState$1(button, "
|
|
3932
|
-
setCustomState$1(button, "
|
|
3933
|
-
setCustomState$1(button, "
|
|
3926
|
+
setCustomState$1(button, "--connected", this.variant === "connected");
|
|
3927
|
+
addCustomState$1(button, "--grouped");
|
|
3928
|
+
setCustomState$1(button, "--first", i == 0);
|
|
3929
|
+
setCustomState$1(button, "--last", i == buttons.length - 1);
|
|
3934
3930
|
if (!this.hasAttribute("disable-role") && button.role !== buttonRole && button.toggle) {
|
|
3935
3931
|
const checked = !button.toggle ? null : button.selected ? "true" : "false";
|
|
3936
3932
|
button.role = buttonRole;
|
|
@@ -3957,7 +3953,7 @@ _M3eButtonGroupElement_handleChange = function _M3eButtonGroupElement_handleChan
|
|
|
3957
3953
|
}
|
|
3958
3954
|
};
|
|
3959
3955
|
/** The styles of the element. */
|
|
3960
|
-
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(
|
|
3956
|
+
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(:is(:state(--first), :--first)[size="extra-small"]), :host([variant="connected"][size="extra-small"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--last), :--last)[size="extra-small"]), :host([variant="connected"][size="extra-small"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--first), :--first)[size="small"]), :host([variant="connected"][size="small"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--last), :--last)[size="small"]), :host([variant="connected"][size="small"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--first), :--first)[size="medium"]), :host([variant="connected"][size="medium"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--last), :--last)[size="medium"]), :host([variant="connected"][size="medium"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--first), :--first)[size="large"]), :host([variant="connected"][size="large"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--last), :--last)[size="large"]), :host([variant="connected"][size="large"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--first), :--first)[size="extra-large"]), :host([variant="connected"][size="extra-large"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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(:is(:state(--last), :--last)[size="extra-large"]), :host([variant="connected"][size="extra-large"]) ::slotted(:not(:is(:state(--first), :--first)):not(:is(:state(--last), :--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} ); }`;
|
|
3961
3957
|
__decorate([query(".base")], M3eButtonGroupElement.prototype, "_base", void 0);
|
|
3962
3958
|
__decorate([property({
|
|
3963
3959
|
reflect: true
|
|
@@ -4595,7 +4591,7 @@ var _M3eCalendarElement_instances, _M3eCalendarElement_transitionComplete, _M3eC
|
|
|
4595
4591
|
* @attr previous-multi-year-label - The accessible label given to the button used to move to the previous 24 years.
|
|
4596
4592
|
* @attr next-multi-year-label - The accessible label given to the button used to move to the next 24 years.
|
|
4597
4593
|
*
|
|
4598
|
-
* @fires change -
|
|
4594
|
+
* @fires change - Dispatched when the selected date changes.
|
|
4599
4595
|
*
|
|
4600
4596
|
* @cssprop --m3e-calendar-container-color - Background color of the container surface.
|
|
4601
4597
|
* @cssprop --m3e-calendar-container-elevation - Elevation shadow applied to the container surface.
|
|
@@ -5247,7 +5243,7 @@ var _M3eCardElement_instances, _M3eCardElement_clickHandler, _M3eCardElement_han
|
|
|
5247
5243
|
* @attr orientation - The orientation of the card.
|
|
5248
5244
|
* @attr variant - The appearance variant of the card.
|
|
5249
5245
|
*
|
|
5250
|
-
* @fires click -
|
|
5246
|
+
* @fires click - Dispatched when the element is clicked.
|
|
5251
5247
|
*
|
|
5252
5248
|
* @cssprop --m3e-card-padding - Internal spacing for all slotted regions
|
|
5253
5249
|
* @cssprop --m3e-card-shape - Corner radius of the card container.
|
|
@@ -5479,10 +5475,11 @@ var _M3eCheckboxElement_instances, _M3eCheckboxElement_clickHandler, _M3eCheckbo
|
|
|
5479
5475
|
* @attr required - Whether the element is required.
|
|
5480
5476
|
* @attr value - A string representing the value of the checkbox.
|
|
5481
5477
|
*
|
|
5482
|
-
* @fires
|
|
5483
|
-
* @fires
|
|
5484
|
-
* @fires
|
|
5485
|
-
* @fires
|
|
5478
|
+
* @fires beforeinput - Dispatched before the checked state changes.
|
|
5479
|
+
* @fires input - Dispatched when the checked state changes.
|
|
5480
|
+
* @fires invalid - Dispatched when a form is submitted and the element fails constraint validation.
|
|
5481
|
+
* @fires change - Dispatched when the checked state changes.
|
|
5482
|
+
* @fires click - Dispatched when the element is clicked.
|
|
5486
5483
|
*
|
|
5487
5484
|
* @cssprop --m3e-checkbox-icon-size - Size of the checkbox icon inside the container.
|
|
5488
5485
|
* @cssprop --m3e-checkbox-container-size - Base size of the checkbox container.
|
|
@@ -5592,18 +5589,18 @@ _M3eCheckboxElement_renderIcon = function _M3eCheckboxElement_renderIcon() {
|
|
|
5592
5589
|
};
|
|
5593
5590
|
_M3eCheckboxElement_handleClick = function _M3eCheckboxElement_handleClick(e) {
|
|
5594
5591
|
if (e.defaultPrevented) return;
|
|
5595
|
-
this.
|
|
5596
|
-
if (this.dispatchEvent(new Event("input", {
|
|
5592
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
5597
5593
|
bubbles: true,
|
|
5598
|
-
composed: true,
|
|
5599
5594
|
cancelable: true
|
|
5600
5595
|
}))) {
|
|
5596
|
+
this.checked = !this.checked;
|
|
5601
5597
|
this.indeterminate = false;
|
|
5598
|
+
this.dispatchEvent(new Event("input", {
|
|
5599
|
+
bubbles: true
|
|
5600
|
+
}));
|
|
5602
5601
|
this.dispatchEvent(new Event("change", {
|
|
5603
5602
|
bubbles: true
|
|
5604
5603
|
}));
|
|
5605
|
-
} else {
|
|
5606
|
-
this.checked = !this.checked;
|
|
5607
5604
|
}
|
|
5608
5605
|
// Prevent default avoids double-click in FireFox.
|
|
5609
5606
|
if (this.closest("label")) {
|
|
@@ -5611,7 +5608,7 @@ _M3eCheckboxElement_handleClick = function _M3eCheckboxElement_handleClick(e) {
|
|
|
5611
5608
|
}
|
|
5612
5609
|
};
|
|
5613
5610
|
/** The styles of the element. */
|
|
5614
|
-
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(
|
|
5611
|
+
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(:is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid))[checked]) .base, :host(:not(:is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid))[checked] ) .wrapper, :host( :not([aria-disabled="true"]):not( :is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--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"]):is(:state(--touched), :--touched):is(:state(--invalid), :--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"]):is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)[checked]) .base, :host( :not([aria-disabled="true"]):is(:state(--touched), :--touched):is(:state(--invalid), :--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"]):is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)):not([indeterminate]):not([checked]) ) .base, :host(:not(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid))[checked]) .base, :host(:not(:is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)):not( [checked] ):not([indeterminate]):not(:hover) ) .wrapper, :host( :not([aria-disabled="true"]):not(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)):not( [checked] ):not([indeterminate]):hover ) .wrapper { border-color: CanvasText; } :host( :not([aria-disabled="true"]):not( :is(:state(--touched), :--touched):is(:state(--invalid), :--invalid) )[checked] ) .wrapper, :host( :not([aria-disabled="true"]):not( :is(:state(--touched), :--touched):is(:state(--invalid), :--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"]):is(:state(--touched), :--touched):is(:state(--invalid), :--invalid):not( [checked] ):not([indeterminate]) ) .wrapper { border-color: Highlight; } :host( :not([aria-disabled="true"]):is(:state(--touched), :--touched):is(:state(--invalid), :--invalid):not( [checked] ):not([indeterminate]) ) .base, :host(:not([aria-disabled="true"]):is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)[checked]) .base, :host( :not([aria-disabled="true"]):is(:state(--touched), :--touched):is( :state(--invalid), :--invalid )[indeterminate] ) .base { --m3e-state-layer-hover-color: Highlight; --m3e-state-layer-focus-color: Highlight; --m3e-ripple-color: Highlight; } }`;
|
|
5615
5612
|
__decorate([query(".focus-ring")], M3eCheckboxElement.prototype, "_focusRing", void 0);
|
|
5616
5613
|
__decorate([query(".state-layer")], M3eCheckboxElement.prototype, "_stateLayer", void 0);
|
|
5617
5614
|
__decorate([query(".ripple")], M3eCheckboxElement.prototype, "_ripple", void 0);
|
|
@@ -5730,16 +5727,16 @@ _M3eChipElement_renderContent = function _M3eChipElement_renderContent() {
|
|
|
5730
5727
|
return html`${this._renderIcon()}<div class="label">${this._renderSlot()}</div>${this._renderTrailingIcon()}`;
|
|
5731
5728
|
};
|
|
5732
5729
|
_M3eChipElement_handleIconSlotChange = function _M3eChipElement_handleIconSlotChange(e) {
|
|
5733
|
-
setCustomState$1(this, "
|
|
5730
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
5734
5731
|
};
|
|
5735
5732
|
_M3eChipElement_handleTrailingIconSlotChange = function _M3eChipElement_handleTrailingIconSlotChange(e) {
|
|
5736
|
-
setCustomState$1(this, "
|
|
5733
|
+
setCustomState$1(this, "--with-trailing-icon", hasAssignedNodes$1(e.target));
|
|
5737
5734
|
};
|
|
5738
5735
|
_M3eChipElement_handleSlotChange = function _M3eChipElement_handleSlotChange(e) {
|
|
5739
5736
|
__classPrivateFieldSet(this, _M3eChipElement_textContent, getTextContent$1(e.target), "f");
|
|
5740
5737
|
};
|
|
5741
5738
|
/** The styles of the element. */
|
|
5742
|
-
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; } }`;
|
|
5739
|
+
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(:is(:state(--with-icon), :--with-icon)) .wrapper { padding-inline-start: var(--m3e-chip-with-icon-padding-start, 0.5rem); } :host(:not(:is(:state(--with-icon), :--with-icon))) .wrapper { padding-inline-start: var(--m3e-chip-padding-start, 1rem); } :host(:is(:state(--with-trailing-icon), :--with-trailing-icon)) .wrapper { padding-inline-end: var(--m3e-chip-with-icon-padding-end, 0.5rem); } :host(:not(:is(:state(--with-trailing-icon), :--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; } }`;
|
|
5743
5740
|
__decorate([query(".elevation")], M3eChipElement.prototype, "_elevation", void 0);
|
|
5744
5741
|
__decorate([query(".focus-ring")], M3eChipElement.prototype, "_focusRing", void 0);
|
|
5745
5742
|
__decorate([query(".state-layer")], M3eChipElement.prototype, "_stateLayer", void 0);
|
|
@@ -5789,7 +5786,7 @@ M3eChipElement = __decorate([customElement$1("m3e-chip")], M3eChipElement);
|
|
|
5789
5786
|
* @attr value - A string representing the value of the chip.
|
|
5790
5787
|
* @attr variant - The appearance variant of the chip.
|
|
5791
5788
|
*
|
|
5792
|
-
* @fires click -
|
|
5789
|
+
* @fires click - Dispatched when the element is clicked.
|
|
5793
5790
|
*
|
|
5794
5791
|
* @cssprop --m3e-chip-container-shape - Border radius of the chip container.
|
|
5795
5792
|
* @cssprop --m3e-chip-container-height - Base height of the chip container before density adjustment.
|
|
@@ -5902,9 +5899,10 @@ var _M3eFilterChipElement_instances, _M3eFilterChipElement_clickHandler, _M3eFil
|
|
|
5902
5899
|
* @attr value - A string representing the value of the chip.
|
|
5903
5900
|
* @attr variant - The appearance variant of the chip.
|
|
5904
5901
|
*
|
|
5905
|
-
* @fires
|
|
5906
|
-
* @fires
|
|
5907
|
-
* @fires
|
|
5902
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
5903
|
+
* @fires input - Dispatched when the selected state changes.
|
|
5904
|
+
* @fires change - Dispatched when the selected state changes.
|
|
5905
|
+
* @fires click - Dispatched when the element is clicked.
|
|
5908
5906
|
*
|
|
5909
5907
|
* @cssprop --m3e-chip-container-shape - Border radius of the chip container.
|
|
5910
5908
|
* @cssprop --m3e-chip-container-height - Base height of the chip container before density adjustment.
|
|
@@ -5983,25 +5981,24 @@ _M3eFilterChipElement_clickHandler = new WeakMap();
|
|
|
5983
5981
|
_M3eFilterChipElement_instances = new WeakSet();
|
|
5984
5982
|
_M3eFilterChipElement_handleClick = function _M3eFilterChipElement_handleClick(e) {
|
|
5985
5983
|
if (e.defaultPrevented) return;
|
|
5986
|
-
|
|
5987
|
-
this.selected = !this.selected;
|
|
5988
|
-
if (this.dispatchEvent(new Event("input", {
|
|
5984
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
5989
5985
|
bubbles: true,
|
|
5990
|
-
composed: true,
|
|
5991
5986
|
cancelable: true
|
|
5992
5987
|
}))) {
|
|
5988
|
+
this.selected = !this.selected;
|
|
5993
5989
|
this.closest("m3e-filter-chip-set")?.[selectionManager].notifySelectionChange(this);
|
|
5990
|
+
this.dispatchEvent(new Event("input", {
|
|
5991
|
+
bubbles: true
|
|
5992
|
+
}));
|
|
5994
5993
|
this.dispatchEvent(new Event("change", {
|
|
5995
5994
|
bubbles: true
|
|
5996
5995
|
}));
|
|
5997
|
-
} else {
|
|
5998
|
-
this.selected = selected;
|
|
5999
5996
|
}
|
|
6000
5997
|
};
|
|
6001
5998
|
/** Indicates that this custom element participates in form submission, validation, and form state restoration. */
|
|
6002
5999
|
M3eFilterChipElement.formAssociated = true;
|
|
6003
6000
|
/** The styles of the element. */
|
|
6004
|
-
M3eFilterChipElement.styles = [M3eChipElement.styles, css`:host([selected]:not(:state(-hide-selection))) .wrapper { padding-inline-start: var(--m3e-chip-with-icon-padding-start, 0.5rem); } .icon { display: flex; align-items: center; justify-content: center; } .check { width: 1em; font-size: var(--m3e-chip-icon-size, 1.125rem); } :host(:not(:disabled):not([disabled-interactive])) .check { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected])) .check, :host(:state(-hide-selection)) .check, :host(:state(-hide-selection):not(:state(-with-icon))) .icon { display: none; } :host(:not(:state(-with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-chip-with-icon-padding-start, 0.5rem)); transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } :host([selected]) .icon { margin-inline-start: 0; } :host([selected]:not(:state(-hide-selection))) ::slotted([slot="icon"]) { display: none !important; } :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base { color: var(--m3e-chip-unselected-label-text-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-ripple-color: var(--m3e-chip-unselected-ripple-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-state-layer-focus-color: var( --m3e-chip-unselected-state-layer-focus-color, ${DesignToken$1.color.onSurfaceVariant} ); --m3e-state-layer-hover-color: var( --m3e-chip-unselected-state-layer-hover-color, ${DesignToken$1.color.onSurfaceVariant} ); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]) { color: var(--m3e-chip-unselected-leading-icon-color, ${DesignToken$1.color.primary}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-unselected-trailing-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: unset; outline-width: var(--m3e-chip-selected-outline-thickness, 0); color: var(--m3e-chip-selected-label-text-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-chip-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-hover-color: var( --m3e-chip-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-chip-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-elevation-hover-level: var(--m3e-chip-selected-hover-elevation, ${DesignToken$1.elevation.level1}); --m3e-ripple-color: var(--m3e-chip-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-chip-selected-state-layer-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-chip-selected-state-layer-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); } :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]) { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-selected-trailing-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } @media (prefers-reduced-motion) { .base, :host(:not(:state(-with-icon))) .icon { transition: none; } } @media (forced-colors: active) { :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])[selected]) .base, :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="trailing-icon"]), :host(:not(:disabled):not([disabled-interactive])) .check { color: ButtonText; } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: calc(0px - var(--m3e-outlined-chip-outline-thickness, 1px)); outline-width: var(--m3e-outlined-chip-outline-thickness, 1px); outline-color: ButtonText; } }`];
|
|
6001
|
+
M3eFilterChipElement.styles = [M3eChipElement.styles, css`:host([selected]:not(:is(:state(--hide-selection), :--hide-selection))) .wrapper { padding-inline-start: var(--m3e-chip-with-icon-padding-start, 0.5rem); } .icon { display: flex; align-items: center; justify-content: center; } .check { width: 1em; font-size: var(--m3e-chip-icon-size, 1.125rem); } :host(:not(:disabled):not([disabled-interactive])) .check { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected])) .check, :host(:is(:state(--hide-selection), :--hide-selection)) .check, :host(:is(:state(--hide-selection), :--hide-selection):not(:is(:state(--with-icon), :--with-icon))) .icon { display: none; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-chip-with-icon-padding-start, 0.5rem)); transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } :host([selected]) .icon { margin-inline-start: 0; } :host([selected]:not(:is(:state(--hide-selection), :--hide-selection))) ::slotted([slot="icon"]) { display: none !important; } :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base { color: var(--m3e-chip-unselected-label-text-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-ripple-color: var(--m3e-chip-unselected-ripple-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-state-layer-focus-color: var( --m3e-chip-unselected-state-layer-focus-color, ${DesignToken$1.color.onSurfaceVariant} ); --m3e-state-layer-hover-color: var( --m3e-chip-unselected-state-layer-hover-color, ${DesignToken$1.color.onSurfaceVariant} ); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]) { color: var(--m3e-chip-unselected-leading-icon-color, ${DesignToken$1.color.primary}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-unselected-trailing-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: unset; outline-width: var(--m3e-chip-selected-outline-thickness, 0); color: var(--m3e-chip-selected-label-text-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-chip-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-hover-color: var( --m3e-chip-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-chip-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-elevation-hover-level: var(--m3e-chip-selected-hover-elevation, ${DesignToken$1.elevation.level1}); --m3e-ripple-color: var(--m3e-chip-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-chip-selected-state-layer-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-chip-selected-state-layer-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); } :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]) { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-selected-trailing-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } @media (prefers-reduced-motion) { .base, :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { transition: none; } } @media (forced-colors: active) { :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])[selected]) .base, :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="trailing-icon"]), :host(:not(:disabled):not([disabled-interactive])) .check { color: ButtonText; } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: calc(0px - var(--m3e-outlined-chip-outline-thickness, 1px)); outline-width: var(--m3e-outlined-chip-outline-thickness, 1px); outline-color: ButtonText; } }`];
|
|
6005
6002
|
M3eFilterChipElement = __decorate([customElement$1("m3e-filter-chip")], M3eFilterChipElement);
|
|
6006
6003
|
|
|
6007
6004
|
var _M3eFilterChipSetElement_instances, _M3eFilterChipSetElement_directionalitySubscription, _M3eFilterChipSetElement_handleSlotChange, _M3eFilterChipSetElement_handleKeyDown, _M3eFilterChipSetElement_handleChange, _M3eFilterChipSetElement_updateChipRole, _a$a;
|
|
@@ -6037,8 +6034,9 @@ var _M3eFilterChipSetElement_instances, _M3eFilterChipSetElement_directionalityS
|
|
|
6037
6034
|
* @attr name - The name that identifies the element when submitting the associated form.
|
|
6038
6035
|
* @attr vertical - Whether the element is oriented vertically.
|
|
6039
6036
|
*
|
|
6040
|
-
* @fires
|
|
6041
|
-
* @fires
|
|
6037
|
+
* @fires beforeinput - Dispatched before the selected state of a chip changes.
|
|
6038
|
+
* @fires input - Dispatched when the selected state of a chip changes.
|
|
6039
|
+
* @fires change - Dispatched when the selected state of a chip changes.
|
|
6042
6040
|
*
|
|
6043
6041
|
* @cssprop --m3e-chip-set-spacing - The spacing (gap) between chips in the set.
|
|
6044
6042
|
*/
|
|
@@ -6123,7 +6121,7 @@ let M3eFilterChipSetElement = class M3eFilterChipSetElement extends Labelled$1(D
|
|
|
6123
6121
|
this.ariaDisabled = this.multi && this.disabled ? "true" : null;
|
|
6124
6122
|
}
|
|
6125
6123
|
if (changedProperties.has("hideSelectionIndicator")) {
|
|
6126
|
-
this.chips.forEach(x => setCustomState$1(x, "
|
|
6124
|
+
this.chips.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
6127
6125
|
}
|
|
6128
6126
|
}
|
|
6129
6127
|
/** @inheritdoc */
|
|
@@ -6135,7 +6133,7 @@ _M3eFilterChipSetElement_handleSlotChange = function _M3eFilterChipSetElement_ha
|
|
|
6135
6133
|
const {
|
|
6136
6134
|
added
|
|
6137
6135
|
} = this[selectionManager].setItems([...this.querySelectorAll("m3e-filter-chip")]);
|
|
6138
|
-
added.forEach(x => setCustomState$1(x, "
|
|
6136
|
+
added.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
6139
6137
|
__classPrivateFieldGet(this, _M3eFilterChipSetElement_instances, "m", _M3eFilterChipSetElement_updateChipRole).call(this);
|
|
6140
6138
|
};
|
|
6141
6139
|
_M3eFilterChipSetElement_handleKeyDown = function _M3eFilterChipSetElement_handleKeyDown(e) {
|
|
@@ -6197,8 +6195,8 @@ var _M3eInputChipElement_instances, _M3eInputChipElement_handleAvatarSlotChange,
|
|
|
6197
6195
|
* @attr value - A string representing the value of the chip.
|
|
6198
6196
|
* @attr variant - The appearance variant of the chip.
|
|
6199
6197
|
*
|
|
6200
|
-
* @fires remove -
|
|
6201
|
-
* @fires click -
|
|
6198
|
+
* @fires remove - Dispatched when the remove button is clicked or DELETE or BACKSPACE key is pressed.
|
|
6199
|
+
* @fires click - Dispatched when the element is clicked.
|
|
6202
6200
|
*
|
|
6203
6201
|
* @cssprop --m3e-chip-container-shape - Border radius of the chip container.
|
|
6204
6202
|
* @cssprop --m3e-chip-container-height - Base height of the chip container before density adjustment.
|
|
@@ -6262,7 +6260,7 @@ let M3eInputChipElement = class M3eInputChipElement extends DisabledInteractive$
|
|
|
6262
6260
|
super.update(changedProperties);
|
|
6263
6261
|
this.removeAttribute("tabindex");
|
|
6264
6262
|
if (changedProperties.has("removable")) {
|
|
6265
|
-
setCustomState$1(this, "
|
|
6263
|
+
setCustomState$1(this, "--with-trailing-icon", this.removable);
|
|
6266
6264
|
}
|
|
6267
6265
|
}
|
|
6268
6266
|
/** @inheritdoc */
|
|
@@ -6276,7 +6274,7 @@ let M3eInputChipElement = class M3eInputChipElement extends DisabledInteractive$
|
|
|
6276
6274
|
};
|
|
6277
6275
|
_M3eInputChipElement_instances = new WeakSet();
|
|
6278
6276
|
_M3eInputChipElement_handleAvatarSlotChange = function _M3eInputChipElement_handleAvatarSlotChange(e) {
|
|
6279
|
-
setCustomState$1(this, "
|
|
6277
|
+
setCustomState$1(this, "--with-avatar", hasAssignedNodes$1(e.target));
|
|
6280
6278
|
};
|
|
6281
6279
|
_M3eInputChipElement_handleRemoveButtonClick = function _M3eInputChipElement_handleRemoveButtonClick(e) {
|
|
6282
6280
|
e.stopPropagation();
|
|
@@ -6295,7 +6293,7 @@ _M3eInputChipElement_handleKeyDown = function _M3eInputChipElement_handleKeyDown
|
|
|
6295
6293
|
/** Indicates that this custom element participates in form submission, validation, and form state restoration. */
|
|
6296
6294
|
M3eInputChipElement.formAssociated = true;
|
|
6297
6295
|
/** The styles of the element. */
|
|
6298
|
-
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; } }`];
|
|
6296
|
+
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(:is(:state(--with-avatar), :--with-avatar)) ::slotted([slot="icon"]) { display: none; } :host(:is(:state(--with-avatar), :--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; } }`];
|
|
6299
6297
|
__decorate([query(".cell")], M3eInputChipElement.prototype, "cell", void 0);
|
|
6300
6298
|
__decorate([query(".remove-button")], M3eInputChipElement.prototype, "removeButton", void 0);
|
|
6301
6299
|
__decorate([property({
|
|
@@ -6339,7 +6337,7 @@ var _M3eInputChipSetElement_instances, _M3eInputChipSetElement_directionalitySub
|
|
|
6339
6337
|
* @attr required - Whether a value is required for the element.
|
|
6340
6338
|
* @attr vertical - Whether the element is oriented vertically.
|
|
6341
6339
|
*
|
|
6342
|
-
* @fires change -
|
|
6340
|
+
* @fires change - Dispatched when a chip is added to, or removed from, the set.
|
|
6343
6341
|
*
|
|
6344
6342
|
* @cssprop --m3e-chip-set-spacing - The spacing (gap) between chips in the set.
|
|
6345
6343
|
*/
|
|
@@ -6616,7 +6614,7 @@ M3eInputChipSetElement = __decorate([customElement$1("m3e-input-chip-set")], M3e
|
|
|
6616
6614
|
* @attr value - A string representing the value of the chip.
|
|
6617
6615
|
* @attr variant - The appearance variant of the chip.
|
|
6618
6616
|
*
|
|
6619
|
-
* @fires click -
|
|
6617
|
+
* @fires click - Dispatched when the element is clicked.
|
|
6620
6618
|
*
|
|
6621
6619
|
* @cssprop --m3e-chip-container-shape - Border radius of the chip container.
|
|
6622
6620
|
* @cssprop --m3e-chip-container-height - Base height of the chip container before density adjustment.
|
|
@@ -8724,7 +8722,7 @@ function Dirty(base) {
|
|
|
8724
8722
|
}
|
|
8725
8723
|
/** Whether the user has modified the value of the element. */
|
|
8726
8724
|
get dirty() {
|
|
8727
|
-
return hasCustomState(this, "
|
|
8725
|
+
return hasCustomState(this, "--dirty");
|
|
8728
8726
|
}
|
|
8729
8727
|
/** Whether the user has not modified the value of the element. */
|
|
8730
8728
|
get pristine() {
|
|
@@ -8743,11 +8741,11 @@ function Dirty(base) {
|
|
|
8743
8741
|
}
|
|
8744
8742
|
/** Marks the element as pristine. */
|
|
8745
8743
|
markAsPristine() {
|
|
8746
|
-
deleteCustomState(this, "
|
|
8744
|
+
deleteCustomState(this, "--dirty");
|
|
8747
8745
|
}
|
|
8748
8746
|
/** Marks the element as dirty. */
|
|
8749
8747
|
markAsDirty() {
|
|
8750
|
-
addCustomState(this, "
|
|
8748
|
+
addCustomState(this, "--dirty");
|
|
8751
8749
|
}
|
|
8752
8750
|
}
|
|
8753
8751
|
_a = _eventHandler$2;
|
|
@@ -8779,7 +8777,7 @@ function Touched(base) {
|
|
|
8779
8777
|
}
|
|
8780
8778
|
/** Whether the user has interacted when the element. */
|
|
8781
8779
|
get touched() {
|
|
8782
|
-
return hasCustomState(this, "
|
|
8780
|
+
return hasCustomState(this, "--touched");
|
|
8783
8781
|
}
|
|
8784
8782
|
/** Whether the user has not interacted when the element. */
|
|
8785
8783
|
get untouched() {
|
|
@@ -8802,11 +8800,11 @@ function Touched(base) {
|
|
|
8802
8800
|
}
|
|
8803
8801
|
/** Marks the element as touched. */
|
|
8804
8802
|
markAsTouched() {
|
|
8805
|
-
addCustomState(this, "
|
|
8803
|
+
addCustomState(this, "--touched");
|
|
8806
8804
|
}
|
|
8807
8805
|
/** Marks the element as untouched. */
|
|
8808
8806
|
markAsUntouched() {
|
|
8809
|
-
deleteCustomState(this, "
|
|
8807
|
+
deleteCustomState(this, "--touched");
|
|
8810
8808
|
}
|
|
8811
8809
|
}
|
|
8812
8810
|
_a = _eventHandler$1;
|
|
@@ -9525,7 +9523,7 @@ function Labelled(base) {
|
|
|
9525
9523
|
[(_a = _eventHandler, updateLabels)]() {
|
|
9526
9524
|
const focusable = this.hasAttribute("tabindex");
|
|
9527
9525
|
const disabled = isDisabledMixin(this) && this.disabled || isDisabledInteractiveMixin(this) && this.disabledInteractive;
|
|
9528
|
-
const invalid = isTouchedMixin(this) && this.touched && (this.ariaInvalid || hasCustomState(this, "
|
|
9526
|
+
const invalid = isTouchedMixin(this) && this.touched && (this.ariaInvalid || hasCustomState(this, "--invalid"));
|
|
9529
9527
|
for (const label of this.labels ?? []) {
|
|
9530
9528
|
label.style.userSelect = focusable ? "none" : "";
|
|
9531
9529
|
label.style.cursor = !disabled && focusable ? "pointer" : "";
|
|
@@ -9765,7 +9763,7 @@ function ConstraintValidation(base) {
|
|
|
9765
9763
|
}
|
|
9766
9764
|
this[internals].setValidity(validity, validityMessage);
|
|
9767
9765
|
this.ariaInvalid = invalid ? "true" : null;
|
|
9768
|
-
setCustomState(this, "
|
|
9766
|
+
setCustomState(this, "--invalid", invalid === true);
|
|
9769
9767
|
if (isLabelledMixin(this)) {
|
|
9770
9768
|
this[updateLabels]?.();
|
|
9771
9769
|
}
|
|
@@ -10437,18 +10435,24 @@ function Role(base, role) {
|
|
|
10437
10435
|
return _RoleMixin;
|
|
10438
10436
|
}
|
|
10439
10437
|
|
|
10438
|
+
/** A symbol used to define the function called to resume animation. */
|
|
10439
|
+
const resumeAnimation = Symbol("resumeAnimation");
|
|
10440
10440
|
/**
|
|
10441
10441
|
* Mixin to augment an element with behavior that suppresses initial animations.
|
|
10442
10442
|
* @template T The type of the base class.
|
|
10443
10443
|
* @param {T} base The base class.
|
|
10444
|
-
* @returns {T} A constructor that implements initial animation suppression.
|
|
10444
|
+
* @returns {Constructor<SuppressInitialAnimationMixin> & T} A constructor that implements initial animation suppression.
|
|
10445
10445
|
*/
|
|
10446
10446
|
function SuppressInitialAnimation(base) {
|
|
10447
10447
|
class _SuppressInitialAnimation extends base {
|
|
10448
10448
|
connectedCallback() {
|
|
10449
10449
|
super.connectedCallback();
|
|
10450
|
-
addCustomState(this, "
|
|
10451
|
-
|
|
10450
|
+
addCustomState(this, "--no-animate");
|
|
10451
|
+
this[resumeAnimation]();
|
|
10452
|
+
}
|
|
10453
|
+
/** @internal */
|
|
10454
|
+
[resumeAnimation]() {
|
|
10455
|
+
requestAnimationFrame(() => deleteCustomState(this, "--no-animate"));
|
|
10452
10456
|
}
|
|
10453
10457
|
}
|
|
10454
10458
|
return _SuppressInitialAnimation;
|
|
@@ -10544,11 +10548,13 @@ var _M3eCollapsibleElement_instances, _M3eCollapsibleElement_slotChanged, _M3eCo
|
|
|
10544
10548
|
* @slot - Renders the collapsible content.
|
|
10545
10549
|
*
|
|
10546
10550
|
* @attr open - Whether content is visible.
|
|
10551
|
+
* @attr orientation - Orientation of collapsible content.
|
|
10552
|
+
* @attr no-animate - Whether to disable animation.
|
|
10547
10553
|
*
|
|
10548
|
-
* @fires opening -
|
|
10549
|
-
* @fires opened -
|
|
10550
|
-
* @fires closing -
|
|
10551
|
-
* @fires closed -
|
|
10554
|
+
* @fires opening - Dispatched when the collapsible begins to open.
|
|
10555
|
+
* @fires opened - Dispatched when the collapsible has opened.
|
|
10556
|
+
* @fires closing - Dispatched when the collapsible begins to close.
|
|
10557
|
+
* @fires closed - Dispatched when the collapsible has closed.
|
|
10552
10558
|
*
|
|
10553
10559
|
* @cssprop --m3e-collapsible-animation-duration - The duration of the expand / collapse animation.
|
|
10554
10560
|
*/
|
|
@@ -10565,11 +10571,21 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
|
|
|
10565
10571
|
* @default false
|
|
10566
10572
|
*/
|
|
10567
10573
|
this.open = false;
|
|
10574
|
+
/**
|
|
10575
|
+
* Orientation of collapsible content.
|
|
10576
|
+
* @default "vertical"
|
|
10577
|
+
*/
|
|
10578
|
+
this.orientation = "vertical";
|
|
10579
|
+
/**
|
|
10580
|
+
* Whether to disable animation.
|
|
10581
|
+
* @default false
|
|
10582
|
+
*/
|
|
10583
|
+
this.noAnimate = false;
|
|
10568
10584
|
}
|
|
10569
10585
|
/** @inheritdoc */
|
|
10570
10586
|
update(changedProperties) {
|
|
10571
10587
|
super.update(changedProperties);
|
|
10572
|
-
addCustomState(this, "
|
|
10588
|
+
addCustomState(this, "--no-animate");
|
|
10573
10589
|
if (!__classPrivateFieldGet(this, _M3eCollapsibleElement_slotChanged, "f")) {
|
|
10574
10590
|
if (this.open) {
|
|
10575
10591
|
__classPrivateFieldSet(this, _M3eCollapsibleElement_hasOpened, true, "f");
|
|
@@ -10581,26 +10597,26 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
|
|
|
10581
10597
|
this.toggleAttribute("inert", !this.open);
|
|
10582
10598
|
if (this.open) {
|
|
10583
10599
|
__classPrivateFieldSet(this, _M3eCollapsibleElement_hasOpened, true, "f");
|
|
10584
|
-
if (!prefersReducedMotion()) {
|
|
10600
|
+
if (!(prefersReducedMotion() || this.noAnimate)) {
|
|
10585
10601
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_autoSize).call(this);
|
|
10586
|
-
setCustomState(this, "
|
|
10602
|
+
setCustomState(this, "--overflows", this.orientation === "vertical" ? this.clientHeight < this.scrollHeight : this.clientWidth < this.scrollWidth);
|
|
10587
10603
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
|
|
10588
10604
|
}
|
|
10589
|
-
deleteCustomState(this, "
|
|
10590
|
-
addCustomState(this, "
|
|
10605
|
+
deleteCustomState(this, "--closing");
|
|
10606
|
+
addCustomState(this, "--opening");
|
|
10591
10607
|
this.dispatchEvent(new Event("opening"));
|
|
10592
10608
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
|
|
10593
|
-
deleteCustomState(this, "
|
|
10609
|
+
deleteCustomState(this, "--no-animate");
|
|
10594
10610
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_actualSize).call(this);
|
|
10595
|
-
if (prefersReducedMotion()) {
|
|
10611
|
+
if (prefersReducedMotion() || this.noAnimate) {
|
|
10596
10612
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_autoSize).call(this);
|
|
10597
|
-
deleteCustomState(this, "
|
|
10613
|
+
deleteCustomState(this, "--opening");
|
|
10598
10614
|
this.dispatchEvent(new Event("opened"));
|
|
10599
10615
|
} else {
|
|
10600
10616
|
this.addEventListener("transitionend", () => {
|
|
10601
10617
|
if (this.open) {
|
|
10602
10618
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_autoSize).call(this);
|
|
10603
|
-
deleteCustomState(this, "
|
|
10619
|
+
deleteCustomState(this, "--opening");
|
|
10604
10620
|
this.dispatchEvent(new Event("opened"));
|
|
10605
10621
|
}
|
|
10606
10622
|
}, {
|
|
@@ -10608,23 +10624,23 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
|
|
|
10608
10624
|
});
|
|
10609
10625
|
}
|
|
10610
10626
|
} else {
|
|
10611
|
-
deleteCustomState(this, "
|
|
10612
|
-
addCustomState(this, "
|
|
10627
|
+
deleteCustomState(this, "--opening");
|
|
10628
|
+
addCustomState(this, "--closing");
|
|
10613
10629
|
this.dispatchEvent(new Event("closing"));
|
|
10614
10630
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_actualSize).call(this);
|
|
10615
10631
|
if (__classPrivateFieldGet(this, _M3eCollapsibleElement_hasOpened, "f")) {
|
|
10616
|
-
deleteCustomState(this, "
|
|
10632
|
+
deleteCustomState(this, "--no-animate");
|
|
10617
10633
|
}
|
|
10618
|
-
if (prefersReducedMotion()) {
|
|
10634
|
+
if (prefersReducedMotion() || this.noAnimate) {
|
|
10619
10635
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
|
|
10620
|
-
deleteCustomState(this, "
|
|
10636
|
+
deleteCustomState(this, "--closing");
|
|
10621
10637
|
this.dispatchEvent(new Event("closed"));
|
|
10622
10638
|
} else {
|
|
10623
10639
|
requestAnimationFrame(() => {
|
|
10624
10640
|
__classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
|
|
10625
10641
|
this.addEventListener("transitionend", () => {
|
|
10626
10642
|
if (!this.open) {
|
|
10627
|
-
deleteCustomState(this, "
|
|
10643
|
+
deleteCustomState(this, "--closing");
|
|
10628
10644
|
this.dispatchEvent(new Event("closed"));
|
|
10629
10645
|
}
|
|
10630
10646
|
}, {
|
|
@@ -10646,27 +10662,46 @@ _M3eCollapsibleElement_handleSlotChange = function _M3eCollapsibleElement_handle
|
|
|
10646
10662
|
__classPrivateFieldSet(this, _M3eCollapsibleElement_slotChanged, true, "f");
|
|
10647
10663
|
};
|
|
10648
10664
|
_M3eCollapsibleElement_autoSize = function _M3eCollapsibleElement_autoSize() {
|
|
10649
|
-
this.style.height = "auto";
|
|
10665
|
+
this.style[this.orientation === "vertical" ? "height" : "width"] = "auto";
|
|
10650
10666
|
};
|
|
10651
10667
|
_M3eCollapsibleElement_clearSize = function _M3eCollapsibleElement_clearSize() {
|
|
10652
|
-
this.style.height = "";
|
|
10668
|
+
this.style[this.orientation === "vertical" ? "height" : "width"] = "";
|
|
10653
10669
|
};
|
|
10654
10670
|
_M3eCollapsibleElement_actualSize = function _M3eCollapsibleElement_actualSize() {
|
|
10655
|
-
this.
|
|
10671
|
+
if (this.orientation === "vertical") {
|
|
10672
|
+
this.style.height = `${this.scrollHeight}px`;
|
|
10673
|
+
} else {
|
|
10674
|
+
this.style.width = `${this.scrollWidth}px`;
|
|
10675
|
+
}
|
|
10656
10676
|
};
|
|
10657
10677
|
/** The styles of the element. */
|
|
10658
|
-
M3eCollapsibleElement.styles = css`:host { display: block;
|
|
10678
|
+
M3eCollapsibleElement.styles = css`:host { display: block; overflow: hidden; } :host([orientation="vertical"]) { height: 0px; transition: ${unsafeCSS(`visibility var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10659
10679
|
${DesignToken.motion.easing.standard},
|
|
10660
10680
|
height var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10661
10681
|
${DesignToken.motion.easing.standard},
|
|
10662
10682
|
padding-top var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10663
10683
|
${DesignToken.motion.easing.standard},
|
|
10664
10684
|
padding-bottom var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10665
|
-
${DesignToken.motion.easing.standard}`)}; } :host(
|
|
10685
|
+
${DesignToken.motion.easing.standard}`)}; } :host([orientation="horizontal"]) { width: 0px; transition: ${unsafeCSS(`visibility var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10686
|
+
${DesignToken.motion.easing.standard},
|
|
10687
|
+
width var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10688
|
+
${DesignToken.motion.easing.standard},
|
|
10689
|
+
padding-left var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10690
|
+
${DesignToken.motion.easing.standard},
|
|
10691
|
+
padding-right var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
|
|
10692
|
+
${DesignToken.motion.easing.standard}`)}; } :host(:not(:is(:state(--closing), :--closing)):not([open])) { visibility: hidden; } :host([orientation="vertical"]:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host([orientation="horizontal"]:not([open])) { min-width: unset !important; padding-left: 0px !important; padding-right: 0px !important; } :host([no-animate]), :host(:is(:state(--no-animate), :--no-animate)) { transition-duration: 0ms; } :host([orientation="vertical"]:is(:state(--opening), :--opening)), :host([orientation="vertical"]:is(:state(--closing), :--closing)) { overflow-y: hidden !important; } :host([orientation="horizontal"]:is(:state(--opening), :--opening)), :host([orientation="horizontal"]:is(:state(--closing), :--closing)) { overflow-x: hidden !important; } :host(:is(:state(--overflows), :--overflows)) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`;
|
|
10666
10693
|
__decorate([property({
|
|
10667
10694
|
type: Boolean,
|
|
10668
10695
|
reflect: true
|
|
10669
10696
|
})], M3eCollapsibleElement.prototype, "open", void 0);
|
|
10697
|
+
__decorate([property({
|
|
10698
|
+
reflect: true
|
|
10699
|
+
})], M3eCollapsibleElement.prototype, "orientation", void 0);
|
|
10700
|
+
__decorate([property({
|
|
10701
|
+
attribute: "no-animate",
|
|
10702
|
+
type: Boolean,
|
|
10703
|
+
reflect: true
|
|
10704
|
+
})], M3eCollapsibleElement.prototype, "noAnimate", void 0);
|
|
10670
10705
|
M3eCollapsibleElement = __decorate([customElement("m3e-collapsible")], M3eCollapsibleElement);
|
|
10671
10706
|
|
|
10672
10707
|
/**
|
|
@@ -11360,13 +11395,13 @@ let M3eScrollContainerElement = class M3eScrollContainerElement extends AttachIn
|
|
|
11360
11395
|
_updateScroll() {
|
|
11361
11396
|
const before = (this.dividers === "above" || this.dividers === "above-below") && this.scrollTop > 0;
|
|
11362
11397
|
const after = (this.dividers === "below" || this.dividers === "above-below") && this.scrollHeight - this.scrollTop - this.clientHeight > 1;
|
|
11363
|
-
setCustomState(this, "
|
|
11364
|
-
setCustomState(this, "
|
|
11398
|
+
setCustomState(this, "--above", before);
|
|
11399
|
+
setCustomState(this, "--below", after);
|
|
11365
11400
|
}
|
|
11366
11401
|
};
|
|
11367
11402
|
_M3eScrollContainerElement_scrollHandler = new WeakMap();
|
|
11368
11403
|
/** The styles of the element. */
|
|
11369
|
-
M3eScrollContainerElement.styles = css`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${DesignToken.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline-color: ${FocusRingToken.color}; outline-width: ${FocusRingToken.thickness}; outline-offset: ${FocusRingToken.outwardOffset}; } :host([thin]) { scrollbar-width: ${DesignToken.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${DesignToken.scrollbar.width}; } :host(:not(:focus-visible):state(
|
|
11404
|
+
M3eScrollContainerElement.styles = css`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${DesignToken.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline-color: ${FocusRingToken.color}; outline-width: ${FocusRingToken.thickness}; outline-offset: ${FocusRingToken.outwardOffset}; } :host([thin]) { scrollbar-width: ${DesignToken.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${DesignToken.scrollbar.width}; } :host(:not(:focus-visible):is(:state(--above), :--above)) { border-top-color: var(--m3e-divider-color, ${DesignToken.color.outlineVariant}); } :host(:not(:focus-visible):is(:state(--below), :--below)) { border-bottom-color: var(--m3e-divider-color, ${DesignToken.color.outlineVariant}); } :host(:focus-visible) { outline-style: solid; animation: grow-shrink ${FocusRingToken.duration}; } @keyframes grow-shrink { 50% { outline-width: calc(${FocusRingToken.thickness} * ${FocusRingToken.growthFactor}); } } @media (forced-colors: active) { :host { border-top: var(--m3e-divider-thickness, 1px) solid Canvas; border-bottom: var(--m3e-divider-thickness, 1px) solid Canvas; } :host(:not(:focus-visible):is(:state(--above), :--above)) { border-top-color: GrayText; } :host(:not(:focus-visible):is(:state(--below), :--below)) { border-bottom-color: GrayText; } } @media (prefers-reduced-motion) { :host(:focus-visible) { animation: none; } }`;
|
|
11370
11405
|
__decorate([property()], M3eScrollContainerElement.prototype, "dividers", void 0);
|
|
11371
11406
|
__decorate([property({
|
|
11372
11407
|
type: Boolean,
|
|
@@ -11415,20 +11450,20 @@ let M3eSlideElement = class M3eSlideElement extends AttachInternals(LitElement)
|
|
|
11415
11450
|
/** @inheritdoc */
|
|
11416
11451
|
connectedCallback() {
|
|
11417
11452
|
super.connectedCallback();
|
|
11418
|
-
addCustomState(this, "
|
|
11453
|
+
addCustomState(this, "--no-animate");
|
|
11419
11454
|
}
|
|
11420
11455
|
/** @inheritdoc */
|
|
11421
11456
|
update(changedProperties) {
|
|
11422
11457
|
super.update(changedProperties);
|
|
11423
11458
|
if (changedProperties.has("selectedIndex")) {
|
|
11424
11459
|
if (this.selectedIndex === null) {
|
|
11425
|
-
addCustomState(this, "
|
|
11460
|
+
addCustomState(this, "--no-animate");
|
|
11426
11461
|
}
|
|
11427
11462
|
__classPrivateFieldGet(this, _M3eSlideElement_instances, "m", _M3eSlideElement_updateItems).call(this);
|
|
11428
|
-
if (this.selectedIndex !== null && hasCustomState(this, "
|
|
11463
|
+
if (this.selectedIndex !== null && hasCustomState(this, "--no-animate")) {
|
|
11429
11464
|
requestAnimationFrame(() => {
|
|
11430
11465
|
if (this.selectedIndex !== null) {
|
|
11431
|
-
deleteCustomState(this, "
|
|
11466
|
+
deleteCustomState(this, "--no-animate");
|
|
11432
11467
|
}
|
|
11433
11468
|
});
|
|
11434
11469
|
}
|
|
@@ -11464,7 +11499,7 @@ _M3eSlideElement_updateItems = function _M3eSlideElement_updateItems() {
|
|
|
11464
11499
|
};
|
|
11465
11500
|
/** The styles of the element. */
|
|
11466
11501
|
M3eSlideElement.styles = css`:host { display: flex; position: relative; overflow: hidden; } ::slotted(*) { width: 100%; top: 0; transition: ${unsafeCSS(`inset-inline-start var(--m3e-slide-animation-duration, ${DesignToken.motion.duration.long2}) ${DesignToken.motion.easing.standard},
|
|
11467
|
-
visibility var(--m3e-slide-animation-duration, ${DesignToken.motion.duration.long2}) ${DesignToken.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(:state(-no-animate)) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`;
|
|
11502
|
+
visibility var(--m3e-slide-animation-duration, ${DesignToken.motion.duration.long2}) ${DesignToken.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(:is(:state(--no-animate), :--no-animate)) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`;
|
|
11468
11503
|
__decorate([property({
|
|
11469
11504
|
attribute: "selected-index",
|
|
11470
11505
|
type: Number,
|
|
@@ -11665,7 +11700,7 @@ var M3eTextHighlightElement_1;
|
|
|
11665
11700
|
* @attr mode - The mode in which to highlight text.
|
|
11666
11701
|
* @attr term - The term to highlight.
|
|
11667
11702
|
*
|
|
11668
|
-
* @fires highlight -
|
|
11703
|
+
* @fires highlight - Dispatched when content is highlighted.
|
|
11669
11704
|
*
|
|
11670
11705
|
* @cssprop --m3e-text-highlight-container-color - Background color applied to highlighted text ranges.
|
|
11671
11706
|
* @cssprop --m3e-text-highlight-color - Foreground color of highlighted text content.
|
|
@@ -11930,6 +11965,7 @@ var M3eDatepickerElement_1;
|
|
|
11930
11965
|
* @attr date - The selected date.
|
|
11931
11966
|
* @attr max-date - The maximum date that can be selected.
|
|
11932
11967
|
* @attr min-date - The minimum date that can be selected.
|
|
11968
|
+
* @attr range - Whether a range of dates can be selected.
|
|
11933
11969
|
* @attr range-end - End of a date range.
|
|
11934
11970
|
* @attr range-start - Start of a date range.
|
|
11935
11971
|
* @attr start-at - A date specifying the period (month or year) to start the calendar in.
|
|
@@ -12031,6 +12067,11 @@ let M3eDatepickerElement = M3eDatepickerElement_1 = class M3eDatepickerElement e
|
|
|
12031
12067
|
* @default null
|
|
12032
12068
|
*/
|
|
12033
12069
|
this.maxDate = null;
|
|
12070
|
+
/**
|
|
12071
|
+
* Whether a range of dates can be selected.
|
|
12072
|
+
* @default false
|
|
12073
|
+
*/
|
|
12074
|
+
this.range = false;
|
|
12034
12075
|
/**
|
|
12035
12076
|
* Start of a date range.
|
|
12036
12077
|
* @default null
|
|
@@ -12129,8 +12170,8 @@ let M3eDatepickerElement = M3eDatepickerElement_1 = class M3eDatepickerElement e
|
|
|
12129
12170
|
this._variant = undefined;
|
|
12130
12171
|
__classPrivateFieldGet(this, _M3eDatepickerElement_breakpointUnobserve, "f")?.call(this);
|
|
12131
12172
|
__classPrivateFieldGet(this, _M3eDatepickerElement_instances, "m", _M3eDatepickerElement_clearAnchoring).call(this);
|
|
12132
|
-
deleteCustomState$1(this, "
|
|
12133
|
-
deleteCustomState$1(this, "
|
|
12173
|
+
deleteCustomState$1(this, "--docked");
|
|
12174
|
+
deleteCustomState$1(this, "--modal");
|
|
12134
12175
|
this.removeEventListener("toggle", __classPrivateFieldGet(this, _M3eDatepickerElement_toggleHandler, "f"));
|
|
12135
12176
|
document.removeEventListener("click", __classPrivateFieldGet(this, _M3eDatepickerElement_documentClickHandler, "f"));
|
|
12136
12177
|
document.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eDatepickerElement_documentKeyDownHandler, "f"));
|
|
@@ -12213,6 +12254,9 @@ let M3eDatepickerElement = M3eDatepickerElement_1 = class M3eDatepickerElement e
|
|
|
12213
12254
|
if (["date", "rangeStart", "rangeEnd"].some(x => changedProperties.has(x))) {
|
|
12214
12255
|
__classPrivateFieldGet(this, _M3eDatepickerElement_instances, "m", _M3eDatepickerElement_clearSelectionState).call(this);
|
|
12215
12256
|
}
|
|
12257
|
+
if (changedProperties.has("rangeStart") && this.rangeStart) {
|
|
12258
|
+
this.range = true;
|
|
12259
|
+
}
|
|
12216
12260
|
if (changedProperties.has("rangeStart") && this.rangeStart && !changedProperties.has("date")) {
|
|
12217
12261
|
this.date = new Date(this.rangeStart);
|
|
12218
12262
|
}
|
|
@@ -12250,12 +12294,20 @@ _M3eDatepickerElement_toggleHandler = new WeakMap();
|
|
|
12250
12294
|
_M3eDatepickerElement_instances = new WeakSet();
|
|
12251
12295
|
_M3eDatepickerElement_renderHeader = function _M3eDatepickerElement_renderHeader() {
|
|
12252
12296
|
if (this.currentVariant === "docked") return nothing;
|
|
12297
|
+
const rangeStart = this._rangeStart ?? this.rangeStart;
|
|
12298
|
+
const rangeEnd = this._rangeStart ? this._rangeEnd : this._rangeEnd ?? this.rangeEnd;
|
|
12253
12299
|
const selectedDate = this._date ?? this.date;
|
|
12254
|
-
return html`<div class="supporting-text">${this.label}</div
|
|
12300
|
+
return html`<div class="supporting-text">${this.label}</div>${rangeStart ? html`<div class="headline">${new Intl.DateTimeFormat(navigator.language, {
|
|
12301
|
+
month: "short",
|
|
12302
|
+
day: "numeric"
|
|
12303
|
+
}).format(rangeStart) + " – " + (rangeEnd ? new Intl.DateTimeFormat(navigator.language, {
|
|
12304
|
+
month: "short",
|
|
12305
|
+
day: "numeric"
|
|
12306
|
+
}).format(rangeEnd) : "")}</div>` : html`<div class="headline">${selectedDate ? new Intl.DateTimeFormat(navigator.language, {
|
|
12255
12307
|
weekday: "short",
|
|
12256
12308
|
month: "short",
|
|
12257
12309
|
day: "numeric"
|
|
12258
|
-
}).format(selectedDate) : "––"}</div
|
|
12310
|
+
}).format(selectedDate) : "––"}</div>`}<div class="divider"></div>`;
|
|
12259
12311
|
};
|
|
12260
12312
|
_M3eDatepickerElement_handleDocumentClick = function _M3eDatepickerElement_handleDocumentClick(e) {
|
|
12261
12313
|
if (!e.composedPath().some(x => x instanceof M3eDatepickerElement_1 || x === __classPrivateFieldGet(this, _M3eDatepickerElement_trigger, "f") || x === __classPrivateFieldGet(this, _M3eDatepickerElement_anchor, "f"))) {
|
|
@@ -12266,6 +12318,10 @@ _M3eDatepickerElement_handleCalendarChange = function _M3eDatepickerElement_hand
|
|
|
12266
12318
|
this._date = this._calendar.date;
|
|
12267
12319
|
this._rangeStart = this._calendar.rangeStart;
|
|
12268
12320
|
this._rangeEnd = this._calendar.rangeEnd;
|
|
12321
|
+
if (this.range && !this._rangeStart && this._date) {
|
|
12322
|
+
this._rangeStart = new Date(this._date);
|
|
12323
|
+
this._calendar.rangeStart = this._rangeStart;
|
|
12324
|
+
}
|
|
12269
12325
|
};
|
|
12270
12326
|
_M3eDatepickerElement_handleClearClick = function _M3eDatepickerElement_handleClearClick() {
|
|
12271
12327
|
this.date = null;
|
|
@@ -12304,15 +12360,15 @@ _M3eDatepickerElement_updateVariant = function _M3eDatepickerElement_updateVaria
|
|
|
12304
12360
|
switch (this.currentVariant) {
|
|
12305
12361
|
case "docked":
|
|
12306
12362
|
this.ariaModal = null;
|
|
12307
|
-
deleteCustomState$1(this, "
|
|
12308
|
-
addCustomState$1(this, "
|
|
12363
|
+
deleteCustomState$1(this, "--modal");
|
|
12364
|
+
addCustomState$1(this, "--docked");
|
|
12309
12365
|
__classPrivateFieldGet(this, _M3eDatepickerElement_scrollLockController, "f").unlock();
|
|
12310
12366
|
__classPrivateFieldGet(this, _M3eDatepickerElement_inertController, "f").unlock();
|
|
12311
12367
|
break;
|
|
12312
12368
|
case "modal":
|
|
12313
12369
|
this.ariaModal = "true";
|
|
12314
|
-
deleteCustomState$1(this, "
|
|
12315
|
-
addCustomState$1(this, "
|
|
12370
|
+
deleteCustomState$1(this, "--docked");
|
|
12371
|
+
addCustomState$1(this, "--modal");
|
|
12316
12372
|
if (this.isOpen) {
|
|
12317
12373
|
__classPrivateFieldGet(this, _M3eDatepickerElement_scrollLockController, "f").lock();
|
|
12318
12374
|
__classPrivateFieldGet(this, _M3eDatepickerElement_inertController, "f").lock();
|
|
@@ -12333,8 +12389,8 @@ async function _M3eDatepickerElement_updatePosition() {
|
|
|
12333
12389
|
flip: true,
|
|
12334
12390
|
shift: "both"
|
|
12335
12391
|
}, (x, y, position) => {
|
|
12336
|
-
setCustomState$1(this, "
|
|
12337
|
-
setCustomState$1(this, "
|
|
12392
|
+
setCustomState$1(this, "--top", position.includes("top"));
|
|
12393
|
+
setCustomState$1(this, "--bottom", position.includes("bottom"));
|
|
12338
12394
|
if (M3eDirectionality.current === "rtl") {
|
|
12339
12395
|
this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
|
|
12340
12396
|
this.style.left = "";
|
|
@@ -12359,14 +12415,14 @@ _M3eDatepickerElement_clearSelectionState = function _M3eDatepickerElement_clear
|
|
|
12359
12415
|
this._date = this._rangeStart = this._rangeEnd = undefined;
|
|
12360
12416
|
};
|
|
12361
12417
|
/** The styles of the element. */
|
|
12362
|
-
M3eDatepickerElement.styles = css`:host { flex-direction: column; margin: unset; border: unset; padding-block: var(--m3e-datepicker-container-padding-block, 0.75rem); padding-inline: var(--m3e-datepicker-container-padding-inline, 0.25rem); background-color: var(--m3e-datepicker-container-color, ${DesignToken$1.color.surfaceContainer}); box-shadow: var(--m3e-datepicker-container-elevation, ${DesignToken$1.elevation.level3}); opacity: 0; display: none; } .calendar { --m3e-calendar-container-color: transparent; --m3e-calendar-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-calendar-container-shape: ${DesignToken$1.shape.corner.none}; } .headline { color: var(--m3e-datepicker-modal-headline-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var( --m3e-datepicker-modal-headline-font-size, ${DesignToken$1.typescale.standard.headline.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-headline-font-weight, ${DesignToken$1.typescale.standard.headline.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-headline-line-height, ${DesignToken$1.typescale.standard.headline.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-headline-tracking, ${DesignToken$1.typescale.standard.headline.large.tracking} ); margin-block-start: 2.25rem; margin-block-end: 0.75rem; margin-inline: 1.5rem; } .supporting-text { color: var(--m3e-datepicker-modal-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var( --m3e-datepicker-modal-supporting-text-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-supporting-text-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-supporting-text-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-supporting-text-tracking, ${DesignToken$1.typescale.standard.label.large.tracking} ); margin-block-start: 1rem; margin-inline: 1.5rem; } .divider { height: var(--m3e-divider-thickness, 1px); width: 100%; position: relative; } .divider::before { content: ""; box-sizing: border-box; position: absolute; border-bottom: var(--m3e-divider-thickness, 1px) solid var(--m3e-divider-color, ${DesignToken$1.color.outlineVariant}); height: inherit; left: -0.25rem; right: -0.25rem; } .actions { display: flex; align-items: center; column-gap: 0.5rem; padding-inline: var(--m3e-datepicker-actions-padding-inline, 0.5rem); } .spacer { flex: 1 1 auto; } :host(:state(
|
|
12418
|
+
M3eDatepickerElement.styles = css`:host { flex-direction: column; margin: unset; border: unset; padding-block: var(--m3e-datepicker-container-padding-block, 0.75rem); padding-inline: var(--m3e-datepicker-container-padding-inline, 0.25rem); background-color: var(--m3e-datepicker-container-color, ${DesignToken$1.color.surfaceContainer}); box-shadow: var(--m3e-datepicker-container-elevation, ${DesignToken$1.elevation.level3}); opacity: 0; display: none; } .calendar { --m3e-calendar-container-color: transparent; --m3e-calendar-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-calendar-container-shape: ${DesignToken$1.shape.corner.none}; } .headline { color: var(--m3e-datepicker-modal-headline-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var( --m3e-datepicker-modal-headline-font-size, ${DesignToken$1.typescale.standard.headline.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-headline-font-weight, ${DesignToken$1.typescale.standard.headline.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-headline-line-height, ${DesignToken$1.typescale.standard.headline.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-headline-tracking, ${DesignToken$1.typescale.standard.headline.large.tracking} ); margin-block-start: 2.25rem; margin-block-end: 0.75rem; margin-inline: 1.5rem; } .supporting-text { color: var(--m3e-datepicker-modal-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var( --m3e-datepicker-modal-supporting-text-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-supporting-text-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-supporting-text-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-supporting-text-tracking, ${DesignToken$1.typescale.standard.label.large.tracking} ); margin-block-start: 1rem; margin-inline: 1.5rem; } .divider { height: var(--m3e-divider-thickness, 1px); width: 100%; position: relative; } .divider::before { content: ""; box-sizing: border-box; position: absolute; border-bottom: var(--m3e-divider-thickness, 1px) solid var(--m3e-divider-color, ${DesignToken$1.color.outlineVariant}); height: inherit; left: -0.25rem; right: -0.25rem; } .actions { display: flex; align-items: center; column-gap: 0.5rem; padding-inline: var(--m3e-datepicker-actions-padding-inline, 0.5rem); } .spacer { flex: 1 1 auto; } :host(:is(:state(--docked), :--docked)) { position: absolute; background-color: var(--m3e-datepicker-docked-container-color, ${DesignToken$1.color.surfaceContainer}); border-radius: var(--m3e-datepicker-docked-container-shape, ${DesignToken$1.shape.corner.large}); } :host(:is(:state(--modal), :--modal)) { position: fixed; inset: 0; margin: auto; transform-origin: top; background-color: var(--m3e-datepicker-modal-container-color, ${DesignToken$1.color.surfaceContainerHigh}); border-radius: var(--m3e-datepicker-modal-container-shape, ${DesignToken$1.shape.corner.extraLarge}); } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard},
|
|
12363
12419
|
transform ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard},
|
|
12364
12420
|
overlay ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12365
|
-
display ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: inline-flex; opacity: 1; } :host(:state(
|
|
12421
|
+
display ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: inline-flex; opacity: 1; } :host(:is(:state(--docked), :--docked))::backdrop { background-color: transparent; } :host(:is(:state(--modal), :--modal))::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent); margin-inline-end: -20px; } :host(:is(:state(--modal), :--modal):not(:popover-open))::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
12366
12422
|
overlay ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12367
|
-
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(
|
|
12423
|
+
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--modal), :--modal):popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) var(--m3e-dialog-scrim-opacity, 32%), transparent ); transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
12368
12424
|
overlay ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12369
|
-
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(
|
|
12425
|
+
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--bottom), :--bottom)) { transform-origin: top; } :host(:is(:state(--top), :--top)) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } :host(:is(:state(--modal), :--modal):popover-open)::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent); } } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; border: 1px solid CanvasText; } }`;
|
|
12370
12426
|
__decorate([state()], M3eDatepickerElement.prototype, "_date", void 0);
|
|
12371
12427
|
__decorate([state()], M3eDatepickerElement.prototype, "_rangeStart", void 0);
|
|
12372
12428
|
__decorate([state()], M3eDatepickerElement.prototype, "_rangeEnd", void 0);
|
|
@@ -12391,6 +12447,9 @@ __decorate([property({
|
|
|
12391
12447
|
attribute: "max-date",
|
|
12392
12448
|
converter: dateConverter$1
|
|
12393
12449
|
})], M3eDatepickerElement.prototype, "maxDate", void 0);
|
|
12450
|
+
__decorate([property({
|
|
12451
|
+
type: Boolean
|
|
12452
|
+
})], M3eDatepickerElement.prototype, "range", void 0);
|
|
12394
12453
|
__decorate([property({
|
|
12395
12454
|
attribute: "range-start",
|
|
12396
12455
|
converter: dateConverter$1
|
|
@@ -12531,11 +12590,11 @@ var M3eDialogElement_1;
|
|
|
12531
12590
|
* @attr no-focus-trap - Whether to disable focus trapping, which keeps keyboard `Tab` navigation within the dialog.
|
|
12532
12591
|
* @attr open - Whether the dialog is open.
|
|
12533
12592
|
*
|
|
12534
|
-
* @fires opening -
|
|
12535
|
-
* @fires opened -
|
|
12536
|
-
* @fires cancel -
|
|
12537
|
-
* @fires closing -
|
|
12538
|
-
* @fires closed -
|
|
12593
|
+
* @fires opening - Dispatched when the dialog begins to open.
|
|
12594
|
+
* @fires opened - Dispatched when the dialog has opened.
|
|
12595
|
+
* @fires cancel - Dispatched when the dialog is cancelled.
|
|
12596
|
+
* @fires closing - Dispatched when the dialog begins to close.
|
|
12597
|
+
* @fires closed - Dispatched when the dialog has closed.
|
|
12539
12598
|
*
|
|
12540
12599
|
* @cssprop --m3e-dialog-shape - Border radius of the dialog container.
|
|
12541
12600
|
* @cssprop --m3e-dialog-min-width - Minimum width of the dialog.
|
|
@@ -12718,7 +12777,7 @@ _M3eDialogElement_handleActionsSlotChange = function _M3eDialogElement_handleAct
|
|
|
12718
12777
|
this._withActions = e.target.assignedNodes({
|
|
12719
12778
|
flatten: true
|
|
12720
12779
|
}).length > 0;
|
|
12721
|
-
setCustomState$1(this, "
|
|
12780
|
+
setCustomState$1(this, "--with-actions", this._withActions);
|
|
12722
12781
|
};
|
|
12723
12782
|
/** The styles of the element. */
|
|
12724
12783
|
M3eDialogElement.styles = css`:host { display: contents; } .base { font: inherit; border: unset; outline: unset; padding: unset; display: flex; flex-direction: column; position: fixed; overflow: visible; border-radius: var(--m3e-dialog-shape, ${DesignToken$1.shape.corner.extraLarge}); min-width: var(--m3e-dialog-min-width, 17.5rem); max-width: var(--m3e-dialog-max-width, 35rem); color: var(--m3e-dialog-color, ${DesignToken$1.color.onSurface}); background-color: var(--m3e-dialog-container-color, ${DesignToken$1.color.surfaceContainerHigh}); visibility: hidden; opacity: 0; transform-origin: top; transform: translateY(-3.125rem) scaleY(0.8); } .base::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent); margin-inline-end: -20px; } .base:not([open]) { visibility: hidden; opacity: 0; transform: translateY(-3.125rem) scaleY(0.8); transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.emphasized},
|
|
@@ -12731,7 +12790,7 @@ M3eDialogElement.styles = css`:host { display: contents; } .base { font: inherit
|
|
|
12731
12790
|
overlay ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12732
12791
|
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } .base[open]::backdrop { background-color: color-mix( in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) var(--m3e-dialog-scrim-opacity, 32%), transparent ); transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
12733
12792
|
overlay ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12734
|
-
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { .base[open] { opacity: 0; transform: translateY(-3.125rem) scaleY(0.8); } .base[open]::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent); } } .header { flex: none; display: flex; align-items: center; padding: 1.5rem 1.5rem 1rem 1.5rem; background-color: var(--m3e-dialog-header-container-color, transparent); } ::slotted([slot="header"]) { margin: unset; flex: 1 1 auto; color: var(--m3e-dialog-header-color, inherit); font-size: var(--m3e-dialog-header-font-size, ${DesignToken$1.typescale.standard.headline.small.fontSize}); font-weight: var(--m3e-dialog-header-font-weight, ${DesignToken$1.typescale.standard.headline.small.fontWeight}); line-height: var(--m3e-dialog-header-line-height, ${DesignToken$1.typescale.standard.headline.small.lineHeight}); letter-spacing: var(--m3e-dialog-header-tracking, ${DesignToken$1.typescale.standard.headline.small.tracking}); } .content { padding-inline: 1.5rem; color: var(--m3e-dialog-content-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var(--m3e-dialog-content-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-dialog-content-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-dialog-content-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-dialog-content-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking}); } .actions { padding: 1.5rem; } ::slotted([slot="actions"]) { flex: none; display: flex; align-items: center; min-height: 1.5rem; column-gap: 0.5rem; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } :host(:not(:state(-with-actions))) .content { margin-bottom: 1.5rem; } :host(:not(:state(-with-actions))) .actions { display: none; } .close { margin-inline-start: 0.5rem; } ::slotted([slot="close-icon"]), .close-icon { width: 1em; font-size: var(--m3e-icon-button-icon-size, 1.5rem) !important; } @media (forced-colors: active) { .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } .base { border-style: solid; border-width: 1px; border-color: CanvasText; } } @media (prefers-reduced-motion) { .base:not([open]), .base[open], .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } }`;
|
|
12793
|
+
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { .base[open] { opacity: 0; transform: translateY(-3.125rem) scaleY(0.8); } .base[open]::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken$1.color.scrim}) 0%, transparent); } } .header { flex: none; display: flex; align-items: center; padding: 1.5rem 1.5rem 1rem 1.5rem; background-color: var(--m3e-dialog-header-container-color, transparent); } ::slotted([slot="header"]) { margin: unset; flex: 1 1 auto; color: var(--m3e-dialog-header-color, inherit); font-size: var(--m3e-dialog-header-font-size, ${DesignToken$1.typescale.standard.headline.small.fontSize}); font-weight: var(--m3e-dialog-header-font-weight, ${DesignToken$1.typescale.standard.headline.small.fontWeight}); line-height: var(--m3e-dialog-header-line-height, ${DesignToken$1.typescale.standard.headline.small.lineHeight}); letter-spacing: var(--m3e-dialog-header-tracking, ${DesignToken$1.typescale.standard.headline.small.tracking}); } .content { padding-inline: 1.5rem; color: var(--m3e-dialog-content-color, ${DesignToken$1.color.onSurfaceVariant}); font-size: var(--m3e-dialog-content-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-dialog-content-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-dialog-content-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-dialog-content-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking}); } .actions { padding: 1.5rem; } ::slotted([slot="actions"]) { flex: none; display: flex; align-items: center; min-height: 1.5rem; column-gap: 0.5rem; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } :host(:not(:is(:state(--with-actions), :--with-actions))) .content { margin-bottom: 1.5rem; } :host(:not(:is(:state(--with-actions), :--with-actions))) .actions { display: none; } .close { margin-inline-start: 0.5rem; } ::slotted([slot="close-icon"]), .close-icon { width: 1em; font-size: var(--m3e-icon-button-icon-size, 1.5rem) !important; } @media (forced-colors: active) { .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } .base { border-style: solid; border-width: 1px; border-color: CanvasText; } } @media (prefers-reduced-motion) { .base:not([open]), .base[open], .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } }`;
|
|
12735
12794
|
/** @private */
|
|
12736
12795
|
M3eDialogElement.__nextId = 0;
|
|
12737
12796
|
__decorate([state()], M3eDialogElement.prototype, "_withActions", void 0);
|
|
@@ -12890,9 +12949,9 @@ const DrawerContainerToken = {
|
|
|
12890
12949
|
const DrawerContainerStyle = css`:host { display: block; position: relative; overflow: hidden; flex: 1 1 auto; } .start, .end { position: absolute; top: 0; bottom: 0; z-index: 3; outline: none; overflow-x: hidden; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; box-sizing: border-box; background-color: ${DrawerContainerToken.containerColor}; box-shadow: ${DrawerContainerToken.containerElevation}; transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12891
12950
|
visibility ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
12892
12951
|
background-color ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12893
|
-
box-shadow ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard}`)}; } .start { inset-inline-start: 0; } .end { inset-inline-end: 0; } :host(:not([start])) .start { visibility: hidden; } :host(:not([start]):not(:dir(rtl))) .start { margin-left: calc(0px - var(--_start-drawer-size, ${DrawerContainerToken.containerWidth})); } :host(:not([start]):dir(rtl)) .start { margin-right: calc(0px - var(--_start-drawer-size, ${DrawerContainerToken.containerWidth})); } :host([start]:not(:dir(rtl))) .start { margin-left: 0; } :host([start]:dir(rtl)) .start { margin-right: 0; } :host(:not([end])) .end { visibility: hidden; } :host(:not([end]):not(:dir(rtl))) .end { margin-right: calc(0px - var(--_end-drawer-size, ${DrawerContainerToken.containerWidth})); } :host(:not([end]):dir(rtl)) .end { margin-left: calc(0px - var(--_end-drawer-size, ${DrawerContainerToken.containerWidth})); } :host([end]:not(:dir(rtl))) .end { margin-right: 0; } :host([end]:dir(rtl)) .end { margin-left: 0; } ::slotted([slot="start"]), ::slotted([slot="end"]) { height: 100%; width: ${DrawerContainerToken.containerWidth}; box-sizing: border-box; } .content { position: relative; height: 100%; overflow: auto; margin-left: 0; margin-right: 0; transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-start-push)[start]:not(:dir(rtl))) .content, :host(:state(-start-side)[start]:not(:dir(rtl))) .content { margin-left: var(--_start-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:state(-start-push)[start]:dir(rtl)) .content, :host(:state(-start-side)[start]:dir(rtl)) .content { margin-right: var(--_start-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:state(-end-push)[end]:not(:dir(rtl))) .content, :host(:state(-end-side)[end]:not(:dir(rtl))) .content { margin-right: var(--_end-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:state(-end-push)[end]:dir(rtl)) .content, :host(:state(-end-side)[end]:dir(rtl)) .content { margin-left: var(--_end-drawer-size, ${DrawerContainerToken.containerWidth}); } .scrim { display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 1; background-color: ${DesignToken$1.color.scrim}; opacity: 0; visibility: hidden; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12894
|
-
visibility ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { .scrim { opacity: 0; } } :host(:state(-start-push)[start]) .scrim, :host(:state(-end-push)[end]) .scrim, :host(:state(-start-over)[start]) .scrim, :host(:state(-end-over)[end]) .scrim { visibility: visible; opacity: ${DrawerContainerToken.scrimOpacity}; } :host(:state(-start-push)) .start, :host(:state(-start-over)) .start { border-start-end-radius: ${DrawerContainerToken.cornerShape}; border-end-end-radius: ${DrawerContainerToken.cornerShape}; } :host(:state(-end-push)) .end, :host(:state(-end-over)) .end { border-start-start-radius: ${DrawerContainerToken.cornerShape}; border-end-start-radius: ${DrawerContainerToken.cornerShape}; } :host(:state(-start-push)) .start, :host(:state(-end-push)) .end, :host(:state(-start-over)) .start, :host(:state(-end-over)) .end { background-color: ${DrawerContainerToken.modalContainerColor}; box-shadow: ${DrawerContainerToken.modalContainerElevation}; } :host([start-divider]) .start { border-inline-end-color: transparent; border-inline-end-width: ${DrawerContainerToken.dividerThickness}; border-inline-end-style: solid; box-sizing: border-box; } :host([start-divider]:state(-start-side)[start]:not(:state(-end-push)[end]):not(:state(-end-over)[end])) .start { border-inline-end-color: ${DrawerContainerToken.dividerColor}; } :host([end-divider]) .end { border-inline-start-color: transparent; border-inline-start-width: ${DrawerContainerToken.dividerThickness}; border-inline-start-style: solid; box-sizing: border-box; } :host([end-divider]:state(-end-side)[end]:not(:state(-start-push)[start]):not(:state(-start-over)[start])) .end { border-inline-start-color: ${DrawerContainerToken.dividerColor}; } :host(:state(-no-animate)) .start, :host(:state(-no-animate)) .end, :host(:state(-no-animate)) .content { transition: none; } @media (forced-colors: active) { .start, .end { background-color: Canvas; box-shadow: unset; transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12895
|
-
visibility ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(-start-push)) .start, :host(:state(-end-push)) .end, :host(:state(-start-over)) .start, :host(:state(-end-over)) .end { background-color: Canvas; box-shadow: unset; border-color: CanvasText; } .start, .end { border-style: solid; border-color: Canvas; border-width: 1px; } .start { border-inline-start-style: none; } .end { border-inline-end-style: none; } :host([start-divider]:state(-start-side)[start]:not(:state(-end-push)[end]):not(:state(-end-over)[end])) .start { border-inline-end-color: GrayText; } :host([end-divider]:state(-end-side)[end]:not(:state(-start-push)[start]):not(:state(-start-over)[start])) .end { border-inline-start-color: GrayText; } } @media (prefers-reduced-motion) { .start, .end, .content, .scrim { transition: none; } }`;
|
|
12952
|
+
box-shadow ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard}`)}; } .start { inset-inline-start: 0; } .end { inset-inline-end: 0; } :host(:not([start])) .start { visibility: hidden; } :host(:not([start]):not(:dir(rtl))) .start { margin-left: calc(0px - var(--_start-drawer-size, ${DrawerContainerToken.containerWidth})); } :host(:not([start]):dir(rtl)) .start { margin-right: calc(0px - var(--_start-drawer-size, ${DrawerContainerToken.containerWidth})); } :host([start]:not(:dir(rtl))) .start { margin-left: 0; } :host([start]:dir(rtl)) .start { margin-right: 0; } :host(:not([end])) .end { visibility: hidden; } :host(:not([end]):not(:dir(rtl))) .end { margin-right: calc(0px - var(--_end-drawer-size, ${DrawerContainerToken.containerWidth})); } :host(:not([end]):dir(rtl)) .end { margin-left: calc(0px - var(--_end-drawer-size, ${DrawerContainerToken.containerWidth})); } :host([end]:not(:dir(rtl))) .end { margin-right: 0; } :host([end]:dir(rtl)) .end { margin-left: 0; } ::slotted([slot="start"]), ::slotted([slot="end"]) { height: 100%; width: ${DrawerContainerToken.containerWidth}; box-sizing: border-box; } .content { position: relative; height: 100%; overflow: auto; margin-left: 0; margin-right: 0; transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:is(:state(--start-push), :--start-push)[start]:not(:dir(rtl))) .content, :host(:is(:state(--start-side), :--start-side)[start]:not(:dir(rtl))) .content { margin-left: var(--_start-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:is(:state(--start-push), :--start-push)[start]:dir(rtl)) .content, :host(:is(:state(--start-side), :--start-side)[start]:dir(rtl)) .content { margin-right: var(--_start-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:is(:state(--end-push), :--end-push)[end]:not(:dir(rtl))) .content, :host(:is(:state(--end-side), :--end-side)[end]:not(:dir(rtl))) .content { margin-right: var(--_end-drawer-size, ${DrawerContainerToken.containerWidth}); } :host(:is(:state(--end-push), :--end-push)[end]:dir(rtl)) .content, :host(:is(:state(--end-side), :--end-side)[end]:dir(rtl)) .content { margin-left: var(--_end-drawer-size, ${DrawerContainerToken.containerWidth}); } .scrim { display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 1; background-color: ${DesignToken$1.color.scrim}; opacity: 0; visibility: hidden; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12953
|
+
visibility ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { .scrim { opacity: 0; } } :host(:is(:state(--start-push), :--start-push)[start]) .scrim, :host(:is(:state(--end-push), :--end-push)[end]) .scrim, :host(:is(:state(--start-over), :--start-over)[start]) .scrim, :host(:is(:state(--end-over), :--end-over)[end]) .scrim { visibility: visible; opacity: ${DrawerContainerToken.scrimOpacity}; } :host(:is(:state(--start-push), :--start-push)) .start, :host(:is(:state(--start-over), :--start-over)) .start { border-start-end-radius: ${DrawerContainerToken.cornerShape}; border-end-end-radius: ${DrawerContainerToken.cornerShape}; } :host(:is(:state(--end-push), :--end-push)) .end, :host(:is(:state(--end-over), :--end-over)) .end { border-start-start-radius: ${DrawerContainerToken.cornerShape}; border-end-start-radius: ${DrawerContainerToken.cornerShape}; } :host(:is(:state(--start-push), :--start-push)) .start, :host(:is(:state(--end-push), :--end-push)) .end, :host(:is(:state(--start-over), :--start-over)) .start, :host(:is(:state(--end-over), :--end-over)) .end { background-color: ${DrawerContainerToken.modalContainerColor}; box-shadow: ${DrawerContainerToken.modalContainerElevation}; } :host([start-divider]) .start { border-inline-end-color: transparent; border-inline-end-width: ${DrawerContainerToken.dividerThickness}; border-inline-end-style: solid; box-sizing: border-box; } :host( [start-divider]:is(:state(--start-side), :--start-side)[start]:not(:is(:state(--end-push), :--end-push)[end]):not( :is(:state(--end-over), :--end-over)[end] ) ) .start { border-inline-end-color: ${DrawerContainerToken.dividerColor}; } :host([end-divider]) .end { border-inline-start-color: transparent; border-inline-start-width: ${DrawerContainerToken.dividerThickness}; border-inline-start-style: solid; box-sizing: border-box; } :host( [end-divider]:is(:state(--end-side), :--end-side)[end]:not(:is(:state(--start-push), :--start-push)[start]):not( :is(:state(--start-over), :--start-over)[start] ) ) .end { border-inline-start-color: ${DrawerContainerToken.dividerColor}; } :host(:is(:state(--no-animate), :--no-animate)) .start, :host(:is(:state(--no-animate), :--no-animate)) .end, :host(:is(:state(--no-animate), :--no-animate)) .content { transition: none; } @media (forced-colors: active) { .start, .end { background-color: Canvas; box-shadow: unset; transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard},
|
|
12954
|
+
visibility ${DesignToken$1.motion.duration.medium4} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--start-push), :--start-push)) .start, :host(:is(:state(--end-push), :--end-push)) .end, :host(:is(:state(--start-over), :--start-over)) .start, :host(:is(:state(--end-over), :--end-over)) .end { background-color: Canvas; box-shadow: unset; border-color: CanvasText; } .start, .end { border-style: solid; border-color: Canvas; border-width: 1px; } .start { border-inline-start-style: none; } .end { border-inline-end-style: none; } :host( [start-divider]:is(:state(--start-side), :--start-side)[start]:not( :is(:state(--end-push), :--end-push)[end] ):not(:is(:state(--end-over), :--end-over)[end]) ) .start { border-inline-end-color: GrayText; } :host( [end-divider]:is(:state(--end-side), :--end-side)[end]:not(:is(:state(--start-push), :--start-push)[start]):not( :is(:state(--start-over), :--start-over)[start] ) ) .end { border-inline-start-color: GrayText; } } @media (prefers-reduced-motion) { .start, .end, .content, .scrim { transition: none; } }`;
|
|
12896
12955
|
|
|
12897
12956
|
var _M3eDrawerContainerElement_instances, _M3eDrawerContainerElement_breakpointUnobserve, _M3eDrawerContainerElement_disableStartFocusTrap, _M3eDrawerContainerElement_disableEndFocusTrap, _M3eDrawerContainerElement_resizeController, _M3eDrawerContainerElement_initialize, _M3eDrawerContainerElement_handleScrimClick, _M3eDrawerContainerElement_handleStartSlotChange, _M3eDrawerContainerElement_handleEndSlotChange, _M3eDrawerContainerElement_handleDrawerResize, _M3eDrawerContainerElement_initBreakpointMonitoring, _M3eDrawerContainerElement_clearMode, _M3eDrawerContainerElement_updateMode;
|
|
12898
12957
|
/**
|
|
@@ -12933,7 +12992,7 @@ var _M3eDrawerContainerElement_instances, _M3eDrawerContainerElement_breakpointU
|
|
|
12933
12992
|
* @attr start-mode - The behavior mode of the start drawer.
|
|
12934
12993
|
* @attr start-divider - Whether to show a divider between the start drawer and content for `side` mode.
|
|
12935
12994
|
*
|
|
12936
|
-
* @fires change -
|
|
12995
|
+
* @fires change - Dispatched when the state of the start or end drawers change.
|
|
12937
12996
|
*
|
|
12938
12997
|
* @cssprop --m3e-drawer-container-color - The background color of the drawer container.
|
|
12939
12998
|
* @cssprop --m3e-drawer-container-elevation - The elevation level of the drawer container.
|
|
@@ -13000,7 +13059,7 @@ let M3eDrawerContainerElement = class M3eDrawerContainerElement extends Reconnec
|
|
|
13000
13059
|
/** @inheritdoc */
|
|
13001
13060
|
connectedCallback() {
|
|
13002
13061
|
super.connectedCallback();
|
|
13003
|
-
addCustomState$1(this, "
|
|
13062
|
+
addCustomState$1(this, "--no-animate");
|
|
13004
13063
|
}
|
|
13005
13064
|
/** @inheritdoc */
|
|
13006
13065
|
disconnectedCallback() {
|
|
@@ -13090,22 +13149,22 @@ _M3eDrawerContainerElement_handleDrawerResize = function _M3eDrawerContainerElem
|
|
|
13090
13149
|
this.style.setProperty("--_end-drawer-size", `${borderSize.inlineSize}px`);
|
|
13091
13150
|
}
|
|
13092
13151
|
}
|
|
13093
|
-
if (hasCustomState$1(this, "
|
|
13152
|
+
if (hasCustomState$1(this, "--no-animate")) {
|
|
13094
13153
|
// Force synchronous layout flush
|
|
13095
13154
|
void this.offsetTop;
|
|
13096
|
-
deleteCustomState$1(this, "
|
|
13155
|
+
deleteCustomState$1(this, "--no-animate");
|
|
13097
13156
|
}
|
|
13098
13157
|
};
|
|
13099
13158
|
_M3eDrawerContainerElement_initBreakpointMonitoring = function _M3eDrawerContainerElement_initBreakpointMonitoring() {
|
|
13100
13159
|
__classPrivateFieldSet(this, _M3eDrawerContainerElement_breakpointUnobserve, M3eBreakpointObserver.observe([Breakpoint.XSmall, Breakpoint.Small], matches => __classPrivateFieldGet(this, _M3eDrawerContainerElement_instances, "m", _M3eDrawerContainerElement_updateMode).call(this, matches, true)), "f");
|
|
13101
13160
|
};
|
|
13102
13161
|
_M3eDrawerContainerElement_clearMode = function _M3eDrawerContainerElement_clearMode() {
|
|
13103
|
-
deleteCustomState$1(this, "
|
|
13104
|
-
deleteCustomState$1(this, "
|
|
13105
|
-
deleteCustomState$1(this, "
|
|
13106
|
-
deleteCustomState$1(this, "
|
|
13107
|
-
deleteCustomState$1(this, "
|
|
13108
|
-
deleteCustomState$1(this, "
|
|
13162
|
+
deleteCustomState$1(this, "--start-over");
|
|
13163
|
+
deleteCustomState$1(this, "--start-push");
|
|
13164
|
+
deleteCustomState$1(this, "--start-side");
|
|
13165
|
+
deleteCustomState$1(this, "--end-over");
|
|
13166
|
+
deleteCustomState$1(this, "--end-push");
|
|
13167
|
+
deleteCustomState$1(this, "--end-side");
|
|
13109
13168
|
};
|
|
13110
13169
|
_M3eDrawerContainerElement_updateMode = function _M3eDrawerContainerElement_updateMode(breakpoints, autoClose = false) {
|
|
13111
13170
|
let autoCloseStart = false,
|
|
@@ -13141,8 +13200,8 @@ _M3eDrawerContainerElement_updateMode = function _M3eDrawerContainerElement_upda
|
|
|
13141
13200
|
this._endMode = this.endMode;
|
|
13142
13201
|
}
|
|
13143
13202
|
__classPrivateFieldGet(this, _M3eDrawerContainerElement_instances, "m", _M3eDrawerContainerElement_clearMode).call(this);
|
|
13144
|
-
addCustomState$1(this,
|
|
13145
|
-
addCustomState$1(this,
|
|
13203
|
+
addCustomState$1(this, `--start-${this._startMode}`);
|
|
13204
|
+
addCustomState$1(this, `--end-${this._endMode}`);
|
|
13146
13205
|
if (autoClose && (autoCloseStart || autoCloseEnd)) {
|
|
13147
13206
|
if (autoCloseStart) {
|
|
13148
13207
|
this.start = false;
|
|
@@ -13439,7 +13498,7 @@ const ExpansionPanelToken = {
|
|
|
13439
13498
|
* @internal
|
|
13440
13499
|
*/
|
|
13441
13500
|
const ExpansionPanelStyle = css`:host { display: block; } .base { background-color: ${ExpansionPanelToken.containerColor}; transition: ${unsafeCSS(`box-shadow var(--m3e-collapsible-animation-duration, ${DesignToken$1.motion.duration.medium1})
|
|
13442
|
-
${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled)) .base { color: ${ExpansionPanelToken.textColor}; } :host(:disabled) .base { color: color-mix( in srgb, ${ExpansionPanelToken.disabledTextColor} ${ExpansionPanelToken.disabledTextOpacity}, transparent ); } :host(:not([open])) .base { box-shadow: ${ExpansionPanelToken.collapsedElevation}; border-radius: ${ExpansionPanelToken.collapsedShape}; } :host([open]) .base { box-shadow: ${ExpansionPanelToken.expandedElevation}; border-radius: ${ExpansionPanelToken.expandedShape}; margin-block: ${ExpansionPanelToken.expandedSpace}; } .toggle { display: flex; align-items: center; justify-content: center; font-size: ${ExpansionHeaderToken.toggleIconSize}; } ::slotted([slot="toggle-icon"]) { font-size: inherit !important; flex: none; } .toggle svg, ::slotted(svg[slot="toggle-icon"]) { width: 1em; height: 1em; } .content { padding: ${ExpansionPanelToken.contentPadding}; } :host(:not(:state(-with-actions))) .actions { display: none; } .actions { padding: ${ExpansionPanelToken.actionsPadding}; border-top-style: solid; border-top-width: ${ExpansionPanelToken.actionsDividerThickness}; border-top-color: ${ExpansionPanelToken.actionsDividerColor}; } ::slotted([slot="actions"]) { flex: none; display: flex; align-items: center; column-gap: ${ExpansionPanelToken.actionsSpacing}; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { border: 1px solid CanvasText; } :host(:disabled) .base { color: GrayText; } .actions { border-top-color: GrayText; } }`;
|
|
13501
|
+
${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled)) .base { color: ${ExpansionPanelToken.textColor}; } :host(:disabled) .base { color: color-mix( in srgb, ${ExpansionPanelToken.disabledTextColor} ${ExpansionPanelToken.disabledTextOpacity}, transparent ); } :host(:not([open])) .base { box-shadow: ${ExpansionPanelToken.collapsedElevation}; border-radius: ${ExpansionPanelToken.collapsedShape}; } :host([open]) .base { box-shadow: ${ExpansionPanelToken.expandedElevation}; border-radius: ${ExpansionPanelToken.expandedShape}; margin-block: ${ExpansionPanelToken.expandedSpace}; } .toggle { display: flex; align-items: center; justify-content: center; font-size: ${ExpansionHeaderToken.toggleIconSize}; } ::slotted([slot="toggle-icon"]) { font-size: inherit !important; flex: none; } .toggle svg, ::slotted(svg[slot="toggle-icon"]) { width: 1em; height: 1em; } .content { padding: ${ExpansionPanelToken.contentPadding}; } :host(:not(:is(:state(--with-actions), :--with-actions))) .actions { display: none; } .actions { padding: ${ExpansionPanelToken.actionsPadding}; border-top-style: solid; border-top-width: ${ExpansionPanelToken.actionsDividerThickness}; border-top-color: ${ExpansionPanelToken.actionsDividerColor}; } ::slotted([slot="actions"]) { flex: none; display: flex; align-items: center; column-gap: ${ExpansionPanelToken.actionsSpacing}; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { border: 1px solid CanvasText; } :host(:disabled) .base { color: GrayText; } .actions { border-top-color: GrayText; } }`;
|
|
13443
13502
|
|
|
13444
13503
|
var _M3eExpansionHeaderElement_instances, _M3eExpansionHeaderElement_renderToggle;
|
|
13445
13504
|
/**
|
|
@@ -13454,7 +13513,7 @@ var _M3eExpansionHeaderElement_instances, _M3eExpansionHeaderElement_renderToggl
|
|
|
13454
13513
|
* @attr toggle-direction - The direction of the expansion toggle.
|
|
13455
13514
|
* @attr toggle-position - The position of the expansion toggle.
|
|
13456
13515
|
*
|
|
13457
|
-
* @fires click -
|
|
13516
|
+
* @fires click - Dispatched when the element is clicked.
|
|
13458
13517
|
*
|
|
13459
13518
|
* @cssprop --m3e-expansion-header-collapsed-height - Height of the header when the panel is collapsed.
|
|
13460
13519
|
* @cssprop --m3e-expansion-header-expanded-height - Height of the header when the panel is expanded.
|
|
@@ -13562,10 +13621,10 @@ var M3eExpansionPanelElement_1;
|
|
|
13562
13621
|
* @attr toggle-direction - The direction of the expansion toggle.
|
|
13563
13622
|
* @attr toggle-position - The position of the expansion toggle.
|
|
13564
13623
|
*
|
|
13565
|
-
* @fires opening -
|
|
13566
|
-
* @fires opened -
|
|
13567
|
-
* @fires closing -
|
|
13568
|
-
* @fires closed -
|
|
13624
|
+
* @fires opening - Dispatched when the expansion panel begins to open.
|
|
13625
|
+
* @fires opened - Dispatched when the expansion panel has opened.
|
|
13626
|
+
* @fires closing - Dispatched when the expansion panel begins to close.
|
|
13627
|
+
* @fires closed - Dispatched when the expansion panel has closed.
|
|
13569
13628
|
*
|
|
13570
13629
|
* @cssprop --m3e-expansion-header-collapsed-height - Height of the header when the panel is collapsed.
|
|
13571
13630
|
* @cssprop --m3e-expansion-header-expanded-height - Height of the header when the panel is expanded.
|
|
@@ -13711,7 +13770,7 @@ _M3eExpansionPanelElement_handleCollapsibleEvent = function _M3eExpansionPanelEl
|
|
|
13711
13770
|
}));
|
|
13712
13771
|
};
|
|
13713
13772
|
_M3eExpansionPanelElement_handleActionsSlotChange = function _M3eExpansionPanelElement_handleActionsSlotChange(e) {
|
|
13714
|
-
setCustomState$1(this, "
|
|
13773
|
+
setCustomState$1(this, "--with-actions", hasAssignedNodes$1(e.target));
|
|
13715
13774
|
};
|
|
13716
13775
|
_M3eExpansionPanelElement_updateHeaderToggleRotation = function _M3eExpansionPanelElement_updateHeaderToggleRotation() {
|
|
13717
13776
|
if (M3eDirectionality.current === "rtl") {
|
|
@@ -13748,7 +13807,7 @@ M3eExpansionPanelElement = M3eExpansionPanelElement_1 = __decorate([customElemen
|
|
|
13748
13807
|
* Baseline styles for `M3eFabElement`.
|
|
13749
13808
|
* @internal
|
|
13750
13809
|
*/
|
|
13751
|
-
const FabStyle = 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}`)}; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; } .label {
|
|
13810
|
+
const FabStyle = 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}`)}; } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; } .label { white-space: nowrap; transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .icon { transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } .close-icon, ::slotted(:not([slot])), ::slotted([slot="close-icon"]) { font-size: inherit !important; flex: none; } .close-icon, ::slotted(svg:not([slot])), ::slotted(svg[slot="close-icon"]) { width: 1em; height: 1em; } .base.with-menu ::slotted([slot="label"]), .base:not(.with-menu) ::slotted([slot="close-icon"]), .base:not(.with-menu) .close-icon, :host([aria-expanded="true"]) .base.with-menu ::slotted(:not([slot])), :host([aria-expanded="false"]) .base.with-menu ::slotted([slot="close-icon"]), :host([aria-expanded="false"]) .base.with-menu .close-icon { display: none; } :host([aria-expanded="true"]) .base.with-menu { border-radius: var(--m3e-fab-menu-close-button-container-shape, ${DesignToken$1.shape.corner.full}); height: calc(var(--m3e-fab-menu-close-button-container-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); } :host([aria-expanded="true"]) .base.with-menu .wrapper { padding-inline-start: calc(var(--m3e-fab-menu-close-button-leading-space, 1rem) + ${DesignToken$1.density.calc(-3)}); padding-inline-end: calc(var(--m3e-fab-menu-close-button-trailing-space, 1rem) + ${DesignToken$1.density.calc(-3)}); } :host([aria-expanded="true"]) .base.with-menu .icon { font-size: calc(var(--m3e-fab-menu-close-button-icon-size, 1.5rem) + ${DesignToken$1.density.calc(-3)}); --m3e-icon-size: calc(var(--m3e-fab-menu-close-button-icon-size, 1.5rem) + ${DesignToken$1.density.calc(-3)}); } .base.with-menu { transition: height ${DesignToken$1.motion.spring.fastSpatial}; } .base.with-menu .wrapper { transition: padding ${DesignToken$1.motion.spring.fastSpatial}; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { .base, .icon { transition: none; } .base { outline-style: solid; } :host([variant]:not(:disabled):not([disabled-interactive])) .base { background-color: ButtonFace; outline-color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])) .label, :host([variant]:not(:disabled):not([disabled-interactive])) .icon { color: ButtonText; } :host([variant]:disabled) .base, :host([variant][disabled-interactive]) .base { outline-color: GrayText; background-color: unset; } :host([variant]:disabled) .label, :host([variant][disabled-interactive]) .label, :host([variant]:disabled) .icon, :host([variant][disabled-interactive]) .icon { color: GrayText; } :host([size="small"]) .base { outline-offset: calc(0px - var(--m3e-button-small-outline-thickness, 1px)); outline-width: var(--m3e-button-small-outline-thickness, 1px); } :host([size="medium"]) .base { outline-offset: calc(0px - var(--m3e-button-medium-outline-thickness, 1px)); outline-width: var(--m3e-button-medium-outline-thickness, 1px); } :host([size="large"]) .base { outline-offset: calc(0px - var(--m3e-button-large-outline-thickness, 2px)); outline-width: var(--m3e-button-large-outline-thickness, 2px); } } @media (prefers-reduced-motion) { .base, .base.resting, .base.pressed, .label, .icon { transition: none; } }`;
|
|
13752
13811
|
|
|
13753
13812
|
/**
|
|
13754
13813
|
* Component design tokens that control the `M3eFabElement` for all size variants.
|
|
@@ -14429,7 +14488,7 @@ var _M3eFabElement_instances, _M3eFabElement_handleSlotChange;
|
|
|
14429
14488
|
* @attr value - The value associated with the element's name when it's submitted with form data.
|
|
14430
14489
|
* @attr variant - The appearance variant of the button.
|
|
14431
14490
|
*
|
|
14432
|
-
* @fires click -
|
|
14491
|
+
* @fires click - Dispatched when the element is clicked.
|
|
14433
14492
|
*
|
|
14434
14493
|
* @cssprop --m3e-fab-container-height - Height of the FAB container for all size variants.
|
|
14435
14494
|
* @cssprop --m3e-fab-label-text-font-size - Font size for the FAB label text for all size variants.
|
|
@@ -14776,7 +14835,7 @@ let M3eFabElement = class M3eFabElement extends KeyboardClick$1(LinkButton$1(For
|
|
|
14776
14835
|
}
|
|
14777
14836
|
/** @inheritdoc */
|
|
14778
14837
|
render() {
|
|
14779
|
-
return html`<div class="base"><m3e-elevation class="elevation" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-elevation><m3e-state-layer class="state-layer" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?centered="${!this.extended}" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-ripple><div class="touch" aria-hidden="true"></div>${this[renderPseudoLink$1]()}<div class="wrapper"><slot class="icon" aria-hidden="true" @slotchange="${__classPrivateFieldGet(this, _M3eFabElement_instances, "m", _M3eFabElement_handleSlotChange)}"></slot><slot class="icon" aria-hidden="true" name="close-icon"><svg class="close-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg></slot><div class="label"><slot name="label" @slotchange="${__classPrivateFieldGet(this, _M3eFabElement_instances, "m", _M3eFabElement_handleSlotChange)}"></slot></div></div></div>`;
|
|
14838
|
+
return html`<div class="base"><m3e-elevation class="elevation" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-elevation><m3e-state-layer class="state-layer" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?centered="${!this.extended}" ?disabled="${this.disabled || this.disabledInteractive}"></m3e-ripple><div class="touch" aria-hidden="true"></div>${this[renderPseudoLink$1]()}<div class="wrapper"><slot class="icon" aria-hidden="true" @slotchange="${__classPrivateFieldGet(this, _M3eFabElement_instances, "m", _M3eFabElement_handleSlotChange)}"></slot><slot class="icon" aria-hidden="true" name="close-icon"><svg class="close-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg></slot><m3e-collapsible class="label-wrapper" orientation="horizontal" ?open="${this.extended}"><div class="label"><slot name="label" @slotchange="${__classPrivateFieldGet(this, _M3eFabElement_instances, "m", _M3eFabElement_handleSlotChange)}"></slot></div></m3e-collapsible></div></div>`;
|
|
14780
14839
|
}
|
|
14781
14840
|
};
|
|
14782
14841
|
_M3eFabElement_instances = new WeakSet();
|
|
@@ -14839,7 +14898,7 @@ var _M3eFabMenuItemElement_instances, _M3eFabMenuItemElement_clickHandler, _M3eF
|
|
|
14839
14898
|
* @attr rel - The relationship between the `target` of the link button and the document.
|
|
14840
14899
|
* @attr target - The target of the link button.
|
|
14841
14900
|
*
|
|
14842
|
-
* @fires click -
|
|
14901
|
+
* @fires click - Dispatched when the element is clicked.
|
|
14843
14902
|
*
|
|
14844
14903
|
* @cssprop --m3e-fab-menu-item-height - Height of the menu item.
|
|
14845
14904
|
* @cssprop --m3e-fab-menu-item-font-size - Font size of the menu item label.
|
|
@@ -15011,8 +15070,8 @@ let M3eFabMenuElement = class M3eFabMenuElement extends SuppressInitialAnimation
|
|
|
15011
15070
|
flip: true,
|
|
15012
15071
|
offset: 8
|
|
15013
15072
|
}, (x, y, position) => {
|
|
15014
|
-
setCustomState$1(this, "
|
|
15015
|
-
setCustomState$1(this, "
|
|
15073
|
+
setCustomState$1(this, "--right", position.includes("end"));
|
|
15074
|
+
setCustomState$1(this, "--left", position.includes("start"));
|
|
15016
15075
|
if (M3eDirectionality.current === "rtl") {
|
|
15017
15076
|
this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
|
|
15018
15077
|
this.style.left = "";
|
|
@@ -15135,10 +15194,10 @@ _M3eFabMenuElement_detachFab = function _M3eFabMenuElement_detachFab() {
|
|
|
15135
15194
|
}
|
|
15136
15195
|
};
|
|
15137
15196
|
/** The styles of the element. */
|
|
15138
|
-
M3eFabMenuElement.styles = css`:host { position: absolute; flex-direction: column; row-gap: var(--m3e-fab-menu-spacing, 0.25rem); padding: unset; margin: unset; border: unset; overflow: visible; max-width: var(--m3e-fab-menu-max-width, 17.5rem); opacity: 0; background-color: transparent; display: none; } :host(:not(:state(-no-animate))) { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.spring.fastEffects},
|
|
15197
|
+
M3eFabMenuElement.styles = css`:host { position: absolute; flex-direction: column; row-gap: var(--m3e-fab-menu-spacing, 0.25rem); padding: unset; margin: unset; border: unset; overflow: visible; max-width: var(--m3e-fab-menu-max-width, 17.5rem); opacity: 0; background-color: transparent; display: none; } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.spring.fastEffects},
|
|
15139
15198
|
transform ${DesignToken$1.motion.spring.fastSpatial},
|
|
15140
15199
|
overlay ${DesignToken$1.motion.spring.fastEffects} allow-discrete,
|
|
15141
|
-
display ${DesignToken$1.motion.spring.fastEffects} allow-discrete`)}; } .base { display: contents; } :host([variant="primary"]) .base { --_fab-menu-item-color: var(--m3e-primary-fab-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-item-container-color: var(--m3e-primary-fab-container-color, ${DesignToken$1.color.primaryContainer}); --_fab-menu-background-hover-color: var(--m3e-primary-fab-hover-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-background-focus-color: var(--m3e-primary-fab-focus-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-ripple-color: var(--m3e-primary-fab-ripple-color, ${DesignToken$1.color.onPrimaryContainer}); } :host([variant="secondary"]) .base { --_fab-menu-item-color: var(--m3e-secondary-fab-color, ${DesignToken$1.color.onSecondaryContainer}); --_fab-menu-item-container-color: var( --m3e-secondary-fab-container-color, ${DesignToken$1.color.secondaryContainer} ); --_fab-menu-background-hover-color: var( --m3e-secondary-fab-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --_fab-menu-background-focus-color: var( --m3e-secondary-fab-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --_fab-menu-ripple-color: var(--m3e-secondary-fab-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([variant="tertiary"]) .base { --_fab-menu-item-color: var(--m3e-tertiary-fab-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-item-container-color: var(--m3e-tertiary-fab-container-color, ${DesignToken$1.color.tertiaryContainer}); --_fab-menu-background-hover-color: var(--m3e-tertiary-fab-hover-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-background-focus-color: var(--m3e-tertiary-fab-focus-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-ripple-color: var(--m3e-tertiary-fab-ripple-color, ${DesignToken$1.color.onTertiaryContainer}); } :host { transform: scaleX(0.8); } :host(:state(
|
|
15200
|
+
display ${DesignToken$1.motion.spring.fastEffects} allow-discrete`)}; } .base { display: contents; } :host([variant="primary"]) .base { --_fab-menu-item-color: var(--m3e-primary-fab-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-item-container-color: var(--m3e-primary-fab-container-color, ${DesignToken$1.color.primaryContainer}); --_fab-menu-background-hover-color: var(--m3e-primary-fab-hover-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-background-focus-color: var(--m3e-primary-fab-focus-color, ${DesignToken$1.color.onPrimaryContainer}); --_fab-menu-ripple-color: var(--m3e-primary-fab-ripple-color, ${DesignToken$1.color.onPrimaryContainer}); } :host([variant="secondary"]) .base { --_fab-menu-item-color: var(--m3e-secondary-fab-color, ${DesignToken$1.color.onSecondaryContainer}); --_fab-menu-item-container-color: var( --m3e-secondary-fab-container-color, ${DesignToken$1.color.secondaryContainer} ); --_fab-menu-background-hover-color: var( --m3e-secondary-fab-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --_fab-menu-background-focus-color: var( --m3e-secondary-fab-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --_fab-menu-ripple-color: var(--m3e-secondary-fab-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host([variant="tertiary"]) .base { --_fab-menu-item-color: var(--m3e-tertiary-fab-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-item-container-color: var(--m3e-tertiary-fab-container-color, ${DesignToken$1.color.tertiaryContainer}); --_fab-menu-background-hover-color: var(--m3e-tertiary-fab-hover-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-background-focus-color: var(--m3e-tertiary-fab-focus-color, ${DesignToken$1.color.onTertiaryContainer}); --_fab-menu-ripple-color: var(--m3e-tertiary-fab-ripple-color, ${DesignToken$1.color.onTertiaryContainer}); } :host { transform: scaleX(0.8); } :host(:is(:state(--left), :--left)) { align-items: flex-start; transform-origin: left; } :host(:is(:state(--right), :--right)) { align-items: flex-end; transform-origin: right; } :host(:popover-open) { transform: scaleX(1); display: inline-flex; opacity: 1; } :host::backdrop { background-color: transparent; } @starting-style { :host(:popover-open) { opacity: 0; } :host(:popover-open) { transform: scaleX(0.8); } } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } } @media (forced-colors: active) { :host { border-radius: ${DesignToken$1.shape.corner.medium}; outline: 1px solid MenuText; background-color: Menu; } }`;
|
|
15142
15201
|
__decorate([property({
|
|
15143
15202
|
reflect: true
|
|
15144
15203
|
})], M3eFabMenuElement.prototype, "variant", void 0);
|
|
@@ -15352,10 +15411,10 @@ let M3eFormFieldElement = class M3eFormFieldElement extends ReconnectedCallback$
|
|
|
15352
15411
|
target: null,
|
|
15353
15412
|
callback: focused => {
|
|
15354
15413
|
focused = focused && !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.disabled ?? true);
|
|
15355
|
-
setCustomState$1(this, "
|
|
15414
|
+
setCustomState$1(this, "--no-animate", false);
|
|
15356
15415
|
__classPrivateFieldSet(this, _M3eFormFieldElement_focused, focused, "f");
|
|
15357
15416
|
if (focused) {
|
|
15358
|
-
setCustomState$1(this, "
|
|
15417
|
+
setCustomState$1(this, "--float-label", true);
|
|
15359
15418
|
} else {
|
|
15360
15419
|
this._invalid = !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.checkValidity?.() ?? true);
|
|
15361
15420
|
this.notifyControlStateChange();
|
|
@@ -15383,7 +15442,7 @@ let M3eFormFieldElement = class M3eFormFieldElement extends ReconnectedCallback$
|
|
|
15383
15442
|
/** @private */
|
|
15384
15443
|
_M3eFormFieldElement_pressedController.set(this, new PressedController$1(this, {
|
|
15385
15444
|
target: null,
|
|
15386
|
-
callback: pressed => setCustomState$1(this, "
|
|
15445
|
+
callback: pressed => setCustomState$1(this, "--pressed", pressed && !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.disabled ?? true))
|
|
15387
15446
|
}));
|
|
15388
15447
|
/** @private */
|
|
15389
15448
|
_M3eFormFieldElement_focused.set(this, false);
|
|
@@ -15420,7 +15479,7 @@ let M3eFormFieldElement = class M3eFormFieldElement extends ReconnectedCallback$
|
|
|
15420
15479
|
*/
|
|
15421
15480
|
this.floatLabel = "auto";
|
|
15422
15481
|
new HoverController$1(this, {
|
|
15423
|
-
callback: () => setCustomState$1(this, "
|
|
15482
|
+
callback: () => setCustomState$1(this, "--no-animate", false)
|
|
15424
15483
|
});
|
|
15425
15484
|
}
|
|
15426
15485
|
/** A reference to the element used to anchor dropdown menus. */
|
|
@@ -15437,16 +15496,16 @@ let M3eFormFieldElement = class M3eFormFieldElement extends ReconnectedCallback$
|
|
|
15437
15496
|
*/
|
|
15438
15497
|
notifyControlStateChange(checkValidity = false) {
|
|
15439
15498
|
this._required = __classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.required === true;
|
|
15440
|
-
setCustomState$1(this, "
|
|
15441
|
-
setCustomState$1(this, "
|
|
15442
|
-
setCustomState$1(this, "
|
|
15499
|
+
setCustomState$1(this, "--required", this._required);
|
|
15500
|
+
setCustomState$1(this, "--disabled", __classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.disabled === true);
|
|
15501
|
+
setCustomState$1(this, "--readonly", isReadOnlyMixin$1(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")) && __classPrivateFieldGet(this, _M3eFormFieldElement_control, "f").readOnly === true);
|
|
15443
15502
|
if (this.floatLabel === "auto") {
|
|
15444
|
-
setCustomState$1(this, "
|
|
15503
|
+
setCustomState$1(this, "--float-label", __classPrivateFieldGet(this, _M3eFormFieldElement_instances, "a", _M3eFormFieldElement_shouldFloatLabel_get) || __classPrivateFieldGet(this, _M3eFormFieldElement_focused, "f"));
|
|
15445
15504
|
}
|
|
15446
15505
|
if (checkValidity) {
|
|
15447
15506
|
this._invalid = !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.checkValidity?.() ?? true);
|
|
15448
15507
|
}
|
|
15449
|
-
setCustomState$1(this, "
|
|
15508
|
+
setCustomState$1(this, "--invalid", this._invalid);
|
|
15450
15509
|
this._validationMessage = __classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.validationMessage ?? "";
|
|
15451
15510
|
if (!this.isUpdatePending) {
|
|
15452
15511
|
this.performUpdate();
|
|
@@ -15456,7 +15515,7 @@ let M3eFormFieldElement = class M3eFormFieldElement extends ReconnectedCallback$
|
|
|
15456
15515
|
connectedCallback() {
|
|
15457
15516
|
super.connectedCallback();
|
|
15458
15517
|
// Label animations are disabled on initial paint.
|
|
15459
|
-
setCustomState$1(this, "
|
|
15518
|
+
setCustomState$1(this, "--no-animate", true);
|
|
15460
15519
|
}
|
|
15461
15520
|
/** @inheritdoc */
|
|
15462
15521
|
disconnectedCallback() {
|
|
@@ -15525,15 +15584,15 @@ _M3eFormFieldElement_handleLabelSlotChange = function _M3eFormFieldElement_handl
|
|
|
15525
15584
|
const assignedElements = e.target.assignedElements({
|
|
15526
15585
|
flatten: true
|
|
15527
15586
|
});
|
|
15528
|
-
setCustomState$1(this, "
|
|
15587
|
+
setCustomState$1(this, "--with-label", assignedElements.length > 0);
|
|
15529
15588
|
this._pseudoLabel = assignedElements[0]?.textContent ?? "";
|
|
15530
15589
|
};
|
|
15531
15590
|
_M3eFormFieldElement_handlePrefixSlotChange = function _M3eFormFieldElement_handlePrefixSlotChange(e) {
|
|
15532
|
-
setCustomState$1(this, "
|
|
15591
|
+
setCustomState$1(this, "--with-prefix", hasAssignedNodes$1(e.target));
|
|
15533
15592
|
__classPrivateFieldGet(this, _M3eFormFieldElement_resizeController, "f").observe(this._prefix);
|
|
15534
15593
|
};
|
|
15535
15594
|
_M3eFormFieldElement_handleSuffixSlotChange = function _M3eFormFieldElement_handleSuffixSlotChange(e) {
|
|
15536
|
-
setCustomState$1(this, "
|
|
15595
|
+
setCustomState$1(this, "--with-suffix", hasAssignedNodes$1(e.target));
|
|
15537
15596
|
};
|
|
15538
15597
|
_M3eFormFieldElement_handlePrefixResize = function _M3eFormFieldElement_handlePrefixResize() {
|
|
15539
15598
|
if (this.variant === "outlined") {
|
|
@@ -15585,8 +15644,8 @@ _M3eFormFieldElement_changeControl = function _M3eFormFieldElement_changeControl
|
|
|
15585
15644
|
} else {
|
|
15586
15645
|
this._base.style.removeProperty("--_form-field-cursor");
|
|
15587
15646
|
}
|
|
15588
|
-
setCustomState$1(this, "
|
|
15589
|
-
if (hasCustomState$1(this, "
|
|
15647
|
+
setCustomState$1(this, "--with-select", __classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.tagName === "M3E-SELECT");
|
|
15648
|
+
if (hasCustomState$1(this, "--with-select")) {
|
|
15590
15649
|
this._base.style.setProperty("--_form-field-cursor", "pointer");
|
|
15591
15650
|
}
|
|
15592
15651
|
if (__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")) {
|
|
@@ -15638,14 +15697,14 @@ _M3eFormFieldElement_handleErrorChange = function _M3eFormFieldElement_handleErr
|
|
|
15638
15697
|
}
|
|
15639
15698
|
};
|
|
15640
15699
|
(() => {
|
|
15641
|
-
registerStyleSheet$1(css`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${DesignToken$1.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:state(-float-label)):state(-with-label) input::placeholder, m3e-form-field[float-label="auto"]:not(:state(-float-label)):state(-with-label) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${DesignToken$1.density.calc(-2)}) / 4); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`);
|
|
15700
|
+
registerStyleSheet$1(css`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${DesignToken$1.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) input::placeholder, m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${DesignToken$1.density.calc(-2)}) / 4); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`);
|
|
15642
15701
|
})();
|
|
15643
15702
|
/** The styles of the element. */
|
|
15644
|
-
M3eFormFieldElement.styles = css`:host { display: inline-flex; flex-direction: column; vertical-align: middle; 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}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:state(
|
|
15703
|
+
M3eFormFieldElement.styles = css`:host { display: inline-flex; flex-direction: column; vertical-align: middle; 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}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:is(:state(--disabled), :--disabled))) .base { cursor: var(--_form-field-cursor); } .base { display: flex; align-items: center; position: relative; 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} ); --_form-field-label-line-height: var( --m3e-form-field-label-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight} ); } .content { display: flex; align-items: center; position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--m3e-form-field-icon-size, 1.5rem); } .prefix, .suffix { display: flex; align-items: center; position: relative; user-select: none; flex: none; font-size: var(--m3e-form-field-icon-size, 1.5rem); } .prefix-text, .suffix-text { opacity: 1; transition: opacity ${DesignToken$1.motion.duration.extraLong1}; user-select: none; flex: none; } .input { display: inline-flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } .label { display: flex; position: absolute; pointer-events: none; user-select: none; top: 0; left: 0; right: 0; font-size: var(--m3e-form-field-label-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-label-font-weight, ${DesignToken$1.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-label-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-label-tracking, ${DesignToken$1.typescale.standard.body.small.tracking}); color: var(--_form-field-label-color, inherit); transition: ${unsafeCSS(`top ${DesignToken$1.motion.duration.short4},
|
|
15645
15704
|
font-size ${DesignToken$1.motion.duration.short4},
|
|
15646
|
-
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(
|
|
15705
|
+
line-height ${DesignToken$1.motion.duration.short4}`)}; } :host(:is(:state(--with-select), :--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(:is(:state(--invalid), :--invalid))) .subscript { opacity: 0; margin-top: 0px; margin-bottom: 0.25rem; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short4},
|
|
15647
15706
|
margin-top ${DesignToken$1.motion.duration.short4},
|
|
15648
|
-
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; } }`;
|
|
15707
|
+
margin-bottom ${DesignToken$1.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed)) .subscript { opacity: 1; margin-top: 0.25rem; margin-bottom: 0; } :host(:is(:state(--invalid), :--invalid)) .hint { display: none; } :host(:not(:is(:state(--invalid), :--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(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .prefix-text, :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:is(:state(--with-prefix), :--with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:is(:state(--with-suffix), :--with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix { margin-inline-start: unset; } :host(:is(:state(--with-select), :--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"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--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(:is(:state(--with-label), :--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"]:is(:state(--with-prefix), :--with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--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(:is(:state(--disabled), :--disabled))) .base:hover::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--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(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--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(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) { color: var(--m3e-form-field-color, ${DesignToken$1.color.onSurface}); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken$1.color.outline}); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--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(:is(:state(--disabled), :--disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${DesignToken$1.color.surfaceContainerHighest} ); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--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(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${DesignToken$1.color.error}); } :host(:is(:state(--disabled), :--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(:is(:state(--disabled), :--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(:is(:state(--no-animate), :--no-animate)) *, :host(:is(:state(--no-animate), :--no-animate)) *::before, :host(:is(:state(--no-animate), :--no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:is(:state(--disabled), :--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; } }`;
|
|
15649
15708
|
__decorate([query(".base")], M3eFormFieldElement.prototype, "_base", void 0);
|
|
15650
15709
|
__decorate([query(".prefix")], M3eFormFieldElement.prototype, "_prefix", void 0);
|
|
15651
15710
|
__decorate([query(".error")], M3eFormFieldElement.prototype, "_error", void 0);
|
|
@@ -16207,7 +16266,7 @@ const IconButtonSizeToken = {
|
|
|
16207
16266
|
|
|
16208
16267
|
/** @private */
|
|
16209
16268
|
function iconButtonStyle(size) {
|
|
16210
|
-
return css`:host([size="${unsafeCSS(size)}"]) .base { height: ${IconButtonSizeToken[size].containerHeight}; } :host([size="${unsafeCSS(size)}"][width="default"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].defaultLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].defaultTrailingSpace}; } :host([size="${unsafeCSS(size)}"][width="narrow"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].narrowLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].narrowTrailingSpace}; } :host([size="${unsafeCSS(size)}"][width="wide"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].wideLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].wideTrailingSpace}; } :host([size="${unsafeCSS(size)}"]) .icon { font-size: ${IconButtonSizeToken[size].iconSize}; } :host([size="${unsafeCSS(size)}"]) .base { outline-offset: calc(0px - ${IconButtonSizeToken[size].outlineThickness}); outline-width: ${IconButtonSizeToken[size].outlineThickness}; } :host(:not(:state(
|
|
16269
|
+
return css`:host([size="${unsafeCSS(size)}"]) .base { height: ${IconButtonSizeToken[size].containerHeight}; } :host([size="${unsafeCSS(size)}"][width="default"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].defaultLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].defaultTrailingSpace}; } :host([size="${unsafeCSS(size)}"][width="narrow"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].narrowLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].narrowTrailingSpace}; } :host([size="${unsafeCSS(size)}"][width="wide"]) .wrapper { padding-inline-start: ${IconButtonSizeToken[size].wideLeadingSpace}; padding-inline-end: ${IconButtonSizeToken[size].wideTrailingSpace}; } :host([size="${unsafeCSS(size)}"]) .icon { font-size: ${IconButtonSizeToken[size].iconSize}; } :host([size="${unsafeCSS(size)}"]) .base { outline-offset: calc(0px - ${IconButtonSizeToken[size].outlineThickness}); outline-width: ${IconButtonSizeToken[size].outlineThickness}; } :host( :not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="rounded"]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: var(--_button-shape, ${IconButtonSizeToken[size].shapeRound}); } :host(:not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="square"]) .base { border-radius: ${IconButtonSizeToken[size].shapeSquare}; } :host( :not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="rounded"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: ${IconButtonSizeToken[size].selectedShapeRound}; } :host( :not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"][shape="square"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: var(--_button-shape, ${IconButtonSizeToken[size].selectedShapeSquare}); } :host(:not(:is(:state(--connected), :--connected))[size="${unsafeCSS(size)}"]:is(:state(--pressed), :--pressed)) .base { border-radius: ${IconButtonSizeToken[size].shapePressedMorph}; } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="rounded"]) .base { border-start-start-radius: var( --_button-rounded-start-shape, var(--_button-shape, ${IconButtonSizeToken[size].shapeRound}) ); border-end-start-radius: var( --_button-rounded-start-shape, var(--_button-shape, ${IconButtonSizeToken[size].shapeRound}) ); border-start-end-radius: var( --_button-rounded-end-shape, var(--_button-shape, ${IconButtonSizeToken[size].shapeRound}) ); border-end-end-radius: var( --_button-rounded-end-shape, var(--_button-shape, ${IconButtonSizeToken[size].shapeRound}) ); } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="square"]) .base { border-start-start-radius: var(--_button-square-start-shape, ${IconButtonSizeToken[size].shapeSquare}); border-end-start-radius: var(--_button-square-start-shape, ${IconButtonSizeToken[size].shapeSquare}); border-start-end-radius: var(--_button-square-end-shape, ${IconButtonSizeToken[size].shapeSquare}); border-end-end-radius: var(--_button-square-end-shape, ${IconButtonSizeToken[size].shapeSquare}); } :host( :is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"][shape="square"][toggle][selected]:not( :is(:state(--pressed), :--pressed) ) ) .base { border-radius: var(--_button-shape, ${IconButtonSizeToken[size].selectedShapeSquare}); } :host(:is(:state(--connected), :--connected)[size="${unsafeCSS(size)}"]:is(:state(--pressed), :--pressed)) .base { border-start-start-radius: var( --_button-start-shape-pressed-morph, ${IconButtonSizeToken[size].shapePressedMorph} ); border-end-start-radius: var(--_button-start-shape-pressed-morph, ${IconButtonSizeToken[size].shapePressedMorph}); border-start-end-radius: var(--_button-end-shape-pressed-morph, ${IconButtonSizeToken[size].shapePressedMorph}); border-end-end-radius: var(--_button-end-shape-pressed-morph, ${IconButtonSizeToken[size].shapePressedMorph}); }`;
|
|
16211
16270
|
}
|
|
16212
16271
|
/**
|
|
16213
16272
|
* Size variant styles for `M3eIconButtonElement`.
|
|
@@ -16219,8 +16278,8 @@ const IconButtonSizeStyle = [iconButtonStyle("extra-small"), iconButtonStyle("sm
|
|
|
16219
16278
|
* Baseline styles for `M3eIconButtonElement`.
|
|
16220
16279
|
* @internal
|
|
16221
16280
|
*/
|
|
16222
|
-
const IconButtonStyle = 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}`)}; } .touch { position: absolute; aspect-ratio: 1 / 1; height: 3rem; left: auto; right: auto; } :host(:state(
|
|
16223
|
-
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; transition: ${unsafeCSS(`padding-inline ${DesignToken$1.motion.spring.fastEffects}`)}; } .icon { transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; --m3e-icon-size: 1em; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } ::slotted(*) { font-size: inherit !important; flex: none; transform: var(--_icon-button-icon-transform); transform-origin: center center; transition: ${unsafeCSS(`transform var(--_icon-button-icon-transform-transition, ${DesignToken$1.motion.spring.fastEffects})`)}; } ::slotted(svg) { width: 1em; height: 1em; } :host([toggle]:not([selected])) .base.with-selected-icon slot[name="selected"], :host([toggle][selected]) .base.with-selected-icon slot:not([name]) { display: none; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } :host(:state(
|
|
16281
|
+
const IconButtonStyle = 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}`)}; } .touch { position: absolute; aspect-ratio: 1 / 1; height: 3rem; left: auto; right: auto; } :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
|
|
16282
|
+
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; transition: ${unsafeCSS(`padding-inline ${DesignToken$1.motion.spring.fastEffects}`)}; } .icon { transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; --m3e-icon-size: 1em; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } ::slotted(*) { font-size: inherit !important; flex: none; transform: var(--_icon-button-icon-transform); transform-origin: center center; transition: ${unsafeCSS(`transform var(--_icon-button-icon-transform-transition, ${DesignToken$1.motion.spring.fastEffects})`)}; } ::slotted(svg) { width: 1em; height: 1em; } :host([toggle]:not([selected])) .base.with-selected-icon slot[name="selected"], :host([toggle][selected]) .base.with-selected-icon slot:not([name]) { display: none; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } :host(:is(:state(--grouped), :--grouped):is(:state(--connected), :--connected)) { flex: 1 1 auto; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):not( :is(:state(--adjacent-pressed), :--adjacent-pressed) ):not(:is(:state(--pressed), :--pressed)) ) { flex-shrink: 0; flex-grow: 0; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--adjacent-pressed), :--adjacent-pressed ):not(:is(:state(--pressed), :--pressed)) ) { flex-shrink: 1; min-width: 0; } :host( :is(:state(--grouped), :--grouped):not(:is(:state(--connected), :--connected)):is( :state(--pressed), :--pressed ):not([disabled-interactive]):not(:disabled) ) { flex-shrink: 0; flex-basis: calc( var(--_button-width) + calc(var(--_button-width) * var(--m3e-standard-button-group-width-multiplier, 0.15)) ); } @media (forced-colors: active) { .base, .icon { transition: none; } :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base { transition: border-radius ${DesignToken$1.motion.spring.fastEffects}; } :host([variant]:not(:disabled):not([disabled-interactive]):not([toggle])) .base { background-color: ButtonFace; outline-color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive]):not([toggle])) .icon { color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .base { background-color: ButtonFace; outline-color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .icon, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle]:not([selected])) .icon, :host([variant]:not(:disabled):not([disabled-interactive])[toggle]:not([selected]):focus) .icon { color: ButtonText; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]) .base { background-color: ButtonText; outline: none; } :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]) .icon, :host([variant]:hover:not(:disabled):not([disabled-interactive])[toggle][selected]) .icon, :host([variant]:not(:disabled):not([disabled-interactive])[toggle][selected]:focus) .icon { forced-color-adjust: none; color: ButtonFace; background-color: ButtonText; } :host([variant]:disabled) .base, :host([variant][disabled-interactive]) .base { outline-color: GrayText; background-color: unset; } :host([variant]:disabled) .icon, :host([variant][disabled-interactive]) .icon { color: GrayText; } .base { outline-style: solid; } :host([size="extra-small"]) .base { outline-offset: calc(0px - var(--m3e-icon-button-extra-small-outline-thickness, 1px)); outline-width: var(--m3e-icon-button-extra-small-outline-thickness, 1px); } :host([size="small"]) .base { outline-offset: calc(0px - var(--m3e-icon-button-small-outline-thickness, 1px)); outline-width: var(--m3e-icon-button-small-outline-thickness, 1px); } :host([size="medium"]) .base { outline-offset: calc(0px - var(--m3e-icon-button-medium-outline-thickness, 1px)); outline-width: var(--m3e-icon-button-medium-outline-thickness, 1px); } :host([size="large"]) .base { outline-offset: calc(0px - var(--m3e-icon-button-large-outline-thickness, 2px)); outline-width: var(--m3e-icon-button-large-outline-thickness, 2px); } :host([size="extra-large"]) .base { outline-offset: calc(0px - var(--m3e-icon-button-extra-large-outline-thickness, 3px)); outline-width: var(--m3e-icon-button-extra-large-outline-thickness, 3px); } } @media (prefers-reduced-motion) { :host(:is(:state(--pressed), :--pressed)) .base, :host(:is(:state(--resting), :--resting)) .base, .base, .wrapper, .icon { transition: none; } }`;
|
|
16224
16283
|
|
|
16225
16284
|
/**
|
|
16226
16285
|
* Component design tokens that control the appearance variants of `M3eIconButtonElement`.
|
|
@@ -16626,7 +16685,7 @@ const IconButtonVariantToken = {
|
|
|
16626
16685
|
|
|
16627
16686
|
/** @private */
|
|
16628
16687
|
function iconButtonVariantStyle(variant) {
|
|
16629
|
-
return css`:host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].containerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.stateLayerColor}; --m3e-state-layer-hover-opacity: ${IconButtonVariantToken[variant].hover.stateLayerOpacity}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.stateLayerColor}; --m3e-state-layer-focus-opacity: ${IconButtonVariantToken[variant].focus.stateLayerOpacity}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.stateLayerColor}; --m3e-ripple-opacity: ${IconButtonVariantToken[variant].pressed.stateLayerOpacity}; --m3e-elevation-level: ${IconButtonVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-hover-level: ${IconButtonVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-focus-level: ${IconButtonVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-pressed-level: ${IconButtonVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].unselectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.unselectedStateLayerColor}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.unselectedStateLayerColor}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.unselectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].selectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.selectedStateLayerColor}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.selectedStateLayerColor}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.selectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:state(
|
|
16688
|
+
return css`:host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].containerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.stateLayerColor}; --m3e-state-layer-hover-opacity: ${IconButtonVariantToken[variant].hover.stateLayerOpacity}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.stateLayerColor}; --m3e-state-layer-focus-opacity: ${IconButtonVariantToken[variant].focus.stateLayerOpacity}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.stateLayerColor}; --m3e-ripple-opacity: ${IconButtonVariantToken[variant].pressed.stateLayerOpacity}; --m3e-elevation-level: ${IconButtonVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-hover-level: ${IconButtonVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-focus-level: ${IconButtonVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-pressed-level: ${IconButtonVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].unselectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.unselectedStateLayerColor}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.unselectedStateLayerColor}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.unselectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .base { background-color: ${IconButtonVariantToken[variant].selectedContainerColor ?? unsafeCSS("unset")}; --m3e-state-layer-hover-color: ${IconButtonVariantToken[variant].hover.selectedStateLayerColor}; --m3e-state-layer-focus-color: ${IconButtonVariantToken[variant].focus.selectedStateLayerColor}; --m3e-ripple-color: ${IconButtonVariantToken[variant].pressed.selectedStateLayerColor}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .base { outline-color: ${IconButtonVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")}; } :host( [variant="${unsafeCSS(variant)}"]:is(:state(--pressed), :--pressed):not(:disabled):not([disabled-interactive]) ) .base { outline-color: ${IconButtonVariantToken[variant].pressed.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:focus:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].focus.iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):focus:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].focus.unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:focus:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].focus.selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:hover:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].hover.iconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle]:not([selected]):hover:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].hover.unselectedIconColor}; } :host([variant="${unsafeCSS(variant)}"][toggle][selected]:hover:not(:disabled):not([disabled-interactive])) .icon { color: ${IconButtonVariantToken[variant].hover.selectedIconColor}; } :host( [variant="${unsafeCSS(variant)}"]:is(:state(--pressed), :--pressed):not(:disabled):not([disabled-interactive]) ) .icon { color: ${IconButtonVariantToken[variant].pressed.iconColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle]:not([selected]):is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .icon { color: ${IconButtonVariantToken[variant].pressed.unselectedIconColor}; } :host( [variant="${unsafeCSS(variant)}"][toggle][selected]:is(:state(--pressed), :--pressed):not(:disabled):not( [disabled-interactive] ) ) .icon { color: ${IconButtonVariantToken[variant].pressed.selectedIconColor}; } :host([variant="${unsafeCSS(variant)}"]:disabled) .base, :host([variant="${unsafeCSS(variant)}"][disabled-interactive]) .base { outline-color: ${IconButtonVariantToken[variant].disabled.outlineColor ?? unsafeCSS("unset")}; background-color: color-mix( in srgb, ${IconButtonVariantToken[variant].disabled.containerColor} ${IconButtonVariantToken[variant].disabled.containerOpacity}, transparent ); } :host([variant="${unsafeCSS(variant)}"]:disabled) .icon, :host([variant="${unsafeCSS(variant)}"][disabled-interactive]) .icon { color: color-mix( in srgb, ${IconButtonVariantToken[variant].disabled.iconColor} ${IconButtonVariantToken[variant].disabled.iconOpacity}, transparent ); }`;
|
|
16630
16689
|
}
|
|
16631
16690
|
/**
|
|
16632
16691
|
* Appearance variant styles for `M3eIconButtonElement`.
|
|
@@ -16684,9 +16743,10 @@ var _M3eIconButtonElement_instances, _M3eIconButtonElement_clickHandler, _M3eIco
|
|
|
16684
16743
|
* @attr variant - The appearance variant of the button.
|
|
16685
16744
|
* @attr width - The width of the button.
|
|
16686
16745
|
*
|
|
16746
|
+
* @fires beforeinput - Dispatched before a toggle button's selected state changes.
|
|
16687
16747
|
* @fires input - Dispatched when a toggle button's selected state changes.
|
|
16688
16748
|
* @fires change - Dispatched when a toggle button's selected state changes.
|
|
16689
|
-
* @fires click -
|
|
16749
|
+
* @fires click - Dispatched when the element is clicked.
|
|
16690
16750
|
*
|
|
16691
16751
|
* @cssprop --m3e-icon-button-container-height - Height of the container for all size variants.
|
|
16692
16752
|
* @cssprop --m3e-icon-button-outline-thickness - Outline thickness for all size variants.
|
|
@@ -17010,7 +17070,7 @@ let M3eIconButtonElement = class M3eIconButtonElement extends KeyboardClick$1(Li
|
|
|
17010
17070
|
}
|
|
17011
17071
|
/** Whether the button is contained by a button group. */
|
|
17012
17072
|
get grouped() {
|
|
17013
|
-
return hasCustomState$1(this, "
|
|
17073
|
+
return hasCustomState$1(this, "--grouped");
|
|
17014
17074
|
}
|
|
17015
17075
|
/** @inheritdoc */
|
|
17016
17076
|
render() {
|
|
@@ -17024,11 +17084,11 @@ let M3eIconButtonElement = class M3eIconButtonElement extends KeyboardClick$1(Li
|
|
|
17024
17084
|
/** @inheritdoc */
|
|
17025
17085
|
disconnectedCallback() {
|
|
17026
17086
|
super.disconnectedCallback();
|
|
17027
|
-
["
|
|
17087
|
+
["--pressed", "--resting", "--grouped", "--connected"].forEach(x => deleteCustomState$1(this, x));
|
|
17028
17088
|
this._base?.style.removeProperty("--_button-shape");
|
|
17029
17089
|
this.style.removeProperty("--_button-width");
|
|
17030
17090
|
this.style.removeProperty("--_adjacent-button-width");
|
|
17031
|
-
deleteCustomState$1(this, "
|
|
17091
|
+
deleteCustomState$1(this, "--adjacent-pressed");
|
|
17032
17092
|
this.removeEventListener("click", __classPrivateFieldGet(this, _M3eIconButtonElement_clickHandler, "f"));
|
|
17033
17093
|
}
|
|
17034
17094
|
/** @inheritdoc */
|
|
@@ -17040,8 +17100,8 @@ let M3eIconButtonElement = class M3eIconButtonElement extends KeyboardClick$1(Li
|
|
|
17040
17100
|
updated(_changedProperties) {
|
|
17041
17101
|
super.updated(_changedProperties);
|
|
17042
17102
|
if (_changedProperties.has("disabled") && this.disabled || _changedProperties.has("disabledInteractive") && this.disabledInteractive) {
|
|
17043
|
-
deleteCustomState$1(this, "
|
|
17044
|
-
deleteCustomState$1(this, "
|
|
17103
|
+
deleteCustomState$1(this, "--pressed");
|
|
17104
|
+
deleteCustomState$1(this, "--resting");
|
|
17045
17105
|
}
|
|
17046
17106
|
if (_changedProperties.has("toggle") || _changedProperties.has("selected")) {
|
|
17047
17107
|
this.ariaPressed = this.toggle ? `${this.selected}` : null;
|
|
@@ -17054,7 +17114,7 @@ let M3eIconButtonElement = class M3eIconButtonElement extends KeyboardClick$1(Li
|
|
|
17054
17114
|
}
|
|
17055
17115
|
/** @private */
|
|
17056
17116
|
_handleResize() {
|
|
17057
|
-
if (this.grouped && !hasCustomState$1(this, "
|
|
17117
|
+
if (this.grouped && !hasCustomState$1(this, "--pressed")) {
|
|
17058
17118
|
this.style.setProperty("--_button-width", `${this.clientWidth}px`);
|
|
17059
17119
|
__classPrivateFieldGet(this, _M3eIconButtonElement_instances, "m", _M3eIconButtonElement_updateButtonShape).call(this, true);
|
|
17060
17120
|
}
|
|
@@ -17073,8 +17133,8 @@ _M3eIconButtonElement_updateButtonShape = function _M3eIconButtonElement_updateB
|
|
|
17073
17133
|
}
|
|
17074
17134
|
};
|
|
17075
17135
|
_M3eIconButtonElement_handlePressedChange = function _M3eIconButtonElement_handlePressedChange(pressed) {
|
|
17076
|
-
setCustomState$1(this, "
|
|
17077
|
-
setCustomState$1(this, "
|
|
17136
|
+
setCustomState$1(this, "--pressed", pressed);
|
|
17137
|
+
setCustomState$1(this, "--resting", !pressed);
|
|
17078
17138
|
const group = this.closest("m3e-button-group");
|
|
17079
17139
|
if (group) {
|
|
17080
17140
|
const clientWidth = this.getBoundingClientRect().width;
|
|
@@ -17084,13 +17144,13 @@ _M3eIconButtonElement_handlePressedChange = function _M3eIconButtonElement_handl
|
|
|
17084
17144
|
const button = buttons[i];
|
|
17085
17145
|
if (i === index - 1) {
|
|
17086
17146
|
button.style.setProperty("--_adjacent-button-width", `${clientWidth}px`);
|
|
17087
|
-
setCustomState$1(button, "
|
|
17147
|
+
setCustomState$1(button, "--adjacent-pressed", pressed);
|
|
17088
17148
|
} else if (i === index + 1) {
|
|
17089
17149
|
button.style.setProperty("--_adjacent-button-width", `${clientWidth}px`);
|
|
17090
|
-
setCustomState$1(button, "
|
|
17150
|
+
setCustomState$1(button, "--adjacent-pressed", pressed);
|
|
17091
17151
|
} else {
|
|
17092
17152
|
button.style.removeProperty("--_adjacent-button-width");
|
|
17093
|
-
deleteCustomState$1(button, "
|
|
17153
|
+
deleteCustomState$1(button, "--adjacent-pressed");
|
|
17094
17154
|
}
|
|
17095
17155
|
}
|
|
17096
17156
|
}
|
|
@@ -17101,19 +17161,17 @@ _M3eIconButtonElement_handleClick = function _M3eIconButtonElement_handleClick(e
|
|
|
17101
17161
|
e.stopImmediatePropagation();
|
|
17102
17162
|
}
|
|
17103
17163
|
if (this.toggle && !e.defaultPrevented) {
|
|
17104
|
-
this.
|
|
17105
|
-
// Dispatch an input event and if not prevented, dispatch a change event.
|
|
17106
|
-
// Otherwise, reset the selected state.
|
|
17107
|
-
if (this.dispatchEvent(new Event("input", {
|
|
17164
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
17108
17165
|
bubbles: true,
|
|
17109
|
-
composed: true,
|
|
17110
17166
|
cancelable: true
|
|
17111
17167
|
}))) {
|
|
17168
|
+
this.selected = !this.selected;
|
|
17169
|
+
this.dispatchEvent(new Event("input", {
|
|
17170
|
+
bubbles: true
|
|
17171
|
+
}));
|
|
17112
17172
|
this.dispatchEvent(new Event("change", {
|
|
17113
17173
|
bubbles: true
|
|
17114
17174
|
}));
|
|
17115
|
-
} else {
|
|
17116
|
-
this.selected = !this.selected;
|
|
17117
17175
|
}
|
|
17118
17176
|
}
|
|
17119
17177
|
};
|
|
@@ -17278,7 +17336,7 @@ let M3eListItemElement = class M3eListItemElement extends ReconnectedCallback$1(
|
|
|
17278
17336
|
_handleLeadingSlotChange(e) {
|
|
17279
17337
|
const contentType = __classPrivateFieldGet(this, _M3eListItemElement_leadingContentType, "f");
|
|
17280
17338
|
__classPrivateFieldSet(this, _M3eListItemElement_leadingContentType, __classPrivateFieldGet(this, _M3eListItemElement_instances, "m", _M3eListItemElement_getSlotContentType).call(this, e.target), "f");
|
|
17281
|
-
setCustomState$1(this, "
|
|
17339
|
+
setCustomState$1(this, "--has-leading", __classPrivateFieldGet(this, _M3eListItemElement_leadingContentType, "f") !== undefined);
|
|
17282
17340
|
if (contentType !== __classPrivateFieldGet(this, _M3eListItemElement_leadingContentType, "f")) {
|
|
17283
17341
|
this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyLeadingContentTypeChange(contentType, __classPrivateFieldGet(this, _M3eListItemElement_leadingContentType, "f"));
|
|
17284
17342
|
}
|
|
@@ -17287,7 +17345,7 @@ let M3eListItemElement = class M3eListItemElement extends ReconnectedCallback$1(
|
|
|
17287
17345
|
_handleTrailingSlotChange(e) {
|
|
17288
17346
|
const contentType = __classPrivateFieldGet(this, _M3eListItemElement_trailingContentType, "f");
|
|
17289
17347
|
__classPrivateFieldSet(this, _M3eListItemElement_trailingContentType, __classPrivateFieldGet(this, _M3eListItemElement_instances, "m", _M3eListItemElement_getSlotContentType).call(this, e.target), "f");
|
|
17290
|
-
setCustomState$1(this, "
|
|
17348
|
+
setCustomState$1(this, "--has-trailing", __classPrivateFieldGet(this, _M3eListItemElement_trailingContentType, "f") !== undefined);
|
|
17291
17349
|
if (contentType !== __classPrivateFieldGet(this, _M3eListItemElement_trailingContentType, "f")) {
|
|
17292
17350
|
this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyTrailingContentTypeChange(contentType, __classPrivateFieldGet(this, _M3eListItemElement_trailingContentType, "f"));
|
|
17293
17351
|
}
|
|
@@ -17306,9 +17364,9 @@ _M3eListItemElement_initialize = function _M3eListItemElement_initialize() {
|
|
|
17306
17364
|
_M3eListItemElement_updateMultiline = function _M3eListItemElement_updateMultiline() {
|
|
17307
17365
|
const content = this.shadowRoot?.querySelector(".content") ?? null;
|
|
17308
17366
|
const lines = content === null ? 0 : computeLineCount$1(content);
|
|
17309
|
-
setCustomState$1(this, "
|
|
17310
|
-
setCustomState$1(this, "
|
|
17311
|
-
setCustomState$1(this, "
|
|
17367
|
+
setCustomState$1(this, "--one-line", lines <= 1);
|
|
17368
|
+
setCustomState$1(this, "--two-line", lines == 2);
|
|
17369
|
+
setCustomState$1(this, "--three-line", lines > 2);
|
|
17312
17370
|
};
|
|
17313
17371
|
_M3eListItemElement_getSlotContentType = function _M3eListItemElement_getSlotContentType(slot) {
|
|
17314
17372
|
const elements = slot.assignedElements({
|
|
@@ -17321,7 +17379,7 @@ _M3eListItemElement_getSlotContentType = function _M3eListItemElement_getSlotCon
|
|
|
17321
17379
|
return elements.length > 0 ? "text" : undefined;
|
|
17322
17380
|
};
|
|
17323
17381
|
/** The styles of the element. */
|
|
17324
|
-
M3eListItemElement.styles = css`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}, background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:state(-two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:state(-three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:state(-three-line))) .base { align-items: center; } :host(:state(-three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${DesignToken$1.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); } :host(:state(-has-leading)) slot[name="leading"], :host(:state(-has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:state(-has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:state(-has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${DesignToken$1.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${DesignToken$1.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${DesignToken$1.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${DesignToken$1.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { .base { transition: none; } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`;
|
|
17382
|
+
M3eListItemElement.styles = css`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}, background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:is(:state(--one-line), :--one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:is(:state(--one-line), :--one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:is(:state(--two-line), :--two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:is(:state(--two-line), :--two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:is(:state(--three-line), :--three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:is(:state(--three-line), :--three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:is(:state(--three-line), :--three-line))) .base { align-items: center; } :host(:is(:state(--three-line), :--three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${DesignToken$1.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); } :host(:is(:state(--has-leading), :--has-leading)) slot[name="leading"], :host(:is(:state(--has-trailing), :--has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:is(:state(--has-leading), :--has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:is(:state(--has-trailing), :--has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${DesignToken$1.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${DesignToken$1.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${DesignToken$1.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${DesignToken$1.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { .base { transition: none; } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`;
|
|
17325
17383
|
M3eListItemElement = __decorate([customElement$1("m3e-list-item")], M3eListItemElement);
|
|
17326
17384
|
|
|
17327
17385
|
var _M3eListElement_instances, _M3eListElement_items, _M3eListElement_leadingContentTypes, _M3eListElement_trailingContentTypes, _M3eListElement_handleSlotChange;
|
|
@@ -17430,7 +17488,7 @@ let M3eListElement = class M3eListElement extends AttachInternals$1(Role$1(LitEl
|
|
|
17430
17488
|
__classPrivateFieldGet(this, _M3eListElement_leadingContentTypes, "f")[newType]++;
|
|
17431
17489
|
}
|
|
17432
17490
|
["video", "image", "avatar", "icon"].forEach(x => {
|
|
17433
|
-
setCustomState$1(this,
|
|
17491
|
+
setCustomState$1(this, `--has-leading-${x}`, this.leadingContentType === x);
|
|
17434
17492
|
});
|
|
17435
17493
|
}
|
|
17436
17494
|
/**
|
|
@@ -17445,7 +17503,7 @@ let M3eListElement = class M3eListElement extends AttachInternals$1(Role$1(LitEl
|
|
|
17445
17503
|
__classPrivateFieldGet(this, _M3eListElement_trailingContentTypes, "f")[newType]--;
|
|
17446
17504
|
}
|
|
17447
17505
|
["video", "image", "avatar", "icon"].forEach(x => {
|
|
17448
|
-
setCustomState$1(this,
|
|
17506
|
+
setCustomState$1(this, `--has-trailing-${x}`, this.trailingContentType === x);
|
|
17449
17507
|
});
|
|
17450
17508
|
}
|
|
17451
17509
|
};
|
|
@@ -17458,13 +17516,13 @@ _M3eListElement_handleSlotChange = function _M3eListElement_handleSlotChange(e)
|
|
|
17458
17516
|
flatten: true
|
|
17459
17517
|
}).filter(x => x instanceof M3eListItemElement), "f");
|
|
17460
17518
|
__classPrivateFieldGet(this, _M3eListElement_items, "f").forEach((x, i) => {
|
|
17461
|
-
setCustomState$1(x, "
|
|
17462
|
-
setCustomState$1(x, "
|
|
17519
|
+
setCustomState$1(x, "--first", i === 0);
|
|
17520
|
+
setCustomState$1(x, "--last", i === __classPrivateFieldGet(this, _M3eListElement_items, "f").length - 1);
|
|
17463
17521
|
});
|
|
17464
17522
|
this.notifyItemsChange();
|
|
17465
17523
|
};
|
|
17466
17524
|
/** The styles of the element. */
|
|
17467
|
-
M3eListElement.styles = css`:host { display: flex; flex-direction: column; overflow-y: auto; box-sizing: border-box; padding-block: var(--m3e-list-block-padding, 0px); --m3e-divider-inset-start-size: var(--m3e-list-divider-inset-start-size, 1rem); --m3e-divider-inset-end-size: var(--m3e-list-divider-inset-end-size, 1.5rem); } :host([variant="standard"]) { --_list-item-leading-video-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-video-outset: var(--m3e-list-item-trailing-space, 1rem); --_expandable-list-item-expanded-toggle-icon-container-color: transparent; } :host([variant="segmented"]) { row-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); } :host([variant="segmented"]) { --m3e-list-item-container-color: var(--m3e-segmented-list-item-container-color, ${DesignToken$1.color.surface}); --m3e-list-item-disabled-container-color: var( --m3e-segmented-list-item-disabled-container-color, ${DesignToken$1.color.surface} ); --m3e-list-item-container-shape: var( --m3e-segmented-list-item-container-shape, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-list-item-hover-container-shape: var( --m3e-segmented-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium} ); --m3e-list-item-focus-container-shape: var( --m3e-segmented-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large} ); --m3e-list-item-selected-container-shape: var( --m3e-segmented-list-item-selected-container-shape, ${DesignToken$1.shape.corner.large} ); --m3e-list-item-video-shape: var(--m3e-segmented-list-item-video-shape, ${DesignToken$1.shape.corner.small}); --m3e-list-item-image-shape: var(--m3e-segmented-list-item-image-shape, ${DesignToken$1.shape.corner.small}); --m3e-list-item-between-space: var(--m3e-segmented-list-item-spacing, 0.75rem); --_expandable-list-item-items-segment-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); --_expandable-list-item-expanded-top-shape: var( --m3e-segmented-list-container-shape, ${DesignToken$1.shape.corner.large} ); } :host([variant="segmented"]) ::slotted(:state(
|
|
17525
|
+
M3eListElement.styles = css`:host { display: flex; flex-direction: column; overflow-y: auto; box-sizing: border-box; padding-block: var(--m3e-list-block-padding, 0px); --m3e-divider-inset-start-size: var(--m3e-list-divider-inset-start-size, 1rem); --m3e-divider-inset-end-size: var(--m3e-list-divider-inset-end-size, 1.5rem); } :host([variant="standard"]) { --_list-item-leading-video-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-video-outset: var(--m3e-list-item-trailing-space, 1rem); --_expandable-list-item-expanded-toggle-icon-container-color: transparent; } :host([variant="segmented"]) { row-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); } :host([variant="segmented"]) { --m3e-list-item-container-color: var(--m3e-segmented-list-item-container-color, ${DesignToken$1.color.surface}); --m3e-list-item-disabled-container-color: var( --m3e-segmented-list-item-disabled-container-color, ${DesignToken$1.color.surface} ); --m3e-list-item-container-shape: var( --m3e-segmented-list-item-container-shape, ${DesignToken$1.shape.corner.extraSmall} ); --m3e-list-item-hover-container-shape: var( --m3e-segmented-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium} ); --m3e-list-item-focus-container-shape: var( --m3e-segmented-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large} ); --m3e-list-item-selected-container-shape: var( --m3e-segmented-list-item-selected-container-shape, ${DesignToken$1.shape.corner.large} ); --m3e-list-item-video-shape: var(--m3e-segmented-list-item-video-shape, ${DesignToken$1.shape.corner.small}); --m3e-list-item-image-shape: var(--m3e-segmented-list-item-image-shape, ${DesignToken$1.shape.corner.small}); --m3e-list-item-between-space: var(--m3e-segmented-list-item-spacing, 0.75rem); --_expandable-list-item-items-segment-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); --_expandable-list-item-expanded-top-shape: var( --m3e-segmented-list-container-shape, ${DesignToken$1.shape.corner.large} ); } :host([variant="segmented"]) ::slotted(:is(:state(--first), :--first)), :host([variant="segmented"]) ::slotted(:is(:state(--has-previous-open), :--has-previous-open):not([open])) { --_list-item-top-container-shape: var(--m3e-segmented-list-container-shape, ${DesignToken$1.shape.corner.large}); } :host([variant="segmented"]) ::slotted(:is(:state(--has-next-open), :--has-next-open):not([open])), :host([variant="segmented"]) ::slotted(:is(:state(--last), :--last)) { --_list-item-bottom-container-shape: var(--m3e-segmented-list-container-shape, ${DesignToken$1.shape.corner.large}); } :host([variant="segmented"]) ::slotted(m3e-divider) { display: none; } :host(:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-video-width, 6.25rem); } :host([variant="standard"]:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-reserved-outset: var(--m3e-list-item-trailing-space, 1rem); } :host(:is(:state(--has-leading-image), :--has-leading-image)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-image-width, 3.5rem); } :host(:is(:state(--has-leading-avatar), :--has-leading-avatar)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-avatar-size, 2.5rem); } :host(:is(:state(--has-leading-icon), :--has-leading-icon)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-icon-size, 1.5rem); }`;
|
|
17468
17526
|
__decorate([property({
|
|
17469
17527
|
reflect: true
|
|
17470
17528
|
})], M3eListElement.prototype, "variant", void 0);
|
|
@@ -17516,10 +17574,10 @@ var M3eExpandableListItemElement_1;
|
|
|
17516
17574
|
* @attr disabled - Whether the element is disabled.
|
|
17517
17575
|
* @attr open - Whether the item is expanded.
|
|
17518
17576
|
*
|
|
17519
|
-
* @fires opening -
|
|
17520
|
-
* @fires opened -
|
|
17521
|
-
* @fires closing -
|
|
17522
|
-
* @fires closed -
|
|
17577
|
+
* @fires opening - Dispatched when the item begins to open.
|
|
17578
|
+
* @fires opened - Dispatched when the item has opened.
|
|
17579
|
+
* @fires closing - Dispatched when the item begins to close.
|
|
17580
|
+
* @fires closed - Dispatched when the item has closed.
|
|
17523
17581
|
*
|
|
17524
17582
|
* @cssprop --m3e-expandable-list-item-toggle-icon-container-width - Width of the toggle icon container.
|
|
17525
17583
|
* @cssprop --m3e-expandable-list-item-toggle-icon-container-shape - Border radius of the toggle icon container.
|
|
@@ -17630,13 +17688,13 @@ let M3eExpandableListItemElement = M3eExpandableListItemElement_1 = class M3eExp
|
|
|
17630
17688
|
if (_changedProperties.has("open")) {
|
|
17631
17689
|
for (let sibling = this.previousElementSibling; sibling; sibling = sibling.previousElementSibling) {
|
|
17632
17690
|
if (sibling instanceof M3eListItemElement) {
|
|
17633
|
-
setCustomState$1(sibling, "
|
|
17691
|
+
setCustomState$1(sibling, "--has-next-open", this.open);
|
|
17634
17692
|
break;
|
|
17635
17693
|
}
|
|
17636
17694
|
}
|
|
17637
17695
|
for (let sibling = this.nextElementSibling; sibling; sibling = sibling.nextElementSibling) {
|
|
17638
17696
|
if (sibling instanceof M3eListItemElement) {
|
|
17639
|
-
setCustomState$1(sibling, "
|
|
17697
|
+
setCustomState$1(sibling, "--has-previous-open", this.open);
|
|
17640
17698
|
break;
|
|
17641
17699
|
}
|
|
17642
17700
|
}
|
|
@@ -17840,7 +17898,7 @@ var _M3eListActionElement_instances, _M3eListActionElement_handleClick;
|
|
|
17840
17898
|
* @attr rel - The relationship between the `target` of the link button and the document.
|
|
17841
17899
|
* @attr target - The target of the link button.
|
|
17842
17900
|
*
|
|
17843
|
-
* @fires click -
|
|
17901
|
+
* @fires click - Dispatched when the element is clicked.
|
|
17844
17902
|
*
|
|
17845
17903
|
* @cssprop --m3e-list-item-between-space - Horizontal gap between elements.
|
|
17846
17904
|
* @cssprop --m3e-list-item-padding-inline - Horizontal padding for the list item.
|
|
@@ -17962,9 +18020,10 @@ var _M3eListOptionElement_instances, _M3eListOptionElement_value, _M3eListOption
|
|
|
17962
18020
|
* @attr disabled - Whether the element is disabled.
|
|
17963
18021
|
* @attr selected - Whether the element is selected.
|
|
17964
18022
|
*
|
|
17965
|
-
* @fires
|
|
17966
|
-
* @fires
|
|
17967
|
-
* @fires
|
|
18023
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
18024
|
+
* @fires input - Dispatched when the selected state changes.
|
|
18025
|
+
* @fires change - Dispatched when the selected state changes.
|
|
18026
|
+
* @fires click - Dispatched when the element is clicked.
|
|
17968
18027
|
*
|
|
17969
18028
|
* @cssprop --m3e-list-item-between-space - Horizontal gap between elements.
|
|
17970
18029
|
* @cssprop --m3e-list-item-padding-inline - Horizontal padding for the list item.
|
|
@@ -18105,24 +18164,23 @@ _M3eListOptionElement_handleClick = function _M3eListOptionElement_handleClick(e
|
|
|
18105
18164
|
const selectionList = this.closest("m3e-selection-list");
|
|
18106
18165
|
if (e.defaultPrevented || !selectionList) return;
|
|
18107
18166
|
if (selectionList.multi || !this.selected) {
|
|
18108
|
-
|
|
18109
|
-
this.selected = !this.selected;
|
|
18110
|
-
if (this.dispatchEvent(new Event("input", {
|
|
18167
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
18111
18168
|
bubbles: true,
|
|
18112
|
-
composed: true,
|
|
18113
18169
|
cancelable: true
|
|
18114
18170
|
}))) {
|
|
18171
|
+
this.selected = !this.selected;
|
|
18115
18172
|
selectionList[selectionManager].notifySelectionChange(this);
|
|
18173
|
+
this.dispatchEvent(new Event("input", {
|
|
18174
|
+
bubbles: true
|
|
18175
|
+
}));
|
|
18116
18176
|
this.dispatchEvent(new Event("change", {
|
|
18117
18177
|
bubbles: true
|
|
18118
18178
|
}));
|
|
18119
|
-
} else {
|
|
18120
|
-
this.selected = selected;
|
|
18121
18179
|
}
|
|
18122
18180
|
}
|
|
18123
18181
|
};
|
|
18124
18182
|
/** The styles of the element. */
|
|
18125
|
-
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)) .content { 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; } }`];
|
|
18183
|
+
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(:is(:state(--three-line), :--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)) .content { 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(:is(:state(--hide-selection), :--hide-selection)) .indicator, :host(:not(:is(:state(--hide-selection), :--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; } }`];
|
|
18126
18184
|
__decorate([query(".focus-ring")], M3eListOptionElement.prototype, "_focusRing", void 0);
|
|
18127
18185
|
__decorate([query(".state-layer")], M3eListOptionElement.prototype, "_stateLayer", void 0);
|
|
18128
18186
|
__decorate([query(".ripple")], M3eListOptionElement.prototype, "_ripple", void 0);
|
|
@@ -18149,8 +18207,9 @@ var _M3eSelectionListElement_instances, _M3eSelectionListElement_keyDownHandler,
|
|
|
18149
18207
|
* @attr multi - Whether multiple items can be selected.
|
|
18150
18208
|
* @attr variant - The appearance variant of the list.
|
|
18151
18209
|
*
|
|
18152
|
-
* @fires
|
|
18153
|
-
* @fires
|
|
18210
|
+
* @fires beforeinput - Dispatched before the selected state of an option changes.
|
|
18211
|
+
* @fires input - Dispatched when the selected state of an option changes.
|
|
18212
|
+
* @fires change - Dispatched when the selected state of an option changes.
|
|
18154
18213
|
*
|
|
18155
18214
|
* @cssprop --m3e-list-divider-inset-start-size - Start inset for dividers within the list.
|
|
18156
18215
|
* @cssprop --m3e-list-divider-inset-end-size - End inset for dividers within the list.
|
|
@@ -18244,7 +18303,7 @@ let M3eSelectionListElement = class M3eSelectionListElement extends Labelled$1(D
|
|
|
18244
18303
|
this[selectionManager].items.forEach(x => x.requestUpdate());
|
|
18245
18304
|
}
|
|
18246
18305
|
if (changedProperties.has("hideSelectionIndicator")) {
|
|
18247
|
-
this[selectionManager].items.forEach(x => setCustomState$1(x, "
|
|
18306
|
+
this[selectionManager].items.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
18248
18307
|
}
|
|
18249
18308
|
}
|
|
18250
18309
|
/** @inheritdoc */
|
|
@@ -18252,7 +18311,7 @@ let M3eSelectionListElement = class M3eSelectionListElement extends Labelled$1(D
|
|
|
18252
18311
|
const {
|
|
18253
18312
|
added
|
|
18254
18313
|
} = this[selectionManager].setItems(this.items.filter(x => x instanceof M3eListOptionElement));
|
|
18255
|
-
added.forEach(x => setCustomState$1(x, "
|
|
18314
|
+
added.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
18256
18315
|
if (!this[selectionManager].activeItem) {
|
|
18257
18316
|
this[selectionManager].updateActiveItem(added.find(x => !x.disabled));
|
|
18258
18317
|
}
|
|
@@ -18408,7 +18467,7 @@ class MenuItemElementBase extends KeyboardClick$1(Focusable$1(AttachInternals$1(
|
|
|
18408
18467
|
}
|
|
18409
18468
|
}
|
|
18410
18469
|
/** The styles of the element. */
|
|
18411
|
-
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(
|
|
18470
|
+
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(:is(:state(--first), :--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(:is(:state(--last), :--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(:is(:state(--first), :--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(:is(:state(--last), :--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; } }`;
|
|
18412
18471
|
__decorate([query(".focus-ring")], MenuItemElementBase.prototype, "_focusRing", void 0);
|
|
18413
18472
|
__decorate([query(".state-layer")], MenuItemElementBase.prototype, "_stateLayer", void 0);
|
|
18414
18473
|
__decorate([query(".ripple")], MenuItemElementBase.prototype, "_ripple", void 0);
|
|
@@ -18587,7 +18646,7 @@ var M3eMenuItemElement_1;
|
|
|
18587
18646
|
* @attr rel - The relationship between the `target` of the link button and the document.
|
|
18588
18647
|
* @attr target - The target of the link button.
|
|
18589
18648
|
*
|
|
18590
|
-
* @fires click -
|
|
18649
|
+
* @fires click - Dispatched when the element is clicked.
|
|
18591
18650
|
*
|
|
18592
18651
|
* @cssprop --m3e-menu-item-container-height - Height of the menu item container.
|
|
18593
18652
|
* @cssprop --m3e-menu-item-color - Text color for unselected, enabled menu items.
|
|
@@ -18686,10 +18745,10 @@ _M3eMenuItemElement_defaultSlotChangeHandler = function _M3eMenuItemElement_defa
|
|
|
18686
18745
|
this._hasSubmenu = __classPrivateFieldGet(this, _M3eMenuItemElement_submenuTrigger, "f") !== undefined;
|
|
18687
18746
|
};
|
|
18688
18747
|
_M3eMenuItemElement_iconSlotChangeHandler = function _M3eMenuItemElement_iconSlotChangeHandler(e) {
|
|
18689
|
-
setCustomState$1(this, "
|
|
18748
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
18690
18749
|
};
|
|
18691
18750
|
_M3eMenuItemElement_trailingIconSlotChangeHandler = function _M3eMenuItemElement_trailingIconSlotChangeHandler(e) {
|
|
18692
|
-
setCustomState$1(this, "
|
|
18751
|
+
setCustomState$1(this, "--with-trailing-icon", hasAssignedNodes$1(e.target));
|
|
18693
18752
|
};
|
|
18694
18753
|
_M3eMenuItemElement_handleClick = function _M3eMenuItemElement_handleClick(e) {
|
|
18695
18754
|
if (!e.defaultPrevented && !this._hasSubmenu) {
|
|
@@ -18902,13 +18961,13 @@ let M3eMenuElement = M3eMenuElement_1 = class M3eMenuElement extends SuppressIni
|
|
|
18902
18961
|
offset: !this.submenu ? 4 : undefined
|
|
18903
18962
|
}, (x, y, position) => {
|
|
18904
18963
|
if (!this.submenu) {
|
|
18905
|
-
setCustomState$1(this, "
|
|
18906
|
-
setCustomState$1(this, "
|
|
18964
|
+
setCustomState$1(this, "--top", position.includes("top"));
|
|
18965
|
+
setCustomState$1(this, "--bottom", position.includes("bottom"));
|
|
18907
18966
|
} else if (__classPrivateFieldGet(this, _M3eMenuElement_trigger, "f")) {
|
|
18908
18967
|
const top = __classPrivateFieldGet(this, _M3eMenuElement_instances, "m", _M3eMenuElement_getAbsolutePosition).call(this, __classPrivateFieldGet(this, _M3eMenuElement_trigger, "f")).y;
|
|
18909
|
-
setCustomState$1(this, "
|
|
18910
|
-
setCustomState$1(this, "
|
|
18911
|
-
setCustomState$1(this, Math.round(y) === Math.round(top) ? "
|
|
18968
|
+
setCustomState$1(this, "--shift-down", false);
|
|
18969
|
+
setCustomState$1(this, "--shift-up", false);
|
|
18970
|
+
setCustomState$1(this, Math.round(y) === Math.round(top) ? "--shift-down" : "--shift-up", true);
|
|
18912
18971
|
}
|
|
18913
18972
|
if (M3eDirectionality.current === "rtl") {
|
|
18914
18973
|
this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
|
|
@@ -18986,10 +19045,10 @@ let M3eMenuElement = M3eMenuElement_1 = class M3eMenuElement extends SuppressIni
|
|
|
18986
19045
|
_activate() {
|
|
18987
19046
|
if (this !== M3eMenuElement_1.__activeMenu) {
|
|
18988
19047
|
if (M3eMenuElement_1.__activeMenu) {
|
|
18989
|
-
deleteCustomState$1(M3eMenuElement_1.__activeMenu, "
|
|
19048
|
+
deleteCustomState$1(M3eMenuElement_1.__activeMenu, "--active");
|
|
18990
19049
|
}
|
|
18991
19050
|
M3eMenuElement_1.__activeMenu = this;
|
|
18992
|
-
addCustomState$1(M3eMenuElement_1.__activeMenu, "
|
|
19051
|
+
addCustomState$1(M3eMenuElement_1.__activeMenu, "--active");
|
|
18993
19052
|
}
|
|
18994
19053
|
}
|
|
18995
19054
|
};
|
|
@@ -19010,8 +19069,8 @@ _M3eMenuElement_handleSlotChange = function _M3eMenuElement_handleSlotChange() {
|
|
|
19010
19069
|
__classPrivateFieldGet(this, _M3eMenuElement_listManager, "f").updateActiveItem(added.find(x => !x.disabled));
|
|
19011
19070
|
}
|
|
19012
19071
|
__classPrivateFieldGet(this, _M3eMenuElement_listManager, "f").items.forEach((x, i) => {
|
|
19013
|
-
setCustomState$1(x, "
|
|
19014
|
-
setCustomState$1(x, "
|
|
19072
|
+
setCustomState$1(x, "--first", i === 0 && !x.previousElementSibling);
|
|
19073
|
+
setCustomState$1(x, "--last", i === __classPrivateFieldGet(this, _M3eMenuElement_listManager, "f").items.length - 1);
|
|
19015
19074
|
});
|
|
19016
19075
|
};
|
|
19017
19076
|
_M3eMenuElement_handleKeyDown = function _M3eMenuElement_handleKeyDown(e) {
|
|
@@ -19069,7 +19128,7 @@ _M3eMenuElement_getAbsolutePosition = function _M3eMenuElement_getAbsolutePositi
|
|
|
19069
19128
|
};
|
|
19070
19129
|
_M3eMenuElement_deactivate = function _M3eMenuElement_deactivate() {
|
|
19071
19130
|
if (this === M3eMenuElement_1.__activeMenu) {
|
|
19072
|
-
deleteCustomState$1(M3eMenuElement_1.__activeMenu, "
|
|
19131
|
+
deleteCustomState$1(M3eMenuElement_1.__activeMenu, "--active");
|
|
19073
19132
|
M3eMenuElement_1.__activeMenu = undefined;
|
|
19074
19133
|
}
|
|
19075
19134
|
};
|
|
@@ -19077,11 +19136,11 @@ _M3eMenuElement_deactivate = function _M3eMenuElement_deactivate() {
|
|
|
19077
19136
|
registerStyleSheet$1(css`m3e-menu > m3e-divider { margin-block: var(--m3e-menu-divider-spacing, 0.5rem); }`);
|
|
19078
19137
|
})();
|
|
19079
19138
|
/** The styles of the element. */
|
|
19080
|
-
M3eMenuElement.styles = css`:host { position: absolute; padding: unset; margin: unset; border: unset; overflow-y: auto; overflow-x: visible; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-menu-container-padding-block, 0.25rem) ); min-width: var(--m3e-menu-container-min-width, 7rem); max-width: var(--m3e-menu-container-max-width, 17.5rem); max-height: var(--m3e-menu-container-max-height, 17.5rem); box-shadow: var(--m3e-menu-container-elevation, ${DesignToken$1.elevation.level3}); opacity: 0; display: none; } .base { display: flex; flex-direction: column; row-gap: var(--m3e-menu-gap, 0.125rem); min-width: inherit; max-width: inherit; padding-block: var(--m3e-menu-container-padding-block, 0.25rem); padding-inline: var(--m3e-menu-container-padding-inline, 0.25rem); --m3e-focus-ring-outward-offset: 0px; --m3e-focus-ring-growth-factor: 1.5; } :host(:not(:state(
|
|
19139
|
+
M3eMenuElement.styles = css`:host { position: absolute; padding: unset; margin: unset; border: unset; overflow-y: auto; overflow-x: visible; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-menu-container-padding-block, 0.25rem) ); min-width: var(--m3e-menu-container-min-width, 7rem); max-width: var(--m3e-menu-container-max-width, 17.5rem); max-height: var(--m3e-menu-container-max-height, 17.5rem); box-shadow: var(--m3e-menu-container-elevation, ${DesignToken$1.elevation.level3}); opacity: 0; display: none; } .base { display: flex; flex-direction: column; row-gap: var(--m3e-menu-gap, 0.125rem); min-width: inherit; max-width: inherit; padding-block: var(--m3e-menu-container-padding-block, 0.25rem); padding-inline: var(--m3e-menu-container-padding-inline, 0.25rem); --m3e-focus-ring-outward-offset: 0px; --m3e-focus-ring-growth-factor: 1.5; } :host(:not(:is(:state(--active), :--active))) { border-radius: var(--m3e-menu-container-shape, ${DesignToken$1.shape.corner.small}); } :host(:not(:is(:state(--active), :--active))) .base { --m3e-menu-item-first-child-shape: ${DesignToken$1.shape.corner.extraSmall}; --m3e-menu-item-last-child-shape: ${DesignToken$1.shape.corner.extraSmall}; } :host(:is(:state(--active), :--active)) { border-radius: var(--m3e-menu-active-container-shape, ${DesignToken$1.shape.corner.large}); } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard},
|
|
19081
19140
|
transform ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard},
|
|
19082
19141
|
overlay ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
19083
19142
|
display ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
19084
|
-
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } :host(:not([submenu])) { transform: scaleY(0.8); } :host(:not([submenu]):popover-open) { transform: scaleY(1); } :host::backdrop { background-color: transparent; } :host(:popover-open) { display: block; opacity: 1; } :host(:state(
|
|
19143
|
+
border-radius ${DesignToken$1.motion.spring.fastEffects}`)}; } :host(:not([submenu])) { transform: scaleY(0.8); } :host(:not([submenu]):popover-open) { transform: scaleY(1); } :host::backdrop { background-color: transparent; } :host(:popover-open) { display: block; opacity: 1; } :host(:is(:state(--bottom), :--bottom)) { transform-origin: top; } :host(:is(:state(--top), :--top)) { transform-origin: bottom; } :host(:is(:state(--shift-down), :--shift-down)) { margin-top: calc(0px - var(--m3e-menu-container-padding-block, 0.25rem)); } :host(:is(:state(--shift-up), :--shift-up)) { margin-top: var(--m3e-menu-container-padding-block, 0.25rem); } :host([variant="vibrant"]) { background-color: var(--m3e-vibrant-menu-container-color, ${DesignToken$1.color.tertiaryContainer}); --m3e-menu-item-color: var(--m3e-vibrant-menu-item-color, ${DesignToken$1.color.onTertiaryContainer}); --m3e-menu-item-container-hover-color: var( --m3e-vibrant-menu-item-container-hover-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-menu-item-container-focus-color: var( --m3e-vibrant-menu-item-container-focus-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-menu-item-ripple-color: var(--m3e-vibrant-menu-item-ripple-color, ${DesignToken$1.color.onTertiaryContainer}); --m3e-menu-item-active-state-layer-color: var( --m3e-vibrant-menu-item-active-state-layer-color, ${DesignToken$1.color.onTertiaryContainer} ); --m3e-menu-item-selected-color: var(--m3e-vibrant-menu-item-selected-color, ${DesignToken$1.color.onTertiary}); --m3e-menu-item-selected-container-color: var( --m3e-vibrant-menu-item-selected-container-color, ${DesignToken$1.color.tertiary} ); --m3e-menu-item-selected-container-hover-color: var( --m3e-vibrant-menu-item-selected-container-hover-color, ${DesignToken$1.color.onTertiary} ); --m3e-menu-item-container-selected-focus-color: var( --m3e-vibrant-menu-item-selected-container-focus-color, ${DesignToken$1.color.onTertiary} ); --m3e-menu-item-selected-ripple-color: var( --m3e-vibrant-menu-item-selected-ripple-color, ${DesignToken$1.color.onTertiary} ); --m3e-menu-item-disabled-color: var( --m3e-vibrant-menu-item-disabled-color, ${DesignToken$1.color.onTertiaryContainer} ); } :host([variant="standard"]) { background-color: var(--m3e-menu-container-color, ${DesignToken$1.color.surfaceContainer}); } @starting-style { :host(:popover-open) { opacity: 0; } :host(:not([submenu]):popover-open) { transform: scaleY(0.8); } } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`;
|
|
19085
19144
|
__decorate([property({
|
|
19086
19145
|
attribute: "position-x"
|
|
19087
19146
|
})], M3eMenuElement.prototype, "positionX", void 0);
|
|
@@ -19130,7 +19189,7 @@ var _M3eMenuItemCheckboxElement_instances, _M3eMenuItemCheckboxElement_clickHand
|
|
|
19130
19189
|
* @attr disabled - Whether the element is disabled.
|
|
19131
19190
|
* @attr checked - Whether the element is checked.
|
|
19132
19191
|
*
|
|
19133
|
-
* @fires click -
|
|
19192
|
+
* @fires click - Dispatched when the element is clicked.
|
|
19134
19193
|
*
|
|
19135
19194
|
* @cssprop --m3e-menu-item-container-height - Height of the menu item container.
|
|
19136
19195
|
* @cssprop --m3e-menu-item-color - Text color for unselected, enabled menu items.
|
|
@@ -19214,10 +19273,10 @@ _M3eMenuItemCheckboxElement_mouseEnterHandler = new WeakMap();
|
|
|
19214
19273
|
_M3eMenuItemCheckboxElement_spacePressed = new WeakMap();
|
|
19215
19274
|
_M3eMenuItemCheckboxElement_instances = new WeakSet();
|
|
19216
19275
|
_M3eMenuItemCheckboxElement_handleIconSlotChange = function _M3eMenuItemCheckboxElement_handleIconSlotChange(e) {
|
|
19217
|
-
setCustomState$1(this, "
|
|
19276
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
19218
19277
|
};
|
|
19219
19278
|
_M3eMenuItemCheckboxElement_handleTrailingIconSlotChange = function _M3eMenuItemCheckboxElement_handleTrailingIconSlotChange(e) {
|
|
19220
|
-
setCustomState$1(this, "
|
|
19279
|
+
setCustomState$1(this, "--with-trailing-icon", hasAssignedNodes$1(e.target));
|
|
19221
19280
|
};
|
|
19222
19281
|
_M3eMenuItemCheckboxElement_handleClick = function _M3eMenuItemCheckboxElement_handleClick(e) {
|
|
19223
19282
|
if (!e.defaultPrevented) {
|
|
@@ -19246,7 +19305,7 @@ _M3eMenuItemCheckboxElement_handleMouseEnter = function _M3eMenuItemCheckboxElem
|
|
|
19246
19305
|
});
|
|
19247
19306
|
};
|
|
19248
19307
|
/** The styles of the element. */
|
|
19249
|
-
M3eMenuItemCheckboxElement.styles = [MenuItemElementBase.styles, css`.icon { display: flex; align-items: center; justify-content: center; transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } :host(:not(:state(-with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-menu-item-icon-label-space, 0.75rem)); } .check { width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } :host(:not([checked])) .check { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]) ::slotted([slot="icon"]) { display: none !important; } @media (prefers-reduced-motion) { .icon { transition: none; } }`];
|
|
19308
|
+
M3eMenuItemCheckboxElement.styles = [MenuItemElementBase.styles, css`.icon { display: flex; align-items: center; justify-content: center; transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-menu-item-icon-label-space, 0.75rem)); } .check { width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } :host(:not([checked])) .check { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]) ::slotted([slot="icon"]) { display: none !important; } @media (prefers-reduced-motion) { .icon { transition: none; } }`];
|
|
19250
19309
|
M3eMenuItemCheckboxElement = __decorate([customElement$1("m3e-menu-item-checkbox")], M3eMenuItemCheckboxElement);
|
|
19251
19310
|
|
|
19252
19311
|
/**
|
|
@@ -19303,7 +19362,7 @@ var _M3eMenuItemRadioElement_instances, _M3eMenuItemRadioElement_clickHandler, _
|
|
|
19303
19362
|
* @attr disabled - Whether the element is disabled.
|
|
19304
19363
|
* @attr checked - Whether the element is checked.
|
|
19305
19364
|
*
|
|
19306
|
-
* @fires click -
|
|
19365
|
+
* @fires click - Dispatched when the element is clicked.
|
|
19307
19366
|
*
|
|
19308
19367
|
* @cssprop --m3e-menu-item-container-height - Height of the menu item container.
|
|
19309
19368
|
* @cssprop --m3e-menu-item-color - Text color for unselected, enabled menu items.
|
|
@@ -19398,10 +19457,10 @@ _M3eMenuItemRadioElement_mouseEnterHandler = new WeakMap();
|
|
|
19398
19457
|
_M3eMenuItemRadioElement_spacePressed = new WeakMap();
|
|
19399
19458
|
_M3eMenuItemRadioElement_instances = new WeakSet();
|
|
19400
19459
|
_M3eMenuItemRadioElement_handleIconSlotChange = function _M3eMenuItemRadioElement_handleIconSlotChange(e) {
|
|
19401
|
-
setCustomState$1(this, "
|
|
19460
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
19402
19461
|
};
|
|
19403
19462
|
_M3eMenuItemRadioElement_handleTrailingIconSlotChange = function _M3eMenuItemRadioElement_handleTrailingIconSlotChange(e) {
|
|
19404
|
-
setCustomState$1(this, "
|
|
19463
|
+
setCustomState$1(this, "--with-trailing-icon", hasAssignedNodes$1(e.target));
|
|
19405
19464
|
};
|
|
19406
19465
|
_M3eMenuItemRadioElement_handleClick = function _M3eMenuItemRadioElement_handleClick(e) {
|
|
19407
19466
|
if (!e.defaultPrevented) {
|
|
@@ -19459,7 +19518,9 @@ var _M3eNavBarElement_instances, _M3eNavBarElement_breakpointUnobserve, _M3eNavB
|
|
|
19459
19518
|
*
|
|
19460
19519
|
* @attr mode - The mode in which items in the bar are presented.
|
|
19461
19520
|
*
|
|
19462
|
-
* @fires
|
|
19521
|
+
* @fires beforeinput - Dispatched before the selected state of an item changes.
|
|
19522
|
+
* @fires input - Dispatched when the selected state of an item changes.
|
|
19523
|
+
* @fires change - Dispatched when the selected state of an item changes.
|
|
19463
19524
|
*
|
|
19464
19525
|
* @cssprop --m3e-nav-bar-height - Height of the navigation bar.
|
|
19465
19526
|
* @cssprop --m3e-nav-bar-container-color - Background color of the navigation bar container.
|
|
@@ -19531,7 +19592,7 @@ let M3eNavBarElement = class M3eNavBarElement extends ReconnectedCallback$1(Atta
|
|
|
19531
19592
|
_updateItems() {
|
|
19532
19593
|
const orientation = this.currentMode === "compact" ? "vertical" : "horizontal";
|
|
19533
19594
|
this._updateOrientation(orientation);
|
|
19534
|
-
setCustomState$1(this, "
|
|
19595
|
+
setCustomState$1(this, "--compact", orientation === "vertical");
|
|
19535
19596
|
}
|
|
19536
19597
|
/** @internal */
|
|
19537
19598
|
_updateOrientation(orientation) {
|
|
@@ -19565,7 +19626,7 @@ __decorate([property({
|
|
|
19565
19626
|
})], M3eNavBarElement.prototype, "mode", void 0);
|
|
19566
19627
|
M3eNavBarElement = __decorate([customElement$1("m3e-nav-bar")], M3eNavBarElement);
|
|
19567
19628
|
|
|
19568
|
-
var _M3eNavItemElement_instances, _M3eNavItemElement_clickHandler, _M3eNavItemElement_handleClick, _M3eNavItemElement_handleSelectedIconSlotChange;
|
|
19629
|
+
var _M3eNavItemElement_instances, _M3eNavItemElement_inRail, _M3eNavItemElement_clickHandler, _M3eNavItemElement_resizeController, _M3eNavItemElement_handleClick, _M3eNavItemElement_handleSelectedIconSlotChange, _M3eNavItemElement_handleStateLayerResize, _M3eNavItemElement_initResizeObserver;
|
|
19569
19630
|
/**
|
|
19570
19631
|
* An item, placed in a navigation bar or rail, used to navigate to destinations in an application.
|
|
19571
19632
|
*
|
|
@@ -19600,9 +19661,10 @@ var _M3eNavItemElement_instances, _M3eNavItemElement_clickHandler, _M3eNavItemEl
|
|
|
19600
19661
|
* @attr selected - A value indicating whether the element is selected.
|
|
19601
19662
|
* @attr target - The target of the link button.
|
|
19602
19663
|
*
|
|
19603
|
-
* @fires
|
|
19604
|
-
* @fires
|
|
19605
|
-
* @fires
|
|
19664
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
19665
|
+
* @fires input - Dispatched when the selected state changes.
|
|
19666
|
+
* @fires change - Dispatched when the selected state changes.
|
|
19667
|
+
* @fires click - Dispatched when the element is clicked.
|
|
19606
19668
|
*
|
|
19607
19669
|
* @cssprop --m3e-nav-item-label-text-font-size - Font size for the label text.
|
|
19608
19670
|
* @cssprop --m3e-nav-item-label-text-font-weight - Font weight for the label text.
|
|
@@ -19633,12 +19695,19 @@ var _M3eNavItemElement_instances, _M3eNavItemElement_clickHandler, _M3eNavItemEl
|
|
|
19633
19695
|
* @cssprop --m3e-vertical-nav-item-active-indicator-height - Height of the active indicator in vertical orientation.
|
|
19634
19696
|
* @cssprop --m3e-vertical-nav-item-active-indicator-margin - Margin for the active indicator in vertical orientation.
|
|
19635
19697
|
*/
|
|
19636
|
-
let M3eNavItemElement = class M3eNavItemElement extends LinkButton$1(Selected$1(KeyboardClick$1(Focusable$1(DisabledInteractive$1(Disabled$1(AttachInternals$1(Role$1(LitElement, "button"), true))))))) {
|
|
19698
|
+
let M3eNavItemElement = class M3eNavItemElement extends ReconnectedCallback$1(SuppressInitialAnimation$1(LinkButton$1(Selected$1(KeyboardClick$1(Focusable$1(DisabledInteractive$1(Disabled$1(AttachInternals$1(Role$1(LitElement, "button"), true))))))))) {
|
|
19637
19699
|
constructor() {
|
|
19638
19700
|
super(...arguments);
|
|
19639
19701
|
_M3eNavItemElement_instances.add(this);
|
|
19640
19702
|
/** @private */
|
|
19703
|
+
_M3eNavItemElement_inRail.set(this, false);
|
|
19704
|
+
/** @private */
|
|
19641
19705
|
_M3eNavItemElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_handleClick).call(this, e));
|
|
19706
|
+
/** @private */
|
|
19707
|
+
_M3eNavItemElement_resizeController.set(this, new ResizeController$1(this, {
|
|
19708
|
+
target: null,
|
|
19709
|
+
callback: entries => __classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_handleStateLayerResize).call(this, entries)
|
|
19710
|
+
}));
|
|
19642
19711
|
/**
|
|
19643
19712
|
* The layout orientation of the item.
|
|
19644
19713
|
* @default "vertical"
|
|
@@ -19649,8 +19718,15 @@ let M3eNavItemElement = class M3eNavItemElement extends LinkButton$1(Selected$1(
|
|
|
19649
19718
|
get navBar() {
|
|
19650
19719
|
return this.closest("m3e-nav-bar") ?? this.closest("m3e-nav-rail") ?? null;
|
|
19651
19720
|
}
|
|
19721
|
+
/** @internal */
|
|
19722
|
+
[(_M3eNavItemElement_inRail = new WeakMap(), _M3eNavItemElement_clickHandler = new WeakMap(), _M3eNavItemElement_resizeController = new WeakMap(), _M3eNavItemElement_instances = new WeakSet(), resumeAnimation$1)]() {
|
|
19723
|
+
if (__classPrivateFieldGet(this, _M3eNavItemElement_inRail, "f")) {
|
|
19724
|
+
super[resumeAnimation$1]();
|
|
19725
|
+
}
|
|
19726
|
+
}
|
|
19652
19727
|
/** @inheritdoc */
|
|
19653
19728
|
connectedCallback() {
|
|
19729
|
+
__classPrivateFieldSet(this, _M3eNavItemElement_inRail, this.closest("m3e-nav-rail") !== null, "f");
|
|
19654
19730
|
super.connectedCallback();
|
|
19655
19731
|
this.addEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), {
|
|
19656
19732
|
capture: true
|
|
@@ -19662,6 +19738,12 @@ let M3eNavItemElement = class M3eNavItemElement extends LinkButton$1(Selected$1(
|
|
|
19662
19738
|
this.removeEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), {
|
|
19663
19739
|
capture: true
|
|
19664
19740
|
});
|
|
19741
|
+
__classPrivateFieldSet(this, _M3eNavItemElement_inRail, false, "f");
|
|
19742
|
+
}
|
|
19743
|
+
/** @inheritdoc */
|
|
19744
|
+
reconnectedCallback() {
|
|
19745
|
+
super.reconnectedCallback();
|
|
19746
|
+
__classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_initResizeObserver).call(this);
|
|
19665
19747
|
}
|
|
19666
19748
|
/** @inheritdoc */
|
|
19667
19749
|
update(changedProperties) {
|
|
@@ -19687,39 +19769,49 @@ let M3eNavItemElement = class M3eNavItemElement extends LinkButton$1(Selected$1(
|
|
|
19687
19769
|
firstUpdated(_changedProperties) {
|
|
19688
19770
|
super.firstUpdated(_changedProperties);
|
|
19689
19771
|
[this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
|
|
19772
|
+
__classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_initResizeObserver).call(this);
|
|
19690
19773
|
}
|
|
19691
19774
|
/** @inheritdoc */
|
|
19692
19775
|
render() {
|
|
19693
19776
|
const disabled = this.disabled || this.disabledInteractive;
|
|
19694
|
-
|
|
19777
|
+
const label = html`<div class="label"><slot></slot></div>`;
|
|
19778
|
+
return html`${this.orientation === "vertical" ? html`<m3e-focus-ring class="focus-ring" inward></m3e-focus-ring>` : nothing}<div class="outer">${this[renderPseudoLink$1]()}<div class="inner">${this.orientation === "horizontal" ? html`<m3e-focus-ring class="focus-ring"></m3e-focus-ring>` : nothing}<m3e-state-layer class="state-layer" ?disabled="${disabled}"></m3e-state-layer><m3e-ripple class="ripple" centered ?disabled="${disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="base"><div class="icon-wrapper" aria-hidden="true"><div class="icon"><slot name="icon"></slot><slot name="selected-icon" @slotchange="${__classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_handleSelectedIconSlotChange)}"></slot></div></div><m3e-collapsible orientation="horizontal" ?no-animate="${!__classPrivateFieldGet(this, _M3eNavItemElement_inRail, "f")}" ?open="${this.orientation === "horizontal"}">${this.orientation === "horizontal" ? label : nothing}</m3e-collapsible>${this.orientation === "horizontal" ? nothing : label}</div></div></div>`;
|
|
19695
19779
|
}
|
|
19696
19780
|
};
|
|
19697
|
-
_M3eNavItemElement_clickHandler = new WeakMap();
|
|
19698
|
-
_M3eNavItemElement_instances = new WeakSet();
|
|
19699
19781
|
_M3eNavItemElement_handleClick = function _M3eNavItemElement_handleClick(e) {
|
|
19700
19782
|
if (e.defaultPrevented) return;
|
|
19701
|
-
this.
|
|
19702
|
-
if (this.dispatchEvent(new Event("input", {
|
|
19783
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
19703
19784
|
bubbles: true,
|
|
19704
|
-
composed: true,
|
|
19705
19785
|
cancelable: true
|
|
19706
19786
|
}))) {
|
|
19787
|
+
this.selected = true;
|
|
19707
19788
|
this.navBar?.[selectionManager].notifySelectionChange(this);
|
|
19789
|
+
this.dispatchEvent(new Event("input", {
|
|
19790
|
+
bubbles: true
|
|
19791
|
+
}));
|
|
19708
19792
|
this.dispatchEvent(new Event("change", {
|
|
19709
19793
|
bubbles: true
|
|
19710
19794
|
}));
|
|
19711
|
-
} else {
|
|
19712
|
-
this.selected = false;
|
|
19713
19795
|
}
|
|
19714
19796
|
};
|
|
19715
19797
|
_M3eNavItemElement_handleSelectedIconSlotChange = function _M3eNavItemElement_handleSelectedIconSlotChange(e) {
|
|
19716
|
-
setCustomState$1(this, "
|
|
19798
|
+
setCustomState$1(this, "--with-selected-icon", hasAssignedNodes$1(e.target));
|
|
19799
|
+
};
|
|
19800
|
+
_M3eNavItemElement_handleStateLayerResize = function _M3eNavItemElement_handleStateLayerResize(entries) {
|
|
19801
|
+
if (entries.length === 0 || this.orientation === "vertical") return;
|
|
19802
|
+
this._inner?.style.setProperty("--_expanded-width", `${entries[0].contentRect.width}px`);
|
|
19803
|
+
};
|
|
19804
|
+
_M3eNavItemElement_initResizeObserver = function _M3eNavItemElement_initResizeObserver() {
|
|
19805
|
+
if (this._stateLayer && __classPrivateFieldGet(this, _M3eNavItemElement_inRail, "f")) {
|
|
19806
|
+
__classPrivateFieldGet(this, _M3eNavItemElement_resizeController, "f").observe(this._stateLayer);
|
|
19807
|
+
}
|
|
19717
19808
|
};
|
|
19718
19809
|
/** The styles of the element. */
|
|
19719
|
-
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])) slot[name="selected-icon"], :host(:not(:state(-with-selected-icon))) slot[name="selected-icon"], :host([selected]:state(-with-selected-icon)) slot[name="icon"] { display: none; } :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.onSurfaceVariant}); } :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]):not([orientation="horizontal"])) .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])[orientation="horizontal"]) .label, :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; } }`;
|
|
19810
|
+
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%; } :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: ${unsafeCSS(`margin-top ${DesignToken$1.motion.duration.short1} ${DesignToken$1.motion.easing.standard}`)}; } .icon { position: absolute; } .label { vertical-align: middle; } :host([orientation="horizontal"]) .label { white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]) { width: 1em; font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple { transition: ${unsafeCSS(`height ${DesignToken$1.motion.duration.short1} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not([selected])) slot[name="selected-icon"], :host(:not(:is(:state(--with-selected-icon), :--with-selected-icon))) slot[name="selected-icon"], :host([selected]:is(:state(--with-selected-icon), :--with-selected-icon)) slot[name="icon"] { display: none; } :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.onSurfaceVariant}); } :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]):not([orientation="horizontal"])) .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])[orientation="horizontal"]) .label, :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="horizongal"]) .base { margin-top: 0; } :host([orientation="vertical"]) .base { margin-top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); margin-bottom: 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(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple { animation: collapse ${DesignToken$1.motion.duration.medium1}; } @keyframes collapse { from { width: var(--_expanded-width, var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem)); } to { 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"]) .state-layer, :host([orientation="horizontal"]) .ripple, :host([orientation="horizontal"]) .inner { height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem); } :host([orientation="horizontal"]) .inner { width: fit-content; } .state-layer, .ripple { margin-inline: auto; } :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${unsafeCSS(`slide-down ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${unsafeCSS(`slide-up ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard}`)}; } @keyframes slide-down { from { transform: translateY(-4px); } to { transform: translateY(0); } } @keyframes slide-up { from { transform: translateY(4px); } to { transform: translateY(0); } } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label { animation: horizontal-fade-in ${DesignToken$1.motion.duration.medium1}; } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: vertical-fade-in ${DesignToken$1.motion.duration.medium1}; } @keyframes horizontal-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes vertical-fade-in { from { opacity: 0; } to { opacity: 1; } } :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 (prefers-reduced-motion) { :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host( :not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"] ) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: none; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: none; } } @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; } }`;
|
|
19720
19811
|
__decorate([query(".focus-ring")], M3eNavItemElement.prototype, "_focusRing", void 0);
|
|
19721
19812
|
__decorate([query(".state-layer")], M3eNavItemElement.prototype, "_stateLayer", void 0);
|
|
19722
19813
|
__decorate([query(".ripple")], M3eNavItemElement.prototype, "_ripple", void 0);
|
|
19814
|
+
__decorate([query(".inner")], M3eNavItemElement.prototype, "_inner", void 0);
|
|
19723
19815
|
__decorate([property({
|
|
19724
19816
|
reflect: true
|
|
19725
19817
|
})], M3eNavItemElement.prototype, "orientation", void 0);
|
|
@@ -19801,11 +19893,11 @@ var M3eNavMenuItemElement_1;
|
|
|
19801
19893
|
* @attr open - Whether the item is expanded.
|
|
19802
19894
|
* @attr selected - Whether the item is selected.
|
|
19803
19895
|
*
|
|
19804
|
-
* @fires opening -
|
|
19805
|
-
* @fires opened -
|
|
19806
|
-
* @fires closing -
|
|
19807
|
-
* @fires closed -
|
|
19808
|
-
* @fires click -
|
|
19896
|
+
* @fires opening - Dispatched when the item begins to open.
|
|
19897
|
+
* @fires opened - Dispatched when the item has opened.
|
|
19898
|
+
* @fires closing - Dispatched when the item begins to close.
|
|
19899
|
+
* @fires closed - Dispatched when the item has closed.
|
|
19900
|
+
* @fires click - Dispatched when the element is clicked.
|
|
19809
19901
|
*
|
|
19810
19902
|
* @cssprop --m3e-nav-menu-item-font-size - Font size for the item label.
|
|
19811
19903
|
* @cssprop --m3e-nav-menu-item-font-weight - Font weight for the item label.
|
|
@@ -19982,7 +20074,7 @@ _M3eNavMenuItemElement_renderIcon = function _M3eNavMenuItemElement_renderIcon()
|
|
|
19982
20074
|
return this.selected && !this.hasChildItems ? html`<slot name="selected-icon" @slotchange="${__classPrivateFieldGet(this, _M3eNavMenuItemElement_instances, "m", _M3eNavMenuItemElement_handleIconSlotChange)}">${icon}</slot>` : icon;
|
|
19983
20075
|
};
|
|
19984
20076
|
_M3eNavMenuItemElement_handleIconSlotChange = function _M3eNavMenuItemElement_handleIconSlotChange(e) {
|
|
19985
|
-
setCustomState$1(this, "
|
|
20077
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
19986
20078
|
};
|
|
19987
20079
|
_M3eNavMenuItemElement_handleSlotChange = function _M3eNavMenuItemElement_handleSlotChange(e) {
|
|
19988
20080
|
__classPrivateFieldSet(this, _M3eNavMenuItemElement_link, e.target.assignedElements({
|
|
@@ -19996,7 +20088,7 @@ _M3eNavMenuItemElement_handleItemSlotChange = function _M3eNavMenuItemElement_ha
|
|
|
19996
20088
|
}).filter(x => x instanceof M3eNavMenuItemElement_1), "f");
|
|
19997
20089
|
const hadChildItems = this._hasChildItems;
|
|
19998
20090
|
this._hasChildItems = __classPrivateFieldGet(this, _M3eNavMenuItemElement_items, "f").length > 0;
|
|
19999
|
-
setCustomState$1(this, "
|
|
20091
|
+
setCustomState$1(this, "--with-items", this._hasChildItems);
|
|
20000
20092
|
if (hadChildItems || this._hasChildItems) {
|
|
20001
20093
|
this.selected = __classPrivateFieldGet(this, _M3eNavMenuItemElement_items, "f").some(x => x.selected);
|
|
20002
20094
|
}
|
|
@@ -20011,7 +20103,7 @@ _M3eNavMenuItemElement_handleClick = function _M3eNavMenuItemElement_handleClick
|
|
|
20011
20103
|
const drawerContainer = this.closest("m3e-drawer-container");
|
|
20012
20104
|
if (drawerContainer) {
|
|
20013
20105
|
const drawer = this.closest("[slot='start']") ?? this.closest("[slot='end']");
|
|
20014
|
-
if (drawer && (hasCustomState$1(drawerContainer,
|
|
20106
|
+
if (drawer && (hasCustomState$1(drawerContainer, `--${drawer.slot}-push`) || hasCustomState$1(drawerContainer, `--${drawer.slot}-over`))) {
|
|
20015
20107
|
setTimeout(() => {
|
|
20016
20108
|
drawerContainer.removeAttribute(drawer.slot);
|
|
20017
20109
|
drawerContainer.dispatchEvent(new Event("change", {
|
|
@@ -20036,7 +20128,7 @@ _M3eNavMenuItemElement_handleCollapsibleEvent = function _M3eNavMenuItemElement_
|
|
|
20036
20128
|
/** The styles of the element. */
|
|
20037
20129
|
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},
|
|
20038
20130
|
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})
|
|
20039
|
-
${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(:disabled)) .base { color: LinkText; } :host([selected]:not(:state(-with-items)):not(:disabled)) .base, :host([selected]:state(-with-items):not(:disabled)) .base { forced-color-adjust: none; background-color: unset; color: Highlight; } :host([selected]:not(:state(-with-items)):not(:disabled)) .base::after { content: ""; position: absolute; inset-inline-start: calc(calc(var(--m3e-nav-menu-item-padding, 1.5rem) / 2) - calc(0.375rem / 2)); inset-block-start: 50%; width: 0.375rem; height: 0.375rem; border-radius: 50%; transform: translateY(-50%); background-color: currentColor; } }`;
|
|
20131
|
+
${DesignToken$1.motion.easing.standard}`)}; } :host(:not(:is(:state(--with-icon), :--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(:is(:state(--with-items), :--with-items))) .toggle, :host(:not(:is(:state(--with-items), :--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(:is(:state(--with-items), :--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(:is(:state(--with-items), :--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]:is(:state(--with-items), :--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(:disabled)) .base { color: LinkText; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base, :host([selected]:is(:state(--with-items), :--with-items):not(:disabled)) .base { forced-color-adjust: none; background-color: unset; color: Highlight; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base::after { content: ""; position: absolute; inset-inline-start: calc(calc(var(--m3e-nav-menu-item-padding, 1.5rem) / 2) - calc(0.375rem / 2)); inset-block-start: 50%; width: 0.375rem; height: 0.375rem; border-radius: 50%; transform: translateY(-50%); background-color: currentColor; } }`;
|
|
20040
20132
|
__decorate([query(".state-layer")], M3eNavMenuItemElement.prototype, "stateLayer", void 0);
|
|
20041
20133
|
__decorate([query(".focus-ring")], M3eNavMenuItemElement.prototype, "focusRing", void 0);
|
|
20042
20134
|
__decorate([query(".ripple")], M3eNavMenuItemElement.prototype, "ripple", void 0);
|
|
@@ -20413,12 +20505,12 @@ let M3eNavMenuItemGroupElement = M3eNavMenuItemGroupElement_1 = class M3eNavMenu
|
|
|
20413
20505
|
/** @inheritdoc */
|
|
20414
20506
|
connectedCallback() {
|
|
20415
20507
|
super.connectedCallback();
|
|
20416
|
-
setCustomState$1(this, "
|
|
20508
|
+
setCustomState$1(this, "--divided", this.previousElementSibling?.tagName === "M3E-DIVIDER");
|
|
20417
20509
|
}
|
|
20418
20510
|
/** @inheritdoc */
|
|
20419
20511
|
disconnectedCallback() {
|
|
20420
20512
|
super.disconnectedCallback();
|
|
20421
|
-
deleteCustomState$1(this, "
|
|
20513
|
+
deleteCustomState$1(this, "--divided");
|
|
20422
20514
|
}
|
|
20423
20515
|
/** @inheritdoc */
|
|
20424
20516
|
render() {
|
|
@@ -20446,10 +20538,10 @@ _M3eNavMenuItemGroupElement_handleLabelSlotChange = function _M3eNavMenuItemGrou
|
|
|
20446
20538
|
this.removeAttribute("aria-labelledby");
|
|
20447
20539
|
}
|
|
20448
20540
|
}
|
|
20449
|
-
setCustomState$1(this, "
|
|
20541
|
+
setCustomState$1(this, "--with-label", __classPrivateFieldGet(this, _M3eNavMenuItemGroupElement_label, "f") !== undefined);
|
|
20450
20542
|
};
|
|
20451
20543
|
/** The styles of the element. */
|
|
20452
|
-
M3eNavMenuItemGroupElement.styles = css`:host { display: contents; } :host(:not(:state(-with-label))) .label { display: none; } .label { margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem); margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem); flex: none; } :host(:state(
|
|
20544
|
+
M3eNavMenuItemGroupElement.styles = css`:host { display: contents; } :host(:not(:is(:state(--with-label), :--with-label))) .label { display: none; } .label { margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem); margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem); flex: none; } :host(:is(:state(--divided), :--divided)) .label { margin-block-start: calc( var(--m3e-nav-menu-item-group-label-space, 1rem) - var(--m3e-nav-menu-divider-margin, 0.25rem) ); } :host(:not(:is(:state(--divided), :--divided))) .label { margin-block-start: var(--m3e-nav-menu-item-group-label-space, 1rem); }`;
|
|
20453
20545
|
/** @private */
|
|
20454
20546
|
M3eNavMenuItemGroupElement.__nextId = 0;
|
|
20455
20547
|
M3eNavMenuItemGroupElement = M3eNavMenuItemGroupElement_1 = __decorate([customElement$1("m3e-nav-menu-item-group")], M3eNavMenuItemGroupElement);
|
|
@@ -20490,19 +20582,24 @@ var _M3eNavRailElement_instances, _M3eNavRailElement_focusKeyManager, _M3eNavRai
|
|
|
20490
20582
|
*
|
|
20491
20583
|
* @attr mode - The mode in which items in the rail are presented.
|
|
20492
20584
|
*
|
|
20493
|
-
* @fires
|
|
20585
|
+
* @fires beforeinput - Dispatched before the selected state of an item changes.
|
|
20586
|
+
* @fires input - Dispatched when the selected state of an item changes.
|
|
20587
|
+
* @fires change - Dispatched when the selected state of an item changes.
|
|
20494
20588
|
*
|
|
20495
20589
|
* @cssprop --m3e-nav-rail-top-space - Top block padding for the nav rail.
|
|
20496
20590
|
* @cssprop --m3e-nav-rail-bottom-space - Bottom block padding for the nav rail.
|
|
20497
20591
|
* @cssprop --m3e-nav-rail-compact-width - Width of the nav rail in compact mode.
|
|
20498
|
-
* @cssprop --m3e-nav-rail-
|
|
20499
|
-
* @cssprop --m3e-nav-rail-expanded-
|
|
20500
|
-
* @cssprop --m3e-nav-rail-expanded-max-width - Maximum width of the nav rail in expanded mode.
|
|
20592
|
+
* @cssprop --m3e-nav-rail-inline-padding - Inline padding for nav rail.
|
|
20593
|
+
* @cssprop --m3e-nav-rail-expanded-width - Width of the nav rail in expanded mode.
|
|
20501
20594
|
* @cssprop --m3e-nav-rail-expanded-item-height - Height of nav items in expanded mode.
|
|
20502
20595
|
* @cssprop --m3e-nav-rail-button-item-space - Space below icon buttons and FABs.
|
|
20503
|
-
* @cssprop --m3e-nav-rail-
|
|
20596
|
+
* @cssprop --m3e-nav-rail-icon-button-inset - Inset for icon buttons.
|
|
20597
|
+
* @cssprop --m3e-nav-rail-expanded-inline-padding - Deprecated, use `--m3e-nav-rail-inline-padding`.
|
|
20598
|
+
* @cssprop --m3e-nav-rail-expanded-min-width - Deprecated, use `--m3e-nav-rail-expanded-width`.
|
|
20599
|
+
* @cssprop --m3e-nav-rail-expanded-max-width - Deprecated, use `--m3e-nav-rail-expanded-width`.
|
|
20600
|
+
* @cssprop --m3e-nav-rail-expanded-icon-button-inset - Deprecated, use `--m3e-nav-rail-icon-button-inset`.
|
|
20504
20601
|
*/
|
|
20505
|
-
let M3eNavRailElement = class M3eNavRailElement extends M3eNavBarElement$1 {
|
|
20602
|
+
let M3eNavRailElement = class M3eNavRailElement extends SuppressInitialAnimation$1(M3eNavBarElement$1) {
|
|
20506
20603
|
constructor() {
|
|
20507
20604
|
super();
|
|
20508
20605
|
_M3eNavRailElement_instances.add(this);
|
|
@@ -20526,7 +20623,7 @@ let M3eNavRailElement = class M3eNavRailElement extends M3eNavBarElement$1 {
|
|
|
20526
20623
|
}
|
|
20527
20624
|
/** @inheritdoc @internal */
|
|
20528
20625
|
_updateItems() {
|
|
20529
|
-
const items = M3eInteractivityChecker.findInteractiveElements(this);
|
|
20626
|
+
const items = M3eInteractivityChecker.findInteractiveElements(this, true);
|
|
20530
20627
|
const {
|
|
20531
20628
|
added
|
|
20532
20629
|
} = __classPrivateFieldGet(this, _M3eNavRailElement_focusKeyManager, "f").setItems(items);
|
|
@@ -20536,6 +20633,7 @@ let M3eNavRailElement = class M3eNavRailElement extends M3eNavBarElement$1 {
|
|
|
20536
20633
|
__classPrivateFieldGet(this, _M3eNavRailElement_focusKeyManager, "f").updateActiveItem(active);
|
|
20537
20634
|
}
|
|
20538
20635
|
}
|
|
20636
|
+
this.items.forEach((x, i) => setCustomState$1(x, "--first", i === 0));
|
|
20539
20637
|
super._updateItems();
|
|
20540
20638
|
}
|
|
20541
20639
|
/** @inheritdoc @internal */
|
|
@@ -20551,10 +20649,10 @@ _M3eNavRailElement_handleKeyDown = function _M3eNavRailElement_handleKeyDown(e)
|
|
|
20551
20649
|
__classPrivateFieldGet(this, _M3eNavRailElement_focusKeyManager, "f").onKeyDown(e);
|
|
20552
20650
|
};
|
|
20553
20651
|
(() => {
|
|
20554
|
-
registerStyleSheet$1(css`m3e-nav-rail > m3e-icon-button, m3e-nav-rail > m3e-fab { margin-block-end: var(--m3e-nav-rail-button-item-space, 1rem); } m3e-nav-rail
|
|
20652
|
+
registerStyleSheet$1(css`m3e-nav-rail > m3e-icon-button, m3e-nav-rail > m3e-fab { margin-block-end: var(--m3e-nav-rail-button-item-space, 1rem); } m3e-nav-rail > m3e-icon-button { margin-inline-start: var(--m3e-nav-rail-icon-button-inset, 0.5rem); }`);
|
|
20555
20653
|
})();
|
|
20556
20654
|
/** The styles of the element. */
|
|
20557
|
-
M3eNavRailElement.styles = css`:host { display: block; overflow-x: hidden; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; } .base { display: flex; width:
|
|
20655
|
+
M3eNavRailElement.styles = css`:host { display: block; overflow-x: hidden; overflow-y: auto; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; scrollbar-color: ${DesignToken$1.scrollbar.color}; } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${unsafeCSS(`width ${DesignToken$1.motion.duration.medium2} ${DesignToken$1.motion.easing.standard}`)}; } .base { display: flex; width: inherit; flex-direction: column; align-items: flex-start; box-sizing: border-box; padding-block-start: var(--m3e-nav-rail-top-space, 2.75rem); padding-block-end: var(--m3e-nav-rail-bottom-space, 0.5rem); padding-inline: var(--m3e-nav-rail-inline-padding, 1.25rem); } :host(:is(:state(--compact), :--compact)) { width: var(--m3e-nav-rail-compact-width, 6rem); } :host(:not(:is(:state(--compact), :--compact))) { width: var(--m3e-nav-rail-expanded-width, 13.75rem); } :host(:not(:is(:state(--compact), :--compact))) { --m3e-horizontal-nav-item-active-indicator-height: var(--m3e-nav-rail-expanded-item-height, 3.5rem); --_nav-item-align-self: stretch; --_nav-item-justify-content: flex-start; } ::slotted(*) { flex: none; } ::slotted(m3e-fab) { --m3e-fab-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-disabled-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-focus-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-pressed-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-hover-container-elevation: ${DesignToken$1.elevation.level1}; --m3e-fab-lowered-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-lowered-disabled-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-lowered-focus-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-lowered-pressed-container-elevation: ${DesignToken$1.elevation.level0}; --m3e-fab-lowered-hover-container-elevation: ${DesignToken$1.elevation.level1}; } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } }`;
|
|
20558
20656
|
M3eNavRailElement = __decorate([customElement$1("m3e-nav-rail")], M3eNavRailElement);
|
|
20559
20657
|
|
|
20560
20658
|
var _M3eNavRailToggleElement_instances, _M3eNavRailToggleElement_mutationController, _M3eNavRailToggleElement_updateToggle;
|
|
@@ -20770,13 +20868,13 @@ let M3eOptionElement = class M3eOptionElement extends Selected$1(Disabled$1(Atta
|
|
|
20770
20868
|
};
|
|
20771
20869
|
_M3eOptionElement_handleSlotChange = function _M3eOptionElement_handleSlotChange(e) {
|
|
20772
20870
|
__classPrivateFieldSet(this, _M3eOptionElement_textContent, getTextContent$1(e.target), "f");
|
|
20773
|
-
setCustomState$1(this, "
|
|
20871
|
+
setCustomState$1(this, "--empty", this.isEmpty);
|
|
20774
20872
|
if (this.selected) {
|
|
20775
20873
|
this.closest("m3e-select")?.requestUpdate?.();
|
|
20776
20874
|
}
|
|
20777
20875
|
};
|
|
20778
20876
|
/** The styles of the element. */
|
|
20779
|
-
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(
|
|
20877
|
+
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(:is(:state(--empty), :--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(:is(:state(--first), :--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(:is(:state(--last), :--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(:is(:state(--first), :--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(:is(:state(--last), :--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(:is(:state(--empty), :--empty)) .icon, :host(:is(:state(--hide-selection-indicator), :--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; } }`;
|
|
20780
20878
|
__decorate([query(".focus-ring")], M3eOptionElement.prototype, "focusRing", void 0);
|
|
20781
20879
|
__decorate([query(".state-layer")], M3eOptionElement.prototype, "stateLayer", void 0);
|
|
20782
20880
|
__decorate([query(".ripple")], M3eOptionElement.prototype, "_ripple", void 0);
|
|
@@ -20916,11 +21014,11 @@ let M3eOptionPanelElement = class M3eOptionPanelElement extends Role$1(M3eFloati
|
|
|
20916
21014
|
};
|
|
20917
21015
|
_M3eOptionPanelElement_instances = new WeakSet();
|
|
20918
21016
|
_M3eOptionPanelElement_handleNoDataSlotChange = function _M3eOptionPanelElement_handleNoDataSlotChange(e) {
|
|
20919
|
-
setCustomState$1(this, "
|
|
21017
|
+
setCustomState$1(this, "--with-no-data", hasAssignedNodes$1(e.target));
|
|
20920
21018
|
};
|
|
20921
21019
|
_M3eOptionPanelElement_handleLoadingSlotChange = function _M3eOptionPanelElement_handleLoadingSlotChange(e) {
|
|
20922
|
-
setCustomState$1(this, "
|
|
20923
|
-
setCustomState$1(this, "
|
|
21020
|
+
setCustomState$1(this, "--with-loading", hasAssignedNodes$1(e.target));
|
|
21021
|
+
setCustomState$1(this, "--with-loading-indicator", this.querySelector("m3e-loading-indicator[slot='loading'], m3e-circular-progress-indicator[slot='loading']") !== null);
|
|
20924
21022
|
};
|
|
20925
21023
|
_M3eOptionPanelElement_handleMutation = function _M3eOptionPanelElement_handleMutation() {
|
|
20926
21024
|
const options = this.querySelectorAll("m3e-option");
|
|
@@ -20929,19 +21027,19 @@ _M3eOptionPanelElement_handleMutation = function _M3eOptionPanelElement_handleMu
|
|
|
20929
21027
|
for (let i = 0; i < options.length; i++) {
|
|
20930
21028
|
const option = options[i];
|
|
20931
21029
|
if (option.hidden === true) {
|
|
20932
|
-
deleteCustomState$1(option, "
|
|
20933
|
-
deleteCustomState$1(option, "
|
|
21030
|
+
deleteCustomState$1(option, "--first");
|
|
21031
|
+
deleteCustomState$1(option, "--last");
|
|
20934
21032
|
} else if (!first && !(option.parentElement instanceof M3eOptGroupElement)) {
|
|
20935
|
-
addCustomState$1(option, "
|
|
21033
|
+
addCustomState$1(option, "--first");
|
|
20936
21034
|
first = true;
|
|
20937
|
-
addCustomState$1(option, "
|
|
21035
|
+
addCustomState$1(option, "--last");
|
|
20938
21036
|
last = option;
|
|
20939
21037
|
} else {
|
|
20940
|
-
deleteCustomState$1(option, "
|
|
21038
|
+
deleteCustomState$1(option, "--first");
|
|
20941
21039
|
if (last) {
|
|
20942
|
-
deleteCustomState$1(last, "
|
|
21040
|
+
deleteCustomState$1(last, "--last");
|
|
20943
21041
|
}
|
|
20944
|
-
addCustomState$1(option, "
|
|
21042
|
+
addCustomState$1(option, "--last");
|
|
20945
21043
|
last = option;
|
|
20946
21044
|
}
|
|
20947
21045
|
}
|
|
@@ -20950,7 +21048,7 @@ _M3eOptionPanelElement_handleMutation = function _M3eOptionPanelElement_handleMu
|
|
|
20950
21048
|
registerStyleSheet$1(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; }`);
|
|
20951
21049
|
})();
|
|
20952
21050
|
/** The styles of the element. */
|
|
20953
|
-
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(
|
|
21051
|
+
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(:is(:state(--no-data), :--no-data)) slot:not([name]), :host(:is(:state(--loading), :--loading)) slot:not([name]), :host(:is(:state(--loading), :--loading)) .no-data, :host(:not(:is(:state(--no-data), :--no-data))) .no-data, :host(:not(:is(:state(--with-no-data), :--with-no-data))) .no-data, :host(:not(:is(:state(--loading), :--loading))) .loading, :host(:not(:is(:state(--with-loading), :--with-loading))) .loading { display: none; } :host(:is(:state(--no-data), :--no-data)) .base, :host(:is(:state(--loading), :--loading)) .base { overflow-y: hidden; } :host(:is(:state(--with-loading-indicator), :--with-loading-indicator)) .loading { padding: 0; justify-content: center; }`];
|
|
20954
21052
|
__decorate([property({
|
|
20955
21053
|
reflect: true
|
|
20956
21054
|
})], M3eOptionPanelElement.prototype, "state", void 0);
|
|
@@ -21003,7 +21101,7 @@ var M3ePaginatorElement_1;
|
|
|
21003
21101
|
* @attr previous-page-label - The accessible label given to the button used to move to the previous page.
|
|
21004
21102
|
* @attr show-first-last-buttons - Whether to show first/last buttons.
|
|
21005
21103
|
*
|
|
21006
|
-
* @fires page -
|
|
21104
|
+
* @fires page - Dispatched when a user selects a different page size or navigates to another page.
|
|
21007
21105
|
*
|
|
21008
21106
|
* @cssprop --m3e-paginator-font-size - The font size used for paginator text.
|
|
21009
21107
|
* @cssprop --m3e-paginator-font-weight - The font weight used for paginator text.
|
|
@@ -21922,9 +22020,10 @@ var _M3eRadioElement_instances, _M3eRadioElement_clickHandler, _M3eRadioElement_
|
|
|
21922
22020
|
* @attr required - Whether the element is required.
|
|
21923
22021
|
* @attr value - A string representing the value of the radio.
|
|
21924
22022
|
*
|
|
21925
|
-
* @fires
|
|
21926
|
-
* @fires
|
|
21927
|
-
* @fires
|
|
22023
|
+
* @fires beforeinput - Dispatched before the checked state changes.
|
|
22024
|
+
* @fires input - Dispatched when the checked state changes.
|
|
22025
|
+
* @fires change - Dispatched when the checked state changes.
|
|
22026
|
+
* @fires click - Dispatched when the element is clicked.
|
|
21928
22027
|
*
|
|
21929
22028
|
* @cssprop --m3e-radio-container-size - Base size of the radio button container.
|
|
21930
22029
|
* @cssprop --m3e-radio-icon-size - Size of the radio icon inside the wrapper.
|
|
@@ -22023,18 +22122,18 @@ _M3eRadioElement_renderIcon = function _M3eRadioElement_renderIcon() {
|
|
|
22023
22122
|
};
|
|
22024
22123
|
_M3eRadioElement_handleClick = function _M3eRadioElement_handleClick(e) {
|
|
22025
22124
|
if (e.defaultPrevented || this.checked || this.disabled) return;
|
|
22026
|
-
this.
|
|
22027
|
-
if (this.dispatchEvent(new Event("input", {
|
|
22125
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
22028
22126
|
bubbles: true,
|
|
22029
|
-
composed: true,
|
|
22030
22127
|
cancelable: true
|
|
22031
22128
|
}))) {
|
|
22129
|
+
this.checked = true;
|
|
22032
22130
|
__classPrivateFieldGet(this, _M3eRadioElement_instances, "m", _M3eRadioElement_notifySelectionChange).call(this);
|
|
22131
|
+
this.dispatchEvent(new Event("input", {
|
|
22132
|
+
bubbles: true
|
|
22133
|
+
}));
|
|
22033
22134
|
this.dispatchEvent(new Event("change", {
|
|
22034
22135
|
bubbles: true
|
|
22035
22136
|
}));
|
|
22036
|
-
} else {
|
|
22037
|
-
this.checked = false;
|
|
22038
22137
|
}
|
|
22039
22138
|
// Prevent default avoids double-click in FireFox.
|
|
22040
22139
|
if (this.closest("label")) {
|
|
@@ -22051,7 +22150,7 @@ _M3eRadioElement_notifySelectionChange = function _M3eRadioElement_notifySelecti
|
|
|
22051
22150
|
}
|
|
22052
22151
|
};
|
|
22053
22152
|
/** The styles of the element. */
|
|
22054
|
-
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(
|
|
22153
|
+
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(:is(:state(--touched), :--touched):is(:state(--invalid), :--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(:is(:state(--touched), :--touched):is(:state(--invalid), :--invalid)) .base { --_radio-forced-color: Highlight; color: Highlight; } }`;
|
|
22055
22154
|
__decorate([query(".focus-ring")], M3eRadioElement.prototype, "_focusRing", void 0);
|
|
22056
22155
|
__decorate([query(".state-layer")], M3eRadioElement.prototype, "_stateLayer", void 0);
|
|
22057
22156
|
__decorate([query(".ripple")], M3eRadioElement.prototype, "_ripple", void 0);
|
|
@@ -22090,7 +22189,9 @@ var _M3eRadioGroupElement_instances, _M3eRadioGroupElement_directionalitySubscri
|
|
|
22090
22189
|
* @attr name - The name that identifies the element when submitting the associated form.
|
|
22091
22190
|
* @attr required - Whether the element is required.
|
|
22092
22191
|
*
|
|
22093
|
-
* @fires
|
|
22192
|
+
* @fires beforeinput - Dispatched before the checked state of a radio button changes.
|
|
22193
|
+
* @fires input - Dispatched when the checked state of a radio button changes.
|
|
22194
|
+
* @fires change - Dispatched when the checked state of a radio button changes.
|
|
22094
22195
|
*/
|
|
22095
22196
|
let M3eRadioGroupElement = class M3eRadioGroupElement extends Labelled$1(RequiredConstraintValidation$1(Dirty$1(Touched$1(Required$1(ConstraintValidation$1(FormAssociated$1(Disabled$1(AttachInternals$1(Role$1(LitElement, "radiogroup")))))))))) {
|
|
22096
22197
|
constructor() {
|
|
@@ -22150,7 +22251,7 @@ let M3eRadioGroupElement = class M3eRadioGroupElement extends Labelled$1(Require
|
|
|
22150
22251
|
break;
|
|
22151
22252
|
case "aria-invalid":
|
|
22152
22253
|
this.radios.forEach(x => {
|
|
22153
|
-
setCustomState$1(x, "
|
|
22254
|
+
setCustomState$1(x, "--invalid", newValue === "true");
|
|
22154
22255
|
x[updateLabels$1]?.();
|
|
22155
22256
|
});
|
|
22156
22257
|
break;
|
|
@@ -22239,7 +22340,7 @@ const SearchBarLightDomStyle = css`m3e-search-bar input[slot="input"]::placehold
|
|
|
22239
22340
|
* Styles for `M3eSearchBarElement`.
|
|
22240
22341
|
* @internal
|
|
22241
22342
|
*/
|
|
22242
|
-
const SearchBarStyle = css`:host { display: block; height: ${SearchBarToken.containerHeight}; } .base { cursor: text; display: flex; align-items: center; box-sizing: border-box; width: 100%; height: 100%; border-radius: ${SearchBarToken.containerShape}; background-color: ${SearchBarToken.containerColor}; } .clear { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 3rem; } :host(:not(:state(
|
|
22343
|
+
const SearchBarStyle = css`:host { display: block; height: ${SearchBarToken.containerHeight}; } .base { cursor: text; display: flex; align-items: center; box-sizing: border-box; width: 100%; height: 100%; border-radius: ${SearchBarToken.containerShape}; background-color: ${SearchBarToken.containerColor}; } .clear { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 3rem; } :host(:not(:is(:state(--clearable), :--clearable))) .clear { display: none; } :host(:is(:state(--with-leading), :--with-leading)) slot[name="leading"], :host(:is(:state(--with-trailing), :--with-trailing)) slot[name="trailing"] { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 3rem; padding-inline: 0.25rem; column-gap: calc(0.5rem + ${SearchBarToken.actionsGap}); } ::slotted([slot="input"]) { flex: 1 1 auto; outline: unset; border: unset; background-color: transparent; box-shadow: none; min-width: 0; padding: unset; color: ${SearchBarToken.inputColor}; font-size: ${SearchBarToken.inputTextFontSize}; font-weight: ${SearchBarToken.inputTextFontWeight}; line-height: ${SearchBarToken.inputTextLineHeight}; letter-spacing: ${SearchBarToken.inputTextTracking}; } :host(:is(:state(--with-leading), :--with-leading)) .base { padding-inline-start: ${SearchBarToken.leadingSpace}; } :host(:not(:is(:state(--with-leading), :--with-leading))) .base { padding-inline-start: ${SearchBarToken.noActionsLeadingSpace}; } :host(:is(:is(:state(--with-trailing), :--with-trailing), :is(:state(--clearable), :--clearable))) .base { padding-inline-end: ${SearchBarToken.trailingSpace}; } :host(:not(:is(:is(:state(--with-trailing), :--with-trailing), :is(:state(--clearable), :--clearable)))) .base { padding-inline-end: ${SearchBarToken.noActionsTrailingSpace}; } :host(:is(:state(--with-leading), :--with-leading)) ::slotted([slot="input"]) { margin-inline-start: ${SearchBarToken.leadingActionsTrailingSpace}; } :host(:is(:is(:state(--with-trailing), :--with-trailing), :is(:state(--clearable), :--clearable))) ::slotted([slot="input"]) { margin-inline-end: ${SearchBarToken.trailingActionsLeadingSpace}; } slot[name="leading"] { color: ${SearchBarToken.leadingIconColor}; --m3e-icon-color: ${SearchBarToken.leadingIconColor}; --m3e-icon-button-icon-color: ${SearchBarToken.leadingIconColor}; --m3e-icon-size: ${SearchBarToken.iconSize}; } slot[name="trailing"], .clear { color: ${SearchBarToken.trailingIconColor}; --m3e-icon-color: ${SearchBarToken.trailingIconColor}; --m3e-icon-button-icon-color: ${SearchBarToken.trailingIconColor}; --m3e-icon-size: ${SearchBarToken.iconSize}; } ::slotted(svg[slot="leading"]), ::slotted(svg[slot="trailing"]) { width: 1em; font-size: ${SearchBarToken.iconSize}; } ::slotted([slot="clear-icon"]), .clear-icon { width: 1em; font-size: ${SearchBarToken.iconSize} !important; } slot[name="clear-icon"] { --m3e-icon-size: ${SearchBarToken.iconSize}; } @media (forced-colors: active) { .base { border: 1px var(--_search-bar-forced-color-outline-style, solid) CanvasText; } }`;
|
|
22243
22344
|
|
|
22244
22345
|
/** @internal */
|
|
22245
22346
|
const SearchViewToken = {
|
|
@@ -22276,14 +22377,14 @@ const SearchViewLightDomStyle = css`m3e-search-view input[slot="input"]::placeho
|
|
|
22276
22377
|
* Styles for `M3eSearchViewElement`.
|
|
22277
22378
|
* @internal
|
|
22278
22379
|
*/
|
|
22279
|
-
const SearchViewStyle = css`:host { display: block; } .base { position: relative; width: 100%; } .anchor { position: absolute; width: 100%; visibility: hidden; } .view { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; outline: none; padding: unset; margin: unset; border: unset; } .header { flex: none; display: flex; align-items: center; } .bar { flex: 1 1 auto; } :host(:state(
|
|
22380
|
+
const SearchViewStyle = css`:host { display: block; } .base { position: relative; width: 100%; } .anchor { position: absolute; width: 100%; visibility: hidden; } .view { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; outline: none; padding: unset; margin: unset; border: unset; } .header { flex: none; display: flex; align-items: center; } .bar { flex: 1 1 auto; } :host(:is(:state(--fullscreen), :--fullscreen)) .bar { transition: ${unsafeCSS(`margin ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:is(:state(--fullscreen), :--fullscreen)[contained]:not([open])) .bar { margin-inline-start: ${SearchViewToken.containedLeadingMargin}; margin-inline-end: ${SearchViewToken.containedTrailingMargin}; } :host(:is(:state(--fullscreen), :--fullscreen)[contained][open]) .bar, :host(:is(:state(--fullscreen), :--fullscreen)[contained][open]) .results { margin-inline-start: ${SearchViewToken.containedFocusedLeadingMargin}; margin-inline-end: ${SearchViewToken.containedFocusedTrailingMargin}; } .icon { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 3rem; } ::slotted([slot="search-icon"]), .search-icon, ::slotted([slot="close-icon"]), .close-icon { width: 1em; font-size: ${SearchBarToken.iconSize} !important; } .results { overflow: hidden; flex: 1 1 auto; display: flex; flex-direction: column; } .scroll-container { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; scrollbar-color: ${DesignToken$1.scrollbar.color}; } .view:not(:popover-open) .results, .view.closing .results { display: none; } :host(:not(:is(:is(:state(--clearable), :--clearable), [open]))) .clear { display: none; } ::slotted([slot="clear-icon"]), .clear-icon { width: 1em; font-size: ${SearchBarToken.iconSize} !important; } slot[name="clear-icon"] { --m3e-icon-size: ${SearchBarToken.iconSize}; } :host(:is(:state(--fullscreen), :--fullscreen)) .header { transition: height 150ms cubic-bezier(0.2, 0, 0, 1); } :host(:is(:state(--fullscreen), :--fullscreen)) .view:popover-open:not(.closing) .header { height: ${SearchViewToken.fullScreenHeaderContainerHeight}; } :host(:is(:state(--fullscreen), :--fullscreen):not([open])) .header, :host(:is(:state(--fullscreen), :--fullscreen)[open]) .view.closing .header { height: ${SearchViewToken.containedFullScreenBarContainerHeight}; } :host(:is(:state(--fullscreen), :--fullscreen)[open]) .bar { --m3e-search-bar-container-height: ${SearchViewToken.containedFullScreenBarContainerHeight}; } :host(:is(:state(--fullscreen), :--fullscreen)) .anchor { height: ${SearchViewToken.containedFullScreenBarContainerHeight}; } :host(:is(:state(--fullscreen), :--fullscreen)) .view:popover-open { border-radius: ${SearchViewToken.fullScreenContainerShape}; } :host(:is(:state(--fullscreen), :--fullscreen)[contained]) .view:popover-open { background-color: ${SearchViewToken.containedContainerColor}; } :host(:is(:state(--fullscreen), :--fullscreen):not([contained])) .view:popover-open { background-color: ${SearchViewToken.containerColor}; } :host(:is(:state(--docked), :--docked)[open]) .header, :host(:is(:state(--docked), :--docked)) .anchor { height: ${SearchViewToken.dockedHeaderContainerHeight}; } :host(:not([contained])[open]) .results { border-top-width: ${SearchViewToken.dividerThickness}; border-top-style: solid; border-top-color: ${SearchViewToken.dividerColor}; } :host(:is(:state(--docked), :--docked)[contained]) .results { margin-top: ${SearchViewToken.containedDockedBarResultsGap}; } :host(:is(:state(--docked), :--docked):not([contained])[open]) .view { background-color: ${SearchViewToken.containerColor}; --m3e-search-bar-container-color: ${SearchViewToken.containerColor}; } :host(:is(:state(--docked), :--docked)[contained]) .results { background-color: ${SearchViewToken.containerColor}; } :host(:is(:state(--docked), :--docked):not([contained])) .view, :host(:is(:state(--docked), :--docked)[contained]) .results { border-radius: ${SearchViewToken.dockedContainerShape}; } :host(:is(:state(--docked), :--docked)) .results { min-height: calc(${SearchViewToken.dockedContainerMinHeight} - ${SearchViewToken.dockedHeaderContainerHeight}); max-height: calc(${SearchViewToken.dockedContainerMaxHeight} - ${SearchViewToken.dockedHeaderContainerHeight}); } :host(:is(:state(--docked), :--docked)) .scroll-container { scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; } :host(:is(:state(--docked), :--docked):not([contained])) .scroll-container { padding-bottom: ${SearchViewToken.dockedResultsBottomSpace}; } :host(:is(:state(--docked), :--docked)[contained]) .scroll-container { padding: ${SearchViewToken.containedDockedResultsSpace}; } :host(:is(:state(--docked), :--docked)) .results { transform-origin: top; transition: ${unsafeCSS(`transform ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard},
|
|
22280
22381
|
overlay ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
22281
|
-
display ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(
|
|
22282
|
-
background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(
|
|
22382
|
+
display ${DesignToken$1.motion.duration.short2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--docked), :--docked):not([open])) .results { transform: scaleY(0.8); } :host(:is(:state(--docked), :--docked)[open]) .results { transform: scaleY(1); } @starting-style { :host(:is(:state(--docked), :--docked)[open]) .results { transform: scaleY(0.8); } } :host(:is(:state(--docked), :--docked)) .view { background-color: transparent; } :host(:is(:state(--docked), :--docked):not([open])) .view { transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
22383
|
+
background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard}`)}; } :host(:is(:state(--docked), :--docked):not([open])) .view::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
22283
22384
|
overlay ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
22284
|
-
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(
|
|
22385
|
+
visibility ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--docked), :--docked)) .view::backdrop { background-color: color-mix(in srgb, ${SearchViewToken.dockedScrimColor} 0%, transparent); margin-inline-end: -20px; } :host(:is(:state(--docked), :--docked)[open]) .view::backdrop { background-color: color-mix( in srgb, ${SearchViewToken.dockedScrimColor} ${SearchViewToken.dockedScrimOpacity}, transparent ); transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard},
|
|
22285
22386
|
overlay ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
22286
|
-
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { :host(:state(
|
|
22387
|
+
visibility ${DesignToken$1.motion.duration.long2} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } @starting-style { :host(:is(:state(--docked), :--docked)[open]) .view::backdrop { background-color: color-mix(in srgb, ${SearchViewToken.dockedScrimColor} 0%, transparent); } } :host(:is(:state(--fullscreen), :--fullscreen)) .view:popover-open { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; overflow: hidden; } @media (prefers-reduced-motion) { :host(:is(:state(--fullscreen), :--fullscreen)) .bar, :host(:is(:state(--fullscreen), :--fullscreen)) .header, :host(:is(:state(--docked), :--docked)) .results, :host(:is(:state(--docked), :--docked):not([open])) .view, :host(:is(:state(--docked), :--docked):not([open])) .view::backdrop, :host(:is(:state(--docked), :--docked)[open]) .view::backdrop { transition: none; } } @media (forced-colors: active) { :host(:not([contained])[open]) .bar { --_search-bar-forced-color-outline-style: none; } :host(:is(:state(--docked), :--docked):not([contained])[open]) .view, :host(:is(:state(--docked), :--docked)[contained]) .results { border: 1px solid CanvasText; } :host(:not([contained])[open]) .results { border-top-color: CanvasText; } }`;
|
|
22287
22388
|
|
|
22288
22389
|
var _M3eSearchBarElement_instances, _M3eSearchBarElement_input, _M3eSearchBarElement_inputInputHandler, _M3eSearchBarElement_renderClearButton, _M3eSearchBarElement_handleContainerClick, _M3eSearchBarElement_handleLeadingSlotChange, _M3eSearchBarElement_handleTrailingSlotChange, _M3eSearchBarElement_handleInputSlotChange, _M3eSearchBarElement_handleInputInput, _M3eSearchBarElement_handleClearClick;
|
|
22289
22390
|
/**
|
|
@@ -22386,10 +22487,10 @@ _M3eSearchBarElement_handleContainerClick = function _M3eSearchBarElement_handle
|
|
|
22386
22487
|
}
|
|
22387
22488
|
};
|
|
22388
22489
|
_M3eSearchBarElement_handleLeadingSlotChange = function _M3eSearchBarElement_handleLeadingSlotChange(e) {
|
|
22389
|
-
setCustomState$1(this, "
|
|
22490
|
+
setCustomState$1(this, "--with-leading", hasAssignedNodes$1(e.target));
|
|
22390
22491
|
};
|
|
22391
22492
|
_M3eSearchBarElement_handleTrailingSlotChange = function _M3eSearchBarElement_handleTrailingSlotChange(e) {
|
|
22392
|
-
setCustomState$1(this, "
|
|
22493
|
+
setCustomState$1(this, "--with-trailing", hasAssignedNodes$1(e.target));
|
|
22393
22494
|
};
|
|
22394
22495
|
_M3eSearchBarElement_handleInputSlotChange = function _M3eSearchBarElement_handleInputSlotChange(e) {
|
|
22395
22496
|
const input = e.target.assignedElements({
|
|
@@ -22408,7 +22509,7 @@ _M3eSearchBarElement_handleInputSlotChange = function _M3eSearchBarElement_handl
|
|
|
22408
22509
|
}
|
|
22409
22510
|
};
|
|
22410
22511
|
_M3eSearchBarElement_handleInputInput = function _M3eSearchBarElement_handleInputInput() {
|
|
22411
|
-
setCustomState$1(this, "
|
|
22512
|
+
setCustomState$1(this, "--clearable", this.clearable && (__classPrivateFieldGet(this, _M3eSearchBarElement_input, "f")?.value ?? "").length > 0);
|
|
22412
22513
|
};
|
|
22413
22514
|
_M3eSearchBarElement_handleClearClick = function _M3eSearchBarElement_handleClearClick() {
|
|
22414
22515
|
this.clear();
|
|
@@ -22720,12 +22821,12 @@ _M3eSearchViewElement_handleInputInput = function _M3eSearchViewElement_handleIn
|
|
|
22720
22821
|
}
|
|
22721
22822
|
};
|
|
22722
22823
|
_M3eSearchViewElement_updateMode = function _M3eSearchViewElement_updateMode() {
|
|
22723
|
-
setCustomState$1(this, "
|
|
22724
|
-
setCustomState$1(this, "
|
|
22824
|
+
setCustomState$1(this, "--fullscreen", this.currentMode === "fullscreen");
|
|
22825
|
+
setCustomState$1(this, "--docked", this.currentMode === "docked");
|
|
22725
22826
|
};
|
|
22726
22827
|
_M3eSearchViewElement_updateClearableState = function _M3eSearchViewElement_updateClearableState() {
|
|
22727
22828
|
this._clearable = (__classPrivateFieldGet(this, _M3eSearchViewElement_input, "f")?.value ?? "").length > 0;
|
|
22728
|
-
setCustomState$1(this, "
|
|
22829
|
+
setCustomState$1(this, "--clearable", this._clearable);
|
|
22729
22830
|
};
|
|
22730
22831
|
_M3eSearchViewElement_handleInputFocus = function _M3eSearchViewElement_handleInputFocus() {
|
|
22731
22832
|
this.open = !__classPrivateFieldGet(this, _M3eSearchViewElement_closeOnInputFocus, "f");
|
|
@@ -23047,9 +23148,10 @@ var M3eButtonSegmentElement_1;
|
|
|
23047
23148
|
* @attr disabled - Whether the element is disabled.
|
|
23048
23149
|
* @attr value - A string representing the value of the segment.
|
|
23049
23150
|
*
|
|
23050
|
-
* @fires
|
|
23051
|
-
* @fires
|
|
23052
|
-
* @fires
|
|
23151
|
+
* @fires beforeinput - Dispatched before the checked state changes.
|
|
23152
|
+
* @fires input - Dispatched when the checked state changes.
|
|
23153
|
+
* @fires change - Dispatched when the checked state changes.
|
|
23154
|
+
* @fires click - Dispatched when the element is clicked.
|
|
23053
23155
|
*
|
|
23054
23156
|
* @cssprop --m3e-segmented-button-height - Total height of the segmented button.
|
|
23055
23157
|
* @cssprop --m3e-segmented-button-outline-thickness - Thickness of the button's border.
|
|
@@ -23147,30 +23249,29 @@ let M3eButtonSegmentElement = M3eButtonSegmentElement_1 = class M3eButtonSegment
|
|
|
23147
23249
|
_M3eButtonSegmentElement_clickHandler = new WeakMap();
|
|
23148
23250
|
_M3eButtonSegmentElement_instances = new WeakSet();
|
|
23149
23251
|
_M3eButtonSegmentElement_handleIconSlotChange = function _M3eButtonSegmentElement_handleIconSlotChange(e) {
|
|
23150
|
-
setCustomState$1(this, "
|
|
23252
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
23151
23253
|
};
|
|
23152
23254
|
_M3eButtonSegmentElement_handleClick = function _M3eButtonSegmentElement_handleClick(e) {
|
|
23153
23255
|
if (e.defaultPrevented) return;
|
|
23154
23256
|
const segmentedButton = this.closest("m3e-segmented-button");
|
|
23155
23257
|
if (segmentedButton && (segmentedButton.multi || !this.checked)) {
|
|
23156
|
-
|
|
23157
|
-
this.checked = !this.checked;
|
|
23158
|
-
if (this.dispatchEvent(new Event("input", {
|
|
23258
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
23159
23259
|
bubbles: true,
|
|
23160
|
-
composed: true,
|
|
23161
23260
|
cancelable: true
|
|
23162
23261
|
}))) {
|
|
23262
|
+
this.checked = !this.checked;
|
|
23163
23263
|
this.closest("m3e-segmented-button")?.[selectionManager].notifySelectionChange(this);
|
|
23264
|
+
this.dispatchEvent(new Event("input", {
|
|
23265
|
+
bubbles: true
|
|
23266
|
+
}));
|
|
23164
23267
|
this.dispatchEvent(new Event("change", {
|
|
23165
23268
|
bubbles: true
|
|
23166
23269
|
}));
|
|
23167
|
-
} else {
|
|
23168
|
-
this.checked = checked;
|
|
23169
23270
|
}
|
|
23170
23271
|
}
|
|
23171
23272
|
};
|
|
23172
23273
|
/** The styles of the element. */
|
|
23173
|
-
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; } }`;
|
|
23274
|
+
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(:is(:state(--hide-selection), :--hide-selection))) .wrapper, :host(:is(:state(--with-icon), :--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(:is(:state(--with-icon), :--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(:is(:state(--hide-selection), :--hide-selection)) .check, :host(:is(:state(--hide-selection), :--hide-selection):not(:is(:state(--with-icon), :--with-icon))) .icon { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]:not(:is(:state(--hide-selection), :--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; } }`;
|
|
23174
23275
|
__decorate([query(".focus-ring")], M3eButtonSegmentElement.prototype, "_focusRing", void 0);
|
|
23175
23276
|
__decorate([query(".state-layer")], M3eButtonSegmentElement.prototype, "_stateLayer", void 0);
|
|
23176
23277
|
__decorate([query(".ripple")], M3eButtonSegmentElement.prototype, "_ripple", void 0);
|
|
@@ -23217,8 +23318,9 @@ var _M3eSegmentedButtonElement_instances, _M3eSegmentedButtonElement_directional
|
|
|
23217
23318
|
* @attr multi - Whether multiple options can be selected.
|
|
23218
23319
|
* @attr name - The name that identifies the element when submitting the associated form.
|
|
23219
23320
|
*
|
|
23220
|
-
* @fires
|
|
23221
|
-
* @fires
|
|
23321
|
+
* @fires beforeinput - Dispatched before the checked state of a segment changes.
|
|
23322
|
+
* @fires input - Dispatched when the checked state of a segment changes.
|
|
23323
|
+
* @fires change - Dispatched when the checked state of a segment changes.
|
|
23222
23324
|
*
|
|
23223
23325
|
* @cssprop --m3e-segmented-button-start-shape - Border radius for the first segment in a segmented button.
|
|
23224
23326
|
* @cssprop --m3e-segmented-button-end-shape - Border radius for the last segment in a segmented button.
|
|
@@ -23302,7 +23404,7 @@ let M3eSegmentedButtonElement = class M3eSegmentedButtonElement extends Labelled
|
|
|
23302
23404
|
this.ariaDisabled = this.multi && this.disabled ? "true" : null;
|
|
23303
23405
|
}
|
|
23304
23406
|
if (changedProperties.has("hideSelectionIndicator")) {
|
|
23305
|
-
this.segments.forEach(x => setCustomState$1(x, "
|
|
23407
|
+
this.segments.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
23306
23408
|
}
|
|
23307
23409
|
}
|
|
23308
23410
|
/** @inheritdoc */
|
|
@@ -23314,10 +23416,10 @@ _M3eSegmentedButtonElement_handleSlotChange = function _M3eSegmentedButtonElemen
|
|
|
23314
23416
|
const {
|
|
23315
23417
|
added
|
|
23316
23418
|
} = this[selectionManager].setItems([...this.querySelectorAll("m3e-button-segment")]);
|
|
23317
|
-
added.forEach(x => setCustomState$1(x, "
|
|
23419
|
+
added.forEach(x => setCustomState$1(x, "--hide-selection", this.hideSelectionIndicator));
|
|
23318
23420
|
this[selectionManager].items.forEach((segment, i) => {
|
|
23319
|
-
setCustomState$1(segment, "
|
|
23320
|
-
setCustomState$1(segment, "
|
|
23421
|
+
setCustomState$1(segment, "--first", i == 0);
|
|
23422
|
+
setCustomState$1(segment, "--last", i == this[selectionManager].items.length - 1);
|
|
23321
23423
|
});
|
|
23322
23424
|
};
|
|
23323
23425
|
_M3eSegmentedButtonElement_handleKeyDown = function _M3eSegmentedButtonElement_handleKeyDown(e) {
|
|
@@ -23332,7 +23434,7 @@ _M3eSegmentedButtonElement_handleChange = function _M3eSegmentedButtonElement_ha
|
|
|
23332
23434
|
}));
|
|
23333
23435
|
};
|
|
23334
23436
|
/** The styles of the element. */
|
|
23335
|
-
M3eSegmentedButtonElement.styles = css`:host { display: inline-flex; vertical-align: middle; align-items: center; } ::slotted(:state(
|
|
23437
|
+
M3eSegmentedButtonElement.styles = css`:host { display: inline-flex; vertical-align: middle; align-items: center; } ::slotted(:is(:state(--first), :--first)) { border-start-start-radius: var(--m3e-segmented-button-start-shape, ${DesignToken$1.shape.corner.full}); border-end-start-radius: var(--m3e-segmented-button-start-shape, ${DesignToken$1.shape.corner.full}); } ::slotted(:is(:state(--last), :--last)) { border-start-end-radius: var(--m3e-segmented-button-end-shape, ${DesignToken$1.shape.corner.full}); border-end-end-radius: var(--m3e-segmented-button-end-shape, ${DesignToken$1.shape.corner.full}); } ::slotted(:not(:is(:state(--first), :--first))) { --_segmented-button-left-border: none; }`;
|
|
23336
23438
|
__decorate([property({
|
|
23337
23439
|
type: Boolean
|
|
23338
23440
|
})], M3eSegmentedButtonElement.prototype, "multi", void 0);
|
|
@@ -23385,8 +23487,9 @@ var M3eSelectElement_1;
|
|
|
23385
23487
|
* @attr panel-class - Class or list of classes to be applied to the select's overlay panel.
|
|
23386
23488
|
* @attr required - Whether the element is required.
|
|
23387
23489
|
*
|
|
23388
|
-
* @fires
|
|
23389
|
-
* @fires
|
|
23490
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
23491
|
+
* @fires input - Dispatched when the selected state changes.
|
|
23492
|
+
* @fires change - Dispatched when the selected state changes.
|
|
23390
23493
|
*
|
|
23391
23494
|
* @cssprop --m3e-form-field-font-size - The font size of the select control.
|
|
23392
23495
|
* @cssprop --m3e-form-field-font-weight - The font weight of the select control.
|
|
@@ -23551,7 +23654,7 @@ let M3eSelectElement = M3eSelectElement_1 = class M3eSelectElement extends Focus
|
|
|
23551
23654
|
update(changedProperties) {
|
|
23552
23655
|
super.update(changedProperties);
|
|
23553
23656
|
if (changedProperties.has("hideSelectionIndicator")) {
|
|
23554
|
-
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_options_get).forEach(x => setCustomState$1(x, "
|
|
23657
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_options_get).forEach(x => setCustomState$1(x, "--hide-selection-indicator", this.hideSelectionIndicator));
|
|
23555
23658
|
}
|
|
23556
23659
|
}
|
|
23557
23660
|
/** @inheritdoc */
|
|
@@ -23577,7 +23680,7 @@ _M3eSelectElement_handleMutation = function _M3eSelectElement_handleMutation() {
|
|
|
23577
23680
|
} = this._listKeyManager.setItems([...__classPrivateFieldGet(this, _M3eSelectElement_clone, "f").querySelectorAll("m3e-option")]);
|
|
23578
23681
|
added.forEach(x => {
|
|
23579
23682
|
x.id = x.id || `${__classPrivateFieldGet(this, _M3eSelectElement_id, "f")}-option-${this._listKeyManager.items.indexOf(x)}`;
|
|
23580
|
-
setCustomState$1(x, "
|
|
23683
|
+
setCustomState$1(x, "--hide-selection-indicator", this.hideSelectionIndicator);
|
|
23581
23684
|
});
|
|
23582
23685
|
this._options = [...this.querySelectorAll("m3e-option")];
|
|
23583
23686
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
@@ -23727,7 +23830,7 @@ _M3eSelectElement_destroyMenu = function _M3eSelectElement_destroyMenu(e) {
|
|
|
23727
23830
|
this.removeAttribute("aria-owns");
|
|
23728
23831
|
this.removeAttribute("aria-activedescendant");
|
|
23729
23832
|
this.requestUpdate();
|
|
23730
|
-
deleteCustomState$1(this, "
|
|
23833
|
+
deleteCustomState$1(this, "--open");
|
|
23731
23834
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
23732
23835
|
this.dispatchEvent(new ToggleEvent("toggle", {
|
|
23733
23836
|
oldState: e.oldState,
|
|
@@ -23769,13 +23872,13 @@ _M3eSelectElement_showMenu = function _M3eSelectElement_showMenu() {
|
|
|
23769
23872
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
23770
23873
|
setTimeout(() => {
|
|
23771
23874
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")?.show(this, __classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.menuAnchor);
|
|
23772
|
-
addCustomState$1(this, "
|
|
23875
|
+
addCustomState$1(this, "--open");
|
|
23773
23876
|
});
|
|
23774
23877
|
};
|
|
23775
23878
|
_M3eSelectElement_hideMenu = function _M3eSelectElement_hideMenu() {
|
|
23776
23879
|
if (!__classPrivateFieldGet(this, _M3eSelectElement_menu, "f")) return;
|
|
23777
23880
|
__classPrivateFieldGet(this, _M3eSelectElement_menu, "f").hide();
|
|
23778
|
-
deleteCustomState$1(this, "
|
|
23881
|
+
deleteCustomState$1(this, "--open");
|
|
23779
23882
|
};
|
|
23780
23883
|
_M3eSelectElement_activateOption = function _M3eSelectElement_activateOption(option) {
|
|
23781
23884
|
this.setAttribute("aria-activedescendant", option.id);
|
|
@@ -23806,13 +23909,12 @@ _M3eSelectElement_updateSelectionState = function _M3eSelectElement_updateSelect
|
|
|
23806
23909
|
_M3eSelectElement_selectOption = function _M3eSelectElement_selectOption(option) {
|
|
23807
23910
|
const selected = this.multi ? !option.selected : true;
|
|
23808
23911
|
if (option.selected === selected) return;
|
|
23809
|
-
|
|
23810
|
-
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, option);
|
|
23811
|
-
if (this.dispatchEvent(new Event("input", {
|
|
23912
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
23812
23913
|
bubbles: true,
|
|
23813
|
-
composed: true,
|
|
23814
23914
|
cancelable: true
|
|
23815
23915
|
}))) {
|
|
23916
|
+
option.selected = selected;
|
|
23917
|
+
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, option);
|
|
23816
23918
|
if (!this.multi) {
|
|
23817
23919
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_selected_get).filter(x => x !== option).forEach(x => {
|
|
23818
23920
|
x.selected = false;
|
|
@@ -23821,16 +23923,16 @@ _M3eSelectElement_selectOption = function _M3eSelectElement_selectOption(option)
|
|
|
23821
23923
|
}
|
|
23822
23924
|
this.requestUpdate();
|
|
23823
23925
|
__classPrivateFieldGet(this, _M3eSelectElement_instances, "a", _M3eSelectElement_formField_get)?.notifyControlStateChange();
|
|
23926
|
+
this.dispatchEvent(new Event("input", {
|
|
23927
|
+
bubbles: true
|
|
23928
|
+
}));
|
|
23824
23929
|
this.dispatchEvent(new Event("change", {
|
|
23825
23930
|
bubbles: true
|
|
23826
23931
|
}));
|
|
23827
|
-
} else {
|
|
23828
|
-
option.selected = !selected;
|
|
23829
|
-
__classPrivateFieldGet(this, _M3eSelectElement_instances, "m", _M3eSelectElement_updateSelectionState).call(this, option);
|
|
23830
23932
|
}
|
|
23831
23933
|
};
|
|
23832
23934
|
/** The styles of the element. */
|
|
23833
|
-
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(
|
|
23935
|
+
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(:is(:state(--open), :--open)) .focus-ring { display: none; }`;
|
|
23834
23936
|
/** @private */
|
|
23835
23937
|
M3eSelectElement.__nextId = 0;
|
|
23836
23938
|
__decorate([query(".focus-ring")], M3eSelectElement.prototype, "_focusRing", void 0);
|
|
@@ -24397,9 +24499,10 @@ var _M3eSliderThumbElement_instances, _M3eSliderThumbElement_labelText_get;
|
|
|
24397
24499
|
* @attr name - The name that identifies the element when submitting the associated form.
|
|
24398
24500
|
* @attr value - The value of the thumb.
|
|
24399
24501
|
*
|
|
24400
|
-
* @fires
|
|
24401
|
-
* @fires
|
|
24402
|
-
* @fires
|
|
24502
|
+
* @fires beforeinput - Dispatched before the value changes.
|
|
24503
|
+
* @fires input - Dispatched when the value changes.
|
|
24504
|
+
* @fires change - Dispatched when the value changes.
|
|
24505
|
+
* @fires click - Dispatched when the element is clicked.
|
|
24403
24506
|
*
|
|
24404
24507
|
* @cssprop --m3e-slider-thumb-width - Width of the slider thumb.
|
|
24405
24508
|
* @cssprop --m3e-slider-thumb-padding - Horizontal padding around the thumb.
|
|
@@ -24472,7 +24575,7 @@ __decorate([property({
|
|
|
24472
24575
|
})], M3eSliderThumbElement.prototype, "value", void 0);
|
|
24473
24576
|
M3eSliderThumbElement = __decorate([customElement$1("m3e-slider-thumb")], M3eSliderThumbElement);
|
|
24474
24577
|
|
|
24475
|
-
var _M3eSliderElement_instances, _M3eSliderElement_directionalitySubscription, _M3eSliderElement_thumbs, _M3eSliderElement_activeThumb, _M3eSliderElement_cachedWidth, _M3eSliderElement_cachedThumbWidth, _M3eSliderElement_cachedLeft, _M3eSliderElement_renderTick, _M3eSliderElement_handleSlotChange, _M3eSliderElement_updateThumbs, _M3eSliderElement_pointFromValue, _M3eSliderElement_valueFromPoint, _M3eSliderElement_updateCachedDimensions, _M3eSliderElement_updateDimensions, _M3eSliderElement_updateTicks, _M3eSliderElement_handlePointerDown, _M3eSliderElement_handlePointerMove, _M3eSliderElement_handlePointerUp, _M3eSliderElement_handleKeyDown, _M3eSliderElement_handleThumbChange, _M3eSliderElement_changeThumb;
|
|
24578
|
+
var _M3eSliderElement_instances, _M3eSliderElement_directionalitySubscription, _M3eSliderElement_changedThumbs, _M3eSliderElement_thumbs, _M3eSliderElement_activeThumb, _M3eSliderElement_cachedWidth, _M3eSliderElement_cachedThumbWidth, _M3eSliderElement_cachedLeft, _M3eSliderElement_renderTick, _M3eSliderElement_handleSlotChange, _M3eSliderElement_updateThumbs, _M3eSliderElement_pointFromValue, _M3eSliderElement_valueFromPoint, _M3eSliderElement_updateCachedDimensions, _M3eSliderElement_updateDimensions, _M3eSliderElement_updateTicks, _M3eSliderElement_handlePointerDown, _M3eSliderElement_handlePointerMove, _M3eSliderElement_handlePointerUp, _M3eSliderElement_handleKeyDown, _M3eSliderElement_handleKeyUp, _M3eSliderElement_handleThumbChange, _M3eSliderElement_changeThumb, _M3eSliderElement_commitThumb;
|
|
24476
24579
|
/**
|
|
24477
24580
|
* Allows for the selection of numeric values from a range.
|
|
24478
24581
|
*
|
|
@@ -24510,6 +24613,10 @@ var _M3eSliderElement_instances, _M3eSliderElement_directionalitySubscription, _
|
|
|
24510
24613
|
* @attr step - The value at which the thumb will snap.
|
|
24511
24614
|
* @attr size - The size of the slider.
|
|
24512
24615
|
*
|
|
24616
|
+
* @fires beforeinput - Dispatched before the value of a thumb changes.
|
|
24617
|
+
* @fires input - Dispatched when the value of a thumb changes.
|
|
24618
|
+
* @fires change - Dispatched when the value of a thumb changes.
|
|
24619
|
+
*
|
|
24513
24620
|
* @cssprop --m3e-slider-min-width - Minimum inline size of the slider host.
|
|
24514
24621
|
* @cssprop --m3e-slider-small-height - Height of the slider when size is small or extra-small.
|
|
24515
24622
|
* @cssprop --m3e-slider-medium-height - Height of the slider when size is medium.
|
|
@@ -24554,6 +24661,8 @@ let M3eSliderElement = class M3eSliderElement extends AttachInternals$1(LitEleme
|
|
|
24554
24661
|
/** @private */
|
|
24555
24662
|
this._ticks = new Array();
|
|
24556
24663
|
/** @private */
|
|
24664
|
+
_M3eSliderElement_changedThumbs.set(this, new Set());
|
|
24665
|
+
/** @private */
|
|
24557
24666
|
_M3eSliderElement_thumbs.set(this, new Array());
|
|
24558
24667
|
/** @private */
|
|
24559
24668
|
_M3eSliderElement_activeThumb.set(this, void 0);
|
|
@@ -24635,6 +24744,7 @@ let M3eSliderElement = class M3eSliderElement extends AttachInternals$1(LitEleme
|
|
|
24635
24744
|
/** @inheritdoc */
|
|
24636
24745
|
disconnectedCallback() {
|
|
24637
24746
|
super.disconnectedCallback();
|
|
24747
|
+
__classPrivateFieldGet(this, _M3eSliderElement_changedThumbs, "f").clear();
|
|
24638
24748
|
__classPrivateFieldGet(this, _M3eSliderElement_directionalitySubscription, "f")?.call(this);
|
|
24639
24749
|
}
|
|
24640
24750
|
/** @inheritdoc */
|
|
@@ -24646,10 +24756,11 @@ let M3eSliderElement = class M3eSliderElement extends AttachInternals$1(LitEleme
|
|
|
24646
24756
|
}
|
|
24647
24757
|
/** @inheritdoc */
|
|
24648
24758
|
render() {
|
|
24649
|
-
return html`<div class="base" tabindex="${ifDefined(!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>`;
|
|
24759
|
+
return html`<div class="base" tabindex="${ifDefined(!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)}" @keyup="${__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_handleKeyUp)}" @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>`;
|
|
24650
24760
|
}
|
|
24651
24761
|
};
|
|
24652
24762
|
_M3eSliderElement_directionalitySubscription = new WeakMap();
|
|
24763
|
+
_M3eSliderElement_changedThumbs = new WeakMap();
|
|
24653
24764
|
_M3eSliderElement_thumbs = new WeakMap();
|
|
24654
24765
|
_M3eSliderElement_activeThumb = new WeakMap();
|
|
24655
24766
|
_M3eSliderElement_cachedWidth = new WeakMap();
|
|
@@ -24760,6 +24871,7 @@ _M3eSliderElement_handlePointerDown = function _M3eSliderElement_handlePointerDo
|
|
|
24760
24871
|
if (e.target instanceof HTMLElement) {
|
|
24761
24872
|
e.target.setPointerCapture(e.pointerId);
|
|
24762
24873
|
}
|
|
24874
|
+
__classPrivateFieldGet(this, _M3eSliderElement_changedThumbs, "f").clear();
|
|
24763
24875
|
__classPrivateFieldSet(this, _M3eSliderElement_activeThumb, e.composedPath().find(x => x instanceof M3eSliderThumbElement), "f");
|
|
24764
24876
|
if (__classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f")) {
|
|
24765
24877
|
return;
|
|
@@ -24807,8 +24919,8 @@ _M3eSliderElement_handlePointerMove = function _M3eSliderElement_handlePointerMo
|
|
|
24807
24919
|
} else if (this.upperThumb) {
|
|
24808
24920
|
max = Math.min(max, this.upperThumb.value ?? this.max);
|
|
24809
24921
|
}
|
|
24810
|
-
if (hasCustomState$1(this, "
|
|
24811
|
-
deleteCustomState$1(this, "
|
|
24922
|
+
if (hasCustomState$1(this, "--animating")) {
|
|
24923
|
+
deleteCustomState$1(this, "--animating");
|
|
24812
24924
|
__classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f").style.transition = "";
|
|
24813
24925
|
}
|
|
24814
24926
|
__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_changeThumb).call(this, __classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f"), Math.min(max, Math.max(min, value)));
|
|
@@ -24820,6 +24932,7 @@ _M3eSliderElement_handlePointerUp = function _M3eSliderElement_handlePointerUp(e
|
|
|
24820
24932
|
e.target.releasePointerCapture(e.pointerId);
|
|
24821
24933
|
}
|
|
24822
24934
|
if (__classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f") && !__classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f").disabled) {
|
|
24935
|
+
__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_commitThumb).call(this, __classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f"));
|
|
24823
24936
|
__classPrivateFieldGet(this, _M3eSliderElement_activeThumb, "f").focus();
|
|
24824
24937
|
}
|
|
24825
24938
|
};
|
|
@@ -24886,6 +24999,12 @@ _M3eSliderElement_handleKeyDown = function _M3eSliderElement_handleKeyDown(e) {
|
|
|
24886
24999
|
break;
|
|
24887
25000
|
}
|
|
24888
25001
|
};
|
|
25002
|
+
_M3eSliderElement_handleKeyUp = function _M3eSliderElement_handleKeyUp(e) {
|
|
25003
|
+
const activeThumb = e.composedPath().find(x => x instanceof M3eSliderThumbElement);
|
|
25004
|
+
if (activeThumb) {
|
|
25005
|
+
__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_commitThumb).call(this, activeThumb);
|
|
25006
|
+
}
|
|
25007
|
+
};
|
|
24889
25008
|
_M3eSliderElement_handleThumbChange = function _M3eSliderElement_handleThumbChange(e) {
|
|
24890
25009
|
e.stopPropagation();
|
|
24891
25010
|
__classPrivateFieldGet(this, _M3eSliderElement_instances, "m", _M3eSliderElement_updateThumbs).call(this);
|
|
@@ -24893,35 +25012,39 @@ _M3eSliderElement_handleThumbChange = function _M3eSliderElement_handleThumbChan
|
|
|
24893
25012
|
};
|
|
24894
25013
|
_M3eSliderElement_changeThumb = function _M3eSliderElement_changeThumb(thumb, value, animate = false) {
|
|
24895
25014
|
if (thumb.value === value) return;
|
|
24896
|
-
|
|
24897
|
-
if (animate && !prefersReducedMotion$1()) {
|
|
24898
|
-
addCustomState$1(this, "-animating");
|
|
24899
|
-
thumb.addEventListener("transitionend", () => {
|
|
24900
|
-
thumb.style.transition = "";
|
|
24901
|
-
deleteCustomState$1(this, "-animating");
|
|
24902
|
-
}, {
|
|
24903
|
-
once: true
|
|
24904
|
-
});
|
|
24905
|
-
thumb.style.transition = `transform ${DesignToken$1.motion.spring.fastEffects}`;
|
|
24906
|
-
}
|
|
24907
|
-
thumb.value = value;
|
|
24908
|
-
thumb.markAsDirty();
|
|
24909
|
-
thumb.markAsTouched();
|
|
24910
|
-
if (thumb.dispatchEvent(new Event("input", {
|
|
25015
|
+
if (thumb.dispatchEvent(new Event("beforeinput", {
|
|
24911
25016
|
bubbles: true,
|
|
24912
|
-
composed: true,
|
|
24913
25017
|
cancelable: true
|
|
24914
25018
|
}))) {
|
|
25019
|
+
if (animate && !prefersReducedMotion$1()) {
|
|
25020
|
+
addCustomState$1(this, "--animating");
|
|
25021
|
+
thumb.addEventListener("transitionend", () => {
|
|
25022
|
+
thumb.style.transition = "";
|
|
25023
|
+
deleteCustomState$1(this, "--animating");
|
|
25024
|
+
}, {
|
|
25025
|
+
once: true
|
|
25026
|
+
});
|
|
25027
|
+
thumb.style.transition = `transform ${DesignToken$1.motion.spring.fastEffects}`;
|
|
25028
|
+
}
|
|
25029
|
+
__classPrivateFieldGet(this, _M3eSliderElement_changedThumbs, "f").add(thumb);
|
|
25030
|
+
thumb.value = value;
|
|
25031
|
+
thumb.markAsDirty();
|
|
25032
|
+
thumb.markAsTouched();
|
|
25033
|
+
thumb.dispatchEvent(new Event("input", {
|
|
25034
|
+
bubbles: true
|
|
25035
|
+
}));
|
|
25036
|
+
}
|
|
25037
|
+
};
|
|
25038
|
+
_M3eSliderElement_commitThumb = function _M3eSliderElement_commitThumb(thumb) {
|
|
25039
|
+
if (__classPrivateFieldGet(this, _M3eSliderElement_changedThumbs, "f").has(thumb)) {
|
|
24915
25040
|
thumb.dispatchEvent(new Event("change", {
|
|
24916
|
-
bubbles: true
|
|
24917
|
-
composed: true
|
|
25041
|
+
bubbles: true
|
|
24918
25042
|
}));
|
|
24919
|
-
|
|
24920
|
-
thumb.value = prev;
|
|
25043
|
+
__classPrivateFieldGet(this, _M3eSliderElement_changedThumbs, "f").delete(thumb);
|
|
24921
25044
|
}
|
|
24922
25045
|
};
|
|
24923
25046
|
/** The styles of the element. */
|
|
24924
|
-
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(
|
|
25047
|
+
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(:is(:state(--animating), :--animating)) .track-active, :host(:is(:state(--animating), :--animating)) .track-inactive.start, :host(:is(:state(--animating), :--animating)) .track-inactive.end { transition: ${unsafeCSS(`margin-inline-start ${DesignToken$1.motion.spring.fastEffects},
|
|
24925
25048
|
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; } }`;
|
|
24926
25049
|
__decorate([query(".base")], M3eSliderElement.prototype, "_base", void 0);
|
|
24927
25050
|
__decorate([state()], M3eSliderElement.prototype, "_ticks", void 0);
|
|
@@ -25430,8 +25553,9 @@ var _M3eSplitPaneElement_instances, _M3eSplitPaneElement_breakpointUnobserve, _M
|
|
|
25430
25553
|
* @attr value - A fractional value, between 0 and 100, indicating the size of the start pane.
|
|
25431
25554
|
* @attr wrap-detents - Whether cycling through detents will wrap.
|
|
25432
25555
|
*
|
|
25433
|
-
* @fires
|
|
25434
|
-
* @fires
|
|
25556
|
+
* @fires beforeinput - Dispatched continuously before the user adjusts the drag handle.
|
|
25557
|
+
* @fires input - Dispatched continuously while the user adjusts the drag handle.
|
|
25558
|
+
* @fires change - Dispatched when the user finishes adjusting the drag handle.
|
|
25435
25559
|
*
|
|
25436
25560
|
* @cssprop --m3e-split-pane-drag-handle-hover-color - Color used for the drag handle hover state.
|
|
25437
25561
|
* @cssprop --m3e-split-pane-drag-handle-hover-opacity - Opacity used for the drag handle hover state.
|
|
@@ -25464,7 +25588,7 @@ let M3eSplitPaneElement = class M3eSplitPaneElement extends FormAssociated$1(Dis
|
|
|
25464
25588
|
target: null,
|
|
25465
25589
|
isPressedKey: key => key === " ",
|
|
25466
25590
|
minPressedDuration: 150,
|
|
25467
|
-
callback: pressed => setCustomState$1(this, "
|
|
25591
|
+
callback: pressed => setCustomState$1(this, "--pressed", pressed && !this.disabled)
|
|
25468
25592
|
}));
|
|
25469
25593
|
/** @private */
|
|
25470
25594
|
_M3eSplitPaneElement_startMutationController.set(this, new MutationController$1(this, {
|
|
@@ -25627,10 +25751,10 @@ _M3eSplitPaneElement_renderDragHandle = function _M3eSplitPaneElement_renderDrag
|
|
|
25627
25751
|
return html`<div id="drag-handle" class="drag-handle" role="separator" tabindex="${ifDefined(this.disabled ? undefined : 0)}" aria-label="${this.label}" aria-controls="start" aria-disabled="${ifDefined(this.disabled ? "true" : undefined)}" aria-orientation="${this.currentOrientation === "horizontal" ? "vertical" : "horizontal"}" aria-valuemin="${this.min}" aria-valuemax="${this.max}" aria-valuenow="${this.value}" aria-valuetext="${ifDefined(this.valueFormatter?.(this.value, this.currentOrientation, M3eDirectionality.current))}" @pointerdown="${__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handlePointerDown)}" @pointerup="${__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handlePointerUp)}" @pointermove="${__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handlePointerMove)}" @keydown="${__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handleKeyDown)}" @dblclick="${__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_cycleDetent)}">${this.disabled ? nothing : html`<div class="handle"><m3e-focus-ring for="drag-handle"></m3e-focus-ring><m3e-state-layer for="drag-handle"></m3e-state-layer></div><div class="touch"></div>`}</div>`;
|
|
25628
25752
|
};
|
|
25629
25753
|
_M3eSplitPaneElement_handleStartSlotChange = function _M3eSplitPaneElement_handleStartSlotChange(e) {
|
|
25630
|
-
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handleSlotChange).call(this, e.target, __classPrivateFieldGet(this, _M3eSplitPaneElement_startMutationController, "f"), "
|
|
25754
|
+
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handleSlotChange).call(this, e.target, __classPrivateFieldGet(this, _M3eSplitPaneElement_startMutationController, "f"), "--with-start");
|
|
25631
25755
|
};
|
|
25632
25756
|
_M3eSplitPaneElement_handleEndSlotChange = function _M3eSplitPaneElement_handleEndSlotChange(e) {
|
|
25633
|
-
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handleSlotChange).call(this, e.target, __classPrivateFieldGet(this, _M3eSplitPaneElement_endMutationController, "f"), "
|
|
25757
|
+
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_handleSlotChange).call(this, e.target, __classPrivateFieldGet(this, _M3eSplitPaneElement_endMutationController, "f"), "--with-end");
|
|
25634
25758
|
};
|
|
25635
25759
|
_M3eSplitPaneElement_handleSlotChange = function _M3eSplitPaneElement_handleSlotChange(slot, mutationController, state) {
|
|
25636
25760
|
for (const target of mutationController.targets) {
|
|
@@ -25645,7 +25769,7 @@ _M3eSplitPaneElement_handleSlotChange = function _M3eSplitPaneElement_handleSlot
|
|
|
25645
25769
|
}
|
|
25646
25770
|
};
|
|
25647
25771
|
_M3eSplitPaneElement_updatePaneVisibility = function _M3eSplitPaneElement_updatePaneVisibility(pane) {
|
|
25648
|
-
setCustomState$1(this,
|
|
25772
|
+
setCustomState$1(this, `--with-${pane}`, __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_hasVisibleElements).call(this, this.shadowRoot?.querySelector(`slot[name='${pane}']`)));
|
|
25649
25773
|
};
|
|
25650
25774
|
_M3eSplitPaneElement_hasVisibleElements = function _M3eSplitPaneElement_hasVisibleElements(slot, assignedElements) {
|
|
25651
25775
|
assignedElements = assignedElements ?? [];
|
|
@@ -25664,10 +25788,10 @@ _M3eSplitPaneElement_initBreakpointMonitoring = function _M3eSplitPaneElement_in
|
|
|
25664
25788
|
}), "f");
|
|
25665
25789
|
};
|
|
25666
25790
|
_M3eSplitPaneElement_updateOrientation = function _M3eSplitPaneElement_updateOrientation() {
|
|
25667
|
-
setCustomState$1(this, "
|
|
25791
|
+
setCustomState$1(this, "--vertical", this.currentOrientation === "vertical");
|
|
25668
25792
|
};
|
|
25669
25793
|
_M3eSplitPaneElement_clearOrientation = function _M3eSplitPaneElement_clearOrientation() {
|
|
25670
|
-
deleteCustomState$1(this, "
|
|
25794
|
+
deleteCustomState$1(this, "--vertical");
|
|
25671
25795
|
this._orientation = undefined;
|
|
25672
25796
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_breakpointUnobserve, "f")?.call(this);
|
|
25673
25797
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_breakpointUnobserve, undefined, "f");
|
|
@@ -25738,8 +25862,7 @@ _M3eSplitPaneElement_handlePointerUp = function _M3eSplitPaneElement_handlePoint
|
|
|
25738
25862
|
}
|
|
25739
25863
|
if (__classPrivateFieldGet(this, _M3eSplitPaneElement_valueChanged, "f")) {
|
|
25740
25864
|
this.dispatchEvent(new Event("change", {
|
|
25741
|
-
bubbles: true
|
|
25742
|
-
composed: true
|
|
25865
|
+
bubbles: true
|
|
25743
25866
|
}));
|
|
25744
25867
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_valueChanged, false, "f");
|
|
25745
25868
|
}
|
|
@@ -25875,27 +25998,25 @@ _M3eSplitPaneElement_handleKeyDown = function _M3eSplitPaneElement_handleKeyDown
|
|
|
25875
25998
|
};
|
|
25876
25999
|
_M3eSplitPaneElement_changeValue = function _M3eSplitPaneElement_changeValue(value, emitChange = true, allowOvershoot = false) {
|
|
25877
26000
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_clearSnapAnimation).call(this);
|
|
25878
|
-
if (
|
|
25879
|
-
|
|
25880
|
-
|
|
25881
|
-
|
|
25882
|
-
|
|
25883
|
-
|
|
25884
|
-
|
|
25885
|
-
|
|
25886
|
-
|
|
25887
|
-
cancelable: true
|
|
25888
|
-
}))) {
|
|
26001
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
26002
|
+
bubbles: true,
|
|
26003
|
+
cancelable: true
|
|
26004
|
+
}))) {
|
|
26005
|
+
if (!allowOvershoot) {
|
|
26006
|
+
value = Math.max(this.min, Math.min(this.max, value));
|
|
26007
|
+
}
|
|
26008
|
+
if (value != this.value) {
|
|
26009
|
+
this.value = value;
|
|
25889
26010
|
this._base.style.setProperty("--_split-pane-value", `${this.value}%`);
|
|
26011
|
+
this.dispatchEvent(new Event("input", {
|
|
26012
|
+
bubbles: true
|
|
26013
|
+
}));
|
|
25890
26014
|
if (emitChange) {
|
|
25891
26015
|
this.dispatchEvent(new Event("change", {
|
|
25892
|
-
bubbles: true
|
|
25893
|
-
composed: true
|
|
26016
|
+
bubbles: true
|
|
25894
26017
|
}));
|
|
25895
26018
|
}
|
|
25896
26019
|
return true;
|
|
25897
|
-
} else {
|
|
25898
|
-
this.value = prev;
|
|
25899
26020
|
}
|
|
25900
26021
|
}
|
|
25901
26022
|
return false;
|
|
@@ -25959,7 +26080,7 @@ _M3eSplitPaneElement_snapToValue = function _M3eSplitPaneElement_snapToValue(val
|
|
|
25959
26080
|
value = Math.max(this.min, Math.min(this.max, value));
|
|
25960
26081
|
if (value === this.value) return;
|
|
25961
26082
|
if (!prefersReducedMotion$1()) {
|
|
25962
|
-
addCustomState$1(this, "
|
|
26083
|
+
addCustomState$1(this, "--animating");
|
|
25963
26084
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_snapAnimation, this._base.animate([{
|
|
25964
26085
|
"--_split-pane-value": `${this.value}%`
|
|
25965
26086
|
}, {
|
|
@@ -25971,7 +26092,7 @@ _M3eSplitPaneElement_snapToValue = function _M3eSplitPaneElement_snapToValue(val
|
|
|
25971
26092
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_snapAnimation, "f").onfinish = () => {
|
|
25972
26093
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_changeValue).call(this, value, emitChange);
|
|
25973
26094
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_snapAnimation, undefined, "f");
|
|
25974
|
-
deleteCustomState$1(this, "
|
|
26095
|
+
deleteCustomState$1(this, "--animating");
|
|
25975
26096
|
};
|
|
25976
26097
|
} else {
|
|
25977
26098
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_changeValue).call(this, value, emitChange);
|
|
@@ -25995,8 +26116,8 @@ _M3eSplitPaneElement_cycleDetent = function _M3eSplitPaneElement_cycleDetent() {
|
|
|
25995
26116
|
registerStyleSheet$1(css`@property --_split-pane-value { syntax: "<length-percentage>"; inherits: true; initial-value: 50%; }</length-percentage>`);
|
|
25996
26117
|
})();
|
|
25997
26118
|
/** The styles of the element. */
|
|
25998
|
-
M3eSplitPaneElement.styles = css`:host { display: block; } .base { display: flex; width: 100%; height: 100%; overflow: hidden; } :host(:not(:state(
|
|
25999
|
-
width ${DesignToken$1.motion.spring.fastEffects}, height ${DesignToken$1.motion.spring.fastEffects}`)}; } .touch { z-index: 1; position: absolute; height: 3rem; width: 3rem; margin: auto; touch-action: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:state(
|
|
26119
|
+
M3eSplitPaneElement.styles = css`:host { display: block; } .base { display: flex; width: 100%; height: 100%; overflow: hidden; } :host(:not(:is(:state(--vertical), :--vertical))) .base { flex-direction: row; } :host(:is(:state(--vertical), :--vertical)) .base { flex-direction: column; } :host(:is(:state(--with-start), :--with-start):is(:state(--with-end), :--with-end)) .start { flex: 0 1 calc(var(--_split-pane-value) - calc(var(--m3e-split-pane-drag-handle-container-width, 1.5rem) / 2)); } :host(:not(:is(:state(--with-end), :--with-end))) .start { flex: 1 1 auto; } :host(:is(:state(--with-end), :--with-end)) .end { flex: 1 1 auto; } :host(:not(:is(:state(--with-end), :--with-end))) .end { display: none; } :host(:not(:is(:state(--animating), :--animating))) .start[inert], :host(:not(:is(:state(--animating), :--animating))) .end[inert] { visibility: hidden; } .drag-handle { flex: none; display: flex; align-items: center; justify-content: center; outline: none; touch-action: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); --m3e-state-layer-hover-color: var(--m3e-split-pane-drag-handle-hover-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-opacity: var(--m3e-split-pane-drag-handle-hover-opacity, 8%); --m3e-state-layer-focus-color: var(--m3e-split-pane-drag-handle-focus-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-opacity: var(--m3e-split-pane-drag-handle-focus-opacity, 10%); } :host(:is(:not(:is(:state(--with-start), :--with-start)), :not(:is(:state(--with-end), :--with-end)))) .drag-handle { display: none; } :host(:not(:is(:state(--pressed), :--pressed))) .drag-handle:not([aria-disabled]) { cursor: grab; } :host(:is(:state(--pressed), :--pressed)) .drag-handle:not([aria-disabled]) { cursor: grabbing; } .handle { position: relative; transition: ${unsafeCSS(`background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
|
|
26120
|
+
width ${DesignToken$1.motion.spring.fastEffects}, height ${DesignToken$1.motion.spring.fastEffects}`)}; } .touch { z-index: 1; position: absolute; height: 3rem; width: 3rem; margin: auto; touch-action: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:is(:state(--pressed), :--pressed))) .handle { background-color: var(--m3e-split-pane-drag-handle-color, ${DesignToken$1.color.outline}); border-radius: var(--m3e-split-pane-drag-handle-shape, ${DesignToken$1.shape.corner.full}); } :host(:is(:state(--pressed), :--pressed)) .handle { background-color: var(--m3e-split-pane-drag-handle-pressed-color, ${DesignToken$1.color.onSurface}); border-radius: var(--m3e-split-pane-drag-handle-pressed-shape, ${DesignToken$1.shape.corner.medium}); } :host(:not(:is(:state(--vertical), :--vertical))) .drag-handle { flex-direction: column; width: var(--m3e-split-pane-drag-handle-container-width, 1.5rem); } :host(:not(:is(:state(--vertical), :--vertical)):not(:is(:state(--pressed), :--pressed))) .handle { width: var(--m3e-split-pane-drag-handle-width, 0.25rem); height: var(--m3e-split-pane-drag-handle-height, 3rem); } :host(:not(:is(:state(--vertical), :--vertical)):is(:state(--pressed), :--pressed)) .handle { width: var(--m3e-split-pane-drag-handle-pressed-width, 0.75rem); height: var(--m3e-split-pane-drag-handle-pressed-height, 3.25rem); } :host(:is(:state(--vertical), :--vertical)) .drag-handle { height: var(--m3e-split-pane-drag-handle-container-width, 1.5rem); } :host(:is(:state(--vertical), :--vertical):not(:is(:state(--pressed), :--pressed))) .handle { width: var(--m3e-split-pane-drag-handle-height, 3rem); height: var(--m3e-split-pane-drag-handle-width, 0.25rem); } :host(:is(:state(--vertical), :--vertical):is(:state(--pressed), :--pressed)) .handle { width: var(--m3e-split-pane-drag-handle-pressed-height, 3.25rem); height: var(--m3e-split-pane-drag-handle-pressed-width, 0.75rem); } @media (prefers-reduced-motion) { .handle { transition: none; } } @media (forced-colors: active) { :host(:is(:state(--pressed), :--pressed)) .handle, :host(:not(:is(:state(--pressed), :--pressed))) .handle { background-color: ButtonText; } }`;
|
|
26000
26121
|
__decorate([state()], M3eSplitPaneElement.prototype, "_orientation", void 0);
|
|
26001
26122
|
__decorate([query(".base")], M3eSplitPaneElement.prototype, "_base", void 0);
|
|
26002
26123
|
__decorate([query(".drag-handle")], M3eSplitPaneElement.prototype, "_dragHandle", void 0);
|
|
@@ -26176,9 +26297,10 @@ var M3eStepElement_1;
|
|
|
26176
26297
|
* @attr optional - Whether the step is optional.
|
|
26177
26298
|
* @attr selected - Whether the element is selected.
|
|
26178
26299
|
*
|
|
26179
|
-
* @fires
|
|
26180
|
-
* @fires
|
|
26181
|
-
* @fires
|
|
26300
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
26301
|
+
* @fires input - Dispatched when the selected state changes.
|
|
26302
|
+
* @fires change - Dispatched when the selected state changes.
|
|
26303
|
+
* @fires click - Dispatched when the element is clicked.
|
|
26182
26304
|
*
|
|
26183
26305
|
* @cssprop --m3e-step-shape - Border radius of the step container, defining its visual shape.
|
|
26184
26306
|
* @cssprop --m3e-step-padding - Internal padding of the step container, used for layout spacing.
|
|
@@ -26322,17 +26444,17 @@ _M3eStepElement_handleClick = function _M3eStepElement_handleClick(e) {
|
|
|
26322
26444
|
e.stopImmediatePropagation();
|
|
26323
26445
|
}
|
|
26324
26446
|
if (e.defaultPrevented || this.selected) return;
|
|
26325
|
-
this.
|
|
26326
|
-
if (this.dispatchEvent(new Event("input", {
|
|
26447
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
26327
26448
|
bubbles: true,
|
|
26328
|
-
composed: true,
|
|
26329
26449
|
cancelable: true
|
|
26330
|
-
})) && this.closest("m3e-stepper")?.
|
|
26450
|
+
})) && this.closest("m3e-stepper")?._moveTo(this.index)) {
|
|
26451
|
+
this.selected = true;
|
|
26452
|
+
this.dispatchEvent(new Event("input", {
|
|
26453
|
+
bubbles: true
|
|
26454
|
+
}));
|
|
26331
26455
|
this.dispatchEvent(new Event("change", {
|
|
26332
26456
|
bubbles: true
|
|
26333
26457
|
}));
|
|
26334
|
-
} else {
|
|
26335
|
-
this.selected = false;
|
|
26336
26458
|
}
|
|
26337
26459
|
};
|
|
26338
26460
|
/** The styles of the element. */
|
|
@@ -26447,7 +26569,9 @@ var _M3eStepperElement_instances, _M3eStepperElement_breakpointUnobserve, _M3eSt
|
|
|
26447
26569
|
* @slot step - Renders a step.
|
|
26448
26570
|
* @slot panel - Renders a panel.
|
|
26449
26571
|
*
|
|
26450
|
-
* @fires
|
|
26572
|
+
* @fires beforeinput - Dispatched before the selected state of a step changes.
|
|
26573
|
+
* @fires input - Dispatched when the selected state of a step changes.
|
|
26574
|
+
* @fires change - Dispatched when the selected step changes.
|
|
26451
26575
|
*
|
|
26452
26576
|
* @cssprop --m3e-step-divider-thickness - Thickness of the divider line between steps.
|
|
26453
26577
|
* @cssprop --m3e-step-divider-color - Color of the divider line between steps.
|
|
@@ -26516,6 +26640,16 @@ let M3eStepperElement = class M3eStepperElement extends ReconnectedCallback$1(At
|
|
|
26516
26640
|
* @returns {boolean} Whether the stepper moved to the specified `index`.
|
|
26517
26641
|
*/
|
|
26518
26642
|
moveTo(index) {
|
|
26643
|
+
if (this._moveTo(index)) {
|
|
26644
|
+
this.dispatchEvent(new Event("change", {
|
|
26645
|
+
bubbles: true
|
|
26646
|
+
}));
|
|
26647
|
+
return true;
|
|
26648
|
+
}
|
|
26649
|
+
return false;
|
|
26650
|
+
}
|
|
26651
|
+
/** @internal */
|
|
26652
|
+
_moveTo(index) {
|
|
26519
26653
|
const selectedStep = this.selectedStep;
|
|
26520
26654
|
if (selectedStep && selectedStep.index === index) {
|
|
26521
26655
|
return true;
|
|
@@ -26545,16 +26679,10 @@ let M3eStepperElement = class M3eStepperElement extends ReconnectedCallback$1(At
|
|
|
26545
26679
|
}
|
|
26546
26680
|
this._selectedIndex = index;
|
|
26547
26681
|
this[selectionManager].select(this.selectedStep);
|
|
26548
|
-
this.dispatchEvent(new Event("change", {
|
|
26549
|
-
bubbles: true
|
|
26550
|
-
}));
|
|
26551
26682
|
return true;
|
|
26552
26683
|
} else {
|
|
26553
26684
|
if (selectedStep) {
|
|
26554
26685
|
this[selectionManager].deselect(selectedStep);
|
|
26555
|
-
this.dispatchEvent(new Event("change", {
|
|
26556
|
-
bubbles: true
|
|
26557
|
-
}));
|
|
26558
26686
|
}
|
|
26559
26687
|
return false;
|
|
26560
26688
|
}
|
|
@@ -26574,7 +26702,7 @@ let M3eStepperElement = class M3eStepperElement extends ReconnectedCallback$1(At
|
|
|
26574
26702
|
/** @inheritdoc */
|
|
26575
26703
|
connectedCallback() {
|
|
26576
26704
|
super.connectedCallback();
|
|
26577
|
-
addCustomState$1(this, "
|
|
26705
|
+
addCustomState$1(this, "--no-animate");
|
|
26578
26706
|
}
|
|
26579
26707
|
/** @inheritdoc */
|
|
26580
26708
|
disconnectedCallback() {
|
|
@@ -26628,7 +26756,9 @@ _M3eStepperElement_renderHeader = function _M3eStepperElement_renderHeader() {
|
|
|
26628
26756
|
};
|
|
26629
26757
|
_M3eStepperElement_handleChange = function _M3eStepperElement_handleChange(e) {
|
|
26630
26758
|
e.stopPropagation();
|
|
26631
|
-
|
|
26759
|
+
this.dispatchEvent(new Event("change", {
|
|
26760
|
+
bubbles: true
|
|
26761
|
+
}));
|
|
26632
26762
|
};
|
|
26633
26763
|
_M3eStepperElement_handleSlotChange = function _M3eStepperElement_handleSlotChange() {
|
|
26634
26764
|
const {
|
|
@@ -26672,8 +26802,8 @@ _M3eStepperElement_handleSelectedChange = function _M3eStepperElement_handleSele
|
|
|
26672
26802
|
if (selected && this.matches(":focus-within") && !selected.matches(":focus")) {
|
|
26673
26803
|
selected.focus();
|
|
26674
26804
|
}
|
|
26675
|
-
if (hasCustomState$1(this, "
|
|
26676
|
-
requestAnimationFrame(() => deleteCustomState$1(this, "
|
|
26805
|
+
if (hasCustomState$1(this, "--no-animate")) {
|
|
26806
|
+
requestAnimationFrame(() => deleteCustomState$1(this, "--no-animate"));
|
|
26677
26807
|
}
|
|
26678
26808
|
};
|
|
26679
26809
|
_M3eStepperElement_checkValidity = function _M3eStepperElement_checkValidity() {
|
|
@@ -26695,7 +26825,7 @@ _M3eStepperElement_initBreakpointMonitoring = function _M3eStepperElement_initBr
|
|
|
26695
26825
|
};
|
|
26696
26826
|
_M3eStepperElement_updateDisplayOrder = function _M3eStepperElement_updateDisplayOrder() {
|
|
26697
26827
|
this[selectionManager].vertical = (this._orientation ?? this.orientation) === "vertical";
|
|
26698
|
-
setCustomState$1(this, "
|
|
26828
|
+
setCustomState$1(this, "--vertical", this[selectionManager].vertical);
|
|
26699
26829
|
if (!this[selectionManager].vertical) {
|
|
26700
26830
|
this.steps.forEach(x => {
|
|
26701
26831
|
x.style.order = "";
|
|
@@ -26713,10 +26843,10 @@ _M3eStepperElement_updateDisplayOrder = function _M3eStepperElement_updateDispla
|
|
|
26713
26843
|
}
|
|
26714
26844
|
};
|
|
26715
26845
|
(() => {
|
|
26716
|
-
registerStyleSheet$1(css`m3e-stepper:not(:state(
|
|
26846
|
+
registerStyleSheet$1(css`m3e-stepper:not(:is(:state(--vertical), :--vertical)) > .-m3e-step-divider::before { border-bottom-width: var(--m3e-step-divider-thickness, 1px); border-bottom-style: solid; border-bottom-color: var(--m3e-step-divider-color, ${DesignToken$1.color.outline}); } m3e-stepper:not(:is(:state(--vertical), :--vertical)) > [slot="step"]:not(.-m3e-step-divider):not(:first-of-type)::before, m3e-stepper:not(:is(:state(--vertical), :--vertical)) > [slot="step"]:not(.-m3e-step-divider):not(:last-of-type)::after { border-bottom-width: var(--m3e-step-divider-thickness, 1px); border-bottom-style: solid; border-bottom-color: var(--m3e-step-divider-color, ${DesignToken$1.color.outline}); } m3e-stepper:not(:is(:state(--vertical), :--vertical))[label-position="end"] > .-m3e-step-divider { margin-block: auto; } m3e-stepper:not(:is(:state(--vertical), :--vertical))[label-position="below"] > .-m3e-step-divider::before, m3e-stepper:not(:is(:state(--vertical), :--vertical))[label-position="below"] > [slot="step"]:not(.-m3e-step-divider):not(:first-of-type)::before, m3e-stepper:not(:is(:state(--vertical), :--vertical))[label-position="below"] > [slot="step"]:not(.-m3e-step-divider):not(:last-of-type)::after { margin-block-start: calc(var(--m3e-step-padding, 1.5rem) + calc(var(--m3e-step-icon-size, 1.5rem) / 2)); } m3e-stepper:is(:state(--vertical), :--vertical) > [slot="panel"] { margin-inline-start: calc(var(--m3e-step-padding, 1.5rem) + calc(var(--m3e-step-icon-size, 1.5rem) / 2)); } m3e-stepper:is(:state(--vertical), :--vertical) > [slot="panel"]:not(:last-of-type) { border-inline-start-width: var(--m3e-step-divider-thickness, 1px); border-inline-start-style: solid; border-inline-start-color: var(--m3e-step-divider-color, ${DesignToken$1.color.outline}); } m3e-stepper:is(:state(--vertical), :--vertical) > [slot="step"]:not(.-m3e-step-divider):not(:first-of-type)::before, m3e-stepper:is(:state(--vertical), :--vertical) > [slot="step"]:not(.-m3e-step-divider):not(:last-of-type)::after { margin-inline-start: calc(var(--m3e-step-padding, 1.5rem) + calc(var(--m3e-step-icon-size, 1.5rem) / 2)); border-inline-start-width: var(--m3e-step-divider-thickness, 1px); border-inline-start-style: solid; border-inline-start-color: var(--m3e-step-divider-color, ${DesignToken$1.color.outline}); }`);
|
|
26717
26847
|
})();
|
|
26718
26848
|
/** The styles of the element. */
|
|
26719
|
-
M3eStepperElement.styles = css`:host { display: flex; flex-direction: column; position: relative; } :host(:not(:state(
|
|
26849
|
+
M3eStepperElement.styles = css`:host { display: flex; flex-direction: column; position: relative; } :host(:not(:is(:state(--vertical), :--vertical))) .header { display: flex; align-items: flex-start; flex-wrap: nowrap; } :host(:not(:is(:state(--vertical), :--vertical))) ::slotted(.-m3e-step-divider) { flex: 1 1 auto; position: relative; min-width: 2rem; } :host(:not(:is(:state(--vertical), :--vertical))) ::slotted(.-m3e-step-divider)::before { content: ""; position: absolute; left: 0; right: 0; } :host(:not(:is(:state(--vertical), :--vertical)):not([label-position="below"])) ::slotted(.-m3e-step-divider)::before { top: 50%; } :host(:not(:is(:state(--vertical), :--vertical))) ::slotted([slot="step"]) { align-self: stretch; } :host(:not(:is(:state(--vertical), :--vertical))) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before, :host(:not(:is(:state(--vertical), :--vertical))) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { content: ""; display: block; position: absolute; top: 0; } :host(:not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before, :host(:not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { top: 50%; } :host(:not(:dir(rtl)):not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before { left: 0; right: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); } :host(:dir(rtl):not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before { right: 0; left: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); } :host(:not(:dir(rtl)):not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { left: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); right: 0; } :host(:dir(rtl):not(:is(:state(--vertical), :--vertical))[label-position="end"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { right: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); left: 0; } :host(:not(:dir(rtl)):not(:is(:state(--vertical), :--vertical))[label-position="below"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before { left: 0; right: calc(50% + calc(var(--m3e-step-icon-size, 1.5rem) / 2) + var(--m3e-step-divider-inset, 0.5rem)); } :host(:dir(rtl):not(:is(:state(--vertical), :--vertical))[label-position="below"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before { right: 0; left: calc(50% + calc(var(--m3e-step-icon-size, 1.5rem) / 2) + var(--m3e-step-divider-inset, 0.5rem)); } :host(:not(:dir(rtl)):not(:is(:state(--vertical), :--vertical))[label-position="below"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { left: calc(50% + calc(var(--m3e-step-icon-size, 1.5rem) / 2) + var(--m3e-step-divider-inset, 0.5rem)); right: 0; } :host(:dir(rtl):not(:is(:state(--vertical), :--vertical))[label-position="below"]) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { right: calc(50% + calc(var(--m3e-step-icon-size, 1.5rem) / 2) + var(--m3e-step-divider-inset, 0.5rem)); left: 0; } :host(:not(:is(:state(--vertical), :--vertical))[label-position="below"]) { --_step-direction: column; --_step-label-align-items: center; } :host(:is(:state(--vertical), :--vertical)) .header { display: contents; } :host(:is(:state(--vertical), :--vertical)) ::slotted([slot="step"]:not(.-m3e-step-divider)) { flex: none; } :host(:is(:state(--vertical), :--vertical)) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before, :host(:is(:state(--vertical), :--vertical)) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { content: ""; display: block; position: absolute; left: 0; } :host(:is(:state(--vertical), :--vertical)) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:first-of-type))::before { top: 0; bottom: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); } :host(:is(:state(--vertical), :--vertical)) ::slotted([slot="step"]:not(.-m3e-step-divider):not(:last-of-type))::after { top: calc(100% - var(--m3e-step-padding, 1.5rem) + var(--m3e-step-divider-inset, 0.5rem)); bottom: 0; } :host(:not(:is(:state(--vertical), :--vertical))) { --m3e-collapsible-animation-duration: 0ms; } :host(:is(:state(--no-animate), :--no-animate)) { --m3e-collapsible-animation-duration: 0ms; }`;
|
|
26720
26850
|
__decorate([state()], M3eStepperElement.prototype, "_orientation", void 0);
|
|
26721
26851
|
__decorate([state()], M3eStepperElement.prototype, "_selectedIndex", void 0);
|
|
26722
26852
|
__decorate([property({
|
|
@@ -26922,9 +27052,10 @@ var _M3eSwitchElement_instances, _M3eSwitchElement_clickHandler, _M3eSwitchEleme
|
|
|
26922
27052
|
* @attr name - The name that identifies the element when submitting the associated form.
|
|
26923
27053
|
* @attr value - A string representing the value of the switch.
|
|
26924
27054
|
*
|
|
26925
|
-
* @fires
|
|
26926
|
-
* @fires
|
|
26927
|
-
* @fires
|
|
27055
|
+
* @fires beforeinput - Dispatched before the checked state changes.
|
|
27056
|
+
* @fires input - Dispatched when the checked state changes.
|
|
27057
|
+
* @fires change - Dispatched when the checked state changes.
|
|
27058
|
+
* @fires click - Dispatched when the element is clicked.
|
|
26928
27059
|
*
|
|
26929
27060
|
* @cssprop --m3e-switch-selected-icon-color - Color of the icon when the switch is selected.
|
|
26930
27061
|
* @cssprop --m3e-switch-selected-icon-size - Size of the icon in the selected state.
|
|
@@ -27071,17 +27202,17 @@ _M3eSwitchElement_renderIcon = function _M3eSwitchElement_renderIcon() {
|
|
|
27071
27202
|
};
|
|
27072
27203
|
_M3eSwitchElement_handleClick = function _M3eSwitchElement_handleClick(e) {
|
|
27073
27204
|
if (e.defaultPrevented) return;
|
|
27074
|
-
this.
|
|
27075
|
-
if (this.dispatchEvent(new Event("input", {
|
|
27205
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
27076
27206
|
bubbles: true,
|
|
27077
|
-
composed: true,
|
|
27078
27207
|
cancelable: true
|
|
27079
27208
|
}))) {
|
|
27209
|
+
this.checked = !this.checked;
|
|
27210
|
+
this.dispatchEvent(new Event("input", {
|
|
27211
|
+
bubbles: true
|
|
27212
|
+
}));
|
|
27080
27213
|
this.dispatchEvent(new Event("change", {
|
|
27081
27214
|
bubbles: true
|
|
27082
27215
|
}));
|
|
27083
|
-
} else {
|
|
27084
|
-
this.checked = !this.checked;
|
|
27085
27216
|
}
|
|
27086
27217
|
// Prevent default avoids double-click in FireFox.
|
|
27087
27218
|
if (this.closest("label")) {
|
|
@@ -27133,9 +27264,10 @@ var M3eTabElement_1;
|
|
|
27133
27264
|
* @attr for - The identifier of the interactive control to which this element is attached.
|
|
27134
27265
|
* @attr selected - Whether the element is selected.
|
|
27135
27266
|
*
|
|
27136
|
-
* @fires
|
|
27137
|
-
* @fires
|
|
27138
|
-
* @fires
|
|
27267
|
+
* @fires beforeinput - Dispatched before the selected state changes.
|
|
27268
|
+
* @fires input - Dispatched when the selected state changes.
|
|
27269
|
+
* @fires change - Dispatched when the selected state changes.
|
|
27270
|
+
* @fires click - Dispatched when the element is clicked.
|
|
27139
27271
|
*
|
|
27140
27272
|
* @cssprop --m3e-tab-font-size - Font size for tab label.
|
|
27141
27273
|
* @cssprop --m3e-tab-font-weight - Font weight for tab label.
|
|
@@ -27212,18 +27344,18 @@ _M3eTabElement_handleClick = function _M3eTabElement_handleClick(e) {
|
|
|
27212
27344
|
e.stopImmediatePropagation();
|
|
27213
27345
|
}
|
|
27214
27346
|
if (e.defaultPrevented || this.selected) return;
|
|
27215
|
-
this.
|
|
27216
|
-
if (this.dispatchEvent(new Event("input", {
|
|
27347
|
+
if (this.dispatchEvent(new Event("beforeinput", {
|
|
27217
27348
|
bubbles: true,
|
|
27218
|
-
composed: true,
|
|
27219
27349
|
cancelable: true
|
|
27220
27350
|
}))) {
|
|
27351
|
+
this.selected = true;
|
|
27221
27352
|
this.closest("m3e-tabs")?.[selectionManager].notifySelectionChange(this);
|
|
27353
|
+
this.dispatchEvent(new Event("input", {
|
|
27354
|
+
bubbles: true
|
|
27355
|
+
}));
|
|
27222
27356
|
this.dispatchEvent(new Event("change", {
|
|
27223
27357
|
bubbles: true
|
|
27224
27358
|
}));
|
|
27225
|
-
} else {
|
|
27226
|
-
this.selected = false;
|
|
27227
27359
|
}
|
|
27228
27360
|
};
|
|
27229
27361
|
/** The styles of the element. */
|
|
@@ -27321,7 +27453,9 @@ const MIN_PRIMARY_TAB_WIDTH = 24;
|
|
|
27321
27453
|
* @attr stretch - Whether tabs are stretched to fill the header.
|
|
27322
27454
|
* @attr variant - The appearance variant of the tabs.
|
|
27323
27455
|
*
|
|
27324
|
-
* @fires
|
|
27456
|
+
* @fires beforeinput - Dispatched before the selected state of a tab changes.
|
|
27457
|
+
* @fires input - Dispatched when the selected state of a tab changes.
|
|
27458
|
+
* @fires change - Dispatched when the selected tab changes.
|
|
27325
27459
|
*
|
|
27326
27460
|
* @cssprop --m3e-tabs-paginator-button-icon-size - Overrides the icon size for paginator buttons.
|
|
27327
27461
|
* @cssprop --m3e-tabs-active-indicator-color - Color of the active tab indicator.
|
|
@@ -27374,7 +27508,7 @@ let M3eTabsElement = class M3eTabsElement extends AttachInternals$1(LitElement)
|
|
|
27374
27508
|
new ResizeController$1(this, {
|
|
27375
27509
|
skipInitial: true,
|
|
27376
27510
|
callback: () => {
|
|
27377
|
-
addCustomState$1(this, "
|
|
27511
|
+
addCustomState$1(this, "--no-animate");
|
|
27378
27512
|
__classPrivateFieldGet(this, _M3eTabsElement_instances, "m", _M3eTabsElement_updateInkBar).call(this);
|
|
27379
27513
|
}
|
|
27380
27514
|
});
|
|
@@ -27404,7 +27538,7 @@ let M3eTabsElement = class M3eTabsElement extends AttachInternals$1(LitElement)
|
|
|
27404
27538
|
/** @inheritdoc */
|
|
27405
27539
|
connectedCallback() {
|
|
27406
27540
|
super.connectedCallback();
|
|
27407
|
-
addCustomState$1(this, "
|
|
27541
|
+
addCustomState$1(this, "--no-animate");
|
|
27408
27542
|
__classPrivateFieldSet(this, _M3eTabsElement_directionalitySubscription, M3eDirectionality.observe(() => {
|
|
27409
27543
|
this.requestUpdate();
|
|
27410
27544
|
this[selectionManager].directionality = M3eDirectionality.current;
|
|
@@ -27482,13 +27616,13 @@ _M3eTabsElement_updateInkBar = function _M3eTabsElement_updateInkBar() {
|
|
|
27482
27616
|
}
|
|
27483
27617
|
this._tablist.style.setProperty("--_tabs-active-tab-position", `${left}px`);
|
|
27484
27618
|
this._tablist.style.setProperty("--_tabs-active-tab-size", `${width}px`);
|
|
27485
|
-
if (width > 0 && hasCustomState$1(this, "
|
|
27486
|
-
setTimeout(() => deleteCustomState$1(this, "
|
|
27619
|
+
if (width > 0 && hasCustomState$1(this, "--no-animate")) {
|
|
27620
|
+
setTimeout(() => deleteCustomState$1(this, "--no-animate"));
|
|
27487
27621
|
}
|
|
27488
27622
|
};
|
|
27489
27623
|
/** The styles of the element. */
|
|
27490
27624
|
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},
|
|
27491
|
-
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; } }`;
|
|
27625
|
+
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(:is(:state(--no-animate), :--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; } }`;
|
|
27492
27626
|
__decorate([query(".tablist")], M3eTabsElement.prototype, "_tablist", void 0);
|
|
27493
27627
|
__decorate([state()], M3eTabsElement.prototype, "_selectedIndex", void 0);
|
|
27494
27628
|
__decorate([property({
|
|
@@ -32086,7 +32220,7 @@ M3eThemeElement = __decorate([customElement$1("m3e-theme")], M3eThemeElement);
|
|
|
32086
32220
|
*
|
|
32087
32221
|
* @attr disabled - A value indicating whether the element is disabled.
|
|
32088
32222
|
*
|
|
32089
|
-
* @fires click -
|
|
32223
|
+
* @fires click - Dispatched when the element is clicked.
|
|
32090
32224
|
*
|
|
32091
32225
|
* @cssprop --m3e-toc-item-shape - Border radius of the TOC item.
|
|
32092
32226
|
* @cssprop --m3e-toc-item-padding-block - Block padding for the TOC item.
|
|
@@ -32250,7 +32384,7 @@ let M3eTocElement = class M3eTocElement extends HtmlFor$1(AttachInternals$1(Role
|
|
|
32250
32384
|
if (this._activeIndicator) {
|
|
32251
32385
|
const item = __classPrivateFieldGet(this, _M3eTocElement_selectionManager, "f").selectedItems[0];
|
|
32252
32386
|
if (!item) {
|
|
32253
|
-
setCustomState$1(this, "
|
|
32387
|
+
setCustomState$1(this, "--no-animate", true);
|
|
32254
32388
|
this._activeIndicator.style.top = `0px`;
|
|
32255
32389
|
this._activeIndicator.style.height = `0px`;
|
|
32256
32390
|
this._activeIndicator.style.visibility = "hidden";
|
|
@@ -32262,8 +32396,8 @@ let M3eTocElement = class M3eTocElement extends HtmlFor$1(AttachInternals$1(Role
|
|
|
32262
32396
|
this._activeIndicator.style.top = `${item.offsetTop}px`;
|
|
32263
32397
|
this._activeIndicator.style.height = `${item.clientHeight}px`;
|
|
32264
32398
|
this._activeIndicator.style.visibility = item.clientHeight == 0 ? "hidden" : "";
|
|
32265
|
-
if (hasCustomState$1(this, "
|
|
32266
|
-
setTimeout(() => setCustomState$1(this, "
|
|
32399
|
+
if (hasCustomState$1(this, "--no-animate")) {
|
|
32400
|
+
setTimeout(() => setCustomState$1(this, "--no-animate", false), 40);
|
|
32267
32401
|
}
|
|
32268
32402
|
}
|
|
32269
32403
|
}
|
|
@@ -32345,7 +32479,7 @@ let M3eTocElement = class M3eTocElement extends HtmlFor$1(AttachInternals$1(Role
|
|
|
32345
32479
|
removed
|
|
32346
32480
|
} = __classPrivateFieldGet(this, _M3eTocElement_selectionManager, "f").setItems([...(this.shadowRoot?.querySelectorAll("m3e-toc-item") ?? [])]);
|
|
32347
32481
|
if (!__classPrivateFieldGet(this, _M3eTocElement_selectionManager, "f").activeItem) {
|
|
32348
|
-
setCustomState$1(this, "
|
|
32482
|
+
setCustomState$1(this, "--no-animate", true);
|
|
32349
32483
|
__classPrivateFieldGet(this, _M3eTocElement_selectionManager, "f").updateActiveItem(added.find(x => !x.disabled));
|
|
32350
32484
|
}
|
|
32351
32485
|
for (const item of added) {
|
|
@@ -32379,10 +32513,10 @@ _M3eTocElement_renderNode = function _M3eTocElement_renderNode(node) {
|
|
|
32379
32513
|
return html`<li><m3e-toc-item tabindex="-1" .node="${node}" @click="${__classPrivateFieldGet(this, _M3eTocElement_instances, "m", _M3eTocElement_handleClick)}">${node.label}</m3e-toc-item>${node.nodes.length == 0 ? nothing : html`<ul>${node.nodes.map(x => __classPrivateFieldGet(this, _M3eTocElement_instances, "m", _M3eTocElement_renderNode).call(this, x))}</ul>`}</li>`;
|
|
32380
32514
|
};
|
|
32381
32515
|
_M3eTocElement_handleOverlineSlotChange = function _M3eTocElement_handleOverlineSlotChange(e) {
|
|
32382
|
-
setCustomState$1(this, "
|
|
32516
|
+
setCustomState$1(this, "--with-overline", hasAssignedNodes$1(e.target));
|
|
32383
32517
|
};
|
|
32384
32518
|
_M3eTocElement_handleTitleSlotChange = function _M3eTocElement_handleTitleSlotChange(e) {
|
|
32385
|
-
setCustomState$1(this, "
|
|
32519
|
+
setCustomState$1(this, "--with-title", hasAssignedNodes$1(e.target));
|
|
32386
32520
|
};
|
|
32387
32521
|
_M3eTocElement_handleClick = function _M3eTocElement_handleClick(e) {
|
|
32388
32522
|
if (e.target instanceof M3eTocItemElement && !e.target.disabled && e.target.node?.element) {
|
|
@@ -32404,7 +32538,7 @@ M3eTocElement.styles = css`:host { display: inline-block; position: relative; ov
|
|
|
32404
32538
|
height var(--m3e-toc-active-indicator-animation-duration, ${DesignToken$1.motion.duration.long1})
|
|
32405
32539
|
${DesignToken$1.motion.easing.standard},
|
|
32406
32540
|
top var(--m3e-toc-active-indicator-animation-duration, ${DesignToken$1.motion.duration.long1})
|
|
32407
|
-
${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; } }`;
|
|
32541
|
+
${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(:is(:state(--with-overline), :--with-overline))) .overline, :host(:not(:is(:state(--with-title), :--with-title))) .title, :host(:not(:is(:state(--with-overline), :--with-overline)):not(:is(:state(--with-title), :--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(:is(:state(--no-animate), :--no-animate)) .active-indicator { transition: none; } @media (prefers-reduced-motion) { .active-indicator { transition: none; } }`;
|
|
32408
32542
|
__decorate([state()], M3eTocElement.prototype, "_toc", void 0);
|
|
32409
32543
|
__decorate([query(".active-indicator")], M3eTocElement.prototype, "_activeIndicator", void 0);
|
|
32410
32544
|
__decorate([property({
|
|
@@ -32515,9 +32649,10 @@ _M3eToolbarElement_directionalitySubscription = new WeakMap();
|
|
|
32515
32649
|
_M3eToolbarElement_focusKeyManager = new WeakMap();
|
|
32516
32650
|
_M3eToolbarElement_instances = new WeakSet();
|
|
32517
32651
|
_M3eToolbarElement_handleSlotChange = function _M3eToolbarElement_handleSlotChange() {
|
|
32652
|
+
const items = M3eInteractivityChecker.findInteractiveElements(this, true);
|
|
32518
32653
|
const {
|
|
32519
32654
|
added
|
|
32520
|
-
} = __classPrivateFieldGet(this, _M3eToolbarElement_focusKeyManager, "f").setItems(
|
|
32655
|
+
} = __classPrivateFieldGet(this, _M3eToolbarElement_focusKeyManager, "f").setItems(items);
|
|
32521
32656
|
if (!__classPrivateFieldGet(this, _M3eToolbarElement_focusKeyManager, "f").activeItem) {
|
|
32522
32657
|
const active = added.find(x => !x.hasAttribute("disabled"));
|
|
32523
32658
|
if (active) {
|
|
@@ -33162,14 +33297,14 @@ _M3eTooltipElement_handleSlotChange = function _M3eTooltipElement_handleSlotChan
|
|
|
33162
33297
|
_M3eTooltipElement_handleToggle = function _M3eTooltipElement_handleToggle(e) {
|
|
33163
33298
|
if (e.newState === "open") {
|
|
33164
33299
|
const multiline = this._base.getBoundingClientRect().height > parseFloat(getComputedStyle(this._base).minHeight);
|
|
33165
|
-
setCustomState$1(this, "
|
|
33300
|
+
setCustomState$1(this, "--multiline", multiline);
|
|
33166
33301
|
}
|
|
33167
33302
|
};
|
|
33168
33303
|
/** The styles of the element. */
|
|
33169
|
-
M3eTooltipElement.styles = css`:host { display: contents; } .base { position: absolute; pointer-events: none; margin: unset; border: unset; word-break: normal; overflow-wrap:
|
|
33304
|
+
M3eTooltipElement.styles = css`:host { display: contents; } .base { position: absolute; pointer-events: none; margin: unset; border: unset; word-break: normal; overflow-wrap: break-word; padding: var(--m3e-tooltip-padding, 0.25rem 0.5rem); min-width: var(--m3e-tooltip-min-width, 2.5rem); max-width: var(--m3e-tooltip-max-width, 12.5rem); min-height: var(--m3e-tooltip-min-height, 1.5rem); max-height: var(--m3e-tooltip-max-height, 40vh); box-sizing: border-box; overflow: hidden; text-align: center; border-radius: var(--m3e-tooltip-shape, ${DesignToken$1.shape.corner.extraSmall}); background-color: var(--m3e-tooltip-container-color, ${DesignToken$1.color.inverseSurface}); color: var(--m3e-tooltip-supporting-text-color, ${DesignToken$1.color.inverseOnSurface}); font-size: var(--m3e-tooltip-supporting-text-font-size, ${DesignToken$1.typescale.standard.body.small.fontSize}); font-weight: var( --m3e-tooltip-supporting-text-font-weight, ${DesignToken$1.typescale.standard.body.small.fontWeight} ); line-height: var( --m3e-tooltip-supporting-text-line-height, ${DesignToken$1.typescale.standard.body.small.lineHeight} ); letter-spacing: var( --m3e-tooltip-supporting-text-tracking, ${DesignToken$1.typescale.standard.body.small.tracking} ); display: none; opacity: 0; transform: scale(0.8); transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
33170
33305
|
transform ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard},
|
|
33171
33306
|
overlay ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete,
|
|
33172
|
-
display ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:state(
|
|
33307
|
+
display ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard} allow-discrete`)}; } :host(:is(:state(--multiline), :--multiline)) .base { text-align: start; } .base::backdrop { background-color: transparent; } .base:popover-open { display: block; opacity: 1; transform: scale(1); } @starting-style { .base:popover-open { opacity: 0; transform: scale(0.8); } } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { background-color: Canvas; color: CanvasText; box-sizing: border-box; border: 1px solid CanvasText; } }`;
|
|
33173
33308
|
__decorate([property()], M3eTooltipElement.prototype, "position", void 0);
|
|
33174
33309
|
M3eTooltipElement = __decorate([customElement$1("m3e-tooltip")], M3eTooltipElement);
|
|
33175
33310
|
|
|
@@ -33198,11 +33333,11 @@ var M3eTreeItemElement_1;
|
|
|
33198
33333
|
* @attr open - Whether the item is expanded.
|
|
33199
33334
|
* @attr selected - Whether the item is selected.
|
|
33200
33335
|
*
|
|
33201
|
-
* @fires opening -
|
|
33202
|
-
* @fires opened -
|
|
33203
|
-
* @fires closing -
|
|
33204
|
-
* @fires closed -
|
|
33205
|
-
* @fires click -
|
|
33336
|
+
* @fires opening - Dispatched when the item begins to open.
|
|
33337
|
+
* @fires opened - Dispatched when the item has opened.
|
|
33338
|
+
* @fires closing - Dispatched when the item begins to close.
|
|
33339
|
+
* @fires closed - Dispatched when the item has closed.
|
|
33340
|
+
* @fires click - Dispatched when the element is clicked.
|
|
33206
33341
|
*
|
|
33207
33342
|
* @cssprop --m3e-tree-item-font-size - Font size for the item label.
|
|
33208
33343
|
* @cssprop --m3e-tree-item-font-weight - Font weight for the item label.
|
|
@@ -33393,10 +33528,10 @@ _M3eTreeItemElement_renderIcon = function _M3eTreeItemElement_renderIcon() {
|
|
|
33393
33528
|
return this.selected && !this.hasChildItems ? html`<slot name="selected-icon" @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleIconSlotChange)}">${icon}</slot>` : icon;
|
|
33394
33529
|
};
|
|
33395
33530
|
_M3eTreeItemElement_handleOpenToggleIconSlotChange = function _M3eTreeItemElement_handleOpenToggleIconSlotChange(e) {
|
|
33396
|
-
setCustomState$1(this, "
|
|
33531
|
+
setCustomState$1(this, "--with-open-toggle-icon", hasAssignedNodes$1(e.target));
|
|
33397
33532
|
};
|
|
33398
33533
|
_M3eTreeItemElement_handleIconSlotChange = function _M3eTreeItemElement_handleIconSlotChange(e) {
|
|
33399
|
-
setCustomState$1(this, "
|
|
33534
|
+
setCustomState$1(this, "--with-icon", hasAssignedNodes$1(e.target));
|
|
33400
33535
|
};
|
|
33401
33536
|
_M3eTreeItemElement_handleSlotChange = function _M3eTreeItemElement_handleSlotChange(e) {
|
|
33402
33537
|
__classPrivateFieldSet(this, _M3eTreeItemElement_link, e.target.assignedElements({
|
|
@@ -33410,7 +33545,7 @@ _M3eTreeItemElement_handleItemSlotChange = function _M3eTreeItemElement_handleIt
|
|
|
33410
33545
|
}).filter(x => x instanceof M3eTreeItemElement_1), "f");
|
|
33411
33546
|
const hadChildItems = this._hasChildItems;
|
|
33412
33547
|
this._hasChildItems = __classPrivateFieldGet(this, _M3eTreeItemElement_items, "f").length > 0;
|
|
33413
|
-
setCustomState$1(this, "
|
|
33548
|
+
setCustomState$1(this, "--with-items", this._hasChildItems);
|
|
33414
33549
|
if (hadChildItems || this._hasChildItems) {
|
|
33415
33550
|
if (this._multi && __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.cascade) {
|
|
33416
33551
|
let anySelected = false,
|
|
@@ -33434,7 +33569,7 @@ _M3eTreeItemElement_handleItemSlotChange = function _M3eTreeItemElement_handleIt
|
|
|
33434
33569
|
};
|
|
33435
33570
|
_M3eTreeItemElement_handleTreeChange = function _M3eTreeItemElement_handleTreeChange() {
|
|
33436
33571
|
this._multi = __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.multi === true;
|
|
33437
|
-
setCustomState$1(this, "
|
|
33572
|
+
setCustomState$1(this, "--multi", this._multi);
|
|
33438
33573
|
};
|
|
33439
33574
|
_M3eTreeItemElement_handleClick = function _M3eTreeItemElement_handleClick() {
|
|
33440
33575
|
if (this.disabled) return;
|
|
@@ -33473,8 +33608,8 @@ _M3eTreeItemElement_handleCollapsibleEvent = function _M3eTreeItemElement_handle
|
|
|
33473
33608
|
};
|
|
33474
33609
|
/** The styles of the element. */
|
|
33475
33610
|
M3eTreeItemElement.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; height: calc(var(--m3e-tree-item-height, 3rem) + ${DesignToken$1.density.calc(-3)}); padding-inline: var(--m3e-tree-item-padding, 1rem); font-size: var(--m3e-tree-item-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-tree-item-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-tree-item-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-tree-item-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
|
|
33476
|
-
background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-tree-item-shape, ${DesignToken$1.shape.corner.none}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .checkbox { flex: none; margin-inline-end: 0.5rem; } .icon, .toggle { flex: none; align-items: center; justify-content: center; position: relative; vertical-align: middle; margin-inline-end: 0.5rem; } .toggle { display: var(--_tree-item-toggle-display, none); } :host(:not(:state(-with-icon))) .icon { display: none; } .inset { margin-inline-start: calc(var(--m3e-tree-item-inset, 2rem) * var(--_tree-item-level, 0)); } :host([open]) .toggle-icon { transform: rotate(90deg); } :host(:not(:state(-with-items))) .toggle { visibility: hidden; } :host(:not(:state(-with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), ::slotted([slot="open-toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-tree-item-icon-size, 1.5rem); } .toggle-icon { transition: ${unsafeCSS(`transform var(--m3e-collapsible-animation-duration, ${DesignToken$1.motion.duration.medium1})
|
|
33477
|
-
${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-with-open-toggle-icon)[open]) slot[name="toggle-icon"], :host(:state(-with-open-toggle-icon):not([open])) slot[name="open-toggle-icon"] { display: none; } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-tree-item-label-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-tree-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-tree-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:disabled)) .base { color: var(--m3e-tree-item-selected-label-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-tree-item-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-tree-item-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-tree-item-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected]):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-tree-item-unselected-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-unselected-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-tree-item-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } .state-layer { margin-inline: auto; } ::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(:disabled)) .base { color: CanvasText; background-color: Canvas; } :host([selected]:not(:state(
|
|
33611
|
+
background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-tree-item-shape, ${DesignToken$1.shape.corner.none}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .checkbox { flex: none; margin-inline-end: 0.5rem; } .icon, .toggle { flex: none; align-items: center; justify-content: center; position: relative; vertical-align: middle; margin-inline-end: 0.5rem; } .toggle { display: var(--_tree-item-toggle-display, none); } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { display: none; } .inset { margin-inline-start: calc(var(--m3e-tree-item-inset, 2rem) * var(--_tree-item-level, 0)); } :host([open]) .toggle-icon { transform: rotate(90deg); } :host(:not(:is(:state(--with-items), :--with-items))) .toggle { visibility: hidden; } :host(:not(:is(:state(--with-items), :--with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), ::slotted([slot="open-toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-tree-item-icon-size, 1.5rem); } .toggle-icon { transition: ${unsafeCSS(`transform var(--m3e-collapsible-animation-duration, ${DesignToken$1.motion.duration.medium1})
|
|
33612
|
+
${DesignToken$1.motion.easing.standard}`)}; } :host(:is(:state(--with-open-toggle-icon), :--with-open-toggle-icon)[open]) slot[name="toggle-icon"], :host(:is(:state(--with-open-toggle-icon), :--with-open-toggle-icon):not([open])) slot[name="open-toggle-icon"] { display: none; } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-tree-item-label-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-tree-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-tree-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:disabled)) .base { color: var(--m3e-tree-item-selected-label-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-tree-item-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-tree-item-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-tree-item-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected]):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-tree-item-unselected-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-unselected-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-tree-item-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } .state-layer { margin-inline: auto; } ::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(:disabled)) .base { color: CanvasText; background-color: Canvas; } :host([selected]:not(:is(:state(--multi), :--multi)):not(:disabled)) slot[name="icon"], :host([selected]:not(:is(:state(--multi), :--multi)):not(:disabled)) slot[name="label"] { color: Highlight; } }`;
|
|
33478
33613
|
__decorate([query(".state-layer")], M3eTreeItemElement.prototype, "stateLayer", void 0);
|
|
33479
33614
|
__decorate([query(".focus-ring")], M3eTreeItemElement.prototype, "focusRing", void 0);
|
|
33480
33615
|
__decorate([query(".ripple")], M3eTreeItemElement.prototype, "ripple", void 0);
|
|
@@ -33563,7 +33698,7 @@ var M3eTreeElement_1;
|
|
|
33563
33698
|
* @attr multi - Whether multiple items can be selected.
|
|
33564
33699
|
* @attr cascade -Whether multiple item selection cascades to child items.
|
|
33565
33700
|
*
|
|
33566
|
-
* @fires change -
|
|
33701
|
+
* @fires change - Dispatched when the selected state changes.
|
|
33567
33702
|
*
|
|
33568
33703
|
* @cssprop --m3e-tree-scrollbar-width - Width of the tree scrollbar.
|
|
33569
33704
|
* @cssprop --m3e-tree-scrollbar-color - Color of the tree scrollbar.
|
|
@@ -33877,7 +34012,7 @@ _M3eTreeElement_cascadeAncestorSelected = function _M3eTreeElement_cascadeAncest
|
|
|
33877
34012
|
};
|
|
33878
34013
|
(() => {
|
|
33879
34014
|
// NOTE: unsafeCSS used here due to linting error with use of '>'.
|
|
33880
|
-
registerStyleSheet$1(css`${unsafeCSS(`m3e-tree:has(> m3e-tree-item:state(-with-items)) {
|
|
34015
|
+
registerStyleSheet$1(css`${unsafeCSS(`m3e-tree:has(> m3e-tree-item:is(:state(--with-items), :--with-items)) {
|
|
33881
34016
|
--_tree-item-toggle-display: flex;
|
|
33882
34017
|
}`)}`);
|
|
33883
34018
|
})();
|
|
@@ -33895,5 +34030,5 @@ __decorate([property({
|
|
|
33895
34030
|
})], M3eTreeElement.prototype, "cascade", void 0);
|
|
33896
34031
|
M3eTreeElement = M3eTreeElement_1 = __decorate([customElement$1("m3e-tree")], M3eTreeElement);
|
|
33897
34032
|
|
|
33898
|
-
export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eBreadcrumbElement, M3eBreadcrumbItemElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eContentPaneElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement, M3eListItemElement, M3eListOptionElement, M3eLoadingIndicatorElement, M3eMenuElement, M3eMenuItemCheckboxElement, M3eMenuItemElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement, M3eMonthViewElement, M3eMultiYearViewElement, M3eNavBarElement, M3eNavItemElement, M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement, M3eNavRailElement, M3eNavRailToggleElement, M3eOptGroupElement, M3eOptionElement, M3eOptionPanelElement, M3ePaginatorElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRadioElement, M3eRadioGroupElement, M3eRichTooltipActionElement, M3eRichTooltipElement, M3eRippleElement, M3eScrollContainerElement, M3eSearchBarElement, M3eSearchViewElement, M3eSegmentedButtonElement, M3eSelectElement, M3eSelectionListElement, M3eShapeElement, M3eSkeletonElement, M3eSlideElement, M3eSlideGroupElement, M3eSliderElement, M3eSliderThumbElement, M3eSnackbar, M3eSnackbarElement, M3eSplitButtonElement, M3eSplitPaneElement, M3eStateLayerElement, M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement, M3eSuggestionChipElement, M3eSwitchElement, M3eTabElement, M3eTabPanelElement, M3eTabsElement, M3eTextHighlightElement, M3eTextOverflowElement, M3eTextareaAutosizeElement, M3eThemeElement, M3eTocElement, M3eTocItemElement, M3eToolbarElement, M3eTooltipElement, M3eTreeElement, M3eTreeItemElement, M3eYearViewElement, MutationController, PressedController, ProgressElementIndicatorBase, ReadOnly, ReconnectedCallback, Required, RequiredConstraintValidation, ResizeController, Role, ScrollController, ScrollLockController, Selected, StepperButtonElementBase, SuppressInitialAnimation, TocGenerator, TooltipElementBase, Touched, VelocityTracker, Vertical, addCustomState, checkOrSelect, computeCssSize, computeLineCount, customElement, dateConverter, debounce, defaultValue, deleteCustomState, findFormFieldControl, focusWhenReady, forcedColorsActive, formValue, generateClipPaths, getColorFromImage, getScrollbarWidth, getTextContent, guid, hasAssignedNodes, hasCustomState, hasKeys, interceptProperty, internals, isAttachInternalsMixin, isCheckedIndeterminateMixin, isCheckedMixin, isCheckedOrSelected, isCheckedOrSelectedMixin, isConstraintValidationMixin, isDirtyMixin, isDisabledInteractiveMixin, isDisabledMixin, isFormAssociatedMixin, isFormFieldControl, isFormSubmitterMixin, isHtmlForMixin, isLabelledMixin, isLinkButtonMixin, isReadOnlyMixin, isRequiredConstraintValidationMixin, isRequiredMixin, isSelectedMixin, isTouchedMixin, isVerticalMixin, prefersReducedMotion, registerIcon, registerStyleSheet, renderPseudoLink, resolveElementById, resolveFragmentUrl, safeStyleMap, scrollIntoViewIfNeeded, setCustomState, spaceSeparatedStringConverter, updateLabels, validate, waitForUpgrade };
|
|
34033
|
+
export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eBreadcrumbElement, M3eBreadcrumbItemElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eContentPaneElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement, M3eListItemElement, M3eListOptionElement, M3eLoadingIndicatorElement, M3eMenuElement, M3eMenuItemCheckboxElement, M3eMenuItemElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement, M3eMonthViewElement, M3eMultiYearViewElement, M3eNavBarElement, M3eNavItemElement, M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement, M3eNavRailElement, M3eNavRailToggleElement, M3eOptGroupElement, M3eOptionElement, M3eOptionPanelElement, M3ePaginatorElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRadioElement, M3eRadioGroupElement, M3eRichTooltipActionElement, M3eRichTooltipElement, M3eRippleElement, M3eScrollContainerElement, M3eSearchBarElement, M3eSearchViewElement, M3eSegmentedButtonElement, M3eSelectElement, M3eSelectionListElement, M3eShapeElement, M3eSkeletonElement, M3eSlideElement, M3eSlideGroupElement, M3eSliderElement, M3eSliderThumbElement, M3eSnackbar, M3eSnackbarElement, M3eSplitButtonElement, M3eSplitPaneElement, M3eStateLayerElement, M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement, M3eSuggestionChipElement, M3eSwitchElement, M3eTabElement, M3eTabPanelElement, M3eTabsElement, M3eTextHighlightElement, M3eTextOverflowElement, M3eTextareaAutosizeElement, M3eThemeElement, M3eTocElement, M3eTocItemElement, M3eToolbarElement, M3eTooltipElement, M3eTreeElement, M3eTreeItemElement, M3eYearViewElement, MutationController, PressedController, ProgressElementIndicatorBase, ReadOnly, ReconnectedCallback, Required, RequiredConstraintValidation, ResizeController, Role, ScrollController, ScrollLockController, Selected, StepperButtonElementBase, SuppressInitialAnimation, TocGenerator, TooltipElementBase, Touched, VelocityTracker, Vertical, addCustomState, checkOrSelect, computeCssSize, computeLineCount, customElement, dateConverter, debounce, defaultValue, deleteCustomState, findFormFieldControl, focusWhenReady, forcedColorsActive, formValue, generateClipPaths, getColorFromImage, getScrollbarWidth, getTextContent, guid, hasAssignedNodes, hasCustomState, hasKeys, interceptProperty, internals, isAttachInternalsMixin, isCheckedIndeterminateMixin, isCheckedMixin, isCheckedOrSelected, isCheckedOrSelectedMixin, isConstraintValidationMixin, isDirtyMixin, isDisabledInteractiveMixin, isDisabledMixin, isFormAssociatedMixin, isFormFieldControl, isFormSubmitterMixin, isHtmlForMixin, isLabelledMixin, isLinkButtonMixin, isReadOnlyMixin, isRequiredConstraintValidationMixin, isRequiredMixin, isSelectedMixin, isTouchedMixin, isVerticalMixin, prefersReducedMotion, registerIcon, registerStyleSheet, renderPseudoLink, resolveElementById, resolveFragmentUrl, resumeAnimation, safeStyleMap, scrollIntoViewIfNeeded, setCustomState, spaceSeparatedStringConverter, updateLabels, validate, waitForUpgrade };
|
|
33899
34034
|
//# sourceMappingURL=all.js.map
|