@redvars/peacock 3.3.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IndividualComponent-DUINtMGK.js +67 -0
- package/dist/IndividualComponent-DUINtMGK.js.map +1 -0
- package/dist/assets/images/empty-state/no-document.svg +11 -12
- package/dist/assets/images/empty-state/page.svg +15 -9
- package/dist/bottom-sheet.js +238 -0
- package/dist/bottom-sheet.js.map +1 -0
- package/dist/{button-ClzS8JLq.js → button-COYCtuA8.js} +306 -149
- package/dist/button-COYCtuA8.js.map +1 -0
- package/dist/button-group-DsXquZQn.js +440 -0
- package/dist/button-group-DsXquZQn.js.map +1 -0
- package/dist/button-group.js +6 -4
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +5 -3
- package/dist/button.js.map +1 -1
- package/dist/card-content.js +29 -0
- package/dist/card-content.js.map +1 -0
- package/dist/card.js +418 -44
- package/dist/card.js.map +1 -1
- package/dist/{chart-bar-DbnXQgvS.js → chart-bar-cn6rrna-.js} +2 -2
- package/dist/{chart-bar-DbnXQgvS.js.map → chart-bar-cn6rrna-.js.map} +1 -1
- package/dist/chart-bar.js +4 -3
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js +2 -1
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js +2 -1
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js +4 -3
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/{class-map-59YGWLnx.js → class-map-3TAnCMAX.js} +3 -9
- package/dist/class-map-3TAnCMAX.js.map +1 -0
- package/dist/clock.js +2 -1
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +6 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +5 -3
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +2458 -2753
- package/dist/custom-elements.json +2742 -757
- package/dist/dispatch-event-utils-B4odODQf.js.map +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +3 -2
- package/dist/number-counter.js.map +1 -1
- package/dist/{observe-theme-change-pALI5fmV.js → observe-theme-change-DKAIv5BB.js} +3 -2
- package/dist/observe-theme-change-DKAIv5BB.js.map +1 -0
- package/dist/peacock-loader.js +34 -8
- package/dist/peacock-loader.js.map +1 -1
- package/dist/property-1psGvXOq.js +10 -0
- package/dist/property-1psGvXOq.js.map +1 -0
- package/dist/{radio-b70_Ie9n.js → select-C3XAzenC.js} +1706 -192
- package/dist/select-C3XAzenC.js.map +1 -0
- package/dist/side-sheet.js +186 -0
- package/dist/side-sheet.js.map +1 -0
- package/dist/src/bottom-sheet/bottom-sheet.d.ts +42 -0
- package/dist/src/bottom-sheet/index.d.ts +1 -0
- package/dist/src/button/BaseButton.d.ts +4 -3
- package/dist/src/button/button/button.d.ts +4 -0
- package/dist/src/button/button-group/button-group.d.ts +32 -3
- package/dist/src/button/icon-button/icon-button.d.ts +4 -0
- package/dist/src/card/card-content.d.ts +15 -0
- package/dist/src/card/card.d.ts +37 -3
- package/dist/src/card/index.d.ts +1 -0
- package/dist/src/container/container.d.ts +1 -1
- package/dist/src/empty-state/empty-state.d.ts +1 -1
- package/dist/src/focus-ring/focus-ring.d.ts +4 -1
- package/dist/src/index.d.ts +6 -1
- package/dist/src/menu/menu/menu.d.ts +1 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +0 -1
- package/dist/src/ripple/ripple.d.ts +19 -3
- package/dist/src/segmented-button/index.d.ts +2 -0
- package/dist/src/segmented-button/segmented-button-group.d.ts +46 -0
- package/dist/src/segmented-button/segmented-button.d.ts +65 -0
- package/dist/src/select/index.d.ts +3 -0
- package/dist/src/select/option.d.ts +55 -0
- package/dist/src/select/select.d.ts +116 -0
- package/dist/src/side-sheet/index.d.ts +1 -0
- package/dist/src/side-sheet/side-sheet.d.ts +41 -0
- package/dist/src/tabs/tab-group.d.ts +0 -1
- package/dist/src/tabs/tab.d.ts +8 -2
- package/dist/src/tabs/tabs.d.ts +13 -1
- package/dist/state-DwbEjqVk.js +10 -0
- package/dist/state-DwbEjqVk.js.map +1 -0
- package/dist/{style-map-DcB52w-l.js → style-map-CRFEoCEg.js} +2 -2
- package/dist/{style-map-DcB52w-l.js.map → style-map-CRFEoCEg.js.map} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-C2r3PyzF.js → unsafe-html-D3GHRaGQ.js} +2 -2
- package/dist/{unsafe-html-C2r3PyzF.js.map → unsafe-html-D3GHRaGQ.js.map} +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/src/bottom-sheet/bottom-sheet.scss +88 -0
- package/src/bottom-sheet/bottom-sheet.ts +135 -0
- package/src/bottom-sheet/index.ts +1 -0
- package/src/button/BaseButton.ts +16 -7
- package/src/button/button/button-colors.scss +76 -5
- package/src/button/button/button-sizes.scss +39 -19
- package/src/button/button/button.scss +117 -116
- package/src/button/button/button.ts +23 -1
- package/src/button/button-group/button-group.scss +25 -22
- package/src/button/button-group/button-group.ts +121 -4
- package/src/button/icon-button/icon-button-sizes.scss +35 -15
- package/src/button/icon-button/icon-button.ts +21 -1
- package/src/card/card-colors.scss +10 -0
- package/src/card/card-content.ts +26 -0
- package/src/card/card.scss +221 -41
- package/src/card/card.ts +240 -7
- package/src/card/index.ts +1 -0
- package/src/code-editor/code-editor.ts +1 -1
- package/src/container/container.ts +1 -1
- package/src/empty-state/empty-state.scss +8 -0
- package/src/empty-state/empty-state.ts +2 -2
- package/src/focus-ring/focus-ring.ts +37 -19
- package/src/index.ts +7 -1
- package/src/menu/menu/menu.scss +24 -3
- package/src/menu/menu/menu.ts +23 -2
- package/src/menu/menu-item/menu-item.scss +1 -0
- package/src/menu/menu-item/menu-item.ts +1 -9
- package/src/peacock-loader.ts +28 -0
- package/src/ripple/ripple.ts +19 -3
- package/src/segmented-button/index.ts +2 -0
- package/src/segmented-button/segmented-button-group.scss +21 -0
- package/src/segmented-button/segmented-button-group.ts +110 -0
- package/src/segmented-button/segmented-button.scss +115 -0
- package/src/segmented-button/segmented-button.ts +175 -0
- package/src/select/index.ts +3 -0
- package/src/select/option.ts +109 -0
- package/src/select/select.scss +120 -0
- package/src/select/select.ts +486 -0
- package/src/side-sheet/index.ts +1 -0
- package/src/side-sheet/side-sheet.scss +79 -0
- package/src/side-sheet/side-sheet.ts +100 -0
- package/src/slider/slider.scss +0 -1
- package/src/tabs/demo/index.html +90 -0
- package/src/tabs/tab-group.ts +0 -3
- package/src/tabs/tab.scss +237 -25
- package/src/tabs/tab.ts +85 -11
- package/src/tabs/tabs.scss +37 -3
- package/src/tabs/tabs.ts +118 -2
- package/src/utils/dispatch-event-utils.ts +1 -0
- package/dist/IndividualComponent-Dt5xirYG.js +0 -73
- package/dist/IndividualComponent-Dt5xirYG.js.map +0 -1
- package/dist/button-ClzS8JLq.js.map +0 -1
- package/dist/button-group-BMS5WvaF.js +0 -292
- package/dist/button-group-BMS5WvaF.js.map +0 -1
- package/dist/chart-donut.js +0 -309
- package/dist/chart-donut.js.map +0 -1
- package/dist/class-map-59YGWLnx.js.map +0 -1
- package/dist/observe-theme-change-pALI5fmV.js.map +0 -1
- package/dist/radio-b70_Ie9n.js.map +0 -1
- package/dist/src/chart-donut/chart-donut.d.ts +0 -53
- package/dist/src/chart-donut/index.d.ts +0 -1
- package/dist/test/card.test.d.ts +0 -1
- package/src/chart-donut/chart-donut.scss +0 -37
- package/src/chart-donut/chart-donut.ts +0 -287
- package/src/chart-donut/demo/index.html +0 -51
- package/src/chart-donut/index.ts +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { a as i, _ as __decorate,
|
|
2
|
-
import {
|
|
1
|
+
import { a as i, _ as __decorate, i as i$2, A, c as __classPrivateFieldGet, b, I as IndividualComponent } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { r } from './state-DwbEjqVk.js';
|
|
4
|
+
import { e as e$2 } from './class-map-3TAnCMAX.js';
|
|
3
5
|
import { i as isActivationClick, d as dispatchActivationClick, t as throttle, o as observerSlotChangesWithCallback } from './dispatch-event-utils-B4odODQf.js';
|
|
4
6
|
import { e, i as i$1, t } from './directive-Cuw6h7YA.js';
|
|
5
7
|
import { e as e$1 } from './query-QBcUV-L_.js';
|
|
@@ -14,15 +16,15 @@ var css_248z$2 = i`* {
|
|
|
14
16
|
|
|
15
17
|
:host {
|
|
16
18
|
display: inline-flex;
|
|
17
|
-
--z-index-button: 0;
|
|
18
19
|
--button-height: unset;
|
|
19
20
|
--button-icon-size: unset;
|
|
20
|
-
--button-container-
|
|
21
|
+
--button-container-padding: unset;
|
|
22
|
+
--button-container-shape: var(--shape-corner-medium);
|
|
21
23
|
--button-container-shape-start-start: unset;
|
|
22
24
|
--button-container-shape-start-end: unset;
|
|
23
25
|
--button-container-shape-end-start: unset;
|
|
24
26
|
--button-container-shape-end-end: unset;
|
|
25
|
-
--button-container-shape-variant:
|
|
27
|
+
--button-container-shape-variant: squircle;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -31,7 +33,7 @@ var css_248z$2 = i`* {
|
|
|
31
33
|
*/
|
|
32
34
|
slot::slotted(*) {
|
|
33
35
|
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
34
|
-
--icon-color: var(--
|
|
36
|
+
--icon-color: var(--_button_label-text-color);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
/*
|
|
@@ -52,29 +54,30 @@ slot::slotted(*) {
|
|
|
52
54
|
flex-direction: column;
|
|
53
55
|
align-items: center;
|
|
54
56
|
justify-content: center;
|
|
55
|
-
height: var(--button-height
|
|
56
|
-
padding: 0 var(--
|
|
57
|
+
height: var(--button-height);
|
|
58
|
+
padding: 0 var(--button-container-padding, var(--_button_container-padding));
|
|
57
59
|
width: 100%;
|
|
58
60
|
font-family: var(--font-family-sans) !important;
|
|
59
61
|
cursor: pointer;
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
62
|
+
--_button_container-shape-start-start: var(--button-container-shape-start-start, var(--button-container-shape));
|
|
63
|
+
--_button_container-shape-start-end: var(--button-container-shape-start-end, var(--button-container-shape));
|
|
64
|
+
--_button_container-shape-end-start: var(--button-container-shape-end-start, var(--button-container-shape));
|
|
65
|
+
--_button_container-shape-end-end: var(--button-container-shape-end-end, var(--button-container-shape));
|
|
66
|
+
--_button_container-corner-shape-variant: var(--button-container-shape-variant);
|
|
65
67
|
}
|
|
66
68
|
.button .button-content {
|
|
67
69
|
display: flex;
|
|
68
70
|
align-items: center;
|
|
69
71
|
justify-content: center;
|
|
72
|
+
pointer-events: none;
|
|
70
73
|
gap: var(--_button-icon-label-spacing);
|
|
71
74
|
width: 100%;
|
|
72
75
|
height: 100%;
|
|
73
76
|
z-index: 0;
|
|
74
|
-
color: var(--
|
|
75
|
-
opacity: var(--
|
|
77
|
+
color: var(--_button_label-text-color);
|
|
78
|
+
opacity: var(--_button_label-text-opacity, 1);
|
|
76
79
|
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
77
|
-
--icon-color: var(--
|
|
80
|
+
--icon-color: var(--_button_label-text-color);
|
|
78
81
|
}
|
|
79
82
|
.button .button-content .slot-container {
|
|
80
83
|
display: none;
|
|
@@ -89,20 +92,20 @@ slot::slotted(*) {
|
|
|
89
92
|
}
|
|
90
93
|
.button .focus-ring {
|
|
91
94
|
z-index: 2;
|
|
92
|
-
--focus-ring-container-shape-start-start: var(--
|
|
93
|
-
--focus-ring-container-shape-start-end: var(--
|
|
94
|
-
--focus-ring-container-shape-end-start: var(--
|
|
95
|
-
--focus-ring-container-shape-end-end: var(--
|
|
96
|
-
--focus-ring-container-shape-variant: var(--
|
|
95
|
+
--focus-ring-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
96
|
+
--focus-ring-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
97
|
+
--focus-ring-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
98
|
+
--focus-ring-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
99
|
+
--focus-ring-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
97
100
|
}
|
|
98
101
|
.button .ripple {
|
|
99
|
-
border-start-start-radius: var(--
|
|
100
|
-
border-start-end-radius: var(--
|
|
101
|
-
border-end-start-radius: var(--
|
|
102
|
-
border-end-end-radius: var(--
|
|
103
|
-
corner-shape: var(--
|
|
104
|
-
--ripple-state-opacity: var(--
|
|
105
|
-
--ripple-pressed-color: var(--
|
|
102
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
103
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
104
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
105
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
106
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
107
|
+
--ripple-state-opacity: var(--_button_container-state-opacity, 0);
|
|
108
|
+
--ripple-pressed-color: var(--_button_container-state-color);
|
|
106
109
|
}
|
|
107
110
|
.button .background {
|
|
108
111
|
display: block;
|
|
@@ -110,13 +113,13 @@ slot::slotted(*) {
|
|
|
110
113
|
left: 0;
|
|
111
114
|
width: 100%;
|
|
112
115
|
height: 100%;
|
|
113
|
-
background-color: var(--
|
|
114
|
-
opacity: var(--
|
|
115
|
-
border-start-start-radius: var(--
|
|
116
|
-
border-start-end-radius: var(--
|
|
117
|
-
border-end-start-radius: var(--
|
|
118
|
-
border-end-end-radius: var(--
|
|
119
|
-
corner-shape: var(--
|
|
116
|
+
background-color: var(--_button_container-color);
|
|
117
|
+
opacity: var(--_button_container-opacity, 1);
|
|
118
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
119
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
120
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
121
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
122
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
120
123
|
pointer-events: none;
|
|
121
124
|
}
|
|
122
125
|
.button .skeleton {
|
|
@@ -127,30 +130,30 @@ slot::slotted(*) {
|
|
|
127
130
|
position: absolute;
|
|
128
131
|
top: 0;
|
|
129
132
|
left: 0;
|
|
130
|
-
--skeleton-container-shape-start-start: var(--
|
|
131
|
-
--skeleton-container-shape-start-end: var(--
|
|
132
|
-
--skeleton-container-shape-end-start: var(--
|
|
133
|
-
--skeleton-container-shape-end-end: var(--
|
|
134
|
-
--skeleton-container-shape-variant: var(--
|
|
133
|
+
--skeleton-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
134
|
+
--skeleton-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
135
|
+
--skeleton-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
136
|
+
--skeleton-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
137
|
+
--skeleton-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
135
138
|
}
|
|
136
139
|
.button .elevation {
|
|
137
|
-
--elevation-level: var(--
|
|
140
|
+
--elevation-level: var(--_button_container-elevation-level);
|
|
138
141
|
transition-duration: 280ms;
|
|
139
|
-
--elevation-container-shape-start-start: var(--
|
|
140
|
-
--elevation-container-shape-start-end: var(--
|
|
141
|
-
--elevation-container-shape-end-start: var(--
|
|
142
|
-
--elevation-container-shape-end-end: var(--
|
|
143
|
-
--elevation-container-shape-variant: var(--
|
|
142
|
+
--elevation-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
143
|
+
--elevation-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
144
|
+
--elevation-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
145
|
+
--elevation-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
146
|
+
--elevation-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
144
147
|
}
|
|
145
148
|
.button .neo-background {
|
|
146
149
|
display: none;
|
|
147
150
|
position: absolute;
|
|
148
151
|
background: var(--color-inverse-surface);
|
|
149
|
-
border-start-start-radius: var(--
|
|
150
|
-
border-start-end-radius: var(--
|
|
151
|
-
border-end-start-radius: var(--
|
|
152
|
-
border-end-end-radius: var(--
|
|
153
|
-
corner-shape: var(--
|
|
152
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
153
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
154
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
155
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
156
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
154
157
|
width: 100%;
|
|
155
158
|
height: 100%;
|
|
156
159
|
pointer-events: none;
|
|
@@ -164,13 +167,13 @@ slot::slotted(*) {
|
|
|
164
167
|
width: 100%;
|
|
165
168
|
height: 100%;
|
|
166
169
|
pointer-events: none;
|
|
167
|
-
border: var(--
|
|
168
|
-
opacity: var(--
|
|
169
|
-
border-start-start-radius: var(--
|
|
170
|
-
border-start-end-radius: var(--
|
|
171
|
-
border-end-start-radius: var(--
|
|
172
|
-
border-end-end-radius: var(--
|
|
173
|
-
corner-shape: var(--
|
|
170
|
+
border: var(--_button_outline-width) solid var(--_button_outline-color);
|
|
171
|
+
opacity: var(--_button_outline-opacity, 1);
|
|
172
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
173
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
174
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
175
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
176
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
174
177
|
}
|
|
175
178
|
.button.has-content .slot-container {
|
|
176
179
|
display: flex;
|
|
@@ -203,123 +206,123 @@ slot::slotted(*) {
|
|
|
203
206
|
* Button variant definitions
|
|
204
207
|
*/
|
|
205
208
|
.button.variant-elevated {
|
|
206
|
-
--
|
|
207
|
-
--
|
|
208
|
-
--
|
|
209
|
-
--
|
|
209
|
+
--_button_container-color: var(--elevated-button-container-color);
|
|
210
|
+
--_button_label-text-color: var(--elevated-button-label-text-color);
|
|
211
|
+
--_button_container-elevation-level: 1;
|
|
212
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
210
213
|
}
|
|
211
214
|
.button.variant-elevated:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
212
|
-
--
|
|
213
|
-
--
|
|
215
|
+
--_button_container-elevation-level: 2;
|
|
216
|
+
--_button_container-state-opacity: 0.08;
|
|
214
217
|
}
|
|
215
218
|
.button.variant-elevated.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
216
|
-
--
|
|
217
|
-
--
|
|
219
|
+
--_button_container-elevation-level: 1;
|
|
220
|
+
--_button_container-state-opacity: 0.12;
|
|
218
221
|
}
|
|
219
222
|
.button.variant-elevated.disabled {
|
|
220
|
-
--
|
|
221
|
-
--
|
|
222
|
-
--
|
|
223
|
-
--
|
|
223
|
+
--_button_container-color: var(--color-on-surface);
|
|
224
|
+
--_button_container-opacity: 0.1;
|
|
225
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
226
|
+
--_button_label-text-opacity: 0.38;
|
|
224
227
|
}
|
|
225
228
|
.button.variant-elevated.disabled .ripple {
|
|
226
229
|
display: none;
|
|
227
230
|
}
|
|
228
231
|
|
|
229
232
|
.button.variant-filled {
|
|
230
|
-
--
|
|
231
|
-
--
|
|
232
|
-
--
|
|
233
|
+
--_button_container-color: var(--filled-button-container-color);
|
|
234
|
+
--_button_label-text-color: var(--filled-button-label-text-color);
|
|
235
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
233
236
|
}
|
|
234
237
|
.button.variant-filled:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
235
|
-
--
|
|
236
|
-
--
|
|
238
|
+
--_button_container-elevation-level: 1;
|
|
239
|
+
--_button_container-state-opacity: 0.08;
|
|
237
240
|
}
|
|
238
241
|
.button.variant-filled.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
239
|
-
--
|
|
240
|
-
--
|
|
242
|
+
--_button_container-elevation-level: 0;
|
|
243
|
+
--_button_container-state-opacity: 0.1;
|
|
241
244
|
}
|
|
242
245
|
.button.variant-filled.disabled {
|
|
243
|
-
--
|
|
244
|
-
--
|
|
245
|
-
--
|
|
246
|
-
--
|
|
246
|
+
--_button_container-color: var(--color-on-surface);
|
|
247
|
+
--_button_container-opacity: 0.1;
|
|
248
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
249
|
+
--_button_label-text-opacity: 0.38;
|
|
247
250
|
}
|
|
248
251
|
.button.variant-filled.disabled .ripple {
|
|
249
252
|
display: none;
|
|
250
253
|
}
|
|
251
254
|
|
|
252
255
|
.button.variant-tonal {
|
|
253
|
-
--
|
|
254
|
-
--
|
|
255
|
-
--
|
|
256
|
+
--_button_container-color: var(--tonal-button-container-color);
|
|
257
|
+
--_button_label-text-color: var(--tonal-button-label-text-color);
|
|
258
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
256
259
|
}
|
|
257
260
|
.button.variant-tonal:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
258
|
-
--
|
|
259
|
-
--
|
|
261
|
+
--_button_container-elevation-level: 1;
|
|
262
|
+
--_button_container-state-opacity: 0.08;
|
|
260
263
|
}
|
|
261
264
|
.button.variant-tonal.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
262
|
-
--
|
|
263
|
-
--
|
|
265
|
+
--_button_container-elevation-level: 0;
|
|
266
|
+
--_button_container-state-opacity: 0.12;
|
|
264
267
|
}
|
|
265
268
|
.button.variant-tonal.disabled {
|
|
266
|
-
--
|
|
267
|
-
--
|
|
268
|
-
--
|
|
269
|
-
--
|
|
269
|
+
--_button_container-color: var(--color-on-surface);
|
|
270
|
+
--_button_container-opacity: 0.1;
|
|
271
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
272
|
+
--_button_label-text-opacity: 0.38;
|
|
270
273
|
}
|
|
271
274
|
.button.variant-tonal.disabled .ripple {
|
|
272
275
|
display: none;
|
|
273
276
|
}
|
|
274
277
|
|
|
275
278
|
.button.variant-outlined {
|
|
276
|
-
--
|
|
277
|
-
--
|
|
278
|
-
--
|
|
279
|
-
--
|
|
279
|
+
--_button_outline-width: var(--outlined-button-outline-width, 0.0675rem);
|
|
280
|
+
--_button_outline-color: var(--outlined-button-outline-color);
|
|
281
|
+
--_button_label-text-color: var(--outlined-button-label-text-color);
|
|
282
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
280
283
|
}
|
|
281
284
|
.button.variant-outlined .outline {
|
|
282
285
|
display: block;
|
|
283
286
|
}
|
|
284
287
|
.button.variant-outlined:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
285
|
-
--
|
|
288
|
+
--_button_container-state-opacity: 0.08;
|
|
286
289
|
}
|
|
287
290
|
.button.variant-outlined.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
288
|
-
--
|
|
291
|
+
--_button_container-state-opacity: 0.12;
|
|
289
292
|
}
|
|
290
293
|
.button.variant-outlined.disabled {
|
|
291
|
-
--
|
|
292
|
-
--
|
|
293
|
-
--
|
|
294
|
-
--
|
|
294
|
+
--_button_outline-color: var(--color-on-surface);
|
|
295
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
296
|
+
--_button_label-text-opacity: 0.38;
|
|
297
|
+
--_button_outline-opacity: 0.12;
|
|
295
298
|
}
|
|
296
299
|
.button.variant-outlined.disabled .ripple {
|
|
297
300
|
display: none;
|
|
298
301
|
}
|
|
299
302
|
|
|
300
303
|
.button.variant-text {
|
|
301
|
-
--
|
|
302
|
-
--
|
|
304
|
+
--_button_label-text-color: var(--text-button-label-text-color);
|
|
305
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
303
306
|
}
|
|
304
307
|
.button.variant-text:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
305
|
-
--
|
|
308
|
+
--_button_container-state-opacity: 0.08;
|
|
306
309
|
}
|
|
307
310
|
.button.variant-text.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
308
|
-
--
|
|
311
|
+
--_button_container-state-opacity: 0.12;
|
|
309
312
|
}
|
|
310
313
|
.button.variant-text.disabled {
|
|
311
|
-
--
|
|
312
|
-
--
|
|
314
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
315
|
+
--_button_label-text-opacity: 0.38;
|
|
313
316
|
}
|
|
314
317
|
.button.variant-text.disabled .ripple {
|
|
315
318
|
display: none;
|
|
316
319
|
}
|
|
317
320
|
|
|
318
321
|
.button.variant-neo {
|
|
319
|
-
--
|
|
320
|
-
--
|
|
321
|
-
--
|
|
322
|
-
--
|
|
322
|
+
--_button_container-color: var(--neo-button-container-color);
|
|
323
|
+
--_button_label-text-color: var(--neo-button-label-text-color);
|
|
324
|
+
--_button_outline-width: var(--outlined-button-outline-width, 0.125rem);
|
|
325
|
+
--_button_outline-color: var(--color-inverse-surface);
|
|
323
326
|
}
|
|
324
327
|
.button.variant-neo .outline {
|
|
325
328
|
display: block;
|
|
@@ -338,11 +341,11 @@ slot::slotted(*) {
|
|
|
338
341
|
transform: translateX(0.25rem) translateY(0.25rem);
|
|
339
342
|
}
|
|
340
343
|
.button.variant-neo.disabled {
|
|
341
|
-
--
|
|
342
|
-
--
|
|
343
|
-
--
|
|
344
|
-
--
|
|
345
|
-
--
|
|
344
|
+
--_button_container-color: var(--color-on-surface);
|
|
345
|
+
--_button_container-opacity: 0.1;
|
|
346
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
347
|
+
--_button_label-text-opacity: 0.38;
|
|
348
|
+
--_button_outline-opacity: 0.12;
|
|
346
349
|
}
|
|
347
350
|
.button.variant-neo.disabled .ripple {
|
|
348
351
|
display: none;
|
|
@@ -352,7 +355,7 @@ slot::slotted(*) {
|
|
|
352
355
|
width: 100%;
|
|
353
356
|
}`;
|
|
354
357
|
|
|
355
|
-
var css_248z$1 = i`:host([color=primary]) {
|
|
358
|
+
var css_248z$1 = i`:host([color=primary]:not([toggle])) {
|
|
356
359
|
--filled-button-container-color: var(--color-primary);
|
|
357
360
|
--filled-button-label-text-color: var(--color-on-primary);
|
|
358
361
|
--tonal-button-container-color: var(--color-primary-container);
|
|
@@ -366,7 +369,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
366
369
|
--neo-button-label-text-color: var(--color-on-primary);
|
|
367
370
|
}
|
|
368
371
|
|
|
369
|
-
:host([color=
|
|
372
|
+
:host([color=primary][toggle][selected]) {
|
|
373
|
+
--filled-button-container-color: var(--color-primary);
|
|
374
|
+
--filled-button-label-text-color: var(--color-on-primary);
|
|
375
|
+
--tonal-button-container-color: var(--color-primary);
|
|
376
|
+
--tonal-button-label-text-color: var(--color-on-primary);
|
|
377
|
+
--elevated-button-container-color: var(--color-primary);
|
|
378
|
+
--elevated-button-label-text-color: var(--color-on-primary);
|
|
379
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
380
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
:host([color=primary][toggle]:not([selected])) {
|
|
384
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
385
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
386
|
+
--tonal-button-container-color: var(--color-primary-container);
|
|
387
|
+
--tonal-button-label-text-color: var(--color-on-primary-container);
|
|
388
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
389
|
+
--elevated-button-label-text-color: var(--color-primary);
|
|
390
|
+
--outlined-button-outline-color: var(--color-primary);
|
|
391
|
+
--outlined-button-label-text-color: var(--color-primary);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
:host([color=secondary]:not([toggle])) {
|
|
370
395
|
--filled-button-container-color: var(--color-secondary);
|
|
371
396
|
--filled-button-label-text-color: var(--color-on-secondary);
|
|
372
397
|
--tonal-button-container-color: var(--color-secondary-container);
|
|
@@ -380,7 +405,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
380
405
|
--neo-button-label-text-color: var(--color-on-secondary);
|
|
381
406
|
}
|
|
382
407
|
|
|
383
|
-
:host([color=
|
|
408
|
+
:host([color=secondary][toggle][selected]) {
|
|
409
|
+
--filled-button-container-color: var(--color-secondary);
|
|
410
|
+
--filled-button-label-text-color: var(--color-on-secondary);
|
|
411
|
+
--tonal-button-container-color: var(--color-secondary);
|
|
412
|
+
--tonal-button-label-text-color: var(--color-on-secondary);
|
|
413
|
+
--elevated-button-container-color: var(--color-secondary);
|
|
414
|
+
--elevated-button-label-text-color: var(--color-on-secondary);
|
|
415
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
416
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
:host([color=secondary][toggle]:not([selected])) {
|
|
420
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
421
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
422
|
+
--tonal-button-container-color: var(--color-secondary-container);
|
|
423
|
+
--tonal-button-label-text-color: var(--color-on-secondary-container);
|
|
424
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
425
|
+
--elevated-button-label-text-color: var(--color-secondary);
|
|
426
|
+
--outlined-button-outline-color: var(--color-secondary);
|
|
427
|
+
--outlined-button-label-text-color: var(--color-secondary);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
:host([color=tertiary]:not([toggle])) {
|
|
384
431
|
--filled-button-container-color: var(--color-tertiary);
|
|
385
432
|
--filled-button-label-text-color: var(--color-on-tertiary);
|
|
386
433
|
--tonal-button-container-color: var(--color-tertiary-container);
|
|
@@ -394,7 +441,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
394
441
|
--neo-button-label-text-color: var(--color-on-tertiary);
|
|
395
442
|
}
|
|
396
443
|
|
|
397
|
-
:host([color=
|
|
444
|
+
:host([color=tertiary][toggle][selected]) {
|
|
445
|
+
--filled-button-container-color: var(--color-tertiary);
|
|
446
|
+
--filled-button-label-text-color: var(--color-on-tertiary);
|
|
447
|
+
--tonal-button-container-color: var(--color-tertiary);
|
|
448
|
+
--tonal-button-label-text-color: var(--color-on-tertiary);
|
|
449
|
+
--elevated-button-container-color: var(--color-tertiary);
|
|
450
|
+
--elevated-button-label-text-color: var(--color-on-tertiary);
|
|
451
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
452
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
:host([color=tertiary][toggle]:not([selected])) {
|
|
456
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
457
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
458
|
+
--tonal-button-container-color: var(--color-tertiary-container);
|
|
459
|
+
--tonal-button-label-text-color: var(--color-on-tertiary-container);
|
|
460
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
461
|
+
--elevated-button-label-text-color: var(--color-tertiary);
|
|
462
|
+
--outlined-button-outline-color: var(--color-tertiary);
|
|
463
|
+
--outlined-button-label-text-color: var(--color-tertiary);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
:host([color=success]:not([toggle])) {
|
|
398
467
|
--filled-button-container-color: var(--color-success);
|
|
399
468
|
--filled-button-label-text-color: var(--color-on-success);
|
|
400
469
|
--tonal-button-container-color: var(--color-success-container);
|
|
@@ -408,7 +477,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
408
477
|
--neo-button-label-text-color: var(--color-on-success);
|
|
409
478
|
}
|
|
410
479
|
|
|
411
|
-
:host([color=
|
|
480
|
+
:host([color=success][toggle][selected]) {
|
|
481
|
+
--filled-button-container-color: var(--color-success);
|
|
482
|
+
--filled-button-label-text-color: var(--color-on-success);
|
|
483
|
+
--tonal-button-container-color: var(--color-success);
|
|
484
|
+
--tonal-button-label-text-color: var(--color-on-success);
|
|
485
|
+
--elevated-button-container-color: var(--color-success);
|
|
486
|
+
--elevated-button-label-text-color: var(--color-on-success);
|
|
487
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
488
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
:host([color=success][toggle]:not([selected])) {
|
|
492
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
493
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
494
|
+
--tonal-button-container-color: var(--color-success-container);
|
|
495
|
+
--tonal-button-label-text-color: var(--color-on-success-container);
|
|
496
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
497
|
+
--elevated-button-label-text-color: var(--color-success);
|
|
498
|
+
--outlined-button-outline-color: var(--color-success);
|
|
499
|
+
--outlined-button-label-text-color: var(--color-success);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
:host([color=danger]:not([toggle])) {
|
|
412
503
|
--filled-button-container-color: var(--color-error);
|
|
413
504
|
--filled-button-label-text-color: var(--color-on-error);
|
|
414
505
|
--tonal-button-container-color: var(--color-error-container);
|
|
@@ -422,6 +513,28 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
422
513
|
--neo-button-label-text-color: var(--color-on-error);
|
|
423
514
|
}
|
|
424
515
|
|
|
516
|
+
:host([color=danger][toggle][selected]) {
|
|
517
|
+
--filled-button-container-color: var(--color-error);
|
|
518
|
+
--filled-button-label-text-color: var(--color-on-error);
|
|
519
|
+
--tonal-button-container-color: var(--color-error);
|
|
520
|
+
--tonal-button-label-text-color: var(--color-on-error);
|
|
521
|
+
--elevated-button-container-color: var(--color-error);
|
|
522
|
+
--elevated-button-label-text-color: var(--color-on-error);
|
|
523
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
524
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
:host([color=danger][toggle]:not([selected])) {
|
|
528
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
529
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
530
|
+
--tonal-button-container-color: var(--color-error-container);
|
|
531
|
+
--tonal-button-label-text-color: var(--color-on-error-container);
|
|
532
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
533
|
+
--elevated-button-label-text-color: var(--color-error);
|
|
534
|
+
--outlined-button-outline-color: var(--color-error);
|
|
535
|
+
--outlined-button-label-text-color: var(--color-error);
|
|
536
|
+
}
|
|
537
|
+
|
|
425
538
|
:host([color=dark]) {
|
|
426
539
|
--filled-button-container-color: var(--color-on-surface);
|
|
427
540
|
--filled-button-label-text-color: var(--color-surface);
|
|
@@ -450,22 +563,30 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
450
563
|
--neo-button-label-text-color: var(--color-on-surface);
|
|
451
564
|
}`;
|
|
452
565
|
|
|
453
|
-
var css_248z = i
|
|
454
|
-
|
|
455
|
-
--
|
|
566
|
+
var css_248z = i`:host([size=xs]),
|
|
567
|
+
:host([size=extra-small]) {
|
|
568
|
+
--button-height: 2rem;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
:host([size=xs]) .button,
|
|
572
|
+
:host([size=extra-small]) .button {
|
|
456
573
|
--_button-icon-size: 1rem;
|
|
457
|
-
--
|
|
574
|
+
--_button_container-padding: 0.75rem;
|
|
458
575
|
font-size: 0.875rem !important;
|
|
459
576
|
font-weight: var(--font-weight-medium) !important;
|
|
460
577
|
line-height: 1.25rem !important;
|
|
461
578
|
letter-spacing: 0.1px !important;
|
|
462
579
|
}
|
|
463
580
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
--
|
|
581
|
+
:host([size=sm]),
|
|
582
|
+
:host([size=small]) {
|
|
583
|
+
--button-height: 2.5rem;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
:host([size=sm]) .button,
|
|
587
|
+
:host([size=small]) .button {
|
|
467
588
|
--_button-icon-size: 1.25rem;
|
|
468
|
-
--
|
|
589
|
+
--_button_container-padding: 1rem;
|
|
469
590
|
--_button-icon-label-spacing: 0.5rem;
|
|
470
591
|
font-size: 0.875rem !important;
|
|
471
592
|
font-weight: var(--font-weight-medium) !important;
|
|
@@ -473,32 +594,43 @@ var css_248z = i`.button.size-xs,
|
|
|
473
594
|
letter-spacing: 0.1px !important;
|
|
474
595
|
}
|
|
475
596
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
--
|
|
597
|
+
:host([size=md]),
|
|
598
|
+
:host([size=medium]) {
|
|
599
|
+
--button-height: 3.5rem;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
:host([size=md]) .button,
|
|
603
|
+
:host([size=medium]) .button {
|
|
479
604
|
--_button-icon-size: 1.5rem;
|
|
480
|
-
--
|
|
605
|
+
--_button_container-padding: 1.5rem;
|
|
481
606
|
font-size: 1rem !important;
|
|
482
607
|
font-weight: var(--font-weight-medium) !important;
|
|
483
608
|
line-height: 1.5rem !important;
|
|
484
609
|
letter-spacing: 0.15px !important;
|
|
485
610
|
}
|
|
486
611
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
--
|
|
612
|
+
:host([size=lg]),
|
|
613
|
+
:host([size=large]) {
|
|
614
|
+
--button-height: 6rem;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
:host([size=lg]) .button,
|
|
618
|
+
:host([size=large]) .button {
|
|
490
619
|
--_button-icon-size: 2rem;
|
|
491
|
-
--
|
|
620
|
+
--_button_container-padding: 3rem;
|
|
492
621
|
font-size: 1.5rem !important;
|
|
493
622
|
font-weight: var(--font-weight-regular) !important;
|
|
494
623
|
line-height: 2rem !important;
|
|
495
624
|
letter-spacing: 0 !important;
|
|
496
625
|
}
|
|
497
626
|
|
|
498
|
-
|
|
499
|
-
--
|
|
627
|
+
:host([size=xl]) {
|
|
628
|
+
--button-height: 8.5rem;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
:host([size=xl]) .button {
|
|
500
632
|
--_button-icon-size: 2.5rem;
|
|
501
|
-
--
|
|
633
|
+
--_button_container-padding: 4rem;
|
|
502
634
|
font-size: 2rem !important;
|
|
503
635
|
font-weight: var(--font-weight-regular) !important;
|
|
504
636
|
line-height: 2.5rem !important;
|
|
@@ -576,6 +708,7 @@ class BaseButton extends i$2 {
|
|
|
576
708
|
* Sets or retrieves the window or frame at which to target content.
|
|
577
709
|
*/
|
|
578
710
|
this.target = '_self';
|
|
711
|
+
this.toggle = false;
|
|
579
712
|
this.selected = false;
|
|
580
713
|
/**
|
|
581
714
|
* Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
|
|
@@ -615,6 +748,9 @@ class BaseButton extends i$2 {
|
|
|
615
748
|
if (!isActivationClick(event) || !this.buttonElement) {
|
|
616
749
|
return;
|
|
617
750
|
}
|
|
751
|
+
if (this.toggle) {
|
|
752
|
+
this.selected = !this.selected;
|
|
753
|
+
}
|
|
618
754
|
this.focus();
|
|
619
755
|
dispatchActivationClick(this.buttonElement);
|
|
620
756
|
};
|
|
@@ -695,16 +831,16 @@ __decorate([
|
|
|
695
831
|
n({ reflect: true })
|
|
696
832
|
], BaseButton.prototype, "color", void 0);
|
|
697
833
|
__decorate([
|
|
698
|
-
n()
|
|
834
|
+
n({ reflect: true })
|
|
699
835
|
], BaseButton.prototype, "size", void 0);
|
|
700
836
|
__decorate([
|
|
701
837
|
n({ type: Boolean, reflect: true })
|
|
702
838
|
], BaseButton.prototype, "disabled", void 0);
|
|
703
839
|
__decorate([
|
|
704
|
-
n()
|
|
840
|
+
n({ type: Boolean, reflect: true })
|
|
705
841
|
], BaseButton.prototype, "skeleton", void 0);
|
|
706
842
|
__decorate([
|
|
707
|
-
n({ reflect: true, attribute: 'soft-disabled' })
|
|
843
|
+
n({ type: Boolean, reflect: true, attribute: 'soft-disabled' })
|
|
708
844
|
], BaseButton.prototype, "softDisabled", void 0);
|
|
709
845
|
__decorate([
|
|
710
846
|
n({ attribute: 'disabled-reason' })
|
|
@@ -712,14 +848,17 @@ __decorate([
|
|
|
712
848
|
__decorate([
|
|
713
849
|
n({ reflect: true })
|
|
714
850
|
], BaseButton.prototype, "href", void 0);
|
|
851
|
+
__decorate([
|
|
852
|
+
n()
|
|
853
|
+
], BaseButton.prototype, "target", void 0);
|
|
715
854
|
__decorate([
|
|
716
855
|
n({ reflect: true })
|
|
717
856
|
], BaseButton.prototype, "configAria", void 0);
|
|
718
857
|
__decorate([
|
|
719
|
-
n()
|
|
720
|
-
], BaseButton.prototype, "
|
|
858
|
+
n({ type: Boolean, reflect: true })
|
|
859
|
+
], BaseButton.prototype, "toggle", void 0);
|
|
721
860
|
__decorate([
|
|
722
|
-
n()
|
|
861
|
+
n({ type: Boolean, reflect: true })
|
|
723
862
|
], BaseButton.prototype, "selected", void 0);
|
|
724
863
|
__decorate([
|
|
725
864
|
n()
|
|
@@ -788,6 +927,22 @@ let Button = class Button extends BaseButton {
|
|
|
788
927
|
this.iconAlign = 'end';
|
|
789
928
|
this.slotHasContent = false;
|
|
790
929
|
}
|
|
930
|
+
focus() {
|
|
931
|
+
this.buttonElement?.focus();
|
|
932
|
+
}
|
|
933
|
+
blur() {
|
|
934
|
+
this.buttonElement?.blur();
|
|
935
|
+
}
|
|
936
|
+
connectedCallback() {
|
|
937
|
+
super.connectedCallback();
|
|
938
|
+
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
939
|
+
window.addEventListener('mouseup', this.__handlePress);
|
|
940
|
+
}
|
|
941
|
+
disconnectedCallback() {
|
|
942
|
+
window.removeEventListener('mouseup', this.__handlePress);
|
|
943
|
+
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
944
|
+
super.disconnectedCallback();
|
|
945
|
+
}
|
|
791
946
|
firstUpdated() {
|
|
792
947
|
this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
|
|
793
948
|
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
|
|
@@ -816,6 +971,7 @@ let Button = class Button extends BaseButton {
|
|
|
816
971
|
id="button"
|
|
817
972
|
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
818
973
|
type=${this.htmlType}
|
|
974
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
819
975
|
@mousedown=${this.__handlePress}
|
|
820
976
|
@keydown=${this.__handlePress}
|
|
821
977
|
@keyup=${this.__handlePress}
|
|
@@ -834,6 +990,7 @@ let Button = class Button extends BaseButton {
|
|
|
834
990
|
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
835
991
|
href=${this.href}
|
|
836
992
|
target=${this.target}
|
|
993
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
837
994
|
@mousedown=${this.__handlePress}
|
|
838
995
|
@keydown=${this.__handlePress}
|
|
839
996
|
@keyup=${this.__handlePress}
|
|
@@ -848,7 +1005,7 @@ let Button = class Button extends BaseButton {
|
|
|
848
1005
|
}
|
|
849
1006
|
renderButtonContent() {
|
|
850
1007
|
return b `
|
|
851
|
-
<wc-focus-ring class="focus-ring" .control=${this}
|
|
1008
|
+
<wc-focus-ring class="focus-ring" .control=${this} .forElement=${this.buttonElement}></wc-focus-ring>
|
|
852
1009
|
<wc-elevation class="elevation"></wc-elevation>
|
|
853
1010
|
<div class="neo-background"></div>
|
|
854
1011
|
<div class="background"></div>
|
|
@@ -881,4 +1038,4 @@ Button = __decorate([
|
|
|
881
1038
|
], Button);
|
|
882
1039
|
|
|
883
1040
|
export { Button as B, css_248z$1 as a, BaseButton as b, css_248z$2 as c, spread as s };
|
|
884
|
-
//# sourceMappingURL=button-
|
|
1041
|
+
//# sourceMappingURL=button-COYCtuA8.js.map
|