@material/web 1.1.1 → 1.1.2-nightly.043bbad.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/button/internal/button.js +1 -1
- package/button/internal/button.js.map +1 -1
- package/checkbox/internal/checkbox.js +2 -1
- package/checkbox/internal/checkbox.js.map +1 -1
- package/chips/internal/filter-chip.js +8 -2
- package/chips/internal/filter-chip.js.map +1 -1
- package/dialog/internal/dialog.d.ts +3 -6
- package/dialog/internal/dialog.js +57 -6
- package/dialog/internal/dialog.js.map +1 -1
- package/field/internal/field.js +7 -2
- package/field/internal/field.js.map +1 -1
- package/internal/events/dispatch-hooks.d.ts +85 -0
- package/internal/events/dispatch-hooks.js +151 -0
- package/internal/events/dispatch-hooks.js.map +1 -0
- package/internal/{controller/events.d.ts → events/form-label-activation.d.ts} +0 -22
- package/internal/{controller/events.js → events/form-label-activation.js} +1 -35
- package/internal/events/form-label-activation.js.map +1 -0
- package/internal/events/redispatch-event.d.ts +27 -0
- package/internal/events/redispatch-event.js +40 -0
- package/internal/events/redispatch-event.js.map +1 -0
- package/labs/badge/internal/badge.d.ts +1 -1
- package/labs/badge/internal/badge.js +1 -1
- package/labs/badge/internal/badge.js.map +1 -1
- package/labs/behaviors/validators/text-field-validator.js +12 -4
- package/labs/behaviors/validators/text-field-validator.js.map +1 -1
- package/labs/card/internal/_outlined-card.scss +3 -2
- package/labs/card/internal/_shared.scss +18 -4
- package/labs/card/internal/card.js +2 -1
- package/labs/card/internal/card.js.map +1 -1
- package/labs/card/internal/outlined-styles.css.js +1 -1
- package/labs/card/internal/outlined-styles.css.js.map +1 -1
- package/labs/card/internal/shared-styles.css.js +1 -1
- package/labs/card/internal/shared-styles.css.js.map +1 -1
- package/labs/navigationbar/internal/navigation-bar.d.ts +1 -1
- package/labs/navigationbar/internal/navigation-bar.js +1 -1
- package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
- package/labs/navigationdrawer/internal/_navigation-drawer-modal.scss +1 -1
- package/labs/navigationdrawer/internal/_navigation-drawer.scss +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal.d.ts +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer.d.ts +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer.js +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
- package/labs/navigationtab/internal/navigation-tab.d.ts +1 -1
- package/labs/navigationtab/internal/navigation-tab.js +2 -2
- package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
- package/labs/navigationtab/internal/state.d.ts +0 -6
- package/labs/navigationtab/internal/state.js.map +1 -1
- package/labs/segmentedbutton/internal/_outlined-segmented-button.scss +2 -2
- package/labs/segmentedbutton/internal/_shared.scss +1 -1
- package/labs/segmentedbutton/internal/outlined-segmented-button.d.ts +1 -1
- package/labs/segmentedbutton/internal/outlined-segmented-button.js +1 -1
- package/labs/segmentedbutton/internal/outlined-segmented-button.js.map +1 -1
- package/labs/segmentedbuttonset/internal/outlined-segmented-button-set.d.ts +1 -1
- package/labs/segmentedbuttonset/internal/outlined-segmented-button-set.js +1 -1
- package/labs/segmentedbuttonset/internal/outlined-segmented-button-set.js.map +1 -1
- package/menu/internal/_menu.scss +1 -0
- package/menu/internal/menu-styles.css.js +1 -1
- package/menu/internal/menu-styles.css.js.map +1 -1
- package/package.json +23 -9
- package/progress/internal/_linear-progress.scss +6 -4
- package/progress/internal/linear-progress-styles.css.js +1 -1
- package/progress/internal/linear-progress-styles.css.js.map +1 -1
- package/progress/internal/linear-progress.js +4 -1
- package/progress/internal/linear-progress.js.map +1 -1
- package/radio/internal/radio.js +1 -1
- package/radio/internal/radio.js.map +1 -1
- package/ripple/internal/ripple.js +11 -0
- package/ripple/internal/ripple.js.map +1 -1
- package/select/harness.d.ts +1 -0
- package/select/harness.js +7 -0
- package/select/harness.js.map +1 -1
- package/select/internal/_shared.scss +10 -1
- package/select/internal/select.d.ts +7 -1
- package/select/internal/select.js +71 -28
- package/select/internal/select.js.map +1 -1
- package/select/internal/selectoption/select-option.d.ts +26 -1
- package/select/internal/selectoption/select-option.js.map +1 -1
- package/select/internal/selectoption/selectOptionController.d.ts +2 -26
- package/select/internal/selectoption/selectOptionController.js.map +1 -1
- package/select/internal/shared-styles.css.js +1 -1
- package/select/internal/shared-styles.css.js.map +1 -1
- package/select/internal/shared.d.ts +1 -1
- package/select/internal/shared.js.map +1 -1
- package/select/select-option.d.ts +1 -0
- package/select/select-option.js.map +1 -1
- package/slider/internal/_slider.scss +31 -33
- package/slider/internal/slider-styles.css.js +1 -1
- package/slider/internal/slider-styles.css.js.map +1 -1
- package/slider/internal/slider.js +4 -3
- package/slider/internal/slider.js.map +1 -1
- package/switch/internal/switch.js +2 -1
- package/switch/internal/switch.js.map +1 -1
- package/tabs/internal/_tab.scss +7 -5
- package/tabs/internal/tab-styles.css.js +1 -1
- package/tabs/internal/tab-styles.css.js.map +1 -1
- package/textfield/internal/_input.scss +1 -1
- package/textfield/internal/shared-styles.css.js +1 -1
- package/textfield/internal/shared-styles.css.js.map +1 -1
- package/textfield/internal/text-field.d.ts +26 -0
- package/textfield/internal/text-field.js +35 -5
- package/textfield/internal/text-field.js.map +1 -1
- package/tokens/_md-comp-elevated-button.scss +1 -1
- package/tokens/_md-comp-filled-button.scss +1 -1
- package/tokens/_md-comp-filled-tonal-button.scss +1 -1
- package/tokens/_md-comp-outlined-button.scss +1 -1
- package/tokens/_md-comp-text-button.scss +1 -1
- package/internal/controller/events.js.map +0 -1
|
@@ -8,7 +8,7 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
8
8
|
import { NavigationTab } from '../../navigationtab/internal/navigation-tab.js';
|
|
9
9
|
import { NavigationBarState } from './state.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* b/265346501 - add docs
|
|
12
12
|
*
|
|
13
13
|
* @fires navigation-bar-activated {CustomEvent<tab: NavigationTab, activeIndex: number>}
|
|
14
14
|
* Dispatched whenever the `activeIndex` changes. --bubbles --composed
|
|
@@ -10,7 +10,7 @@ import { property, queryAssignedElements } from 'lit/decorators.js';
|
|
|
10
10
|
import { requestUpdateOnAriaChange } from '../../../internal/aria/delegate.js';
|
|
11
11
|
import { isRtl } from '../../../internal/controller/is-rtl.js';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* b/265346501 - add docs
|
|
14
14
|
*
|
|
15
15
|
* @fires navigation-bar-activated {CustomEvent<tab: NavigationTab, activeIndex: number>}
|
|
16
16
|
* Dispatched whenever the `activeIndex` changes. --bubbles --composed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-bar.js","sourceRoot":"","sources":["navigation-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAC,KAAK,EAAC,MAAM,wCAAwC,CAAC;AAM7D;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAA7C;;QAKuD,gBAAW,GAAG,CAAC,CAAC;QAGrE,uBAAkB,GAAG,KAAK,CAAC;QAE3B,SAAI,GAAoB,EAAE,CAAC;IAkI7B,CAAC;IA7HoB,MAAM;QACvB,iCAAiC;QACjC,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,OAAO,IAAI,CAAA;;;mBAGI,SAAS,IAAI,OAAO;kBACrB,IAAI,CAAC,aAAa;qCACC,IAAI,CAAC,8BAA8B;iCACvC,IAAI,CAAC,4BAA4B;;;YAGtD,CAA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IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAC,CAAC;yDAClC;AAKV;IADhB,qBAAqB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;kDACQ","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../elevation/elevation.js';\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\nimport {isRtl} from '../../../internal/controller/is-rtl.js';\nimport {NavigationTab} from '../../navigationtab/internal/navigation-tab.js';\n\nimport {NavigationTabInteractionEvent} from './constants.js';\nimport {NavigationBarState} from './state.js';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"navigation-bar.js","sourceRoot":"","sources":["navigation-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAC,KAAK,EAAC,MAAM,wCAAwC,CAAC;AAM7D;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAA7C;;QAKuD,gBAAW,GAAG,CAAC,CAAC;QAGrE,uBAAkB,GAAG,KAAK,CAAC;QAE3B,SAAI,GAAoB,EAAE,CAAC;IAkI7B,CAAC;IA7HoB,MAAM;QACvB,iCAAiC;QACjC,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,OAAO,IAAI,CAAA;;;mBAGI,SAAS,IAAI,OAAO;kBACrB,IAAI,CAAC,aAAa;qCACC,I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E,cAAc,EAAC,CAAC;kDAAiB;AAGrE;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAC,CAAC;yDAClC;AAKV;IADhB,qBAAqB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;kDACQ","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../elevation/elevation.js';\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\nimport {isRtl} from '../../../internal/controller/is-rtl.js';\nimport {NavigationTab} from '../../navigationtab/internal/navigation-tab.js';\n\nimport {NavigationTabInteractionEvent} from './constants.js';\nimport {NavigationBarState} from './state.js';\n\n/**\n * b/265346501 - add docs\n *\n * @fires navigation-bar-activated {CustomEvent<tab: NavigationTab, activeIndex: number>}\n * Dispatched whenever the `activeIndex` changes. --bubbles --composed\n */\nexport class NavigationBar extends LitElement implements NavigationBarState {\n static {\n requestUpdateOnAriaChange(NavigationBar);\n }\n\n @property({type: Number, attribute: 'active-index'}) activeIndex = 0;\n\n @property({type: Boolean, attribute: 'hide-inactive-labels'})\n hideInactiveLabels = false;\n\n tabs: NavigationTab[] = [];\n\n @queryAssignedElements({flatten: true})\n private readonly tabsElement!: NavigationTab[];\n\n protected override render() {\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`<div\n class=\"md3-navigation-bar\"\n role=\"tablist\"\n aria-label=${ariaLabel || nothing}\n @keydown=\"${this.handleKeydown}\"\n @navigation-tab-interaction=\"${this.handleNavigationTabInteraction}\"\n @navigation-tab-rendered=${this.handleNavigationTabConnected}\n ><md-elevation></md-elevation\n ><div class=\"md3-navigation-bar__tabs-slot-container\"><slot></slot></div\n ></div>`;\n }\n\n protected override updated(changedProperties: PropertyValues<NavigationBar>) {\n if (changedProperties.has('activeIndex')) {\n this.onActiveIndexChange(this.activeIndex);\n this.dispatchEvent(\n new CustomEvent('navigation-bar-activated', {\n detail: {\n tab: this.tabs[this.activeIndex],\n activeIndex: this.activeIndex,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n if (changedProperties.has('hideInactiveLabels')) {\n this.onHideInactiveLabelsChange(this.hideInactiveLabels);\n }\n\n if (changedProperties.has('tabs')) {\n this.onHideInactiveLabelsChange(this.hideInactiveLabels);\n this.onActiveIndexChange(this.activeIndex);\n }\n }\n\n override firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n this.layout();\n }\n\n layout() {\n if (!this.tabsElement) return;\n const navTabs: NavigationTab[] = [];\n for (const node of this.tabsElement) {\n navTabs.push(node);\n }\n this.tabs = navTabs;\n }\n\n private handleNavigationTabConnected(event: CustomEvent) {\n const target = event.target as NavigationTab;\n if (this.tabs.indexOf(target) === -1) {\n this.layout();\n }\n }\n\n private handleNavigationTabInteraction(event: NavigationTabInteractionEvent) {\n this.activeIndex = this.tabs.indexOf(event.detail.state as NavigationTab);\n }\n\n private handleKeydown(event: KeyboardEvent) {\n const key = event.key;\n const focusedTabIndex = this.tabs.findIndex((tab) => {\n return tab.matches(':focus-within');\n });\n const isRTL = isRtl(this);\n const maxIndex = this.tabs.length - 1;\n\n if (key === 'Enter' || key === ' ') {\n this.activeIndex = focusedTabIndex;\n return;\n }\n\n if (key === 'Home') {\n this.tabs[0].focus();\n return;\n }\n\n if (key === 'End') {\n this.tabs[maxIndex].focus();\n return;\n }\n\n const toNextTab =\n (key === 'ArrowRight' && !isRTL) || (key === 'ArrowLeft' && isRTL);\n if (toNextTab && focusedTabIndex === maxIndex) {\n this.tabs[0].focus();\n return;\n }\n if (toNextTab) {\n this.tabs[focusedTabIndex + 1].focus();\n return;\n }\n\n const toPreviousTab =\n (key === 'ArrowLeft' && !isRTL) || (key === 'ArrowRight' && isRTL);\n if (toPreviousTab && focusedTabIndex === 0) {\n this.tabs[maxIndex].focus();\n return;\n }\n if (toPreviousTab) {\n this.tabs[focusedTabIndex - 1].focus();\n return;\n }\n }\n\n private onActiveIndexChange(value: number) {\n if (!this.tabs[value]) {\n throw new Error('NavigationBar: activeIndex is out of bounds.');\n }\n for (let i = 0; i < this.tabs.length; i++) {\n this.tabs[i].active = i === value;\n }\n }\n\n private onHideInactiveLabelsChange(value: boolean) {\n for (const tab of this.tabs) {\n tab.hideInactiveLabel = value;\n }\n }\n}\n"]}
|
|
@@ -23,7 +23,7 @@ $_reference: (
|
|
|
23
23
|
'container-height': 100%,
|
|
24
24
|
'container-shape': 0 16px 16px 0,
|
|
25
25
|
'container-width': 360px,
|
|
26
|
-
//
|
|
26
|
+
// b/216384393 - Temporary existing token to use for shadow color
|
|
27
27
|
'divider-color': #000,
|
|
28
28
|
'modal-container-elevation': 1,
|
|
29
29
|
'scrim-color': null,
|
|
@@ -21,7 +21,7 @@ $_reference: (
|
|
|
21
21
|
'container-height': 100%,
|
|
22
22
|
'container-shape': 0 16px 16px 0,
|
|
23
23
|
'container-width': 360px,
|
|
24
|
-
//
|
|
24
|
+
// b/216384393 - Temporary existing token to use for shadow color
|
|
25
25
|
'divider-color': #000,
|
|
26
26
|
'modal-container-elevation': 1,
|
|
27
27
|
'standard-container-elevation': 0,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { LitElement, PropertyValues } from 'lit';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* b/265346501 - add docs
|
|
9
9
|
*
|
|
10
10
|
* @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}
|
|
11
11
|
* Dispatched whenever the drawer opens or closes --bubbles --composed
|
|
@@ -9,7 +9,7 @@ import { property } from 'lit/decorators.js';
|
|
|
9
9
|
import { classMap } from 'lit/directives/class-map.js';
|
|
10
10
|
import { requestUpdateOnAriaChange } from '../../../internal/aria/delegate.js';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* b/265346501 - add docs
|
|
13
13
|
*
|
|
14
14
|
* @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}
|
|
15
15
|
* Dispatched whenever the drawer opens or closes --bubbles --composed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-drawer-modal.js","sourceRoot":"","sources":["navigation-drawer-modal.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAGrD,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IAArD;;QAK6B,WAAM,GAAG,KAAK,CAAC;QAC9B,UAAK,GAAoB,KAAK,CAAC;IAkE7C,CAAC;IAhEoB,MAAM;QACvB,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACpD,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACnD,iCAAiC;QACjC,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAuB,CAAC;QACvD,OAAO,IAAI,CAAA;;oDAEqC,IAAI,CAAC,eAAe,EAAE;kBACxD,IAAI,CAAC,gBAAgB;;;wBAGf,YAAY;sBACd,UAAU;qBACX,SAAS,IAAI,OAAO;qBACpB,SAAS,IAAI,OAAO;6CACI,IAAI,CAAC,gBAAgB,EAAE;oBAChD,IAAI,CAAC,aAAa;;;;;;;KAOjC,CAAC;IACJ,CAAC;IAEO,eAAe;QACrB,OAAO,QAAQ,CAAC;YACd,4CAA4C,EAAE,IAAI,CAAC,MAAM;SAC1D,CAAC,CAAC;IACL,CAAC;IAEO,gBAAgB;QACtB,OAAO,QAAQ,CAAC;YACd,qCAAqC,EAAE,IAAI,CAAC,MAAM;YAClD,6CAA6C,EAAE,IAAI,CAAC,KAAK,KAAK,OAAO;SACtE,CAAC,CAAC;IACL,CAAC;IAEkB,OAAO,CACxB,iBAAwD;QAExD,IAAI,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YACnC,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,2BAA2B,EAAE;oBAC3C,MAAM,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;oBAC7B,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,IAAI;iBACf,CAAC,CACH,CAAC;YACJ,CAAC,EAAE,GAAG,CAAC,CAAC;SACT;IACH,CAAC;IAEO,aAAa,CAAC,KAAoB;QACxC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;IACH,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;CACF;AAvEC;IACE,yBAAyB,CAAC,qBAAqB,CAAC,CAAC;AACnD,CAAC,GAAA,CAAA;AAE0B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;qDAAgB;AAC9B;IAAX,QAAQ,EAAE;oDAAgC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/a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AA6C,EAAE,IAAI,CAAC,KAAK,KAAK,OAAO;SACtE,CAAC,CAAC;IACL,CAAC;IAEkB,OAAO,CACxB,iBAAwD;QAExD,IAAI,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YACnC,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,2BAA2B,EAAE;oBAC3C,MAAM,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;oBAC7B,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,IAAI;iBACf,CAAC,CACH,CAAC;YACJ,CAAC,EAAE,GAAG,CAAC,CAAC;SACT;IACH,CAAC;IAEO,aAAa,CAAC,KAAoB;QACxC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;IACH,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;CACF;AAvEC;IACE,yBAAyB,CAAC,qBAAqB,CAAC,CAAC;AACnD,CAAC,GAAA,CAAA;AAE0B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;qDAAgB;AAC9B;IAAX,QAAQ,EAAE;oDAAgC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\n/**\n * b/265346501 - add docs\n *\n * @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}\n * Dispatched whenever the drawer opens or closes --bubbles --composed\n */\nexport class NavigationDrawerModal extends LitElement {\n static {\n requestUpdateOnAriaChange(NavigationDrawerModal);\n }\n\n @property({type: Boolean}) opened = false;\n @property() pivot: 'start' | 'end' = 'end';\n\n protected override render() {\n const ariaExpanded = this.opened ? 'true' : 'false';\n const ariaHidden = !this.opened ? 'true' : 'false';\n // Needed for closure conformance\n const {ariaLabel, ariaModal} = this as ARIAMixinStrict;\n return html`\n <div\n class=\"md3-navigation-drawer-modal__scrim ${this.getScrimClasses()}\"\n @click=\"${this.handleScrimClick}\">\n </div>\n <div\n aria-expanded=${ariaExpanded}\n aria-hidden=${ariaHidden}\n aria-label=${ariaLabel || nothing}\n aria-modal=${ariaModal || nothing}\n class=\"md3-navigation-drawer-modal ${this.getRenderClasses()}\"\n @keydown=\"${this.handleKeyDown}\"\n role=\"dialog\"\n ><div class=\"md3-elevation-overlay\"></div>\n <div class=\"md3-navigation-drawer-modal__slot-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private getScrimClasses() {\n return classMap({\n 'md3-navigation-drawer-modal--scrim-visible': this.opened,\n });\n }\n\n private getRenderClasses() {\n return classMap({\n 'md3-navigation-drawer-modal--opened': this.opened,\n 'md3-navigation-drawer-modal--pivot-at-start': this.pivot === 'start',\n });\n }\n\n protected override updated(\n changedProperties: PropertyValues<NavigationDrawerModal>,\n ) {\n if (changedProperties.has('opened')) {\n setTimeout(() => {\n this.dispatchEvent(\n new CustomEvent('navigation-drawer-changed', {\n detail: {opened: this.opened},\n bubbles: true,\n composed: true,\n }),\n );\n }, 250);\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.code === 'Escape') {\n this.opened = false;\n }\n }\n\n private handleScrimClick() {\n this.opened = !this.opened;\n }\n}\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import '../../../elevation/elevation.js';
|
|
7
7
|
import { LitElement, PropertyValues } from 'lit';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* b/265346501 - add docs
|
|
10
10
|
*
|
|
11
11
|
* @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}
|
|
12
12
|
* Dispatched whenever the drawer opens or closes --bubbles --composed
|
|
@@ -10,7 +10,7 @@ import { property } from 'lit/decorators.js';
|
|
|
10
10
|
import { classMap } from 'lit/directives/class-map.js';
|
|
11
11
|
import { requestUpdateOnAriaChange } from '../../../internal/aria/delegate.js';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* b/265346501 - add docs
|
|
14
14
|
*
|
|
15
15
|
* @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}
|
|
16
16
|
* Dispatched whenever the drawer opens or closes --bubbles --composed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-drawer.js","sourceRoot":"","sources":["navigation-drawer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAGrD,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAK6B,WAAM,GAAG,KAAK,CAAC;QAC9B,UAAK,GAAoB,KAAK,CAAC;IA6C7C,CAAC;IA3CoB,MAAM;QACvB,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACpD,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACnD,iCAAiC;QACjC,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAuB,CAAC;QACvD,OAAO,IAAI,CAAA;;yBAEU,YAAY;uBACd,UAAU;qBACZ,SAAS,IAAI,OAAO;sBACnB,SAAS,IAAI,OAAO;uCACH,IAAI,CAAC,gBAAgB,EAAE;;;;;;;KAOzD,CAAC;IACJ,CAAC;IAEO,gBAAgB;QACtB,OAAO,QAAQ,CAAC;YACd,+BAA+B,EAAE,IAAI,CAAC,MAAM;YAC5C,uCAAuC,EAAE,IAAI,CAAC,KAAK,KAAK,OAAO;SAChE,CAAC,CAAC;IACL,CAAC;IAEkB,OAAO,CACxB,iBAAmD;QAEnD,IAAI,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YACnC,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,2BAA2B,EAAE;oBAC3C,MAAM,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;oBAC7B,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,IAAI;iBACf,CAAC,CACH,CAAC;YACJ,CAAC,EAAE,GAAG,CAAC,CAAC;SACT;IACH,CAAC;CACF;AAlDC;IACE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;AAC9C,CAAC,GAAA,CAAA;AAE0B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;gDAAgB;AAC9B;IAAX,QAAQ,EAAE;+CAAgC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../elevation/elevation.js';\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"navigation-drawer.js","sourceRoot":"","sources":["navigation-drawer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,iCAAiC,CAAC;AAEzC,OAAO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O,EAAE,IAAI;oBACb,QAAQ,EAAE,IAAI;iBACf,CAAC,CACH,CAAC;YACJ,CAAC,EAAE,GAAG,CAAC,CAAC;SACT;IACH,CAAC;CACF;AAlDC;IACE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;AAC9C,CAAC,GAAA,CAAA;AAE0B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;gDAAgB;AAC9B;IAAX,QAAQ,EAAE;+CAAgC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../elevation/elevation.js';\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\n/**\n * b/265346501 - add docs\n *\n * @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>}\n * Dispatched whenever the drawer opens or closes --bubbles --composed\n */\nexport class NavigationDrawer extends LitElement {\n static {\n requestUpdateOnAriaChange(NavigationDrawer);\n }\n\n @property({type: Boolean}) opened = false;\n @property() pivot: 'start' | 'end' = 'end';\n\n protected override render() {\n const ariaExpanded = this.opened ? 'true' : 'false';\n const ariaHidden = !this.opened ? 'true' : 'false';\n // Needed for closure conformance\n const {ariaLabel, ariaModal} = this as ARIAMixinStrict;\n return html`\n <div\n aria-expanded=\"${ariaExpanded}\"\n aria-hidden=\"${ariaHidden}\"\n aria-label=${ariaLabel || nothing}\n aria-modal=\"${ariaModal || nothing}\"\n class=\"md3-navigation-drawer ${this.getRenderClasses()}\"\n role=\"dialog\">\n <md-elevation></md-elevation>\n <div class=\"md3-navigation-drawer__slot-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private getRenderClasses() {\n return classMap({\n 'md3-navigation-drawer--opened': this.opened,\n 'md3-navigation-drawer--pivot-at-start': this.pivot === 'start',\n });\n }\n\n protected override updated(\n changedProperties: PropertyValues<NavigationDrawer>,\n ) {\n if (changedProperties.has('opened')) {\n setTimeout(() => {\n this.dispatchEvent(\n new CustomEvent('navigation-drawer-changed', {\n detail: {opened: this.opened},\n bubbles: true,\n composed: true,\n }),\n );\n }, 250);\n }\n }\n}\n"]}
|
|
@@ -9,7 +9,7 @@ import '../../badge/badge.js';
|
|
|
9
9
|
import { LitElement, PropertyValues } from 'lit';
|
|
10
10
|
import { NavigationTabState } from './state.js';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* b/265346501 - add docs
|
|
13
13
|
*
|
|
14
14
|
* @fires navigation-tab-rendered {Event} Dispatched when the navigation tab's
|
|
15
15
|
* DOM has rendered and custom element definition has loaded. --bubbles
|
|
@@ -12,7 +12,7 @@ import { property, query } from 'lit/decorators.js';
|
|
|
12
12
|
import { classMap } from 'lit/directives/class-map.js';
|
|
13
13
|
import { requestUpdateOnAriaChange } from '../../../internal/aria/delegate.js';
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* b/265346501 - add docs
|
|
16
16
|
*
|
|
17
17
|
* @fires navigation-tab-rendered {Event} Dispatched when the navigation tab's
|
|
18
18
|
* DOM has rendered and custom element definition has loaded. --bubbles
|
|
@@ -98,7 +98,7 @@ export class NavigationTab extends LitElement {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
handleClick() {
|
|
101
|
-
//
|
|
101
|
+
// b/269772145 - connect to ripple
|
|
102
102
|
this.dispatchEvent(new CustomEvent('navigation-tab-interaction', {
|
|
103
103
|
detail: { state: this },
|
|
104
104
|
bubbles: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-tab.js","sourceRoot":"","sources":["navigation-tab.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,iCAAiC,CAAC;AACzC,OAAO,2BAA2B,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAE9B,OAA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AC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAC,CAAC;gDAAmB;AAErD;IAAhB,KAAK,CAAC,QAAQ,CAAC;oDAAoC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../focus/md-focus-ring.js';\nimport '../../../ripple/ripple.js';\nimport '../../badge/badge.js';\n\nimport {html, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, query} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\nimport {NavigationTabState} from './state.js';\n\n/**\n * b/265346501 - add docs\n *\n * @fires navigation-tab-rendered {Event} Dispatched when the navigation tab's\n * DOM has rendered and custom element definition has loaded. --bubbles\n * --composed\n * @fires navigation-tab-interaction {CustomEvent<{state: MdNavigationTab}>}\n * Dispatched when the navigation tab has been clicked. --bubbles --composed\n */\nexport class NavigationTab extends LitElement implements NavigationTabState {\n static {\n requestUpdateOnAriaChange(NavigationTab);\n }\n\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean, reflect: true}) active = false;\n @property({type: Boolean, attribute: 'hide-inactive-label'})\n hideInactiveLabel = false;\n @property() label?: string;\n @property({attribute: 'badge-value'}) badgeValue = '';\n @property({type: Boolean, attribute: 'show-badge'}) showBadge = false;\n\n @query('button') buttonElement!: HTMLElement | null;\n\n protected override render() {\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n return html` <button\n class=\"md3-navigation-tab ${classMap(this.getRenderClasses())}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n aria-label=${ariaLabel || nothing}\n tabindex=\"${this.active ? 0 : -1}\"\n @click=\"${this.handleClick}\">\n <md-focus-ring part=\"focus-ring\" inward></md-focus-ring>\n <md-ripple\n ?disabled=\"${this.disabled}\"\n class=\"md3-navigation-tab__ripple\"></md-ripple>\n <span aria-hidden=\"true\" class=\"md3-navigation-tab__icon-content\"\n ><span class=\"md3-navigation-tab__active-indicator\"></span\n ><span class=\"md3-navigation-tab__icon\"\n ><slot name=\"inactive-icon\"></slot\n ></span>\n <span class=\"md3-navigation-tab__icon md3-navigation-tab__icon--active\"\n ><slot name=\"active-icon\"></slot></span\n >${this.renderBadge()}</span\n >${this.renderLabel()}\n </button>`;\n }\n\n private getRenderClasses() {\n return {\n 'md3-navigation-tab--hide-inactive-label': this.hideInactiveLabel,\n 'md3-navigation-tab--active': this.active,\n };\n }\n\n private renderBadge() {\n return this.showBadge\n ? html`<md-badge .value=\"${this.badgeValue}\"></md-badge>`\n : nothing;\n }\n\n private renderLabel() {\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n const ariaHidden = ariaLabel ? 'true' : 'false';\n return !this.label\n ? nothing\n : html` <span\n aria-hidden=\"${ariaHidden}\"\n class=\"md3-navigation-tab__label-text\"\n >${this.label}</span\n >`;\n }\n\n override firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n const event = new Event('navigation-tab-rendered', {\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(event);\n }\n\n override focus() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n buttonElement.focus();\n }\n }\n\n override blur() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n buttonElement.blur();\n }\n }\n\n handleClick() {\n // b/269772145 - connect to ripple\n this.dispatchEvent(\n new CustomEvent('navigation-tab-interaction', {\n detail: {state: this},\n bubbles: true,\n composed: true,\n }),\n );\n }\n}\n"]}
|
|
@@ -15,10 +15,4 @@ export interface NavigationTabState {
|
|
|
15
15
|
* If true, when inactive label will be hidden.
|
|
16
16
|
*/
|
|
17
17
|
hideInactiveLabel: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Inner button for the tab
|
|
20
|
-
* TODO(b/229015424): Remove this when the jscompiler rename issue is
|
|
21
|
-
* understood.
|
|
22
|
-
*/
|
|
23
|
-
buttonElement: HTMLElement | null;
|
|
24
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["state.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * The state of a navigation tab.\n */\nexport interface NavigationTabState {\n /**\n * Active state of the navigation tab.\n */\n active: boolean;\n /**\n * If true, when inactive label will be hidden.\n */\n hideInactiveLabel: boolean;\n
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["state.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * The state of a navigation tab.\n */\nexport interface NavigationTabState {\n /**\n * Active state of the navigation tab.\n */\n active: boolean;\n /**\n * If true, when inactive label will be hidden.\n */\n hideInactiveLabel: boolean;\n}\n"]}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
@mixin styles() {
|
|
17
17
|
$tokens: tokens.md-comp-outlined-segmented-button-values();
|
|
18
|
-
//
|
|
18
|
+
// b/198759625 - Remove spacing tokens once provided.
|
|
19
19
|
$tokens: map.merge(
|
|
20
20
|
$tokens,
|
|
21
21
|
(
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
.md3-segmented-button__outline {
|
|
34
34
|
border-radius: inherit;
|
|
35
35
|
border-style: solid;
|
|
36
|
-
//
|
|
36
|
+
// Move border-width and inset into theme.
|
|
37
37
|
border-width: 1px;
|
|
38
38
|
inset: 0px -0.5px;
|
|
39
39
|
pointer-events: none;
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
&.md3-segmented-button--selected.md3-segmented-button--with-label.md3-segmented-button--with-checkmark,
|
|
99
99
|
&.md3-segmented-button--selected.md3-segmented-button--without-label.md3-segmented-button--with-checkmark {
|
|
100
100
|
.md3-segmented-button__graphic {
|
|
101
|
-
//
|
|
101
|
+
// b/198759625 - Use padding token instead of hardcoded 8px value.
|
|
102
102
|
width: calc(var(--_icon-size) + 8px);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlined-segmented-button.js","sourceRoot":"","sources":["outlined-segmented-button.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,eAAe;IACvC,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,gCAAgC,EAAE,IAAI;SACvC,CAAC;IACJ,CAAC;IAEkB,aAAa;QAC9B,OAAO,IAAI,CAAA,qDAAqD,CAAC;IACnE,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html} from 'lit';\n\nimport {SegmentedButton} from './segmented-button.js';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"outlined-segmented-button.js","sourceRoot":"","sources":["outlined-segmented-button.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,eAAe;IACvC,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,gCAAgC,EAAE,IAAI;SACvC,CAAC;IACJ,CAAC;IAEkB,aAAa;QAC9B,OAAO,IAAI,CAAA,qDAAqD,CAAC;IACnE,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html} from 'lit';\n\nimport {SegmentedButton} from './segmented-button.js';\n\n/**\n * b/265346443 - add docs\n */\nexport class OutlinedSegmentedButton extends SegmentedButton {\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n 'md3-segmented-button--outlined': true,\n };\n }\n\n protected override renderOutline() {\n return html`<span class=\"md3-segmented-button__outline\"></span>`;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlined-segmented-button-set.js","sourceRoot":"","sources":["outlined-segmented-button-set.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC7C,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,oCAAoC,EAAE,IAAI;SAC3C,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {SegmentedButtonSet} from './segmented-button-set.js';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"outlined-segmented-button-set.js","sourceRoot":"","sources":["outlined-segmented-button-set.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC7C,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,oCAAoC,EAAE,IAAI;SAC3C,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {SegmentedButtonSet} from './segmented-button-set.js';\n\n/**\n * b/265346443 - add docs\n */\nexport class OutlinedSegmentedButtonSet extends SegmentedButtonSet {\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n 'md3-segmented-button-set--outlined': true,\n };\n }\n}\n"]}
|
package/menu/internal/_menu.scss
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, 4px)}.menu{border-radius:var(--md-menu-container-shape, 4px);display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}/*# sourceMappingURL=menu-styles.css.map */
|
|
7
|
+
export const styles = css `:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, 4px)}.menu{border-radius:var(--md-menu-container-shape, 4px);display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}/*# sourceMappingURL=menu-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=menu-styles.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-styles.css.js","sourceRoot":"","sources":["menu-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, 4px)}.menu{border-radius:var(--md-menu-container-shape, 4px);display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}/*# sourceMappingURL=menu-styles.css.map */\n`;\n "]}
|
|
1
|
+
{"version":3,"file":"menu-styles.css.js","sourceRoot":"","sources":["menu-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, 4px)}.menu{border-radius:var(--md-menu-container-shape, 4px);display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}/*# sourceMappingURL=menu-styles.css.map */\n`;\n "]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@material/web",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2-nightly.043bbad.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"build:sass": "wireit",
|
|
30
30
|
"test": "wireit",
|
|
31
31
|
"build:catalog": "wireit",
|
|
32
|
-
"build:
|
|
33
|
-
"update-docs": "wireit"
|
|
32
|
+
"build:scripts": "wireit",
|
|
33
|
+
"update-docs": "wireit",
|
|
34
|
+
"update-size": "wireit"
|
|
34
35
|
},
|
|
35
36
|
"type": "module",
|
|
36
37
|
"files": [
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"**/*.scss",
|
|
41
42
|
"!css-to-ts.js",
|
|
42
43
|
"!web-test-runner.config.js",
|
|
44
|
+
"!commitlint.config.js",
|
|
43
45
|
"!**/test/**",
|
|
44
46
|
"!**/testing/**",
|
|
45
47
|
"!**/*_test.*",
|
|
@@ -56,10 +58,14 @@
|
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
60
|
"@lit-labs/analyzer": "^0.9.2",
|
|
61
|
+
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
62
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
63
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
59
64
|
"@types/jasmine": "^4.0.3",
|
|
60
65
|
"@web/test-runner": "^0.15.0",
|
|
61
66
|
"@web/test-runner-playwright": "^0.9.0",
|
|
62
67
|
"jasmine": "^4.5.0",
|
|
68
|
+
"rollup": "^2.79.1",
|
|
63
69
|
"sass": "^1.52.3",
|
|
64
70
|
"sass-true": "^6.1.0",
|
|
65
71
|
"typescript": "5.1.6",
|
|
@@ -90,6 +96,7 @@
|
|
|
90
96
|
"**/*.d.ts",
|
|
91
97
|
"!css-to-ts.js",
|
|
92
98
|
"!web-test-runner.config.js",
|
|
99
|
+
"!commitlint.config.js",
|
|
93
100
|
"!types/",
|
|
94
101
|
"!catalog",
|
|
95
102
|
"!scripts/"
|
|
@@ -145,19 +152,19 @@
|
|
|
145
152
|
"./catalog:build:prod"
|
|
146
153
|
]
|
|
147
154
|
},
|
|
148
|
-
"build:
|
|
155
|
+
"build:scripts": {
|
|
149
156
|
"command": "tsc -b scripts/tsconfig.json --pretty",
|
|
150
157
|
"files": [
|
|
151
158
|
"scripts/tsconfig.json",
|
|
152
|
-
"scripts
|
|
159
|
+
"scripts/**/*.ts",
|
|
153
160
|
"!**/*.d.ts",
|
|
154
161
|
"!**/*.css.ts"
|
|
155
162
|
],
|
|
156
163
|
"output": [
|
|
157
164
|
"scripts/.tsbuildinfo",
|
|
158
|
-
"scripts
|
|
159
|
-
"scripts
|
|
160
|
-
"scripts
|
|
165
|
+
"scripts/**/*.js",
|
|
166
|
+
"scripts/**/*.js.map",
|
|
167
|
+
"scripts/**/*.d.ts"
|
|
161
168
|
],
|
|
162
169
|
"clean": "if-file-deleted"
|
|
163
170
|
},
|
|
@@ -175,7 +182,14 @@
|
|
|
175
182
|
],
|
|
176
183
|
"output": [],
|
|
177
184
|
"dependencies": [
|
|
178
|
-
"build:
|
|
185
|
+
"build:scripts"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"update-size": {
|
|
189
|
+
"command": "node scripts/size/update-size.js",
|
|
190
|
+
"dependencies": [
|
|
191
|
+
"build:scripts",
|
|
192
|
+
"build"
|
|
179
193
|
]
|
|
180
194
|
}
|
|
181
195
|
}
|
|
@@ -114,6 +114,12 @@ $_indeterminate-duration: 2s;
|
|
|
114
114
|
z-index: -1; // Place behind tracks for Safari
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
// dots are hidden when indeterminate or when there is no visible buffer to
|
|
118
|
+
// prevent infinite invisible animation.
|
|
119
|
+
.dots[hidden] {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
117
123
|
// indeterminate
|
|
118
124
|
.indeterminate .bar {
|
|
119
125
|
transition: none;
|
|
@@ -131,10 +137,6 @@ $_indeterminate-duration: 2s;
|
|
|
131
137
|
display: block;
|
|
132
138
|
}
|
|
133
139
|
|
|
134
|
-
.indeterminate .dots {
|
|
135
|
-
display: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
140
|
.indeterminate .primary-bar {
|
|
139
141
|
animation: linear infinite $_indeterminate-duration;
|
|
140
142
|
animation-name: primary-indeterminate-translate;
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .
|
|
7
|
+
export const styles = css `:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host-context([dir=rtl]),:host([dir=rtl]){transform:scale(-1)}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}}/*# sourceMappingURL=linear-progress-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=linear-progress-styles.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear-progress-styles.css.js","sourceRoot":"","sources":["linear-progress-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");z-index:-1}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .
|
|
1
|
+
{"version":3,"file":"linear-progress-styles.css.js","sourceRoot":"","sources":["linear-progress-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host-context([dir=rtl]),:host([dir=rtl]){transform:scale(-1)}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}}/*# sourceMappingURL=linear-progress-styles.css.map */\n`;\n "]}
|
|
@@ -29,8 +29,11 @@ export class LinearProgress extends Progress {
|
|
|
29
29
|
const dotStyles = {
|
|
30
30
|
transform: `scaleX(${(this.indeterminate ? 1 : this.buffer / this.max) * 100}%)`,
|
|
31
31
|
};
|
|
32
|
+
// Only display dots when visible - this prevents invisible infinite
|
|
33
|
+
// animation.
|
|
34
|
+
const hideDots = this.indeterminate || this.buffer >= this.max || this.value >= this.max;
|
|
32
35
|
return html `
|
|
33
|
-
<div class="dots"></div>
|
|
36
|
+
<div class="dots" ?hidden=${hideDots}></div>
|
|
34
37
|
<div class="inactive-track" style=${styleMap(dotStyles)}></div>
|
|
35
38
|
<div class="bar primary-bar" style=${styleMap(progressStyles)}>
|
|
36
39
|
<div class="bar-inner"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear-progress.js","sourceRoot":"","sources":["linear-progress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAA5C;;QACE;;WAEG;QACuB,WAAM,GAAG,CA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;8CAAY","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {Progress} from './progress.js';\n\n/**\n * A linear progress component.\n */\nexport class LinearProgress extends Progress {\n /**\n * Buffer amount to display, a fraction between 0 and `max`.\n */\n @property({type: Number}) buffer = 1;\n\n // Note, the indeterminate animation is rendered with transform %'s\n // Previously, this was optimized to use px calculated with the resizeObserver\n // due to a now fixed Chrome bug: crbug.com/389359.\n protected override renderIndicator() {\n const progressStyles = {\n transform: `scaleX(${\n (this.indeterminate ? 1 : this.value / this.max) * 100\n }%)`,\n };\n const dotStyles = {\n transform: `scaleX(${\n (this.indeterminate ? 1 : this.buffer / this.max) * 100\n }%)`,\n };\n\n // Only display dots when visible - this prevents invisible infinite\n // animation.\n const hideDots =\n this.indeterminate || this.buffer >= this.max || this.value >= this.max;\n return html`\n <div class=\"dots\" ?hidden=${hideDots}></div>\n <div class=\"inactive-track\" style=${styleMap(dotStyles)}></div>\n <div class=\"bar primary-bar\" style=${styleMap(progressStyles)}>\n <div class=\"bar-inner\"></div>\n </div>\n <div class=\"bar secondary-bar\">\n <div class=\"bar-inner\"></div>\n </div>\n `;\n }\n}\n"]}
|
package/radio/internal/radio.js
CHANGED
|
@@ -10,7 +10,7 @@ import '../../ripple/ripple.js';
|
|
|
10
10
|
import { html, isServer, LitElement } from 'lit';
|
|
11
11
|
import { property, query } from 'lit/decorators.js';
|
|
12
12
|
import { classMap } from 'lit/directives/class-map.js';
|
|
13
|
-
import { isActivationClick } from '../../internal/
|
|
13
|
+
import { isActivationClick } from '../../internal/events/form-label-activation.js';
|
|
14
14
|
import { createValidator, getValidityAnchor, mixinConstraintValidation, } from '../../labs/behaviors/constraint-validation.js';
|
|
15
15
|
import { internals, mixinElementInternals, } from '../../labs/behaviors/element-internals.js';
|
|
16
16
|
import { mixinFocusable } from '../../labs/behaviors/focusable.js';
|