@redvars/peacock 3.6.1 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components.css.map +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/tokens.css.map +1 -1
- package/dist/{button-colors-Ccys3hvS.js → button-colors-Cg6oxiz-.js} +126 -116
- package/dist/{button-colors-Ccys3hvS.js.map → button-colors-Cg6oxiz-.js.map} +1 -1
- package/dist/button-group.js +2 -2
- package/dist/button.js +18 -16
- package/dist/button.js.map +1 -1
- package/dist/canvas.js +126 -107
- package/dist/canvas.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/code-highlighter.js +34 -9
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +4306 -3215
- package/dist/custom-elements.json +8344 -7173
- package/dist/{flow-designer-node-BWrPuxAR.js → flow-designer-node-9Bqyn6qx.js} +2 -1
- package/dist/flow-designer-node-9Bqyn6qx.js.map +1 -0
- package/dist/flow-designer-node.js +1 -1
- package/dist/flow-designer.js +1402 -8
- package/dist/flow-designer.js.map +1 -1
- package/dist/icon-CueRR7wx.js +260 -0
- package/dist/icon-CueRR7wx.js.map +1 -0
- package/dist/{icon-button-CK1ZuE-2.js → icon-button-AdJBEoNy.js} +34 -30
- package/dist/icon-button-AdJBEoNy.js.map +1 -0
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/modal.js +11 -11
- package/dist/modal.js.map +1 -1
- package/dist/{navigation-rail-DTTkqohi.js → navigation-rail-DAUuJ_Yp.js} +975 -486
- package/dist/navigation-rail-DAUuJ_Yp.js.map +1 -0
- package/dist/peacock-loader.js +33 -30
- package/dist/peacock-loader.js.map +1 -1
- package/dist/{popover-NC7b1lTq.js → popover-DUPmMVWS.js} +9 -4
- package/dist/{popover-NC7b1lTq.js.map → popover-DUPmMVWS.js.map} +1 -1
- package/dist/popover-content.js +1 -1
- package/dist/popover-content.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/search.js +11 -14
- package/dist/search.js.map +1 -1
- package/dist/src/__controllers/floating-controller.d.ts +1 -0
- package/dist/src/avatar/avatar.d.ts +1 -1
- package/dist/src/breadcrumb/breadcrumb/breadcrumb.d.ts +0 -1
- package/dist/src/canvas/canvas.d.ts +3 -3
- package/dist/src/chip/chip/chip.d.ts +14 -11
- package/dist/src/chip/chip-set/chip-set.d.ts +20 -0
- package/dist/src/chip/chip-set/index.d.ts +1 -0
- package/dist/src/code-highlighter/code-highlighter.d.ts +4 -0
- package/dist/src/field/field.d.ts +1 -0
- package/dist/src/flow-designer/flow-designer-node.d.ts +1 -0
- package/dist/src/image/image.d.ts +2 -2
- package/dist/src/index.d.ts +2 -0
- package/dist/src/input/input.d.ts +1 -3
- package/dist/src/item/index.d.ts +1 -0
- package/dist/src/item/item.d.ts +48 -0
- package/dist/src/menu/menu/menu.d.ts +1 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +8 -9
- package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
- package/dist/src/modal/modal.d.ts +1 -1
- package/dist/src/navigation-rail/navigation-rail.d.ts +2 -6
- package/dist/src/popover/popover-content.d.ts +1 -1
- package/dist/src/search/search.d.ts +2 -6
- package/dist/test/chip.test.d.ts +1 -0
- package/dist/test/item.test.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/scss/mixin.scss +23 -0
- package/scss/styles.scss +3 -3
- package/scss/tokens.css +1 -1
- package/src/__controllers/floating-controller.ts +9 -3
- package/src/avatar/avatar.scss +4 -4
- package/src/avatar/avatar.ts +1 -1
- package/src/breadcrumb/breadcrumb/breadcrumb.ts +0 -1
- package/src/button/button/button-sizes.scss +11 -11
- package/src/button/button/button.scss +96 -122
- package/src/button/button/button.ts +38 -36
- package/src/button/icon-button/icon-button-sizes.scss +8 -8
- package/src/button/icon-button/icon-button.ts +23 -20
- package/src/canvas/canvas.scss +18 -6
- package/src/canvas/canvas.ts +125 -103
- package/src/card/card.ts +1 -1
- package/src/chip/chip/chip.scss +120 -46
- package/src/chip/chip/chip.ts +97 -38
- package/src/chip/chip-set/chip-set.scss +13 -0
- package/src/chip/chip-set/chip-set.ts +25 -0
- package/src/chip/chip-set/index.ts +1 -0
- package/src/code-highlighter/code-highlighter.ts +33 -6
- package/src/empty-state/empty-state.scss +1 -0
- package/src/field/field.scss +1 -1
- package/src/field/field.ts +6 -0
- package/src/flow-designer/flow-designer-node.ts +1 -0
- package/src/image/image.scss +21 -16
- package/src/image/image.ts +13 -14
- package/src/index.ts +2 -0
- package/src/input/input.ts +16 -25
- package/src/item/index.ts +1 -0
- package/src/item/item.scss +184 -0
- package/src/item/item.ts +340 -0
- package/src/menu/menu/menu.ts +16 -9
- package/src/menu/menu-item/menu-item.scss +30 -108
- package/src/menu/menu-item/menu-item.ts +89 -129
- package/src/menu/sub-menu/sub-menu.ts +6 -2
- package/src/modal/modal.scss +10 -10
- package/src/modal/modal.ts +1 -1
- package/src/navigation-rail/navigation-rail.ts +2 -6
- package/src/peacock-loader.ts +28 -22
- package/src/popover/popover-content.ts +1 -1
- package/src/search/search.ts +11 -16
- package/src/select/option.ts +1 -1
- package/src/select/select.scss +1 -10
- package/src/select/select.ts +2 -0
- package/dist/flow-designer-DvTUrDp5.js +0 -1656
- package/dist/flow-designer-DvTUrDp5.js.map +0 -1
- package/dist/flow-designer-node-BWrPuxAR.js.map +0 -1
- package/dist/icon-button-CK1ZuE-2.js.map +0 -1
- package/dist/navigation-rail-DTTkqohi.js.map +0 -1
- package/src/chip/chip/chip-colors.scss +0 -31
|
@@ -5,13 +5,13 @@ import { r } from './state-DwbEjqVk.js';
|
|
|
5
5
|
import { o as observerSlotChangesWithCallback } from './observe-slot-change-BGJfgg2E.js';
|
|
6
6
|
import { a as e, e as e$2 } from './query-QBcUV-L_.js';
|
|
7
7
|
import { B as BaseHyperlinkMixin, t as throttle } from './BaseHyperlinkMixin-BNuwbiEf.js';
|
|
8
|
-
import { o as o$1 } from './
|
|
8
|
+
import { B as BaseButton, o as o$1, s as spread, a as BaseButtonMixin } from './BaseButton-BNFAYn-S.js';
|
|
9
|
+
import { o as o$2 } from './style-map-DVmWOuYy.js';
|
|
9
10
|
import { r as redispatchEvent, i as isActivationClick, d as dispatchActivationClick } from './dispatch-event-utils-CuEqjlPT.js';
|
|
10
|
-
import { s as spread, o as o$2, a as BaseButtonMixin } from './BaseButton-BNFAYn-S.js';
|
|
11
11
|
import { B as BaseInput } from './BaseInput-14YmcfK7.js';
|
|
12
|
-
import { F as FloatingController } from './popover-
|
|
12
|
+
import { F as FloatingController } from './popover-DUPmMVWS.js';
|
|
13
13
|
import { i as isDarkMode, o as observeThemeChange } from './is-dark-mode-DOcaw4Yq.js';
|
|
14
|
-
import { f as fetchSVG, s as sanitizeSvg, o as o$3 } from './
|
|
14
|
+
import { f as fetchSVG, s as sanitizeSvg, o as o$3 } from './icon-CueRR7wx.js';
|
|
15
15
|
import { o as o$4 } from './unsafe-html-BsGUjx94.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -20,7 +20,7 @@ import { o as o$4 } from './unsafe-html-BsGUjx94.js';
|
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
21
|
*/function o(o){return (e$1,n)=>{const{slot:r,selector:s}=o??{},c="slot"+(r?`[name=${r}]`:":not([name])");return e(e$1,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter(t=>t.matches(s))}})}}
|
|
22
22
|
|
|
23
|
-
var css_248z$
|
|
23
|
+
var css_248z$V = i`* {
|
|
24
24
|
box-sizing: border-box;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -32,9 +32,9 @@ var css_248z$U = i`* {
|
|
|
32
32
|
display: inline-block;
|
|
33
33
|
pointer-events: none;
|
|
34
34
|
--avatar-size: 2rem;
|
|
35
|
-
--avatar-
|
|
35
|
+
--avatar-container-color: var(--color-primary);
|
|
36
36
|
--avatar-text-color: var(--color-on-primary);
|
|
37
|
-
--avatar-
|
|
37
|
+
--avatar-container-shape: var(--global-avatar-container-shape);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.avatar-container {
|
|
@@ -45,7 +45,7 @@ var css_248z$U = i`* {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.avatar {
|
|
48
|
-
border-radius: var(--avatar-
|
|
48
|
+
border-radius: var(--avatar-container-shape);
|
|
49
49
|
display: flex;
|
|
50
50
|
justify-content: center;
|
|
51
51
|
align-items: center;
|
|
@@ -57,7 +57,7 @@ var css_248z$U = i`* {
|
|
|
57
57
|
font-weight: var(--typography-body-large-emphasized-font-weight) !important;
|
|
58
58
|
line-height: var(--typography-body-large-emphasized-line-height) !important;
|
|
59
59
|
letter-spacing: var(--typography-body-large-emphasized-letter-spacing) !important;
|
|
60
|
-
background-color: var(--avatar-
|
|
60
|
+
background-color: var(--avatar-container-color);
|
|
61
61
|
font-size: calc(var(--avatar-size) * 0.5) !important;
|
|
62
62
|
}
|
|
63
63
|
.avatar .image {
|
|
@@ -74,7 +74,7 @@ var css_248z$U = i`* {
|
|
|
74
74
|
* @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.
|
|
75
75
|
*
|
|
76
76
|
* @cssprop --avatar-border-radius - Controls the border radius of the avatar.
|
|
77
|
-
* @cssprop --avatar-
|
|
77
|
+
* @cssprop --avatar-container-color - Controls the color of the avatar container.
|
|
78
78
|
* @cssprop --avatar-size - Controls the size of the avatar.
|
|
79
79
|
* @cssprop --avatar-text-color - Controls the color of the text inside the avatar.
|
|
80
80
|
*
|
|
@@ -111,7 +111,7 @@ class Avatar extends i$1 {
|
|
|
111
111
|
return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase();
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
Avatar.styles = [css_248z$
|
|
114
|
+
Avatar.styles = [css_248z$V];
|
|
115
115
|
__decorate([
|
|
116
116
|
n({ type: String, reflect: true })
|
|
117
117
|
], Avatar.prototype, "name", void 0);
|
|
@@ -119,7 +119,7 @@ __decorate([
|
|
|
119
119
|
n({ type: String, reflect: true })
|
|
120
120
|
], Avatar.prototype, "src", void 0);
|
|
121
121
|
|
|
122
|
-
var css_248z$
|
|
122
|
+
var css_248z$U = i`* {
|
|
123
123
|
box-sizing: border-box;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -191,12 +191,12 @@ class Badge extends i$1 {
|
|
|
191
191
|
</div>`;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
Badge.styles = [css_248z$
|
|
194
|
+
Badge.styles = [css_248z$U];
|
|
195
195
|
__decorate([
|
|
196
196
|
n({ type: String })
|
|
197
197
|
], Badge.prototype, "value", void 0);
|
|
198
198
|
|
|
199
|
-
var css_248z$
|
|
199
|
+
var css_248z$T = i`* {
|
|
200
200
|
box-sizing: border-box;
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -305,7 +305,7 @@ class Divider extends i$1 {
|
|
|
305
305
|
</div>`;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
Divider.styles = [css_248z$
|
|
308
|
+
Divider.styles = [css_248z$T];
|
|
309
309
|
__decorate([
|
|
310
310
|
n({ type: Boolean, reflect: true })
|
|
311
311
|
], Divider.prototype, "vertical", void 0);
|
|
@@ -313,7 +313,7 @@ __decorate([
|
|
|
313
313
|
r()
|
|
314
314
|
], Divider.prototype, "slotHasContent", void 0);
|
|
315
315
|
|
|
316
|
-
var css_248z$
|
|
316
|
+
var css_248z$S = i`* {
|
|
317
317
|
box-sizing: border-box;
|
|
318
318
|
}
|
|
319
319
|
|
|
@@ -394,9 +394,9 @@ class Elevation extends i$1 {
|
|
|
394
394
|
return b `<span class="shadow"></span>`;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
Elevation.styles = [css_248z$
|
|
397
|
+
Elevation.styles = [css_248z$S];
|
|
398
398
|
|
|
399
|
-
var css_248z$
|
|
399
|
+
var css_248z$R = i`* {
|
|
400
400
|
box-sizing: border-box;
|
|
401
401
|
}
|
|
402
402
|
|
|
@@ -649,7 +649,7 @@ class SegmentedButton extends i$1 {
|
|
|
649
649
|
`;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
SegmentedButton.styles = [css_248z$
|
|
652
|
+
SegmentedButton.styles = [css_248z$R];
|
|
653
653
|
__decorate([
|
|
654
654
|
n({ type: String, reflect: true })
|
|
655
655
|
], SegmentedButton.prototype, "value", void 0);
|
|
@@ -669,7 +669,7 @@ __decorate([
|
|
|
669
669
|
r()
|
|
670
670
|
], SegmentedButton.prototype, "isActive", void 0);
|
|
671
671
|
|
|
672
|
-
var css_248z$
|
|
672
|
+
var css_248z$Q = i`* {
|
|
673
673
|
box-sizing: border-box;
|
|
674
674
|
}
|
|
675
675
|
|
|
@@ -781,7 +781,7 @@ class SegmentedButtonGroup extends i$1 {
|
|
|
781
781
|
`;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
SegmentedButtonGroup.styles = [css_248z$
|
|
784
|
+
SegmentedButtonGroup.styles = [css_248z$Q];
|
|
785
785
|
SegmentedButtonGroup.SegmentedButton = SegmentedButton;
|
|
786
786
|
__decorate([
|
|
787
787
|
n({ type: Boolean, reflect: true, attribute: 'multi-select' })
|
|
@@ -790,7 +790,7 @@ __decorate([
|
|
|
790
790
|
n({ type: Boolean, reflect: true })
|
|
791
791
|
], SegmentedButtonGroup.prototype, "nullable", void 0);
|
|
792
792
|
|
|
793
|
-
var css_248z$
|
|
793
|
+
var css_248z$P = i`:host {
|
|
794
794
|
display: none;
|
|
795
795
|
pointer-events: none;
|
|
796
796
|
position: absolute;
|
|
@@ -908,7 +908,7 @@ class FocusRing extends i$1 {
|
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
FocusRing.styles = [css_248z$
|
|
911
|
+
FocusRing.styles = [css_248z$P];
|
|
912
912
|
__decorate([
|
|
913
913
|
n({ type: Boolean, reflect: true })
|
|
914
914
|
], FocusRing.prototype, "visible", void 0);
|
|
@@ -1385,7 +1385,7 @@ __decorate([
|
|
|
1385
1385
|
e$2('.surface')
|
|
1386
1386
|
], Ripple.prototype, "mdRoot", void 0);
|
|
1387
1387
|
|
|
1388
|
-
var css_248z$
|
|
1388
|
+
var css_248z$O = i`* {
|
|
1389
1389
|
box-sizing: border-box;
|
|
1390
1390
|
}
|
|
1391
1391
|
|
|
@@ -1681,7 +1681,7 @@ class AccordionItem extends i$1 {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
1683
|
_AccordionItem_id = new WeakMap();
|
|
1684
|
-
AccordionItem.styles = [css_248z$
|
|
1684
|
+
AccordionItem.styles = [css_248z$O];
|
|
1685
1685
|
__decorate([
|
|
1686
1686
|
n({ type: Boolean, reflect: true })
|
|
1687
1687
|
], AccordionItem.prototype, "disabled", void 0);
|
|
@@ -1704,7 +1704,7 @@ __decorate([
|
|
|
1704
1704
|
e$2('.header-button')
|
|
1705
1705
|
], AccordionItem.prototype, "buttonElement", void 0);
|
|
1706
1706
|
|
|
1707
|
-
var css_248z$
|
|
1707
|
+
var css_248z$N = i`* {
|
|
1708
1708
|
box-sizing: border-box;
|
|
1709
1709
|
}
|
|
1710
1710
|
|
|
@@ -1832,7 +1832,7 @@ class Accordion extends i$1 {
|
|
|
1832
1832
|
return b `<div class="accordion"><slot></slot></div>`;
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
Accordion.styles = [css_248z$
|
|
1835
|
+
Accordion.styles = [css_248z$N];
|
|
1836
1836
|
Accordion.Item = AccordionItem;
|
|
1837
1837
|
__decorate([
|
|
1838
1838
|
n({ type: Boolean, reflect: true })
|
|
@@ -1844,7 +1844,7 @@ __decorate([
|
|
|
1844
1844
|
o({ selector: 'wc-accordion-item' })
|
|
1845
1845
|
], Accordion.prototype, "items", void 0);
|
|
1846
1846
|
|
|
1847
|
-
var css_248z$
|
|
1847
|
+
var css_248z$M = i`* {
|
|
1848
1848
|
box-sizing: border-box;
|
|
1849
1849
|
}
|
|
1850
1850
|
|
|
@@ -1908,9 +1908,9 @@ class Link extends BaseHyperlinkMixin(i$1) {
|
|
|
1908
1908
|
</a>`;
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
Link.styles = [css_248z$
|
|
1911
|
+
Link.styles = [css_248z$M];
|
|
1912
1912
|
|
|
1913
|
-
var css_248z$
|
|
1913
|
+
var css_248z$L = i`* {
|
|
1914
1914
|
box-sizing: border-box;
|
|
1915
1915
|
}
|
|
1916
1916
|
|
|
@@ -2047,7 +2047,7 @@ slot::slotted(*) {
|
|
|
2047
2047
|
--_container-state-opacity: 0.08;
|
|
2048
2048
|
}`;
|
|
2049
2049
|
|
|
2050
|
-
var css_248z$
|
|
2050
|
+
var css_248z$K = i`:host([color=default]) {
|
|
2051
2051
|
--filled-tag-container-color: var(--color-surface);
|
|
2052
2052
|
--filled-tag-label-text-color: var(--color-on-surface);
|
|
2053
2053
|
--tonal-tag-container-color: var(--color-surface-container);
|
|
@@ -2113,7 +2113,7 @@ var css_248z$J = i`:host([color=default]) {
|
|
|
2113
2113
|
--outlined-tag-label-text-color: var(--color-purple);
|
|
2114
2114
|
}`;
|
|
2115
2115
|
|
|
2116
|
-
var css_248z$
|
|
2116
|
+
var css_248z$J = i`.tag {
|
|
2117
2117
|
font-family: var(--font-family-sans) !important;
|
|
2118
2118
|
}
|
|
2119
2119
|
|
|
@@ -2212,7 +2212,7 @@ class Tag extends i$1 {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
// Define styles (Lit handles Scoping via Shadow DOM by default)
|
|
2214
2214
|
// You would typically import your tag.scss.js here or use the css tag
|
|
2215
|
-
Tag.styles = [css_248z$
|
|
2215
|
+
Tag.styles = [css_248z$L, css_248z$K, css_248z$J];
|
|
2216
2216
|
__decorate([
|
|
2217
2217
|
n({ type: Boolean })
|
|
2218
2218
|
], Tag.prototype, "dismissible", void 0);
|
|
@@ -2226,7 +2226,7 @@ __decorate([
|
|
|
2226
2226
|
n()
|
|
2227
2227
|
], Tag.prototype, "size", void 0);
|
|
2228
2228
|
|
|
2229
|
-
var css_248z$
|
|
2229
|
+
var css_248z$I = i`* {
|
|
2230
2230
|
box-sizing: border-box;
|
|
2231
2231
|
}
|
|
2232
2232
|
|
|
@@ -2235,27 +2235,35 @@ var css_248z$H = i`* {
|
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
2237
|
:host {
|
|
2238
|
-
display: inline-
|
|
2238
|
+
display: inline-flex;
|
|
2239
2239
|
--chip-container-color: var(--color-surface);
|
|
2240
2240
|
--chip-label-text-color: var(--color-on-surface);
|
|
2241
|
-
--chip-outline-color: var(--color-outline);
|
|
2241
|
+
--chip-outline-color: var(--color-outline-variant);
|
|
2242
2242
|
--chip-container-shape: var(--shape-corner-small);
|
|
2243
|
+
--chip-container-padding: 1rem;
|
|
2244
|
+
/* 8dp */
|
|
2243
2245
|
}
|
|
2244
2246
|
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
+
/*
|
|
2248
|
+
* Reset native button/link styles
|
|
2249
|
+
*/
|
|
2250
|
+
.button {
|
|
2251
|
+
background: transparent;
|
|
2252
|
+
border: none;
|
|
2253
|
+
appearance: none;
|
|
2254
|
+
margin: 0;
|
|
2255
|
+
padding: 0;
|
|
2256
|
+
outline: none;
|
|
2257
|
+
text-decoration: none;
|
|
2247
2258
|
}
|
|
2248
2259
|
|
|
2249
2260
|
.chip {
|
|
2250
2261
|
position: relative;
|
|
2251
2262
|
display: inline-flex;
|
|
2252
|
-
flex-direction: column;
|
|
2253
2263
|
align-items: center;
|
|
2254
|
-
justify-content: center;
|
|
2255
2264
|
height: var(--chip-height, var(--_chip-height, 2rem));
|
|
2256
|
-
padding: 0 var(--_container-padding, 1rem);
|
|
2257
2265
|
width: 100%;
|
|
2258
|
-
|
|
2266
|
+
cursor: pointer;
|
|
2259
2267
|
}
|
|
2260
2268
|
.chip .tag-content {
|
|
2261
2269
|
position: relative;
|
|
@@ -2264,41 +2272,74 @@ var css_248z$H = i`* {
|
|
|
2264
2272
|
text-overflow: ellipsis;
|
|
2265
2273
|
white-space: nowrap;
|
|
2266
2274
|
max-width: 100%;
|
|
2275
|
+
height: 100%;
|
|
2267
2276
|
display: flex;
|
|
2268
2277
|
align-items: center;
|
|
2269
2278
|
justify-content: center;
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
font-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2279
|
+
padding-inline: var(--chip-container-padding);
|
|
2280
|
+
color: var(--_chip-text-color);
|
|
2281
|
+
opacity: var(--_chip-text-opacity, 1);
|
|
2282
|
+
font-family: var(--typography-label-large-font-family) !important;
|
|
2283
|
+
font-size: var(--typography-label-large-font-size) !important;
|
|
2284
|
+
font-weight: var(--typography-label-large-font-weight) !important;
|
|
2285
|
+
line-height: var(--typography-label-large-line-height) !important;
|
|
2286
|
+
letter-spacing: var(--typography-label-large-letter-spacing) !important;
|
|
2277
2287
|
}
|
|
2278
|
-
.chip .tag-content .
|
|
2279
|
-
width:
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2288
|
+
.chip .tag-content .label-container {
|
|
2289
|
+
min-width: 0;
|
|
2290
|
+
overflow: hidden;
|
|
2291
|
+
text-overflow: ellipsis;
|
|
2292
|
+
white-space: nowrap;
|
|
2283
2293
|
}
|
|
2284
|
-
.chip .close-btn {
|
|
2285
|
-
|
|
2294
|
+
.chip .tag-content .close-btn {
|
|
2295
|
+
height: 100%;
|
|
2286
2296
|
padding: 0;
|
|
2297
|
+
padding-inline: calc(var(--chip-container-padding) / 2);
|
|
2287
2298
|
margin: 0;
|
|
2288
2299
|
border: none;
|
|
2289
2300
|
background: transparent;
|
|
2290
2301
|
line-height: 0;
|
|
2291
2302
|
cursor: pointer;
|
|
2292
|
-
--icon-size: 1rem;
|
|
2293
2303
|
}
|
|
2294
|
-
.chip .close-btn .close-btn-icon {
|
|
2304
|
+
.chip .tag-content .close-btn .close-btn-icon {
|
|
2295
2305
|
--icon-size: 1rem;
|
|
2306
|
+
--icon-color: var(--_chip-text-color);
|
|
2296
2307
|
}
|
|
2297
|
-
.chip .close-btn:hover {
|
|
2308
|
+
.chip .tag-content .close-btn:hover {
|
|
2298
2309
|
background: var(--chip-hover-color);
|
|
2299
2310
|
}
|
|
2300
|
-
.chip .
|
|
2301
|
-
|
|
2311
|
+
.chip .tag-content .icon-slot-container {
|
|
2312
|
+
height: 100%;
|
|
2313
|
+
display: flex;
|
|
2314
|
+
align-items: center;
|
|
2315
|
+
--icon-size: 1rem;
|
|
2316
|
+
--icon-color: var(--color-primary);
|
|
2317
|
+
}
|
|
2318
|
+
.chip .focus-ring {
|
|
2319
|
+
z-index: 2;
|
|
2320
|
+
display: block;
|
|
2321
|
+
--focus-ring-container-shape: var(--chip-container-shape);
|
|
2322
|
+
}
|
|
2323
|
+
.chip .ripple {
|
|
2324
|
+
display: block;
|
|
2325
|
+
border-radius: var(--chip-container-shape);
|
|
2326
|
+
--ripple-state-opacity: var(--_chip-state-opacity, 0);
|
|
2327
|
+
--ripple-pressed-color: var(--_chip-state-color);
|
|
2328
|
+
}
|
|
2329
|
+
.chip.disabled {
|
|
2330
|
+
cursor: not-allowed;
|
|
2331
|
+
}
|
|
2332
|
+
.chip.dismissible .tag-content {
|
|
2333
|
+
padding-inline-end: 0;
|
|
2334
|
+
}
|
|
2335
|
+
.chip.dismissible.actionable .tag-content {
|
|
2336
|
+
padding-inline-end: calc(var(--chip-container-padding) / 2);
|
|
2337
|
+
}
|
|
2338
|
+
.chip.icon-slot-has-content .tag-content, .chip.selected .tag-content {
|
|
2339
|
+
padding-inline-start: 0;
|
|
2340
|
+
}
|
|
2341
|
+
.chip.icon-slot-has-content .icon-slot-container, .chip.selected .icon-slot-container {
|
|
2342
|
+
padding-inline: calc(var(--chip-container-padding) / 2);
|
|
2302
2343
|
}
|
|
2303
2344
|
.chip {
|
|
2304
2345
|
/**
|
|
@@ -2308,66 +2349,56 @@ var css_248z$H = i`* {
|
|
|
2308
2349
|
.chip .background {
|
|
2309
2350
|
display: block;
|
|
2310
2351
|
position: absolute;
|
|
2352
|
+
left: 0;
|
|
2311
2353
|
width: 100%;
|
|
2312
2354
|
height: 100%;
|
|
2313
|
-
border-radius:
|
|
2314
|
-
background: var(--
|
|
2355
|
+
border-radius: var(--chip-container-shape);
|
|
2356
|
+
background: var(--_chip-container-color);
|
|
2315
2357
|
pointer-events: none;
|
|
2316
2358
|
}
|
|
2317
2359
|
.chip .outline {
|
|
2360
|
+
z-index: 0;
|
|
2318
2361
|
display: block;
|
|
2319
2362
|
position: absolute;
|
|
2363
|
+
left: 0;
|
|
2320
2364
|
width: 100%;
|
|
2321
2365
|
height: 100%;
|
|
2322
|
-
border-radius:
|
|
2366
|
+
border-radius: var(--chip-container-shape);
|
|
2323
2367
|
border: 1px solid var(--chip-outline-color);
|
|
2324
2368
|
}
|
|
2325
2369
|
.chip .elevation {
|
|
2326
2370
|
--elevation-level: 0;
|
|
2327
2371
|
transition-duration: 280ms;
|
|
2328
|
-
|
|
2329
|
-
}
|
|
2330
|
-
.chip.dismissible .tag-content {
|
|
2331
|
-
padding-inline-end: 0.25rem;
|
|
2332
|
-
}
|
|
2333
|
-
.chip.selected {
|
|
2334
|
-
color: var(--background);
|
|
2335
|
-
background: var(--chip-hover-color);
|
|
2372
|
+
--elevation-container-shape: var(--chip-container-shape);
|
|
2336
2373
|
}
|
|
2337
|
-
.chip.selected .close-btn-icon {
|
|
2338
|
-
color: var(--background);
|
|
2339
|
-
}`;
|
|
2340
2374
|
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
--
|
|
2375
|
+
/** Color state management */
|
|
2376
|
+
.chip {
|
|
2377
|
+
--_chip-container-color: var(--chip-container-color);
|
|
2378
|
+
--_chip-text-color: var(--chip-label-text-color);
|
|
2379
|
+
--_chip-state-color: var(--_chip-text-color);
|
|
2344
2380
|
}
|
|
2345
|
-
|
|
2346
|
-
:
|
|
2347
|
-
--chip-container-color: var(--color-green-container);
|
|
2348
|
-
--chip-label-text-color: var(--color-on-green-container);
|
|
2349
|
-
--chip-outline-color: var(--color-on-green-container);
|
|
2381
|
+
.chip:hover {
|
|
2382
|
+
--_chip-state-opacity: 0.08;
|
|
2350
2383
|
}
|
|
2351
|
-
|
|
2352
|
-
:
|
|
2353
|
-
--chip-container-color: var(--color-blue-container);
|
|
2354
|
-
--chip-label-text-color: var(--color-on-blue-container);
|
|
2355
|
-
--chip-outline-color: var(--color-on-blue-container);
|
|
2384
|
+
.chip.pressed {
|
|
2385
|
+
--_chip-state-opacity: 0.12;
|
|
2356
2386
|
}
|
|
2357
|
-
|
|
2358
|
-
:
|
|
2359
|
-
--
|
|
2360
|
-
--chip-label-text-color: var(--color-on-yellow-container);
|
|
2361
|
-
--chip-outline-color: var(--color-on-yellow-container);
|
|
2387
|
+
.chip.selected {
|
|
2388
|
+
--_chip-container-color: var(--color-secondary-container);
|
|
2389
|
+
--_chip-text-color: var(--color-on-secondary-container);
|
|
2362
2390
|
}
|
|
2363
|
-
|
|
2364
|
-
:
|
|
2365
|
-
--
|
|
2366
|
-
--
|
|
2367
|
-
--
|
|
2391
|
+
.chip.disabled {
|
|
2392
|
+
--_chip-container-color: var(--color-on-surface);
|
|
2393
|
+
--_chip-container-opacity: 0.1;
|
|
2394
|
+
--_chip-text-color: var(--color-on-surface);
|
|
2395
|
+
--_chip-text-opacity: 0.38;
|
|
2396
|
+
}
|
|
2397
|
+
.chip.disabled .ripple {
|
|
2398
|
+
display: none;
|
|
2368
2399
|
}`;
|
|
2369
2400
|
|
|
2370
|
-
var css_248z$
|
|
2401
|
+
var css_248z$H = i`.tag {
|
|
2371
2402
|
font-family: var(--font-family-sans) !important;
|
|
2372
2403
|
}
|
|
2373
2404
|
|
|
@@ -2437,17 +2468,25 @@ var css_248z$F = i`.tag {
|
|
|
2437
2468
|
* <wc-chip>Chip content</wc-chip>
|
|
2438
2469
|
* ```
|
|
2439
2470
|
*/
|
|
2440
|
-
class Chip extends
|
|
2471
|
+
class Chip extends BaseButton {
|
|
2441
2472
|
constructor() {
|
|
2442
2473
|
super(...arguments);
|
|
2443
2474
|
/** If true, the tag will have a close icon. */
|
|
2444
2475
|
this.dismissible = false;
|
|
2445
|
-
|
|
2446
|
-
this.
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2476
|
+
this._hasIconSlotContent = false;
|
|
2477
|
+
this._isPressed = false;
|
|
2478
|
+
}
|
|
2479
|
+
focus() {
|
|
2480
|
+
this.buttonElement?.focus();
|
|
2481
|
+
}
|
|
2482
|
+
blur() {
|
|
2483
|
+
this.buttonElement?.blur();
|
|
2484
|
+
}
|
|
2485
|
+
firstUpdated() {
|
|
2486
|
+
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot[name="icon"]'), hasContent => {
|
|
2487
|
+
this._hasIconSlotContent = hasContent;
|
|
2488
|
+
this.requestUpdate();
|
|
2489
|
+
});
|
|
2451
2490
|
}
|
|
2452
2491
|
_dismissClickHandler(e) {
|
|
2453
2492
|
e.stopPropagation();
|
|
@@ -2461,7 +2500,7 @@ class Chip extends i$1 {
|
|
|
2461
2500
|
}
|
|
2462
2501
|
_renderCloseButton() {
|
|
2463
2502
|
if (!this.dismissible)
|
|
2464
|
-
return
|
|
2503
|
+
return A;
|
|
2465
2504
|
return b `
|
|
2466
2505
|
<button
|
|
2467
2506
|
class="close-btn"
|
|
@@ -2472,57 +2511,135 @@ class Chip extends i$1 {
|
|
|
2472
2511
|
</button>
|
|
2473
2512
|
`;
|
|
2474
2513
|
}
|
|
2475
|
-
_renderImage() {
|
|
2476
|
-
if (this.imageSrc)
|
|
2477
|
-
return b `<img
|
|
2478
|
-
src=${this.imageSrc}
|
|
2479
|
-
class="tag-image"
|
|
2480
|
-
alt="Tag Logo"
|
|
2481
|
-
/>`;
|
|
2482
|
-
return A;
|
|
2483
|
-
}
|
|
2484
2514
|
render() {
|
|
2485
|
-
const
|
|
2515
|
+
const cssClasses = {
|
|
2486
2516
|
chip: true,
|
|
2517
|
+
button: true,
|
|
2487
2518
|
selected: this.selected,
|
|
2488
2519
|
dismissible: this.dismissible,
|
|
2489
|
-
|
|
2520
|
+
pressed: this._isPressed,
|
|
2521
|
+
'icon-slot-has-content': this._hasIconSlotContent,
|
|
2490
2522
|
};
|
|
2523
|
+
if (!this.__isLink()) {
|
|
2524
|
+
return b `<button
|
|
2525
|
+
class=${e$1(cssClasses)}
|
|
2526
|
+
id="button"
|
|
2527
|
+
type=${this.htmlType}
|
|
2528
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
2529
|
+
@mousedown=${this.__handlePress}
|
|
2530
|
+
@keydown=${this.__handlePress}
|
|
2531
|
+
@keyup=${this.__handlePress}
|
|
2532
|
+
|
|
2533
|
+
aria-describedby=${o$1(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
|
|
2534
|
+
?aria-disabled=${this.softDisabled}
|
|
2535
|
+
|
|
2536
|
+
?disabled=${this.disabled}
|
|
2537
|
+
${spread(this.configAria)}
|
|
2538
|
+
>
|
|
2539
|
+
${this.renderChipContent()}
|
|
2540
|
+
</button>`;
|
|
2541
|
+
}
|
|
2542
|
+
return b `<a
|
|
2543
|
+
class=${e$1(cssClasses)}
|
|
2544
|
+
id="button"
|
|
2545
|
+
href=${this.href}
|
|
2546
|
+
target=${this.target}
|
|
2547
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
2548
|
+
|
|
2549
|
+
@click=${this.__dispatchClick}
|
|
2550
|
+
@mousedown=${this.__handlePress}
|
|
2551
|
+
@keydown=${this.__handlePress}
|
|
2552
|
+
@keyup=${this.__handlePress}
|
|
2553
|
+
role="button"
|
|
2554
|
+
|
|
2555
|
+
aria-describedby=${o$1(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
|
|
2556
|
+
?aria-disabled=${this.softDisabled}
|
|
2557
|
+
|
|
2558
|
+
${spread(this.configAria)}
|
|
2559
|
+
>
|
|
2560
|
+
${this.renderChipContent()}
|
|
2561
|
+
</a>`;
|
|
2562
|
+
}
|
|
2563
|
+
renderChipContent() {
|
|
2491
2564
|
return b `
|
|
2492
|
-
<
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2565
|
+
<wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
|
|
2566
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
2567
|
+
<div class="background"></div>
|
|
2568
|
+
<div class="outline"></div>
|
|
2569
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
2570
|
+
<div class="tag-content">
|
|
2496
2571
|
|
|
2497
|
-
<div class="
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2572
|
+
<div class="icon-slot-container">
|
|
2573
|
+
${this.selected
|
|
2574
|
+
? b `<wc-icon class="selected-icon" name="check"></wc-icon>`
|
|
2575
|
+
: b `<slot name="icon"></slot>`}
|
|
2501
2576
|
</div>
|
|
2577
|
+
<div class="label-container">
|
|
2578
|
+
<slot></slot>
|
|
2579
|
+
</div>
|
|
2580
|
+
|
|
2581
|
+
${this._renderCloseButton()}
|
|
2502
2582
|
</div>
|
|
2503
2583
|
`;
|
|
2504
2584
|
}
|
|
2505
2585
|
}
|
|
2506
2586
|
// Define styles (Lit handles Scoping via Shadow DOM by default)
|
|
2507
2587
|
// You would typically import your tag.scss.js here or use the css tag
|
|
2508
|
-
Chip.styles = [css_248z$
|
|
2588
|
+
Chip.styles = [css_248z$I, css_248z$H];
|
|
2509
2589
|
__decorate([
|
|
2510
2590
|
n({ type: Boolean })
|
|
2511
2591
|
], Chip.prototype, "dismissible", void 0);
|
|
2512
2592
|
__decorate([
|
|
2513
|
-
n({
|
|
2514
|
-
], Chip.prototype, "
|
|
2515
|
-
__decorate([
|
|
2516
|
-
n({ type: String, reflect: true })
|
|
2517
|
-
], Chip.prototype, "value", void 0);
|
|
2593
|
+
n({ reflect: true })
|
|
2594
|
+
], Chip.prototype, "configAria", void 0);
|
|
2518
2595
|
__decorate([
|
|
2519
|
-
|
|
2520
|
-
], Chip.prototype, "
|
|
2596
|
+
r()
|
|
2597
|
+
], Chip.prototype, "_hasIconSlotContent", void 0);
|
|
2521
2598
|
__decorate([
|
|
2522
|
-
|
|
2523
|
-
], Chip.prototype, "
|
|
2599
|
+
r()
|
|
2600
|
+
], Chip.prototype, "_isPressed", void 0);
|
|
2524
2601
|
|
|
2525
|
-
var css_248z$
|
|
2602
|
+
var css_248z$G = i`* {
|
|
2603
|
+
box-sizing: border-box;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
.screen-reader-only {
|
|
2607
|
+
display: none !important;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
:host {
|
|
2611
|
+
display: block;
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
slot {
|
|
2615
|
+
display: flex;
|
|
2616
|
+
flex-wrap: wrap;
|
|
2617
|
+
gap: 8px;
|
|
2618
|
+
}`;
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* @label Chip Set
|
|
2622
|
+
* @tag wc-chip-set
|
|
2623
|
+
* @rawTag chip-set
|
|
2624
|
+
* @summary A layout container for wrapping chips.
|
|
2625
|
+
* @tags layout
|
|
2626
|
+
*
|
|
2627
|
+
* @example
|
|
2628
|
+
* ```html
|
|
2629
|
+
* <wc-chip-set>
|
|
2630
|
+
* <wc-chip>One</wc-chip>
|
|
2631
|
+
* <wc-chip>Two</wc-chip>
|
|
2632
|
+
* </wc-chip-set>
|
|
2633
|
+
* ```
|
|
2634
|
+
*/
|
|
2635
|
+
class ChipSet extends i$1 {
|
|
2636
|
+
render() {
|
|
2637
|
+
return b `<slot></slot>`;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
ChipSet.styles = [css_248z$G];
|
|
2641
|
+
|
|
2642
|
+
var css_248z$F = i`:host {
|
|
2526
2643
|
display: block;
|
|
2527
2644
|
--progress-height: 0.25rem;
|
|
2528
2645
|
--progress-container-color: var(--color-primary);
|
|
@@ -2712,7 +2829,7 @@ class LinearProgress extends BaseProgress {
|
|
|
2712
2829
|
<div class="track track-start"></div>
|
|
2713
2830
|
<div
|
|
2714
2831
|
class="active-indicator"
|
|
2715
|
-
style="${o$
|
|
2832
|
+
style="${o$2({
|
|
2716
2833
|
width: `${this.__getPercentageValue()}%`,
|
|
2717
2834
|
})}"
|
|
2718
2835
|
></div>
|
|
@@ -2728,9 +2845,9 @@ class LinearProgress extends BaseProgress {
|
|
|
2728
2845
|
}
|
|
2729
2846
|
}
|
|
2730
2847
|
// Lit components use static styles for better performance
|
|
2731
|
-
LinearProgress.styles = [css_248z$
|
|
2848
|
+
LinearProgress.styles = [css_248z$F];
|
|
2732
2849
|
|
|
2733
|
-
var css_248z$
|
|
2850
|
+
var css_248z$E = i`:host {
|
|
2734
2851
|
display: inline-block;
|
|
2735
2852
|
--progress-height: 1.5rem;
|
|
2736
2853
|
--progress-line-thickness: 4px;
|
|
@@ -2872,7 +2989,7 @@ class CircularProgress extends BaseProgress {
|
|
|
2872
2989
|
cx="8"
|
|
2873
2990
|
cy="8"
|
|
2874
2991
|
r="6"
|
|
2875
|
-
style="${o$
|
|
2992
|
+
style="${o$2({
|
|
2876
2993
|
strokeDasharray: `${circumference}`,
|
|
2877
2994
|
strokeDashoffset: this.indeterminate ? undefined : `${offset}`,
|
|
2878
2995
|
})}"
|
|
@@ -2893,9 +3010,9 @@ class CircularProgress extends BaseProgress {
|
|
|
2893
3010
|
}
|
|
2894
3011
|
}
|
|
2895
3012
|
// Lit components use static styles for better performance
|
|
2896
|
-
CircularProgress.styles = [css_248z$
|
|
3013
|
+
CircularProgress.styles = [css_248z$E];
|
|
2897
3014
|
|
|
2898
|
-
var css_248z$
|
|
3015
|
+
var css_248z$D = i`* {
|
|
2899
3016
|
box-sizing: border-box;
|
|
2900
3017
|
}
|
|
2901
3018
|
|
|
@@ -2999,12 +3116,12 @@ class Skeleton extends i$1 {
|
|
|
2999
3116
|
return b ` <div class="skeleton"></div>`;
|
|
3000
3117
|
}
|
|
3001
3118
|
}
|
|
3002
|
-
Skeleton.styles = [css_248z$
|
|
3119
|
+
Skeleton.styles = [css_248z$D];
|
|
3003
3120
|
__decorate([
|
|
3004
3121
|
n({ type: Boolean, reflect: true })
|
|
3005
3122
|
], Skeleton.prototype, "visible", void 0);
|
|
3006
3123
|
|
|
3007
|
-
var css_248z$
|
|
3124
|
+
var css_248z$C = i`* {
|
|
3008
3125
|
box-sizing: border-box;
|
|
3009
3126
|
}
|
|
3010
3127
|
|
|
@@ -3074,16 +3191,23 @@ class Input extends BaseInput {
|
|
|
3074
3191
|
* validation errors only display in response to user interactions.
|
|
3075
3192
|
*/
|
|
3076
3193
|
this.dirty = false;
|
|
3194
|
+
this.__handleFocusChange = (event) => {
|
|
3195
|
+
this.focused = event.type === 'focus';
|
|
3196
|
+
};
|
|
3197
|
+
}
|
|
3198
|
+
async focus() {
|
|
3199
|
+
await Promise.all([
|
|
3200
|
+
customElements.whenDefined('wc-input'),
|
|
3201
|
+
customElements.whenDefined('wc-field'),
|
|
3202
|
+
]);
|
|
3203
|
+
await this.updateComplete;
|
|
3204
|
+
this.inputElement?.focus();
|
|
3077
3205
|
}
|
|
3078
3206
|
connectedCallback() {
|
|
3079
3207
|
super.connectedCallback();
|
|
3080
3208
|
this.handleInitialAttributes();
|
|
3081
3209
|
}
|
|
3082
3210
|
handleInitialAttributes() {
|
|
3083
|
-
if (this.hasAttribute('tabindex')) {
|
|
3084
|
-
this.tabindex = this.getAttribute('tabindex') || undefined;
|
|
3085
|
-
this.removeAttribute('tabindex');
|
|
3086
|
-
}
|
|
3087
3211
|
Array.from(this.attributes).forEach(attr => {
|
|
3088
3212
|
if (attr.name.startsWith('aria-')) {
|
|
3089
3213
|
this.configAria[attr.name] = attr.value;
|
|
@@ -3095,19 +3219,6 @@ class Input extends BaseInput {
|
|
|
3095
3219
|
this.dirty = true;
|
|
3096
3220
|
this.value = event.target.value;
|
|
3097
3221
|
}
|
|
3098
|
-
focus() {
|
|
3099
|
-
this.inputElement?.focus();
|
|
3100
|
-
}
|
|
3101
|
-
blur() {
|
|
3102
|
-
this.inputElement?.blur();
|
|
3103
|
-
}
|
|
3104
|
-
__handleFocusChange() {
|
|
3105
|
-
// When calling focus() or reportValidity() during change, it's possible
|
|
3106
|
-
// for blur to be called after the new focus event. Rather than set
|
|
3107
|
-
// `this.focused` to true/false on focus/blur, we always set it to whether
|
|
3108
|
-
// or not the input itself is focused.
|
|
3109
|
-
this.focused = this.inputElement?.matches(':focus') ?? false;
|
|
3110
|
-
}
|
|
3111
3222
|
__redispatchEvent(event) {
|
|
3112
3223
|
redispatchEvent(this, event);
|
|
3113
3224
|
}
|
|
@@ -3140,7 +3251,6 @@ class Input extends BaseInput {
|
|
|
3140
3251
|
placeholder=${this.placeholder}
|
|
3141
3252
|
autocomplete=${this.autocomplete}
|
|
3142
3253
|
.value=${this.value}
|
|
3143
|
-
?tabindex=${this.tabindex}
|
|
3144
3254
|
?readonly=${this.readonly}
|
|
3145
3255
|
?required=${this.required}
|
|
3146
3256
|
?disabled=${this.disabled}
|
|
@@ -3153,7 +3263,7 @@ class Input extends BaseInput {
|
|
|
3153
3263
|
|
|
3154
3264
|
${this.type === 'password'
|
|
3155
3265
|
? b `
|
|
3156
|
-
<
|
|
3266
|
+
<wc-tooltip
|
|
3157
3267
|
slot="field-end"
|
|
3158
3268
|
content=${this.passwordVisible
|
|
3159
3269
|
? 'Hide password'
|
|
@@ -3167,10 +3277,12 @@ class Input extends BaseInput {
|
|
|
3167
3277
|
}}
|
|
3168
3278
|
>
|
|
3169
3279
|
<wc-icon
|
|
3170
|
-
name=${this.passwordVisible
|
|
3280
|
+
name=${this.passwordVisible
|
|
3281
|
+
? 'visibility_off'
|
|
3282
|
+
: 'visibility'}
|
|
3171
3283
|
></wc-icon>
|
|
3172
3284
|
</wc-icon-button>
|
|
3173
|
-
</
|
|
3285
|
+
</wc-tooltip>
|
|
3174
3286
|
`
|
|
3175
3287
|
: A}
|
|
3176
3288
|
|
|
@@ -3179,7 +3291,7 @@ class Input extends BaseInput {
|
|
|
3179
3291
|
`;
|
|
3180
3292
|
}
|
|
3181
3293
|
}
|
|
3182
|
-
Input.styles = [css_248z$
|
|
3294
|
+
Input.styles = [css_248z$C];
|
|
3183
3295
|
__decorate([
|
|
3184
3296
|
n({ type: String })
|
|
3185
3297
|
], Input.prototype, "value", void 0);
|
|
@@ -3238,7 +3350,7 @@ __decorate([
|
|
|
3238
3350
|
e$2('.input-element')
|
|
3239
3351
|
], Input.prototype, "inputElement", void 0);
|
|
3240
3352
|
|
|
3241
|
-
var css_248z$
|
|
3353
|
+
var css_248z$B = i`* {
|
|
3242
3354
|
box-sizing: border-box;
|
|
3243
3355
|
}
|
|
3244
3356
|
|
|
@@ -3471,7 +3583,7 @@ class UrlField extends BaseInput {
|
|
|
3471
3583
|
`;
|
|
3472
3584
|
}
|
|
3473
3585
|
}
|
|
3474
|
-
UrlField.styles = [css_248z$
|
|
3586
|
+
UrlField.styles = [css_248z$B];
|
|
3475
3587
|
__decorate([
|
|
3476
3588
|
n({ type: String })
|
|
3477
3589
|
], UrlField.prototype, "value", void 0);
|
|
@@ -3521,7 +3633,7 @@ __decorate([
|
|
|
3521
3633
|
e$2('.url-input')
|
|
3522
3634
|
], UrlField.prototype, "inputElement", void 0);
|
|
3523
3635
|
|
|
3524
|
-
var css_248z$
|
|
3636
|
+
var css_248z$A = i`* {
|
|
3525
3637
|
box-sizing: border-box;
|
|
3526
3638
|
}
|
|
3527
3639
|
|
|
@@ -3610,7 +3722,7 @@ var css_248z$z = i`* {
|
|
|
3610
3722
|
display: flex;
|
|
3611
3723
|
align-items: center;
|
|
3612
3724
|
flex: 1;
|
|
3613
|
-
height: var(--field-height, 3.5rem);
|
|
3725
|
+
min-height: var(--field-height, 3.5rem);
|
|
3614
3726
|
padding-block: var(--field-padding-block);
|
|
3615
3727
|
z-index: 1;
|
|
3616
3728
|
}
|
|
@@ -3889,7 +4001,11 @@ class Field extends i$1 {
|
|
|
3889
4001
|
return b `<div class="text-count">${this.textCount}</div>`;
|
|
3890
4002
|
}
|
|
3891
4003
|
}
|
|
3892
|
-
Field.
|
|
4004
|
+
Field.shadowRootOptions = {
|
|
4005
|
+
...i$1.shadowRootOptions,
|
|
4006
|
+
delegatesFocus: true,
|
|
4007
|
+
};
|
|
4008
|
+
Field.styles = [css_248z$A];
|
|
3893
4009
|
__decorate([
|
|
3894
4010
|
n({ type: String })
|
|
3895
4011
|
], Field.prototype, "label", void 0);
|
|
@@ -3945,7 +4061,7 @@ __decorate([
|
|
|
3945
4061
|
r()
|
|
3946
4062
|
], Field.prototype, "slotEndHasContent", void 0);
|
|
3947
4063
|
|
|
3948
|
-
var css_248z$
|
|
4064
|
+
var css_248z$z = i`* {
|
|
3949
4065
|
box-sizing: border-box;
|
|
3950
4066
|
}
|
|
3951
4067
|
|
|
@@ -4144,7 +4260,7 @@ class NumberField extends BaseInput {
|
|
|
4144
4260
|
}
|
|
4145
4261
|
}
|
|
4146
4262
|
_NumberField_id = new WeakMap();
|
|
4147
|
-
NumberField.styles = [css_248z$
|
|
4263
|
+
NumberField.styles = [css_248z$z];
|
|
4148
4264
|
__decorate([
|
|
4149
4265
|
n({ type: Number })
|
|
4150
4266
|
], NumberField.prototype, "value", void 0);
|
|
@@ -4206,7 +4322,7 @@ __decorate([
|
|
|
4206
4322
|
e$2('.input-element')
|
|
4207
4323
|
], NumberField.prototype, "inputElement", void 0);
|
|
4208
4324
|
|
|
4209
|
-
var css_248z$
|
|
4325
|
+
var css_248z$y = i`* {
|
|
4210
4326
|
box-sizing: border-box;
|
|
4211
4327
|
}
|
|
4212
4328
|
|
|
@@ -4373,7 +4489,7 @@ class DatePicker extends BaseInput {
|
|
|
4373
4489
|
`;
|
|
4374
4490
|
}
|
|
4375
4491
|
}
|
|
4376
|
-
DatePicker.styles = [css_248z$
|
|
4492
|
+
DatePicker.styles = [css_248z$y];
|
|
4377
4493
|
__decorate([
|
|
4378
4494
|
n({ type: String })
|
|
4379
4495
|
], DatePicker.prototype, "value", void 0);
|
|
@@ -4429,7 +4545,7 @@ __decorate([
|
|
|
4429
4545
|
e$2('.input-element')
|
|
4430
4546
|
], DatePicker.prototype, "inputElement", void 0);
|
|
4431
4547
|
|
|
4432
|
-
var css_248z$
|
|
4548
|
+
var css_248z$x = i`* {
|
|
4433
4549
|
box-sizing: border-box;
|
|
4434
4550
|
}
|
|
4435
4551
|
|
|
@@ -4596,7 +4712,7 @@ class TimePicker extends BaseInput {
|
|
|
4596
4712
|
`;
|
|
4597
4713
|
}
|
|
4598
4714
|
}
|
|
4599
|
-
TimePicker.styles = [css_248z$
|
|
4715
|
+
TimePicker.styles = [css_248z$x];
|
|
4600
4716
|
__decorate([
|
|
4601
4717
|
n({ type: String })
|
|
4602
4718
|
], TimePicker.prototype, "value", void 0);
|
|
@@ -4652,7 +4768,7 @@ __decorate([
|
|
|
4652
4768
|
e$2('.input-element')
|
|
4653
4769
|
], TimePicker.prototype, "inputElement", void 0);
|
|
4654
4770
|
|
|
4655
|
-
var css_248z$
|
|
4771
|
+
var css_248z$w = i`* {
|
|
4656
4772
|
box-sizing: border-box;
|
|
4657
4773
|
}
|
|
4658
4774
|
|
|
@@ -4812,7 +4928,7 @@ class Textarea extends BaseInput {
|
|
|
4812
4928
|
`;
|
|
4813
4929
|
}
|
|
4814
4930
|
}
|
|
4815
|
-
Textarea.styles = [css_248z$
|
|
4931
|
+
Textarea.styles = [css_248z$w];
|
|
4816
4932
|
__decorate([
|
|
4817
4933
|
n({ type: String })
|
|
4818
4934
|
], Textarea.prototype, "value", void 0);
|
|
@@ -4871,7 +4987,7 @@ __decorate([
|
|
|
4871
4987
|
e$2('.input-element')
|
|
4872
4988
|
], Textarea.prototype, "inputElement", void 0);
|
|
4873
4989
|
|
|
4874
|
-
var css_248z$
|
|
4990
|
+
var css_248z$v = i`* {
|
|
4875
4991
|
box-sizing: border-box;
|
|
4876
4992
|
}
|
|
4877
4993
|
|
|
@@ -5212,7 +5328,7 @@ class Switch extends BaseInput {
|
|
|
5212
5328
|
`;
|
|
5213
5329
|
}
|
|
5214
5330
|
}
|
|
5215
|
-
Switch.styles = [css_248z$
|
|
5331
|
+
Switch.styles = [css_248z$v];
|
|
5216
5332
|
__decorate([
|
|
5217
5333
|
n({ type: Boolean })
|
|
5218
5334
|
], Switch.prototype, "value", void 0);
|
|
@@ -5256,7 +5372,7 @@ __decorate([
|
|
|
5256
5372
|
e$2('.input-native')
|
|
5257
5373
|
], Switch.prototype, "nativeElement", void 0);
|
|
5258
5374
|
|
|
5259
|
-
var css_248z$
|
|
5375
|
+
var css_248z$u = i`* {
|
|
5260
5376
|
box-sizing: border-box;
|
|
5261
5377
|
}
|
|
5262
5378
|
|
|
@@ -5714,7 +5830,7 @@ class Checkbox extends i$1 {
|
|
|
5714
5830
|
`;
|
|
5715
5831
|
}
|
|
5716
5832
|
}
|
|
5717
|
-
Checkbox.styles = [css_248z$
|
|
5833
|
+
Checkbox.styles = [css_248z$u];
|
|
5718
5834
|
__decorate([
|
|
5719
5835
|
n({ type: String })
|
|
5720
5836
|
], Checkbox.prototype, "name", void 0);
|
|
@@ -5761,7 +5877,7 @@ __decorate([
|
|
|
5761
5877
|
e$2('.input-native')
|
|
5762
5878
|
], Checkbox.prototype, "nativeElement", void 0);
|
|
5763
5879
|
|
|
5764
|
-
var css_248z$
|
|
5880
|
+
var css_248z$t = i`* {
|
|
5765
5881
|
box-sizing: border-box;
|
|
5766
5882
|
}
|
|
5767
5883
|
|
|
@@ -5848,9 +5964,9 @@ class Spinner extends i$1 {
|
|
|
5848
5964
|
`;
|
|
5849
5965
|
}
|
|
5850
5966
|
}
|
|
5851
|
-
Spinner.styles = [css_248z$
|
|
5967
|
+
Spinner.styles = [css_248z$t];
|
|
5852
5968
|
|
|
5853
|
-
var css_248z$
|
|
5969
|
+
var css_248z$s = i`* {
|
|
5854
5970
|
box-sizing: border-box;
|
|
5855
5971
|
}
|
|
5856
5972
|
|
|
@@ -5968,12 +6084,12 @@ class Container extends i$1 {
|
|
|
5968
6084
|
`;
|
|
5969
6085
|
}
|
|
5970
6086
|
}
|
|
5971
|
-
Container.styles = [css_248z$
|
|
6087
|
+
Container.styles = [css_248z$s];
|
|
5972
6088
|
__decorate([
|
|
5973
6089
|
n({ type: String, reflect: true })
|
|
5974
6090
|
], Container.prototype, "size", void 0);
|
|
5975
6091
|
|
|
5976
|
-
var css_248z$
|
|
6092
|
+
var css_248z$r = i`* {
|
|
5977
6093
|
box-sizing: border-box;
|
|
5978
6094
|
}
|
|
5979
6095
|
|
|
@@ -6035,6 +6151,7 @@ var css_248z$q = i`* {
|
|
|
6035
6151
|
|
|
6036
6152
|
:host(.content-center) .content {
|
|
6037
6153
|
align-items: center;
|
|
6154
|
+
text-align: center;
|
|
6038
6155
|
}
|
|
6039
6156
|
|
|
6040
6157
|
@container emptystate (min-width: 672px) {
|
|
@@ -6136,7 +6253,7 @@ class EmptyState extends i$1 {
|
|
|
6136
6253
|
}
|
|
6137
6254
|
}
|
|
6138
6255
|
// Lit handles styles in a static property for better performance
|
|
6139
|
-
EmptyState.styles = [css_248z$
|
|
6256
|
+
EmptyState.styles = [css_248z$r];
|
|
6140
6257
|
__decorate([
|
|
6141
6258
|
n({ type: String, reflect: true })
|
|
6142
6259
|
], EmptyState.prototype, "illustration", void 0);
|
|
@@ -6150,7 +6267,7 @@ __decorate([
|
|
|
6150
6267
|
r()
|
|
6151
6268
|
], EmptyState.prototype, "vertical", void 0);
|
|
6152
6269
|
|
|
6153
|
-
var css_248z$
|
|
6270
|
+
var css_248z$q = i`* {
|
|
6154
6271
|
box-sizing: border-box;
|
|
6155
6272
|
}
|
|
6156
6273
|
|
|
@@ -6388,7 +6505,7 @@ class Tooltip extends i$1 {
|
|
|
6388
6505
|
`;
|
|
6389
6506
|
}
|
|
6390
6507
|
}
|
|
6391
|
-
Tooltip.styles = [css_248z$
|
|
6508
|
+
Tooltip.styles = [css_248z$q];
|
|
6392
6509
|
__decorate([
|
|
6393
6510
|
n()
|
|
6394
6511
|
], Tooltip.prototype, "content", void 0);
|
|
@@ -6408,7 +6525,7 @@ __decorate([
|
|
|
6408
6525
|
n({ type: Boolean, reflect: true })
|
|
6409
6526
|
], Tooltip.prototype, "preview", void 0);
|
|
6410
6527
|
|
|
6411
|
-
var css_248z$
|
|
6528
|
+
var css_248z$p = i`* {
|
|
6412
6529
|
box-sizing: border-box;
|
|
6413
6530
|
}
|
|
6414
6531
|
|
|
@@ -6444,7 +6561,7 @@ ol {
|
|
|
6444
6561
|
pointer-events: none;
|
|
6445
6562
|
}`;
|
|
6446
6563
|
|
|
6447
|
-
var css_248z$
|
|
6564
|
+
var css_248z$o = i`* {
|
|
6448
6565
|
box-sizing: border-box;
|
|
6449
6566
|
}
|
|
6450
6567
|
|
|
@@ -6553,8 +6670,8 @@ class BreadcrumbItem extends i$1 {
|
|
|
6553
6670
|
<a
|
|
6554
6671
|
class="breadcrumb-link"
|
|
6555
6672
|
itemprop="item"
|
|
6556
|
-
href=${o$
|
|
6557
|
-
target=${o$
|
|
6673
|
+
href=${o$1(this.href)}
|
|
6674
|
+
target=${o$1(this.target)}
|
|
6558
6675
|
${this.target === '_blank'
|
|
6559
6676
|
? b `rel="noopener noreferrer"`
|
|
6560
6677
|
: A}
|
|
@@ -6574,7 +6691,7 @@ class BreadcrumbItem extends i$1 {
|
|
|
6574
6691
|
`;
|
|
6575
6692
|
}
|
|
6576
6693
|
}
|
|
6577
|
-
BreadcrumbItem.styles = [css_248z$
|
|
6694
|
+
BreadcrumbItem.styles = [css_248z$o];
|
|
6578
6695
|
__decorate([
|
|
6579
6696
|
n({ reflect: true })
|
|
6580
6697
|
], BreadcrumbItem.prototype, "href", void 0);
|
|
@@ -6616,7 +6733,6 @@ class Breadcrumb extends i$1 {
|
|
|
6616
6733
|
super(...arguments);
|
|
6617
6734
|
/**
|
|
6618
6735
|
* Accessible label for the breadcrumb navigation landmark.
|
|
6619
|
-
* @default "Breadcrumb"
|
|
6620
6736
|
*/
|
|
6621
6737
|
this.label = 'Breadcrumb';
|
|
6622
6738
|
}
|
|
@@ -6628,13 +6744,13 @@ class Breadcrumb extends i$1 {
|
|
|
6628
6744
|
</nav>`;
|
|
6629
6745
|
}
|
|
6630
6746
|
}
|
|
6631
|
-
Breadcrumb.styles = [css_248z$
|
|
6747
|
+
Breadcrumb.styles = [css_248z$p];
|
|
6632
6748
|
Breadcrumb.Item = BreadcrumbItem;
|
|
6633
6749
|
__decorate([
|
|
6634
6750
|
n({ type: String })
|
|
6635
6751
|
], Breadcrumb.prototype, "label", void 0);
|
|
6636
6752
|
|
|
6637
|
-
var css_248z$
|
|
6753
|
+
var css_248z$n = i`* {
|
|
6638
6754
|
box-sizing: border-box;
|
|
6639
6755
|
}
|
|
6640
6756
|
|
|
@@ -6742,7 +6858,7 @@ var css_248z$m = i`* {
|
|
|
6742
6858
|
--_container-color: var(--color-tertiary-container);
|
|
6743
6859
|
}`;
|
|
6744
6860
|
|
|
6745
|
-
var css_248z$
|
|
6861
|
+
var css_248z$m = i`* {
|
|
6746
6862
|
box-sizing: border-box;
|
|
6747
6863
|
}
|
|
6748
6864
|
|
|
@@ -6751,113 +6867,42 @@ var css_248z$l = i`* {
|
|
|
6751
6867
|
}
|
|
6752
6868
|
|
|
6753
6869
|
:host {
|
|
6754
|
-
padding-inline: var(--spacing-050);
|
|
6755
6870
|
outline: none;
|
|
6871
|
+
--menu-item-container-shape-start-start: var(--shape-corner-extra-small);
|
|
6872
|
+
--menu-item-container-shape-start-end: var(--shape-corner-extra-small);
|
|
6873
|
+
--menu-item-container-shape-end-start: var(--shape-corner-extra-small);
|
|
6874
|
+
--menu-item-container-shape-end-end: var(--shape-corner-extra-small);
|
|
6756
6875
|
}
|
|
6757
6876
|
|
|
6758
6877
|
.menu-item {
|
|
6759
|
-
position: relative;
|
|
6760
|
-
height: 3rem;
|
|
6761
|
-
display: flex;
|
|
6762
|
-
align-items: center;
|
|
6763
|
-
padding-inline: 0.75rem;
|
|
6764
|
-
outline: 0;
|
|
6765
|
-
text-decoration: none;
|
|
6766
|
-
font-family: var(--typography-label-large-font-family) !important;
|
|
6767
|
-
font-size: var(--typography-label-large-font-size) !important;
|
|
6768
|
-
font-weight: var(--typography-label-large-font-weight) !important;
|
|
6769
|
-
line-height: var(--typography-label-large-line-height) !important;
|
|
6770
|
-
letter-spacing: var(--typography-label-large-letter-spacing) !important;
|
|
6771
|
-
}
|
|
6772
|
-
.menu-item .menu-item-content {
|
|
6773
|
-
display: flex;
|
|
6774
|
-
align-items: center;
|
|
6775
|
-
z-index: 1;
|
|
6776
|
-
width: 100%;
|
|
6777
|
-
gap: var(--spacing-100);
|
|
6778
|
-
color: var(--_label-text-color);
|
|
6779
|
-
opacity: var(--_label-text-opacity, 1);
|
|
6780
|
-
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
6781
|
-
--icon-color: var(--_label-text-color);
|
|
6782
|
-
}
|
|
6783
|
-
.menu-item .menu-item-content .slot-container {
|
|
6784
|
-
flex: 1;
|
|
6785
|
-
}
|
|
6786
|
-
.menu-item .background {
|
|
6787
|
-
display: block;
|
|
6788
|
-
position: absolute;
|
|
6789
|
-
left: 0;
|
|
6790
|
-
top: 0;
|
|
6791
6878
|
width: 100%;
|
|
6792
|
-
height:
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
--
|
|
6813
|
-
--
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
--ripple-state-opacity: var(--_container-state-opacity, 0);
|
|
6817
|
-
--ripple-pressed-color: var(--_container-state-color);
|
|
6818
|
-
border-start-start-radius: var(--_container-shape-start-start);
|
|
6819
|
-
border-start-end-radius: var(--_container-shape-start-end);
|
|
6820
|
-
border-end-start-radius: var(--_container-shape-end-start);
|
|
6821
|
-
border-end-end-radius: var(--_container-shape-end-end);
|
|
6822
|
-
corner-shape: var(--_container-corner-shape-variant);
|
|
6823
|
-
}
|
|
6824
|
-
|
|
6825
|
-
.menu-item {
|
|
6826
|
-
--_container-shape-start-start: var(--menu-item-container-shape-start-start, var(--shape-corner-extra-small));
|
|
6827
|
-
--_container-shape-start-end: var(--menu-item-container-shape-start-end, var(--shape-corner-extra-small));
|
|
6828
|
-
--_container-shape-end-start: var(--menu-item-container-shape-end-start, var(--shape-corner-extra-small));
|
|
6829
|
-
--_container-shape-end-end: var(--menu-item-container-shape-end-end, var(--shape-corner-extra-small));
|
|
6830
|
-
--_container-corner-shape-variant: none;
|
|
6831
|
-
--_label-text-color: var(--menu-item-label-color);
|
|
6832
|
-
--_container-state-color: var(--_label-text-color);
|
|
6833
|
-
}
|
|
6834
|
-
.menu-item:hover:not(:where(.disabled, .selected)) {
|
|
6835
|
-
--_container-state-opacity: 0.08;
|
|
6836
|
-
}
|
|
6837
|
-
.menu-item.pressed:not(:where(.disabled)) {
|
|
6838
|
-
--_container-state-opacity: 0.12;
|
|
6839
|
-
}
|
|
6840
|
-
.menu-item.selected {
|
|
6841
|
-
--_container-color: var(--menu-item-container-selected-color);
|
|
6842
|
-
--_label-text-color: var(--menu-item-label-selected-color);
|
|
6843
|
-
--_container-shape-start-start: var(--shape-corner-large);
|
|
6844
|
-
--_container-shape-start-end: var(--shape-corner-large);
|
|
6845
|
-
--_container-shape-end-start: var(--shape-corner-large);
|
|
6846
|
-
--_container-shape-end-end: var(--shape-corner-large);
|
|
6847
|
-
--_container-corner-shape-variant: none;
|
|
6848
|
-
}
|
|
6849
|
-
.menu-item.disabled {
|
|
6850
|
-
cursor: not-allowed;
|
|
6851
|
-
--_container-color: var(--color-on-surface);
|
|
6852
|
-
--_container-opacity: 0.1;
|
|
6853
|
-
--_label-text-color: var(--color-on-surface);
|
|
6854
|
-
--_label-text-opacity: 0.38;
|
|
6855
|
-
}
|
|
6856
|
-
.menu-item.disabled .ripple {
|
|
6857
|
-
display: none;
|
|
6879
|
+
--item-height: 3rem;
|
|
6880
|
+
--item-container-shape-start-start: var(--menu-item-container-shape-start-start);
|
|
6881
|
+
--item-container-shape-start-end: var(--menu-item-container-shape-start-end);
|
|
6882
|
+
--item-container-shape-end-start: var(--menu-item-container-shape-end-start);
|
|
6883
|
+
--item-container-shape-end-end: var(--menu-item-container-shape-end-end);
|
|
6884
|
+
--item-container-shape-variant: none;
|
|
6885
|
+
--item-label-font-family: var(--typography-label-large-font-family);
|
|
6886
|
+
--item-label-font-size: var(--typography-label-large-font-size);
|
|
6887
|
+
--item-label-font-weight: var(--typography-label-large-font-weight);
|
|
6888
|
+
--item-label-line-height: var(--typography-label-large-line-height);
|
|
6889
|
+
--item-label-letter-spacing: var(--typography-label-large-letter-spacing);
|
|
6890
|
+
--item-label-text-color: var(--menu-item-label-color);
|
|
6891
|
+
--item-leading-trailing-color: var(--menu-item-label-color);
|
|
6892
|
+
--item-supporting-text-color: var(--menu-item-label-color);
|
|
6893
|
+
--item-container-selected-color: var(--menu-item-container-selected-color);
|
|
6894
|
+
--item-label-text-selected-color: var(--menu-item-label-selected-color);
|
|
6895
|
+
--item-icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
6896
|
+
}
|
|
6897
|
+
|
|
6898
|
+
:host([selected]) {
|
|
6899
|
+
--menu-item-container-shape-start-start: var(--shape-corner-large);
|
|
6900
|
+
--menu-item-container-shape-start-end: var(--shape-corner-large);
|
|
6901
|
+
--menu-item-container-shape-end-start: var(--shape-corner-large);
|
|
6902
|
+
--menu-item-container-shape-end-end: var(--shape-corner-large);
|
|
6858
6903
|
}`;
|
|
6859
6904
|
|
|
6860
|
-
var css_248z$
|
|
6905
|
+
var css_248z$l = i`:host-context([variant=standard]) {
|
|
6861
6906
|
--menu-item-label-color: var(--color-on-surface-variant);
|
|
6862
6907
|
--menu-item-label-selected-color: var(--color-on-tertiary-container);
|
|
6863
6908
|
--menu-item-container-selected-color: var(--color-tertiary-container);
|
|
@@ -6891,144 +6936,106 @@ class MenuItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
|
|
|
6891
6936
|
this.hasSubmenu = false;
|
|
6892
6937
|
this.submenuOpen = false;
|
|
6893
6938
|
this.variant = 'standard';
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
this.
|
|
6898
|
-
this.__dispatchClickWithThrottle = event => {
|
|
6899
|
-
this.__dispatchClick(event);
|
|
6900
|
-
};
|
|
6901
|
-
this.__dispatchClick = (event) => {
|
|
6902
|
-
// If the button is soft-disabled or a disabled link, we need to explicitly
|
|
6903
|
-
// prevent the click from propagating to other event listeners as well as
|
|
6904
|
-
// prevent the default action.
|
|
6905
|
-
if (this.softDisabled || (this.disabled && this.href)) {
|
|
6906
|
-
event.stopImmediatePropagation();
|
|
6907
|
-
event.preventDefault();
|
|
6908
|
-
return;
|
|
6909
|
-
}
|
|
6910
|
-
if (!isActivationClick(event) || !this.itemElement) {
|
|
6911
|
-
return;
|
|
6912
|
-
}
|
|
6913
|
-
this.focus();
|
|
6914
|
-
dispatchActivationClick(this.itemElement);
|
|
6915
|
-
};
|
|
6916
|
-
this.__handleKeyDown = (event) => {
|
|
6917
|
-
this.__handlePress(event);
|
|
6918
|
-
if (this.disabled || this.softDisabled || !this.itemElement) {
|
|
6919
|
-
return;
|
|
6920
|
-
}
|
|
6921
|
-
if (event.key === ' ') {
|
|
6922
|
-
event.preventDefault();
|
|
6923
|
-
this.itemElement.click();
|
|
6924
|
-
return;
|
|
6925
|
-
}
|
|
6926
|
-
if (event.key === 'Enter' && !this.__isLink()) {
|
|
6927
|
-
event.preventDefault();
|
|
6928
|
-
this.itemElement.click();
|
|
6929
|
-
}
|
|
6930
|
-
};
|
|
6931
|
-
this.__handlePress = (event) => {
|
|
6932
|
-
if (this.disabled || this.softDisabled)
|
|
6933
|
-
return;
|
|
6934
|
-
if (event instanceof KeyboardEvent &&
|
|
6935
|
-
event.type === 'keydown' &&
|
|
6936
|
-
(event.key === 'Enter' || event.key === ' ')) {
|
|
6937
|
-
this.isPressed = true;
|
|
6938
|
-
}
|
|
6939
|
-
else if (event.type === 'mousedown') {
|
|
6940
|
-
this.isPressed = true;
|
|
6941
|
-
}
|
|
6942
|
-
else {
|
|
6943
|
-
this.isPressed = false;
|
|
6944
|
-
}
|
|
6945
|
-
};
|
|
6939
|
+
this._contentObserver = new MutationObserver(() => {
|
|
6940
|
+
this.requestUpdate();
|
|
6941
|
+
});
|
|
6942
|
+
this._rovingTabIndex = -1;
|
|
6946
6943
|
}
|
|
6947
6944
|
connectedCallback() {
|
|
6948
6945
|
// eslint-disable-next-line wc/guard-super-call
|
|
6949
6946
|
super.connectedCallback();
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6947
|
+
this._contentObserver.observe(this, {
|
|
6948
|
+
subtree: true,
|
|
6949
|
+
childList: true,
|
|
6950
|
+
characterData: true,
|
|
6951
|
+
attributes: true,
|
|
6952
|
+
attributeFilter: ['slot'],
|
|
6953
|
+
});
|
|
6955
6954
|
}
|
|
6956
6955
|
disconnectedCallback() {
|
|
6957
|
-
|
|
6958
|
-
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
6956
|
+
this._contentObserver.disconnect();
|
|
6959
6957
|
super.disconnectedCallback();
|
|
6960
6958
|
}
|
|
6959
|
+
get tabIndex() {
|
|
6960
|
+
return this._rovingTabIndex;
|
|
6961
|
+
}
|
|
6962
|
+
set tabIndex(value) {
|
|
6963
|
+
this._rovingTabIndex = value;
|
|
6964
|
+
this.requestUpdate();
|
|
6965
|
+
}
|
|
6961
6966
|
focus() {
|
|
6962
6967
|
this.itemElement?.focus();
|
|
6963
6968
|
}
|
|
6964
6969
|
blur() {
|
|
6965
6970
|
this.itemElement?.blur();
|
|
6966
6971
|
}
|
|
6972
|
+
_hasNamedSlot(...names) {
|
|
6973
|
+
return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
|
|
6974
|
+
}
|
|
6975
|
+
_hasDefaultSlot() {
|
|
6976
|
+
return Array.from(this.childNodes).some(node => {
|
|
6977
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
6978
|
+
return Boolean(node.textContent?.trim());
|
|
6979
|
+
}
|
|
6980
|
+
return (node.nodeType === Node.ELEMENT_NODE &&
|
|
6981
|
+
!node.hasAttribute('slot'));
|
|
6982
|
+
});
|
|
6983
|
+
}
|
|
6967
6984
|
render() {
|
|
6968
|
-
const isLink = this.__isLink();
|
|
6969
|
-
const cssClasses = {
|
|
6970
|
-
'menu-item': true,
|
|
6971
|
-
disabled: this.disabled,
|
|
6972
|
-
selected: this.selected,
|
|
6973
|
-
pressed: this.isPressed,
|
|
6974
|
-
};
|
|
6975
6985
|
const controls = this.getAttribute('aria-controls');
|
|
6976
|
-
|
|
6977
|
-
|
|
6986
|
+
return b `
|
|
6987
|
+
<wc-item
|
|
6978
6988
|
id="item"
|
|
6979
|
-
class
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6989
|
+
class="menu-item"
|
|
6990
|
+
role="menuitem"
|
|
6991
|
+
tabindex=${String(this.tabIndex)}
|
|
6992
|
+
?selected=${this.selected}
|
|
6993
|
+
?disabled=${this.disabled}
|
|
6994
|
+
.softDisabled=${this.softDisabled}
|
|
6995
|
+
.htmlType=${this.htmlType}
|
|
6996
|
+
.href=${this.href}
|
|
6997
|
+
.target=${this.target}
|
|
6998
|
+
.rel=${this.rel}
|
|
6999
|
+
.download=${this.download}
|
|
6990
7000
|
aria-haspopup=${this.hasSubmenu ? 'menu' : A}
|
|
6991
|
-
aria-controls=${this.hasSubmenu && controls ? controls :
|
|
6992
|
-
aria-expanded=${this.hasSubmenu ? String(this.submenuOpen) :
|
|
7001
|
+
aria-controls=${o$1(this.hasSubmenu && controls ? controls : undefined)}
|
|
7002
|
+
aria-expanded=${o$1(this.hasSubmenu ? String(this.submenuOpen) : undefined)}
|
|
6993
7003
|
>
|
|
6994
7004
|
${this.renderContent()}
|
|
6995
|
-
</
|
|
6996
|
-
|
|
6997
|
-
return b `<div
|
|
6998
|
-
id="item"
|
|
6999
|
-
class=${e$1(cssClasses)}
|
|
7000
|
-
tabindex=${this.disabled ? '-1' : '0'}
|
|
7001
|
-
|
|
7002
|
-
@click=${this.__dispatchClick}
|
|
7003
|
-
@mousedown=${this.__handlePress}
|
|
7004
|
-
@keydown=${this.__handleKeyDown}
|
|
7005
|
-
@keyup=${this.__handlePress}
|
|
7006
|
-
|
|
7007
|
-
aria-disabled=${String(this.disabled)}
|
|
7008
|
-
aria-haspopup=${this.hasSubmenu ? 'menu' : A}
|
|
7009
|
-
aria-controls=${this.hasSubmenu && controls ? controls : A}
|
|
7010
|
-
aria-expanded=${this.hasSubmenu ? String(this.submenuOpen) : A}
|
|
7011
|
-
>
|
|
7012
|
-
${this.renderContent()}
|
|
7013
|
-
</div>`;
|
|
7005
|
+
</wc-item>
|
|
7006
|
+
`;
|
|
7014
7007
|
}
|
|
7015
7008
|
renderContent() {
|
|
7009
|
+
const hasStart = this._hasNamedSlot('start');
|
|
7010
|
+
const hasOverline = this._hasNamedSlot('overline');
|
|
7011
|
+
const hasHeadline = this._hasNamedSlot('headline');
|
|
7012
|
+
const hasDefault = this._hasDefaultSlot();
|
|
7013
|
+
const hasSupportingText = this._hasNamedSlot('supporting-text');
|
|
7014
|
+
const hasTrailingSupportingText = this._hasNamedSlot('trailing-supporting-text');
|
|
7015
|
+
const hasEnd = this._hasNamedSlot('end');
|
|
7016
7016
|
return b `
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7017
|
+
${hasStart ? b `<slot name="start" slot="start"></slot>` : A}
|
|
7018
|
+
${hasOverline
|
|
7019
|
+
? b `<slot name="overline" slot="overline"></slot>`
|
|
7020
|
+
: A}
|
|
7021
|
+
${hasHeadline ? b `<slot name="headline" slot="headline"></slot>` : A}
|
|
7022
|
+
${hasDefault ? b `<slot></slot>` : A}
|
|
7023
|
+
${hasSupportingText
|
|
7024
|
+
? b `<slot name="supporting-text" slot="supporting-text"></slot>`
|
|
7025
|
+
: A}
|
|
7026
|
+
${hasTrailingSupportingText
|
|
7027
|
+
? b `
|
|
7028
|
+
<slot
|
|
7029
|
+
name="trailing-supporting-text"
|
|
7030
|
+
slot="trailing-supporting-text"
|
|
7031
|
+
></slot>
|
|
7032
|
+
`
|
|
7033
|
+
: A}
|
|
7034
|
+
${hasEnd ? b `<slot name="end" slot="end"></slot>` : A}
|
|
7028
7035
|
`;
|
|
7029
7036
|
}
|
|
7030
7037
|
}
|
|
7031
|
-
MenuItem.styles = [css_248z$
|
|
7038
|
+
MenuItem.styles = [css_248z$m, css_248z$l];
|
|
7032
7039
|
__decorate([
|
|
7033
7040
|
n({ type: String })
|
|
7034
7041
|
], MenuItem.prototype, "value", void 0);
|
|
@@ -7048,11 +7055,8 @@ __decorate([
|
|
|
7048
7055
|
n({ type: String, reflect: true })
|
|
7049
7056
|
], MenuItem.prototype, "variant", void 0);
|
|
7050
7057
|
__decorate([
|
|
7051
|
-
e$2('
|
|
7058
|
+
e$2('wc-item')
|
|
7052
7059
|
], MenuItem.prototype, "itemElement", void 0);
|
|
7053
|
-
__decorate([
|
|
7054
|
-
r()
|
|
7055
|
-
], MenuItem.prototype, "isPressed", void 0);
|
|
7056
7060
|
|
|
7057
7061
|
/**
|
|
7058
7062
|
* @label Menu
|
|
@@ -7105,6 +7109,7 @@ class Menu extends i$1 {
|
|
|
7105
7109
|
return;
|
|
7106
7110
|
}
|
|
7107
7111
|
this._setActiveItem(item);
|
|
7112
|
+
this._dispatchItemActivate(item);
|
|
7108
7113
|
if (item.keepOpen) {
|
|
7109
7114
|
return;
|
|
7110
7115
|
}
|
|
@@ -7292,8 +7297,7 @@ class Menu extends i$1 {
|
|
|
7292
7297
|
}
|
|
7293
7298
|
_isEventFromThisMenu(event) {
|
|
7294
7299
|
const path = event.composedPath();
|
|
7295
|
-
const sourceMenu = path.find(target => target instanceof
|
|
7296
|
-
target.tagName.toLowerCase() === 'wc-menu');
|
|
7300
|
+
const sourceMenu = path.find(target => target instanceof Menu);
|
|
7297
7301
|
return sourceMenu === this;
|
|
7298
7302
|
}
|
|
7299
7303
|
_ownedItemFromEvent(event) {
|
|
@@ -7303,12 +7307,10 @@ class Menu extends i$1 {
|
|
|
7303
7307
|
const path = event.composedPath();
|
|
7304
7308
|
const ownedItems = this.items;
|
|
7305
7309
|
for (const target of path) {
|
|
7306
|
-
if (target instanceof
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
return ownedItem;
|
|
7311
|
-
}
|
|
7310
|
+
if (target instanceof MenuItem) {
|
|
7311
|
+
const ownedItem = ownedItems.find(item => item === target);
|
|
7312
|
+
if (ownedItem) {
|
|
7313
|
+
return ownedItem;
|
|
7312
7314
|
}
|
|
7313
7315
|
}
|
|
7314
7316
|
}
|
|
@@ -7323,6 +7325,13 @@ class Menu extends i$1 {
|
|
|
7323
7325
|
this.activeIndex = nextIndex;
|
|
7324
7326
|
this._syncRovingTabIndex();
|
|
7325
7327
|
}
|
|
7328
|
+
_dispatchItemActivate(item) {
|
|
7329
|
+
this.dispatchEvent(new CustomEvent('menu-item-activate', {
|
|
7330
|
+
bubbles: true,
|
|
7331
|
+
composed: true,
|
|
7332
|
+
detail: { item },
|
|
7333
|
+
}));
|
|
7334
|
+
}
|
|
7326
7335
|
_applyPositioning() {
|
|
7327
7336
|
if (!this.open || !this.menuListElement) {
|
|
7328
7337
|
return;
|
|
@@ -7404,7 +7413,7 @@ class Menu extends i$1 {
|
|
|
7404
7413
|
</div>`;
|
|
7405
7414
|
}
|
|
7406
7415
|
}
|
|
7407
|
-
Menu.styles = [css_248z$
|
|
7416
|
+
Menu.styles = [css_248z$n];
|
|
7408
7417
|
Menu.Item = MenuItem;
|
|
7409
7418
|
__decorate([
|
|
7410
7419
|
n({ type: Boolean, reflect: true })
|
|
@@ -7440,7 +7449,7 @@ __decorate([
|
|
|
7440
7449
|
e$2('.menu')
|
|
7441
7450
|
], Menu.prototype, "menuListElement", void 0);
|
|
7442
7451
|
|
|
7443
|
-
var css_248z$
|
|
7452
|
+
var css_248z$k = i`* {
|
|
7444
7453
|
box-sizing: border-box;
|
|
7445
7454
|
}
|
|
7446
7455
|
|
|
@@ -7503,7 +7512,7 @@ class SubMenu extends i$1 {
|
|
|
7503
7512
|
menu.addEventListener('opened', this._onChildMenuOpened);
|
|
7504
7513
|
menu.addEventListener('closed', this._onChildMenuClosed);
|
|
7505
7514
|
menu.isSubmenu = true;
|
|
7506
|
-
menu.anchorElement = item;
|
|
7515
|
+
menu.anchorElement = this._resolveAnchorElement(item);
|
|
7507
7516
|
menu.placement =
|
|
7508
7517
|
getComputedStyle(this).direction === 'rtl' ? 'left-start' : 'right-start';
|
|
7509
7518
|
menu.offset = 4;
|
|
@@ -7574,6 +7583,9 @@ class SubMenu extends i$1 {
|
|
|
7574
7583
|
}, this.hoverCloseDelay);
|
|
7575
7584
|
};
|
|
7576
7585
|
}
|
|
7586
|
+
_resolveAnchorElement(item) {
|
|
7587
|
+
return item.itemElement?.itemElement ?? item.itemElement ?? item;
|
|
7588
|
+
}
|
|
7577
7589
|
get item() {
|
|
7578
7590
|
const [candidate] = this._items ?? [];
|
|
7579
7591
|
return candidate instanceof MenuItem ? candidate : null;
|
|
@@ -7602,7 +7614,7 @@ class SubMenu extends i$1 {
|
|
|
7602
7614
|
if (!item || !menu) {
|
|
7603
7615
|
return;
|
|
7604
7616
|
}
|
|
7605
|
-
menu.anchorElement = item;
|
|
7617
|
+
menu.anchorElement = this._resolveAnchorElement(item);
|
|
7606
7618
|
menu.isSubmenu = true;
|
|
7607
7619
|
menu.show();
|
|
7608
7620
|
item.hasSubmenu = true;
|
|
@@ -7635,7 +7647,7 @@ class SubMenu extends i$1 {
|
|
|
7635
7647
|
`;
|
|
7636
7648
|
}
|
|
7637
7649
|
}
|
|
7638
|
-
SubMenu.styles = [css_248z$
|
|
7650
|
+
SubMenu.styles = [css_248z$k];
|
|
7639
7651
|
__decorate([
|
|
7640
7652
|
n({ type: Number, attribute: 'hover-open-delay' })
|
|
7641
7653
|
], SubMenu.prototype, "hoverOpenDelay", void 0);
|
|
@@ -7655,7 +7667,7 @@ __decorate([
|
|
|
7655
7667
|
o({ slot: 'menu' })
|
|
7656
7668
|
], SubMenu.prototype, "_menus", void 0);
|
|
7657
7669
|
|
|
7658
|
-
var css_248z$
|
|
7670
|
+
var css_248z$j = i`* {
|
|
7659
7671
|
box-sizing: border-box;
|
|
7660
7672
|
}
|
|
7661
7673
|
|
|
@@ -7684,7 +7696,7 @@ var css_248z$i = i`* {
|
|
|
7684
7696
|
--_container-color: var(--color-tertiary-container);
|
|
7685
7697
|
}`;
|
|
7686
7698
|
|
|
7687
|
-
var css_248z$
|
|
7699
|
+
var css_248z$i = i`* {
|
|
7688
7700
|
box-sizing: border-box;
|
|
7689
7701
|
}
|
|
7690
7702
|
|
|
@@ -7903,8 +7915,8 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
|
|
|
7903
7915
|
class=${e$1(cssClasses)}
|
|
7904
7916
|
href=${this.href}
|
|
7905
7917
|
target=${this.target}
|
|
7906
|
-
rel=${o$
|
|
7907
|
-
download=${o$
|
|
7918
|
+
rel=${o$1(this.rel)}
|
|
7919
|
+
download=${o$1(this.download)}
|
|
7908
7920
|
tabindex=${this.disabled ? '-1' : '0'}
|
|
7909
7921
|
aria-disabled=${String(this.disabled || this.softDisabled)}
|
|
7910
7922
|
@click=${this.__dispatchClick}
|
|
@@ -7936,7 +7948,7 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
|
|
|
7936
7948
|
`;
|
|
7937
7949
|
}
|
|
7938
7950
|
}
|
|
7939
|
-
ListItem.styles = [css_248z$
|
|
7951
|
+
ListItem.styles = [css_248z$i];
|
|
7940
7952
|
__decorate([
|
|
7941
7953
|
n({ type: Boolean, reflect: true })
|
|
7942
7954
|
], ListItem.prototype, "selected", void 0);
|
|
@@ -7987,12 +7999,498 @@ class List extends i$1 {
|
|
|
7987
7999
|
`;
|
|
7988
8000
|
}
|
|
7989
8001
|
}
|
|
7990
|
-
List.styles = [css_248z$
|
|
8002
|
+
List.styles = [css_248z$j];
|
|
7991
8003
|
List.Item = ListItem;
|
|
7992
8004
|
__decorate([
|
|
7993
8005
|
n({ type: String, reflect: true })
|
|
7994
8006
|
], List.prototype, "variant", void 0);
|
|
7995
8007
|
|
|
8008
|
+
var css_248z$h = i`* {
|
|
8009
|
+
box-sizing: border-box;
|
|
8010
|
+
}
|
|
8011
|
+
|
|
8012
|
+
.screen-reader-only {
|
|
8013
|
+
display: none !important;
|
|
8014
|
+
}
|
|
8015
|
+
|
|
8016
|
+
:host {
|
|
8017
|
+
display: block;
|
|
8018
|
+
padding-inline: var(--spacing-050);
|
|
8019
|
+
--item-height: 3.5rem;
|
|
8020
|
+
}
|
|
8021
|
+
|
|
8022
|
+
/**
|
|
8023
|
+
* Reset native button/link styles
|
|
8024
|
+
*/
|
|
8025
|
+
.native-button {
|
|
8026
|
+
background: transparent;
|
|
8027
|
+
border: none;
|
|
8028
|
+
appearance: none;
|
|
8029
|
+
margin: 0;
|
|
8030
|
+
outline: none;
|
|
8031
|
+
padding: 0;
|
|
8032
|
+
}
|
|
8033
|
+
|
|
8034
|
+
.native-link {
|
|
8035
|
+
text-decoration: none;
|
|
8036
|
+
color: inherit;
|
|
8037
|
+
cursor: pointer;
|
|
8038
|
+
}
|
|
8039
|
+
.native-link:link, .native-link:visited, .native-link:hover, .native-link:active {
|
|
8040
|
+
text-decoration: none;
|
|
8041
|
+
color: inherit;
|
|
8042
|
+
}
|
|
8043
|
+
|
|
8044
|
+
.item {
|
|
8045
|
+
position: relative;
|
|
8046
|
+
min-height: var(--item-height);
|
|
8047
|
+
width: 100%;
|
|
8048
|
+
background: transparent;
|
|
8049
|
+
text-align: initial;
|
|
8050
|
+
cursor: pointer;
|
|
8051
|
+
--private-item-container-shape-start-start: var(--item-container-shape-start-start, var(--shape-corner-extra-small));
|
|
8052
|
+
--private-item-container-shape-start-end: var(--item-container-shape-start-end, var(--shape-corner-extra-small));
|
|
8053
|
+
--private-item-container-shape-end-start: var(--item-container-shape-end-start, var(--shape-corner-extra-small));
|
|
8054
|
+
--private-item-container-shape-end-end: var(--item-container-shape-end-end, var(--shape-corner-extra-small));
|
|
8055
|
+
--private-item-container-shape-variant: var(--item-container-shape-variant, none);
|
|
8056
|
+
font-family: var(--item-label-font-family, var(--typography-body-large-font-family)) !important;
|
|
8057
|
+
font-size: var(--item-label-font-size, var(--typography-body-large-font-size)) !important;
|
|
8058
|
+
font-weight: var(--item-label-font-weight, var(--typography-body-large-font-weight)) !important;
|
|
8059
|
+
line-height: var(--item-label-line-height, var(--typography-body-large-line-height)) !important;
|
|
8060
|
+
letter-spacing: var(--item-label-letter-spacing, var(--typography-body-large-letter-spacing)) !important;
|
|
8061
|
+
}
|
|
8062
|
+
.item .item-content {
|
|
8063
|
+
position: relative;
|
|
8064
|
+
z-index: 1;
|
|
8065
|
+
display: flex;
|
|
8066
|
+
align-items: center;
|
|
8067
|
+
gap: var(--spacing-200);
|
|
8068
|
+
min-height: var(--item-height);
|
|
8069
|
+
padding-inline: var(--spacing-200);
|
|
8070
|
+
color: var(--private-item-label-text-color);
|
|
8071
|
+
opacity: var(--private-item-label-text-opacity, 1);
|
|
8072
|
+
--icon-size: var(--item-icon-size, 1.5rem);
|
|
8073
|
+
--icon-color: var(--private-item-leading-trailing-color);
|
|
8074
|
+
}
|
|
8075
|
+
.item .start,
|
|
8076
|
+
.item .end {
|
|
8077
|
+
display: inline-flex;
|
|
8078
|
+
align-items: center;
|
|
8079
|
+
justify-content: center;
|
|
8080
|
+
color: var(--private-item-leading-trailing-color);
|
|
8081
|
+
}
|
|
8082
|
+
.item .end {
|
|
8083
|
+
margin-inline-start: auto;
|
|
8084
|
+
}
|
|
8085
|
+
.item .content {
|
|
8086
|
+
display: flex;
|
|
8087
|
+
flex: 1;
|
|
8088
|
+
flex-direction: column;
|
|
8089
|
+
justify-content: center;
|
|
8090
|
+
gap: 0.125rem;
|
|
8091
|
+
min-inline-size: 0;
|
|
8092
|
+
}
|
|
8093
|
+
.item .headline-row {
|
|
8094
|
+
display: flex;
|
|
8095
|
+
min-inline-size: 0;
|
|
8096
|
+
}
|
|
8097
|
+
.item .headline,
|
|
8098
|
+
.item .overline,
|
|
8099
|
+
.item .supporting-text,
|
|
8100
|
+
.item .trailing-supporting-text {
|
|
8101
|
+
min-inline-size: 0;
|
|
8102
|
+
}
|
|
8103
|
+
.item .headline {
|
|
8104
|
+
flex: 1;
|
|
8105
|
+
color: var(--private-item-label-text-color);
|
|
8106
|
+
}
|
|
8107
|
+
.item .overline,
|
|
8108
|
+
.item .supporting-text,
|
|
8109
|
+
.item .trailing-supporting-text {
|
|
8110
|
+
color: var(--private-item-supporting-text-color);
|
|
8111
|
+
}
|
|
8112
|
+
.item .overline {
|
|
8113
|
+
font-family: var(--typography-label-small-font-family) !important;
|
|
8114
|
+
font-size: var(--typography-label-small-font-size) !important;
|
|
8115
|
+
font-weight: var(--typography-label-small-font-weight) !important;
|
|
8116
|
+
line-height: var(--typography-label-small-line-height) !important;
|
|
8117
|
+
letter-spacing: var(--typography-label-small-letter-spacing) !important;
|
|
8118
|
+
}
|
|
8119
|
+
.item .supporting-text,
|
|
8120
|
+
.item .trailing-supporting-text {
|
|
8121
|
+
font-family: var(--typography-body-medium-font-family) !important;
|
|
8122
|
+
font-size: var(--typography-body-medium-font-size) !important;
|
|
8123
|
+
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
8124
|
+
line-height: var(--typography-body-medium-line-height) !important;
|
|
8125
|
+
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
8126
|
+
}
|
|
8127
|
+
.item .trailing-supporting-text {
|
|
8128
|
+
display: inline-flex;
|
|
8129
|
+
align-items: center;
|
|
8130
|
+
white-space: nowrap;
|
|
8131
|
+
color: var(--private-item-supporting-text-color);
|
|
8132
|
+
}
|
|
8133
|
+
.item .background {
|
|
8134
|
+
position: absolute;
|
|
8135
|
+
inset: 0;
|
|
8136
|
+
background-color: var(--private-item-container-color);
|
|
8137
|
+
opacity: var(--private-item-container-opacity, 1);
|
|
8138
|
+
pointer-events: none;
|
|
8139
|
+
border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
|
|
8140
|
+
border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
|
|
8141
|
+
border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
|
|
8142
|
+
border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
|
|
8143
|
+
corner-shape: var(--private-item-container-shape-variant);
|
|
8144
|
+
}
|
|
8145
|
+
.item .focus-ring {
|
|
8146
|
+
z-index: 2;
|
|
8147
|
+
--focus-ring-container-shape-start-start: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
|
|
8148
|
+
--focus-ring-container-shape-start-end: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
|
|
8149
|
+
--focus-ring-container-shape-end-start: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
|
|
8150
|
+
--focus-ring-container-shape-end-end: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
|
|
8151
|
+
--focus-ring-container-shape-variant: var(--private-item-container-shape-variant);
|
|
8152
|
+
}
|
|
8153
|
+
.item .ripple {
|
|
8154
|
+
border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
|
|
8155
|
+
border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
|
|
8156
|
+
border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
|
|
8157
|
+
border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
|
|
8158
|
+
corner-shape: var(--private-item-container-shape-variant);
|
|
8159
|
+
--ripple-state-opacity: var(--private-item-container-state-opacity, 0);
|
|
8160
|
+
--ripple-pressed-color: var(--private-item-container-state-color);
|
|
8161
|
+
}
|
|
8162
|
+
|
|
8163
|
+
.item {
|
|
8164
|
+
--private-item-container-color: var(--item-container-color);
|
|
8165
|
+
--private-item-label-text-color: var(--item-label-text-color);
|
|
8166
|
+
--private-item-leading-trailing-color: var(--item-leading-trailing-color);
|
|
8167
|
+
--private-item-supporting-text-color: var(--item-supporting-text-color);
|
|
8168
|
+
--private-item-container-state-color: var(--private-item-label-text-color);
|
|
8169
|
+
}
|
|
8170
|
+
.item:hover:not(:where(.disabled, .selected)) {
|
|
8171
|
+
--private-item-container-state-opacity: 0.08;
|
|
8172
|
+
}
|
|
8173
|
+
.item.pressed:not(:where(.disabled)) {
|
|
8174
|
+
--private-item-container-state-opacity: 0.12;
|
|
8175
|
+
}
|
|
8176
|
+
.item.selected {
|
|
8177
|
+
--private-item-container-color: var(--item-container-selected-color);
|
|
8178
|
+
--private-item-label-text-color: var(--item-label-text-selected-color);
|
|
8179
|
+
--private-item-leading-trailing-color: var(--item-label-text-selected-color);
|
|
8180
|
+
--private-item-supporting-text-color: var(--item-label-text-selected-color);
|
|
8181
|
+
}
|
|
8182
|
+
.item.disabled {
|
|
8183
|
+
cursor: not-allowed;
|
|
8184
|
+
--private-item-label-text-color: var(--color-on-surface);
|
|
8185
|
+
--private-item-label-text-opacity: 0.38;
|
|
8186
|
+
--private-item-leading-trailing-color: var(--color-on-surface);
|
|
8187
|
+
--private-item-supporting-text-color: var(--color-on-surface);
|
|
8188
|
+
--private-item-container-opacity: 0.12;
|
|
8189
|
+
}
|
|
8190
|
+
.item.disabled .ripple {
|
|
8191
|
+
display: none;
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
:host {
|
|
8195
|
+
--item-container-color: transparent;
|
|
8196
|
+
--item-label-text-color: var(--color-on-surface);
|
|
8197
|
+
--item-leading-trailing-color: var(--color-on-surface-variant);
|
|
8198
|
+
--item-supporting-text-color: var(--color-on-surface-variant);
|
|
8199
|
+
--item-container-selected-color: var(--color-tertiary-container);
|
|
8200
|
+
--item-label-text-selected-color: var(--color-on-tertiary-container);
|
|
8201
|
+
}`;
|
|
8202
|
+
|
|
8203
|
+
/**
|
|
8204
|
+
* @label Item
|
|
8205
|
+
* @tag wc-item
|
|
8206
|
+
* @rawTag item
|
|
8207
|
+
*
|
|
8208
|
+
* @summary A Material 3 item with start, text and end slots.
|
|
8209
|
+
*
|
|
8210
|
+
* @example
|
|
8211
|
+
* ```html
|
|
8212
|
+
* <wc-item selected>
|
|
8213
|
+
* <wc-icon slot="start" name="home"></wc-icon>
|
|
8214
|
+
* <div slot="overline">Overline</div>
|
|
8215
|
+
* <div slot="headline">Headline</div>
|
|
8216
|
+
* <div slot="supporting-text">Supporting text</div>
|
|
8217
|
+
* <div slot="trailing-supporting-text">Trailing</div>
|
|
8218
|
+
* <wc-icon slot="end" name="chevron_right"></wc-icon>
|
|
8219
|
+
* </wc-item>
|
|
8220
|
+
* ```
|
|
8221
|
+
* @tags display
|
|
8222
|
+
*/
|
|
8223
|
+
class Item extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
|
|
8224
|
+
constructor() {
|
|
8225
|
+
super(...arguments);
|
|
8226
|
+
this.__contentObserver = new MutationObserver(() => {
|
|
8227
|
+
this.requestUpdate();
|
|
8228
|
+
});
|
|
8229
|
+
this.__isCapturingTabIndex = false;
|
|
8230
|
+
this.selected = false;
|
|
8231
|
+
this.isPressed = false;
|
|
8232
|
+
this.__handleSlotChange = () => {
|
|
8233
|
+
this.requestUpdate();
|
|
8234
|
+
};
|
|
8235
|
+
this.__dispatchClick = (event) => {
|
|
8236
|
+
if (this.softDisabled || (this.disabled && this.href)) {
|
|
8237
|
+
event.stopImmediatePropagation();
|
|
8238
|
+
event.preventDefault();
|
|
8239
|
+
return;
|
|
8240
|
+
}
|
|
8241
|
+
if (!isActivationClick(event) || !this.itemElement) {
|
|
8242
|
+
return;
|
|
8243
|
+
}
|
|
8244
|
+
this.focus();
|
|
8245
|
+
dispatchActivationClick(this.itemElement);
|
|
8246
|
+
};
|
|
8247
|
+
this.__handleKeyDown = (event) => {
|
|
8248
|
+
this.__handlePress(event);
|
|
8249
|
+
if (this.disabled || this.softDisabled || !this.itemElement) {
|
|
8250
|
+
return;
|
|
8251
|
+
}
|
|
8252
|
+
if (event.key === ' ') {
|
|
8253
|
+
event.preventDefault();
|
|
8254
|
+
this.itemElement.click();
|
|
8255
|
+
return;
|
|
8256
|
+
}
|
|
8257
|
+
if (event.key === 'Enter' && !this.__isLink()) {
|
|
8258
|
+
event.preventDefault();
|
|
8259
|
+
this.itemElement.click();
|
|
8260
|
+
}
|
|
8261
|
+
};
|
|
8262
|
+
this.__handlePress = (event) => {
|
|
8263
|
+
if (this.disabled || this.softDisabled)
|
|
8264
|
+
return;
|
|
8265
|
+
if (event instanceof KeyboardEvent &&
|
|
8266
|
+
event.type === 'keydown' &&
|
|
8267
|
+
(event.key === 'Enter' || event.key === ' ')) {
|
|
8268
|
+
this.isPressed = true;
|
|
8269
|
+
}
|
|
8270
|
+
else if (event.type === 'mousedown') {
|
|
8271
|
+
this.isPressed = true;
|
|
8272
|
+
}
|
|
8273
|
+
else {
|
|
8274
|
+
this.isPressed = false;
|
|
8275
|
+
}
|
|
8276
|
+
};
|
|
8277
|
+
}
|
|
8278
|
+
static get observedAttributes() {
|
|
8279
|
+
return [...super.observedAttributes, 'tabindex'];
|
|
8280
|
+
}
|
|
8281
|
+
__hasNamedSlot(...names) {
|
|
8282
|
+
return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
|
|
8283
|
+
}
|
|
8284
|
+
__hasDefaultSlot() {
|
|
8285
|
+
return Array.from(this.childNodes).some(node => {
|
|
8286
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
8287
|
+
return Boolean(node.textContent?.trim());
|
|
8288
|
+
}
|
|
8289
|
+
return (node.nodeType === Node.ELEMENT_NODE &&
|
|
8290
|
+
!node.hasAttribute('slot'));
|
|
8291
|
+
});
|
|
8292
|
+
}
|
|
8293
|
+
connectedCallback() {
|
|
8294
|
+
// eslint-disable-next-line wc/guard-super-call
|
|
8295
|
+
super.connectedCallback();
|
|
8296
|
+
this.__captureHostTabIndex();
|
|
8297
|
+
this.__contentObserver.observe(this, {
|
|
8298
|
+
subtree: true,
|
|
8299
|
+
childList: true,
|
|
8300
|
+
characterData: true,
|
|
8301
|
+
attributes: true,
|
|
8302
|
+
attributeFilter: ['slot'],
|
|
8303
|
+
});
|
|
8304
|
+
}
|
|
8305
|
+
disconnectedCallback() {
|
|
8306
|
+
this.__contentObserver.disconnect();
|
|
8307
|
+
super.disconnectedCallback();
|
|
8308
|
+
}
|
|
8309
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
8310
|
+
if (name === 'tabindex') {
|
|
8311
|
+
if (!this.__isCapturingTabIndex && newValue != null) {
|
|
8312
|
+
this.__capturedTabIndex = newValue;
|
|
8313
|
+
this.__isCapturingTabIndex = true;
|
|
8314
|
+
this.removeAttribute('tabindex');
|
|
8315
|
+
this.__isCapturingTabIndex = false;
|
|
8316
|
+
this.requestUpdate();
|
|
8317
|
+
}
|
|
8318
|
+
return;
|
|
8319
|
+
}
|
|
8320
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
8321
|
+
}
|
|
8322
|
+
focus() {
|
|
8323
|
+
this.itemElement?.focus();
|
|
8324
|
+
}
|
|
8325
|
+
blur() {
|
|
8326
|
+
this.itemElement?.blur();
|
|
8327
|
+
}
|
|
8328
|
+
__getForwardedAttribute(name) {
|
|
8329
|
+
return this.getAttribute(name) ?? undefined;
|
|
8330
|
+
}
|
|
8331
|
+
__captureHostTabIndex() {
|
|
8332
|
+
const tabIndex = this.getAttribute('tabindex');
|
|
8333
|
+
if (tabIndex == null) {
|
|
8334
|
+
return;
|
|
8335
|
+
}
|
|
8336
|
+
this.__capturedTabIndex = tabIndex;
|
|
8337
|
+
this.__isCapturingTabIndex = true;
|
|
8338
|
+
this.removeAttribute('tabindex');
|
|
8339
|
+
this.__isCapturingTabIndex = false;
|
|
8340
|
+
}
|
|
8341
|
+
render() {
|
|
8342
|
+
const isLink = this.__isLink();
|
|
8343
|
+
const role = this.__getForwardedAttribute('role');
|
|
8344
|
+
const tabIndex = this.__capturedTabIndex;
|
|
8345
|
+
const ariaHasPopup = this.__getForwardedAttribute('aria-haspopup');
|
|
8346
|
+
const ariaControls = this.__getForwardedAttribute('aria-controls');
|
|
8347
|
+
const ariaExpanded = this.__getForwardedAttribute('aria-expanded');
|
|
8348
|
+
const cssClasses = {
|
|
8349
|
+
item: true,
|
|
8350
|
+
selected: this.selected,
|
|
8351
|
+
disabled: this.disabled || this.softDisabled,
|
|
8352
|
+
pressed: this.isPressed,
|
|
8353
|
+
};
|
|
8354
|
+
if (!isLink) {
|
|
8355
|
+
cssClasses['native-button'] = true;
|
|
8356
|
+
return b `
|
|
8357
|
+
<button
|
|
8358
|
+
id="item"
|
|
8359
|
+
class=${e$1(cssClasses)}
|
|
8360
|
+
type=${this.htmlType}
|
|
8361
|
+
role=${o$1(role)}
|
|
8362
|
+
tabindex=${o$1(tabIndex)}
|
|
8363
|
+
?disabled=${this.disabled}
|
|
8364
|
+
?aria-disabled=${this.softDisabled}
|
|
8365
|
+
aria-haspopup=${o$1(ariaHasPopup)}
|
|
8366
|
+
aria-controls=${o$1(ariaControls)}
|
|
8367
|
+
aria-expanded=${o$1(ariaExpanded)}
|
|
8368
|
+
@click=${this.__dispatchClick}
|
|
8369
|
+
@mousedown=${this.__handlePress}
|
|
8370
|
+
@keydown=${this.__handleKeyDown}
|
|
8371
|
+
@keyup=${this.__handlePress}
|
|
8372
|
+
>
|
|
8373
|
+
${this.renderContent()}
|
|
8374
|
+
</button>
|
|
8375
|
+
`;
|
|
8376
|
+
}
|
|
8377
|
+
else {
|
|
8378
|
+
cssClasses['native-link'] = true;
|
|
8379
|
+
return b `
|
|
8380
|
+
<a
|
|
8381
|
+
id="item"
|
|
8382
|
+
class=${e$1(cssClasses)}
|
|
8383
|
+
href=${this.href}
|
|
8384
|
+
target=${this.target}
|
|
8385
|
+
rel=${o$1(this.rel)}
|
|
8386
|
+
download=${o$1(this.download)}
|
|
8387
|
+
role=${o$1(role)}
|
|
8388
|
+
tabindex=${o$1(tabIndex ?? (this.disabled ? '-1' : '0'))}
|
|
8389
|
+
aria-disabled=${String(this.disabled || this.softDisabled)}
|
|
8390
|
+
aria-haspopup=${o$1(ariaHasPopup)}
|
|
8391
|
+
aria-controls=${o$1(ariaControls)}
|
|
8392
|
+
aria-expanded=${o$1(ariaExpanded)}
|
|
8393
|
+
@click=${this.__dispatchClick}
|
|
8394
|
+
@mousedown=${this.__handlePress}
|
|
8395
|
+
@keydown=${this.__handleKeyDown}
|
|
8396
|
+
@keyup=${this.__handlePress}
|
|
8397
|
+
>
|
|
8398
|
+
${this.renderContent()}
|
|
8399
|
+
</a>
|
|
8400
|
+
`;
|
|
8401
|
+
}
|
|
8402
|
+
}
|
|
8403
|
+
renderContent() {
|
|
8404
|
+
const hasStart = this.__hasNamedSlot('start');
|
|
8405
|
+
const hasEnd = this.__hasNamedSlot('end');
|
|
8406
|
+
const hasOverline = this.__hasNamedSlot('overline');
|
|
8407
|
+
const hasHeadline = this.__hasNamedSlot('headline');
|
|
8408
|
+
const hasDefault = this.__hasDefaultSlot();
|
|
8409
|
+
const hasSupportingText = this.__hasNamedSlot('supporting-text');
|
|
8410
|
+
const hasTrailingSupportingText = this.__hasNamedSlot('trailing-supporting-text');
|
|
8411
|
+
return b `
|
|
8412
|
+
<wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
|
|
8413
|
+
<div class="background"></div>
|
|
8414
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
8415
|
+
|
|
8416
|
+
<div class="item-content">
|
|
8417
|
+
${hasStart
|
|
8418
|
+
? b `
|
|
8419
|
+
<div class="start">
|
|
8420
|
+
<slot name="start" @slotchange=${this.__handleSlotChange}></slot>
|
|
8421
|
+
</div>
|
|
8422
|
+
`
|
|
8423
|
+
: A}
|
|
8424
|
+
<div class="content">
|
|
8425
|
+
|
|
8426
|
+
${hasOverline
|
|
8427
|
+
? b `
|
|
8428
|
+
<div class="overline">
|
|
8429
|
+
<slot name="overline" @slotchange=${this.__handleSlotChange}></slot>
|
|
8430
|
+
</div>
|
|
8431
|
+
`
|
|
8432
|
+
: A}
|
|
8433
|
+
${hasHeadline || hasDefault
|
|
8434
|
+
? b `
|
|
8435
|
+
<div class="headline-row">
|
|
8436
|
+
${hasHeadline || hasDefault
|
|
8437
|
+
? b `
|
|
8438
|
+
<div class="headline">
|
|
8439
|
+
${hasHeadline
|
|
8440
|
+
? b `<slot name="headline" @slotchange=${this.__handleSlotChange}></slot>`
|
|
8441
|
+
: A}
|
|
8442
|
+
${hasDefault
|
|
8443
|
+
? b `<slot @slotchange=${this.__handleSlotChange}></slot>`
|
|
8444
|
+
: A}
|
|
8445
|
+
</div>
|
|
8446
|
+
`
|
|
8447
|
+
: A}
|
|
8448
|
+
</div>
|
|
8449
|
+
`
|
|
8450
|
+
: A}
|
|
8451
|
+
${hasSupportingText
|
|
8452
|
+
? b `
|
|
8453
|
+
<div class="supporting-text">
|
|
8454
|
+
<slot
|
|
8455
|
+
name="supporting-text"
|
|
8456
|
+
@slotchange=${this.__handleSlotChange}
|
|
8457
|
+
></slot>
|
|
8458
|
+
</div>
|
|
8459
|
+
`
|
|
8460
|
+
: A}
|
|
8461
|
+
</div>
|
|
8462
|
+
${hasTrailingSupportingText
|
|
8463
|
+
? b `
|
|
8464
|
+
<div class="trailing-supporting-text">
|
|
8465
|
+
<slot
|
|
8466
|
+
name="trailing-supporting-text"
|
|
8467
|
+
@slotchange=${this.__handleSlotChange}
|
|
8468
|
+
></slot>
|
|
8469
|
+
</div>
|
|
8470
|
+
`
|
|
8471
|
+
: A}
|
|
8472
|
+
${hasEnd
|
|
8473
|
+
? b `
|
|
8474
|
+
<div class="end">
|
|
8475
|
+
<slot name="end" @slotchange=${this.__handleSlotChange}></slot>
|
|
8476
|
+
</div>
|
|
8477
|
+
`
|
|
8478
|
+
: A}
|
|
8479
|
+
</div>
|
|
8480
|
+
`;
|
|
8481
|
+
}
|
|
8482
|
+
}
|
|
8483
|
+
Item.styles = [css_248z$h];
|
|
8484
|
+
__decorate([
|
|
8485
|
+
n({ type: Boolean, reflect: true })
|
|
8486
|
+
], Item.prototype, "selected", void 0);
|
|
8487
|
+
__decorate([
|
|
8488
|
+
e$2('#item')
|
|
8489
|
+
], Item.prototype, "itemElement", void 0);
|
|
8490
|
+
__decorate([
|
|
8491
|
+
r()
|
|
8492
|
+
], Item.prototype, "isPressed", void 0);
|
|
8493
|
+
|
|
7996
8494
|
var css_248z$g = i`@charset "UTF-8";
|
|
7997
8495
|
:host {
|
|
7998
8496
|
display: block;
|
|
@@ -8025,29 +8523,32 @@ img.clickable {
|
|
|
8025
8523
|
display: block;
|
|
8026
8524
|
}
|
|
8027
8525
|
|
|
8028
|
-
/*
|
|
8029
|
-
|
|
8030
|
-
.preview-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
inset: 0;
|
|
8034
|
-
z-index: 9999;
|
|
8035
|
-
background: rgba(0, 0, 0, 0.85);
|
|
8036
|
-
align-items: center;
|
|
8037
|
-
justify-content: center;
|
|
8526
|
+
/* Lightbox preview — native <dialog> renders in the top layer,
|
|
8527
|
+
bypassing any stacking context on the host page. */
|
|
8528
|
+
.preview-dialog {
|
|
8529
|
+
background: transparent;
|
|
8530
|
+
border: none;
|
|
8038
8531
|
cursor: zoom-out;
|
|
8532
|
+
max-height: 90dvh;
|
|
8533
|
+
max-width: 90dvw;
|
|
8534
|
+
padding: 0;
|
|
8039
8535
|
}
|
|
8040
|
-
|
|
8041
|
-
.preview-overlay.open {
|
|
8536
|
+
.preview-dialog[open] {
|
|
8042
8537
|
display: flex;
|
|
8538
|
+
align-items: center;
|
|
8539
|
+
justify-content: center;
|
|
8540
|
+
}
|
|
8541
|
+
.preview-dialog::backdrop {
|
|
8542
|
+
background: color-mix(in srgb, var(--color-scrim), transparent 15%);
|
|
8043
8543
|
}
|
|
8044
8544
|
|
|
8045
|
-
.preview-
|
|
8545
|
+
.preview-dialog img {
|
|
8046
8546
|
max-width: 90vw;
|
|
8047
8547
|
max-height: 90vh;
|
|
8048
8548
|
object-fit: contain;
|
|
8049
|
-
box-shadow: 0 8px 40px
|
|
8549
|
+
box-shadow: 0 8px 40px color-mix(in srgb, var(--color-shadow), transparent 40%);
|
|
8050
8550
|
border-radius: 4px;
|
|
8551
|
+
cursor: auto;
|
|
8051
8552
|
}`;
|
|
8052
8553
|
|
|
8053
8554
|
/**
|
|
@@ -8075,7 +8576,6 @@ class Image extends i$1 {
|
|
|
8075
8576
|
this.preview = false;
|
|
8076
8577
|
this._isDarkMode = isDarkMode();
|
|
8077
8578
|
this._loaded = false;
|
|
8078
|
-
this._previewOpen = false;
|
|
8079
8579
|
this._intersectionObserver = null;
|
|
8080
8580
|
this._themeCleanup = null;
|
|
8081
8581
|
}
|
|
@@ -8116,12 +8616,14 @@ class Image extends i$1 {
|
|
|
8116
8616
|
}
|
|
8117
8617
|
_handleClick() {
|
|
8118
8618
|
if (this.preview) {
|
|
8119
|
-
this.
|
|
8619
|
+
this._dialog?.showModal();
|
|
8120
8620
|
}
|
|
8121
8621
|
}
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8622
|
+
_handleDialogClick(e) {
|
|
8623
|
+
// Close when clicking the backdrop (target is the dialog itself, not the image)
|
|
8624
|
+
if (e.target === e.currentTarget) {
|
|
8625
|
+
e.currentTarget.close();
|
|
8626
|
+
}
|
|
8125
8627
|
}
|
|
8126
8628
|
render() {
|
|
8127
8629
|
return b `
|
|
@@ -8136,17 +8638,14 @@ class Image extends i$1 {
|
|
|
8136
8638
|
: b `<span class="placeholder" aria-hidden="true"></span>`}
|
|
8137
8639
|
</div>
|
|
8138
8640
|
|
|
8139
|
-
<!-- Lightbox preview
|
|
8140
|
-
<
|
|
8141
|
-
class="preview-
|
|
8142
|
-
role="dialog"
|
|
8143
|
-
aria-modal="true"
|
|
8641
|
+
<!-- Lightbox preview dialog — uses native top-layer to avoid stacking context issues -->
|
|
8642
|
+
<dialog
|
|
8643
|
+
class="preview-dialog"
|
|
8144
8644
|
aria-label="Image preview"
|
|
8145
|
-
@click=${this.
|
|
8146
|
-
@keydown=${(e) => e.key === 'Escape' && this._closePreview(e)}
|
|
8645
|
+
@click=${this._handleDialogClick}
|
|
8147
8646
|
>
|
|
8148
8647
|
<img src=${this._activeSrc} alt=${this.imageTitle} @click=${(e) => e.stopPropagation()} />
|
|
8149
|
-
</
|
|
8648
|
+
</dialog>
|
|
8150
8649
|
`;
|
|
8151
8650
|
}
|
|
8152
8651
|
}
|
|
@@ -8170,8 +8669,8 @@ __decorate([
|
|
|
8170
8669
|
r()
|
|
8171
8670
|
], Image.prototype, "_loaded", void 0);
|
|
8172
8671
|
__decorate([
|
|
8173
|
-
|
|
8174
|
-
], Image.prototype, "
|
|
8672
|
+
e$2('.preview-dialog')
|
|
8673
|
+
], Image.prototype, "_dialog", void 0);
|
|
8175
8674
|
|
|
8176
8675
|
var css_248z$f = i`* {
|
|
8177
8676
|
box-sizing: border-box;
|
|
@@ -9797,7 +10296,7 @@ class Slider extends i$1 {
|
|
|
9797
10296
|
@touchstart=${this.onMouseDown}
|
|
9798
10297
|
>
|
|
9799
10298
|
<div class="track">
|
|
9800
|
-
<div class="track-active" style=${o$
|
|
10299
|
+
<div class="track-active" style=${o$2({ width: `${percentage}%` })}></div>
|
|
9801
10300
|
</div>
|
|
9802
10301
|
|
|
9803
10302
|
<div
|
|
@@ -9809,7 +10308,7 @@ class Slider extends i$1 {
|
|
|
9809
10308
|
aria-valuemax=${this.max}
|
|
9810
10309
|
aria-valuenow=${this.value}
|
|
9811
10310
|
aria-disabled=${this.disabled}
|
|
9812
|
-
style=${o$
|
|
10311
|
+
style=${o$2({ left: `calc(${percentage}% - var(--thumb-half))` })}
|
|
9813
10312
|
@keydown=${this.handleKeyDown}
|
|
9814
10313
|
>
|
|
9815
10314
|
${this.labeled ? b `<div class="value-label">${this.value}</div>` : ''}
|
|
@@ -11153,7 +11652,7 @@ class SidebarSubMenu extends i$1 {
|
|
|
11153
11652
|
disabled: this.disabled,
|
|
11154
11653
|
selected: this.selected,
|
|
11155
11654
|
});
|
|
11156
|
-
const inlineStyles = o$
|
|
11655
|
+
const inlineStyles = o$2({
|
|
11157
11656
|
paddingLeft: `calc(var(--sidebar-menu-item-height, 2.5rem) * ${this.level})`,
|
|
11158
11657
|
});
|
|
11159
11658
|
return b `
|
|
@@ -12267,17 +12766,9 @@ var css_248z$2 = i`@charset "UTF-8";
|
|
|
12267
12766
|
/* Multi-select chips area — single scrollable row, no vertical growth */
|
|
12268
12767
|
.chips-container {
|
|
12269
12768
|
display: flex;
|
|
12270
|
-
flex-wrap: nowrap;
|
|
12271
|
-
overflow-x: auto;
|
|
12272
|
-
scrollbar-width: none;
|
|
12273
|
-
gap: var(--spacing-050);
|
|
12274
|
-
padding-block: var(--spacing-050);
|
|
12275
12769
|
align-items: center;
|
|
12276
12770
|
flex: 1;
|
|
12277
|
-
|
|
12278
|
-
}
|
|
12279
|
-
.chips-container::-webkit-scrollbar {
|
|
12280
|
-
display: none;
|
|
12771
|
+
padding-block: 0.5rem;
|
|
12281
12772
|
}
|
|
12282
12773
|
|
|
12283
12774
|
/* Disabled state */
|
|
@@ -12359,7 +12850,7 @@ class SelectOptionElement extends i$1 {
|
|
|
12359
12850
|
?keep-open=${this.keepOpen}
|
|
12360
12851
|
>
|
|
12361
12852
|
${this.icon
|
|
12362
|
-
? b `<wc-icon name=${this.icon} slot="
|
|
12853
|
+
? b `<wc-icon name=${this.icon} slot="start"></wc-icon>`
|
|
12363
12854
|
: A}
|
|
12364
12855
|
<slot>${this.value === '' ? 'None' : ''}</slot>
|
|
12365
12856
|
${this.selected && this.keepOpen
|
|
@@ -12753,6 +13244,7 @@ class Select extends BaseInput {
|
|
|
12753
13244
|
// Multi-select: show chips for selected items
|
|
12754
13245
|
if (this.multiple && this._selectedValues.length > 0) {
|
|
12755
13246
|
return b `<div class="chips-container">
|
|
13247
|
+
<wc-chip-set>
|
|
12756
13248
|
${this._selectedValues.map(val => b `
|
|
12757
13249
|
<wc-chip
|
|
12758
13250
|
dismissible
|
|
@@ -12761,6 +13253,7 @@ class Select extends BaseInput {
|
|
|
12761
13253
|
>${this._getLabelForValue(val)}</wc-chip
|
|
12762
13254
|
>
|
|
12763
13255
|
`)}
|
|
13256
|
+
</wc-chip-set>
|
|
12764
13257
|
</div>`;
|
|
12765
13258
|
}
|
|
12766
13259
|
// Single select: show selected label or placeholder
|
|
@@ -13371,17 +13864,13 @@ __decorate([
|
|
|
13371
13864
|
* ```html
|
|
13372
13865
|
* <wc-navigation-rail>
|
|
13373
13866
|
* <wc-navigation-rail-item active>
|
|
13374
|
-
* <wc-icon slot="icon"
|
|
13867
|
+
* <wc-icon slot="icon" name="home"></wc-icon>
|
|
13375
13868
|
* Home
|
|
13376
13869
|
* </wc-navigation-rail-item>
|
|
13377
13870
|
* <wc-navigation-rail-item>
|
|
13378
|
-
* <wc-icon slot="icon"
|
|
13871
|
+
* <wc-icon slot="icon" name="search"></wc-icon>
|
|
13379
13872
|
* Search
|
|
13380
13873
|
* </wc-navigation-rail-item>
|
|
13381
|
-
* <wc-navigation-rail-item>
|
|
13382
|
-
* <wc-icon slot="icon">settings</wc-icon>
|
|
13383
|
-
* Settings
|
|
13384
|
-
* </wc-navigation-rail-item>
|
|
13385
13874
|
* </wc-navigation-rail>
|
|
13386
13875
|
* ```
|
|
13387
13876
|
* @tags navigation
|
|
@@ -13475,5 +13964,5 @@ __decorate([
|
|
|
13475
13964
|
n({ type: Boolean, attribute: 'show-divider' })
|
|
13476
13965
|
], NavigationRail.prototype, "showDivider", void 0);
|
|
13477
13966
|
|
|
13478
|
-
export { Accordion as A, Badge as B, Checkbox as C, DatePicker as D, Elevation as E, Field as F,
|
|
13479
|
-
//# sourceMappingURL=navigation-rail-
|
|
13967
|
+
export { Tooltip as $, Accordion as A, Badge as B, Checkbox as C, DatePicker as D, Elevation as E, Field as F, Slider as G, Snackbar as H, Image as I, Spinner as J, SubMenu as K, LinearProgress as L, Menu as M, NavigationRail as N, Svg as O, Pagination as P, Switch as Q, Radio as R, SegmentedButton as S, Tab as T, TabGroup as U, TabPanel as V, Table as W, Tabs as X, Tag as Y, Textarea as Z, TimePicker as _, Avatar as a, UrlField as a0, Breadcrumb as b, BreadcrumbItem as c, Chip as d, ChipSet as e, CircularProgress as f, Container as g, Divider as h, EmptyState as i, FocusRing as j, Input as k, Item as l, Link as m, List as n, ListItem as o, MenuItem as p, NavigationRailItem as q, NumberField as r, Ripple as s, SegmentedButtonGroup as t, Select as u, SelectOptionElement as v, SidebarMenu as w, SidebarMenuItem as x, SidebarSubMenu as y, Skeleton as z };
|
|
13968
|
+
//# sourceMappingURL=navigation-rail-DAUuJ_Yp.js.map
|