@redvars/peacock 3.3.3 → 3.5.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/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/banner.js +202 -0
- package/dist/banner.js.map +1 -0
- package/dist/bottom-sheet.js +238 -0
- package/dist/bottom-sheet.js.map +1 -0
- package/dist/{button-ClzS8JLq.js → button-DMN1dPAg.js} +358 -218
- package/dist/button-DMN1dPAg.js.map +1 -0
- package/dist/button-group-CX9CUUXk.js +435 -0
- package/dist/button-group-CX9CUUXk.js.map +1 -0
- package/dist/button-group.js +11 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +10 -5
- 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 +428 -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 +5 -4
- 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 +5 -4
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/{class-map-59YGWLnx.js → class-map-YU7g0o3B.js} +4 -10
- package/dist/class-map-YU7g0o3B.js.map +1 -0
- package/dist/clock.js +2 -1
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +8 -6
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +6 -4
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +6270 -5026
- package/dist/custom-elements.json +5763 -2049
- package/dist/directive-ZPhl09Yt.js +9 -0
- package/dist/directive-ZPhl09Yt.js.map +1 -0
- package/dist/dispatch-event-utils-CuEqjlPT.js +127 -0
- package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -0
- package/dist/fab-C5Nzxk0E.js +497 -0
- package/dist/fab-C5Nzxk0E.js.map +1 -0
- package/dist/fab.js +11 -0
- package/dist/fab.js.map +1 -0
- package/dist/index.js +24 -12
- package/dist/index.js.map +1 -1
- package/dist/{observe-theme-change-pALI5fmV.js → is-dark-mode-DicqGkCJ.js} +8 -3
- package/dist/is-dark-mode-DicqGkCJ.js.map +1 -0
- package/dist/notification.js +417 -0
- package/dist/notification.js.map +1 -0
- package/dist/number-counter.js +4 -3
- package/dist/number-counter.js.map +1 -1
- package/dist/observe-slot-change-BGJfgg2E.js +31 -0
- package/dist/observe-slot-change-BGJfgg2E.js.map +1 -0
- package/dist/peacock-loader.js +59 -10
- 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/search.js +452 -0
- package/dist/search.js.map +1 -0
- package/dist/{radio-b70_Ie9n.js → select-4pl4XBj7.js} +2439 -521
- package/dist/select-4pl4XBj7.js.map +1 -0
- package/dist/side-sheet.js +186 -0
- package/dist/side-sheet.js.map +1 -0
- package/dist/spread-B5cgadZl.js +32 -0
- package/dist/spread-B5cgadZl.js.map +1 -0
- package/dist/src/__base_element/BaseHyperlink.d.ts +20 -0
- package/dist/src/__utils/cache-fetch.d.ts +1 -0
- package/dist/src/__utils/is-dark-mode.d.ts +1 -0
- package/dist/src/__utils/is-in-viewport.d.ts +1 -0
- package/dist/src/__utils/observe-slot-change.d.ts +1 -0
- package/dist/src/__utils/sanitize-svg.d.ts +1 -0
- package/dist/src/__utils/throttle.d.ts +4 -0
- package/dist/src/accordion/accordion-item.d.ts +33 -9
- package/dist/src/accordion/accordion.d.ts +21 -5
- package/dist/src/banner/banner.d.ts +47 -0
- package/dist/src/banner/index.d.ts +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 +7 -13
- 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/fab/fab.d.ts +111 -0
- package/dist/src/fab/index.d.ts +1 -0
- package/dist/src/focus-ring/focus-ring.d.ts +4 -1
- package/dist/src/index.d.ts +11 -1
- package/dist/src/link/link.d.ts +3 -10
- package/dist/src/menu/menu/menu.d.ts +4 -2
- package/dist/src/menu/menu-item/menu-item.d.ts +0 -1
- package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
- package/dist/src/notification/index.d.ts +1 -0
- package/dist/src/notification/notification.d.ts +69 -0
- package/dist/src/pagination/pagination.d.ts +8 -1
- package/dist/src/ripple/ripple.d.ts +19 -3
- package/dist/src/search/index.d.ts +1 -0
- package/dist/src/search/search.d.ts +76 -0
- 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 +114 -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/slider/slider.d.ts +4 -0
- package/dist/src/snackbar/snackbar.d.ts +14 -1
- 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/src/toolbar/index.d.ts +1 -0
- package/dist/src/toolbar/toolbar.d.ts +86 -0
- package/dist/state-DwbEjqVk.js +10 -0
- package/dist/state-DwbEjqVk.js.map +1 -0
- package/dist/{style-map-DcB52w-l.js → style-map-DVmWOuYy.js} +3 -3
- package/dist/{style-map-DcB52w-l.js.map → style-map-DVmWOuYy.js.map} +1 -1
- package/dist/test/search.test.d.ts +1 -0
- package/dist/test/toolbar.test.d.ts +1 -0
- package/dist/throttle-C7ZAPqtu.js +24 -0
- package/dist/throttle-C7ZAPqtu.js.map +1 -0
- package/dist/toolbar.js +306 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-C2r3PyzF.js → unsafe-html-BsGUjx94.js} +3 -3
- package/dist/{unsafe-html-C2r3PyzF.js.map → unsafe-html-BsGUjx94.js.map} +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/scss/styles.scss +4 -0
- package/src/__base_element/BaseHyperlink.ts +42 -0
- package/src/__base_element/README.md +19 -0
- package/src/__utils/cache-fetch.ts +65 -0
- package/src/{utils → __utils}/dispatch-event-utils.ts +1 -0
- package/src/__utils/is-dark-mode.ts +3 -0
- package/src/__utils/is-in-viewport.ts +6 -0
- package/src/__utils/observe-slot-change.ts +38 -0
- package/src/__utils/sanitize-svg.ts +27 -0
- package/src/__utils/throttle.ts +27 -0
- package/src/accordion/accordion-item.scss +136 -65
- package/src/accordion/accordion-item.ts +117 -44
- package/src/accordion/accordion.scss +24 -5
- package/src/accordion/accordion.ts +29 -23
- package/src/accordion/demo/index.html +74 -35
- package/src/banner/banner.scss +87 -0
- package/src/banner/banner.ts +107 -0
- package/src/banner/index.ts +1 -0
- 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 +26 -30
- package/src/button/button/button-colors.scss +90 -19
- package/src/button/button/button-sizes.scss +39 -19
- package/src/button/button/button.scss +117 -116
- package/src/button/button/button.ts +29 -6
- package/src/button/button-group/button-group.scss +25 -22
- package/src/button/button-group/button-group.ts +122 -5
- package/src/button/icon-button/icon-button-sizes.scss +35 -15
- package/src/button/icon-button/icon-button.ts +25 -12
- 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 +251 -8
- package/src/card/index.ts +1 -0
- package/src/chart-bar/chart-bar.ts +1 -1
- package/src/chart-bar/chart-stacked-bar.ts +3 -1
- package/src/chart-doughnut/chart-doughnut.ts +1 -1
- package/src/chart-pie/chart-pie.ts +1 -1
- package/src/checkbox/checkbox.ts +1 -1
- package/src/clock/clock.ts +1 -1
- package/src/code-editor/code-editor.ts +5 -5
- package/src/code-highlighter/code-highlighter.ts +2 -2
- package/src/container/container.ts +1 -1
- package/src/date-picker/date-picker.ts +5 -2
- package/src/divider/divider.ts +3 -1
- package/src/empty-state/empty-state.scss +9 -3
- package/src/empty-state/empty-state.ts +2 -2
- package/src/fab/fab-colors.scss +49 -0
- package/src/fab/fab-sizes.scss +47 -0
- package/src/fab/fab.scss +137 -0
- package/src/fab/fab.ts +285 -0
- package/src/fab/index.ts +1 -0
- package/src/field/field.ts +3 -1
- package/src/focus-ring/focus-ring.ts +37 -19
- package/src/icon/datasource.ts +1 -1
- package/src/icon/icon.ts +3 -1
- package/src/image/image.ts +3 -2
- package/src/index.ts +12 -1
- package/src/input/input.ts +5 -2
- package/src/link/link.ts +2 -15
- package/src/menu/menu/menu.scss +31 -3
- package/src/menu/menu/menu.ts +30 -6
- package/src/menu/menu-item/menu-item.scss +1 -0
- package/src/menu/menu-item/menu-item.ts +1 -9
- package/src/menu/sub-menu/sub-menu.ts +1 -0
- package/src/notification/index.ts +1 -0
- package/src/notification/notification.scss +201 -0
- package/src/notification/notification.ts +206 -0
- package/src/number-counter/number-counter.ts +3 -1
- package/src/number-field/number-field.ts +4 -2
- package/src/pagination/pagination.scss +33 -24
- package/src/pagination/pagination.ts +113 -60
- package/src/peacock-loader.ts +48 -0
- package/src/radio/radio.ts +3 -1
- package/src/ripple/ripple.ts +19 -3
- package/src/search/index.ts +1 -0
- package/src/search/search-colors.scss +14 -0
- package/src/search/search.scss +204 -0
- package/src/search/search.ts +240 -0
- 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 +125 -0
- package/src/select/select.ts +520 -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 +19 -1
- package/src/slider/slider.ts +30 -19
- package/src/snackbar/snackbar.scss +62 -31
- package/src/snackbar/snackbar.ts +92 -12
- package/src/switch/switch.ts +3 -1
- package/src/table/table.ts +3 -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 +91 -14
- package/src/tabs/tabs.scss +37 -3
- package/src/tabs/tabs.ts +118 -2
- package/src/textarea/textarea.ts +4 -2
- package/src/time-picker/time-picker.ts +4 -2
- package/src/toolbar/index.ts +1 -0
- package/src/toolbar/toolbar-colors.scss +16 -0
- package/src/toolbar/toolbar.scss +165 -0
- package/src/toolbar/toolbar.ts +137 -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/directive-Cuw6h7YA.js +0 -9
- package/dist/directive-Cuw6h7YA.js.map +0 -1
- package/dist/dispatch-event-utils-B4odODQf.js +0 -277
- package/dist/dispatch-event-utils-B4odODQf.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/src/styleMixins.css.d.ts +0 -9
- package/dist/src/utils.d.ts +0 -9
- 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
- package/src/styleMixins.css.ts +0 -55
- package/src/utils.ts +0 -193
- /package/dist/src/{spread.d.ts → __directive/spread.d.ts} +0 -0
- /package/dist/src/{utils → __utils}/copy-to-clipboard.d.ts +0 -0
- /package/dist/src/{utils → __utils}/dispatch-event-utils.d.ts +0 -0
- /package/dist/src/{utils → __utils}/observe-theme-change.d.ts +0 -0
- /package/dist/test/{card.test.d.ts → banner.test.d.ts} +0 -0
- /package/src/{spread.ts → __directive/spread.ts} +0 -0
- /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
- /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { a as i, _ as __decorate,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { e
|
|
5
|
-
import {
|
|
1
|
+
import { a as i, _ as __decorate, b, A, i as i$1, I as IndividualComponent, c as __classPrivateFieldGet } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { r } from './state-DwbEjqVk.js';
|
|
4
|
+
import { e as e$1 } from './class-map-YU7g0o3B.js';
|
|
5
|
+
import { o as observerSlotChangesWithCallback } from './observe-slot-change-BGJfgg2E.js';
|
|
6
|
+
import { t as throttle } from './throttle-C7ZAPqtu.js';
|
|
7
|
+
import { s as spread } from './spread-B5cgadZl.js';
|
|
8
|
+
import { e } from './query-QBcUV-L_.js';
|
|
9
|
+
import { i as isActivationClick, d as dispatchActivationClick } from './dispatch-event-utils-CuEqjlPT.js';
|
|
6
10
|
|
|
7
11
|
var css_248z$2 = i`* {
|
|
8
12
|
box-sizing: border-box;
|
|
@@ -14,15 +18,15 @@ var css_248z$2 = i`* {
|
|
|
14
18
|
|
|
15
19
|
:host {
|
|
16
20
|
display: inline-flex;
|
|
17
|
-
--z-index-button: 0;
|
|
18
21
|
--button-height: unset;
|
|
19
22
|
--button-icon-size: unset;
|
|
20
|
-
--button-container-
|
|
23
|
+
--button-container-padding: unset;
|
|
24
|
+
--button-container-shape: var(--shape-corner-medium);
|
|
21
25
|
--button-container-shape-start-start: unset;
|
|
22
26
|
--button-container-shape-start-end: unset;
|
|
23
27
|
--button-container-shape-end-start: unset;
|
|
24
28
|
--button-container-shape-end-end: unset;
|
|
25
|
-
--button-container-shape-variant:
|
|
29
|
+
--button-container-shape-variant: squircle;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -31,7 +35,7 @@ var css_248z$2 = i`* {
|
|
|
31
35
|
*/
|
|
32
36
|
slot::slotted(*) {
|
|
33
37
|
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
34
|
-
--icon-color: var(--
|
|
38
|
+
--icon-color: var(--_button_label-text-color);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
/*
|
|
@@ -52,29 +56,30 @@ slot::slotted(*) {
|
|
|
52
56
|
flex-direction: column;
|
|
53
57
|
align-items: center;
|
|
54
58
|
justify-content: center;
|
|
55
|
-
height: var(--button-height
|
|
56
|
-
padding: 0 var(--
|
|
59
|
+
height: var(--button-height);
|
|
60
|
+
padding: 0 var(--button-container-padding, var(--_button_container-padding));
|
|
57
61
|
width: 100%;
|
|
58
62
|
font-family: var(--font-family-sans) !important;
|
|
59
63
|
cursor: pointer;
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
64
|
+
--_button_container-shape-start-start: var(--button-container-shape-start-start, var(--button-container-shape));
|
|
65
|
+
--_button_container-shape-start-end: var(--button-container-shape-start-end, var(--button-container-shape));
|
|
66
|
+
--_button_container-shape-end-start: var(--button-container-shape-end-start, var(--button-container-shape));
|
|
67
|
+
--_button_container-shape-end-end: var(--button-container-shape-end-end, var(--button-container-shape));
|
|
68
|
+
--_button_container-corner-shape-variant: var(--button-container-shape-variant);
|
|
65
69
|
}
|
|
66
70
|
.button .button-content {
|
|
67
71
|
display: flex;
|
|
68
72
|
align-items: center;
|
|
69
73
|
justify-content: center;
|
|
74
|
+
pointer-events: none;
|
|
70
75
|
gap: var(--_button-icon-label-spacing);
|
|
71
76
|
width: 100%;
|
|
72
77
|
height: 100%;
|
|
73
78
|
z-index: 0;
|
|
74
|
-
color: var(--
|
|
75
|
-
opacity: var(--
|
|
79
|
+
color: var(--_button_label-text-color);
|
|
80
|
+
opacity: var(--_button_label-text-opacity, 1);
|
|
76
81
|
--icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
77
|
-
--icon-color: var(--
|
|
82
|
+
--icon-color: var(--_button_label-text-color);
|
|
78
83
|
}
|
|
79
84
|
.button .button-content .slot-container {
|
|
80
85
|
display: none;
|
|
@@ -89,20 +94,20 @@ slot::slotted(*) {
|
|
|
89
94
|
}
|
|
90
95
|
.button .focus-ring {
|
|
91
96
|
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(--
|
|
97
|
+
--focus-ring-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
98
|
+
--focus-ring-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
99
|
+
--focus-ring-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
100
|
+
--focus-ring-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
101
|
+
--focus-ring-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
97
102
|
}
|
|
98
103
|
.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(--
|
|
104
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
105
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
106
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
107
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
108
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
109
|
+
--ripple-state-opacity: var(--_button_container-state-opacity, 0);
|
|
110
|
+
--ripple-pressed-color: var(--_button_container-state-color);
|
|
106
111
|
}
|
|
107
112
|
.button .background {
|
|
108
113
|
display: block;
|
|
@@ -110,13 +115,13 @@ slot::slotted(*) {
|
|
|
110
115
|
left: 0;
|
|
111
116
|
width: 100%;
|
|
112
117
|
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(--
|
|
118
|
+
background-color: var(--_button_container-color);
|
|
119
|
+
opacity: var(--_button_container-opacity, 1);
|
|
120
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
121
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
122
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
123
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
124
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
120
125
|
pointer-events: none;
|
|
121
126
|
}
|
|
122
127
|
.button .skeleton {
|
|
@@ -127,30 +132,30 @@ slot::slotted(*) {
|
|
|
127
132
|
position: absolute;
|
|
128
133
|
top: 0;
|
|
129
134
|
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(--
|
|
135
|
+
--skeleton-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
136
|
+
--skeleton-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
137
|
+
--skeleton-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
138
|
+
--skeleton-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
139
|
+
--skeleton-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
135
140
|
}
|
|
136
141
|
.button .elevation {
|
|
137
|
-
--elevation-level: var(--
|
|
142
|
+
--elevation-level: var(--_button_container-elevation-level);
|
|
138
143
|
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(--
|
|
144
|
+
--elevation-container-shape-start-start: var(--_button_container-shape-start-start);
|
|
145
|
+
--elevation-container-shape-start-end: var(--_button_container-shape-start-end);
|
|
146
|
+
--elevation-container-shape-end-start: var(--_button_container-shape-end-start);
|
|
147
|
+
--elevation-container-shape-end-end: var(--_button_container-shape-end-end);
|
|
148
|
+
--elevation-container-shape-variant: var(--_button_container-corner-shape-variant);
|
|
144
149
|
}
|
|
145
150
|
.button .neo-background {
|
|
146
151
|
display: none;
|
|
147
152
|
position: absolute;
|
|
148
153
|
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(--
|
|
154
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
155
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
156
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
157
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
158
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
154
159
|
width: 100%;
|
|
155
160
|
height: 100%;
|
|
156
161
|
pointer-events: none;
|
|
@@ -164,13 +169,13 @@ slot::slotted(*) {
|
|
|
164
169
|
width: 100%;
|
|
165
170
|
height: 100%;
|
|
166
171
|
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(--
|
|
172
|
+
border: var(--_button_outline-width) solid var(--_button_outline-color);
|
|
173
|
+
opacity: var(--_button_outline-opacity, 1);
|
|
174
|
+
border-start-start-radius: var(--_button_container-shape-start-start);
|
|
175
|
+
border-start-end-radius: var(--_button_container-shape-start-end);
|
|
176
|
+
border-end-start-radius: var(--_button_container-shape-end-start);
|
|
177
|
+
border-end-end-radius: var(--_button_container-shape-end-end);
|
|
178
|
+
corner-shape: var(--_button_container-corner-shape-variant);
|
|
174
179
|
}
|
|
175
180
|
.button.has-content .slot-container {
|
|
176
181
|
display: flex;
|
|
@@ -203,123 +208,123 @@ slot::slotted(*) {
|
|
|
203
208
|
* Button variant definitions
|
|
204
209
|
*/
|
|
205
210
|
.button.variant-elevated {
|
|
206
|
-
--
|
|
207
|
-
--
|
|
208
|
-
--
|
|
209
|
-
--
|
|
211
|
+
--_button_container-color: var(--elevated-button-container-color);
|
|
212
|
+
--_button_label-text-color: var(--elevated-button-label-text-color);
|
|
213
|
+
--_button_container-elevation-level: 1;
|
|
214
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
210
215
|
}
|
|
211
216
|
.button.variant-elevated:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
212
|
-
--
|
|
213
|
-
--
|
|
217
|
+
--_button_container-elevation-level: 2;
|
|
218
|
+
--_button_container-state-opacity: 0.08;
|
|
214
219
|
}
|
|
215
220
|
.button.variant-elevated.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
216
|
-
--
|
|
217
|
-
--
|
|
221
|
+
--_button_container-elevation-level: 1;
|
|
222
|
+
--_button_container-state-opacity: 0.12;
|
|
218
223
|
}
|
|
219
224
|
.button.variant-elevated.disabled {
|
|
220
|
-
--
|
|
221
|
-
--
|
|
222
|
-
--
|
|
223
|
-
--
|
|
225
|
+
--_button_container-color: var(--color-on-surface);
|
|
226
|
+
--_button_container-opacity: 0.1;
|
|
227
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
228
|
+
--_button_label-text-opacity: 0.38;
|
|
224
229
|
}
|
|
225
230
|
.button.variant-elevated.disabled .ripple {
|
|
226
231
|
display: none;
|
|
227
232
|
}
|
|
228
233
|
|
|
229
234
|
.button.variant-filled {
|
|
230
|
-
--
|
|
231
|
-
--
|
|
232
|
-
--
|
|
235
|
+
--_button_container-color: var(--filled-button-container-color);
|
|
236
|
+
--_button_label-text-color: var(--filled-button-label-text-color);
|
|
237
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
233
238
|
}
|
|
234
239
|
.button.variant-filled:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
235
|
-
--
|
|
236
|
-
--
|
|
240
|
+
--_button_container-elevation-level: 1;
|
|
241
|
+
--_button_container-state-opacity: 0.08;
|
|
237
242
|
}
|
|
238
243
|
.button.variant-filled.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
239
|
-
--
|
|
240
|
-
--
|
|
244
|
+
--_button_container-elevation-level: 0;
|
|
245
|
+
--_button_container-state-opacity: 0.1;
|
|
241
246
|
}
|
|
242
247
|
.button.variant-filled.disabled {
|
|
243
|
-
--
|
|
244
|
-
--
|
|
245
|
-
--
|
|
246
|
-
--
|
|
248
|
+
--_button_container-color: var(--color-on-surface);
|
|
249
|
+
--_button_container-opacity: 0.1;
|
|
250
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
251
|
+
--_button_label-text-opacity: 0.38;
|
|
247
252
|
}
|
|
248
253
|
.button.variant-filled.disabled .ripple {
|
|
249
254
|
display: none;
|
|
250
255
|
}
|
|
251
256
|
|
|
252
257
|
.button.variant-tonal {
|
|
253
|
-
--
|
|
254
|
-
--
|
|
255
|
-
--
|
|
258
|
+
--_button_container-color: var(--tonal-button-container-color);
|
|
259
|
+
--_button_label-text-color: var(--tonal-button-label-text-color);
|
|
260
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
256
261
|
}
|
|
257
262
|
.button.variant-tonal:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
258
|
-
--
|
|
259
|
-
--
|
|
263
|
+
--_button_container-elevation-level: 1;
|
|
264
|
+
--_button_container-state-opacity: 0.08;
|
|
260
265
|
}
|
|
261
266
|
.button.variant-tonal.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
262
|
-
--
|
|
263
|
-
--
|
|
267
|
+
--_button_container-elevation-level: 0;
|
|
268
|
+
--_button_container-state-opacity: 0.12;
|
|
264
269
|
}
|
|
265
270
|
.button.variant-tonal.disabled {
|
|
266
|
-
--
|
|
267
|
-
--
|
|
268
|
-
--
|
|
269
|
-
--
|
|
271
|
+
--_button_container-color: var(--color-on-surface);
|
|
272
|
+
--_button_container-opacity: 0.1;
|
|
273
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
274
|
+
--_button_label-text-opacity: 0.38;
|
|
270
275
|
}
|
|
271
276
|
.button.variant-tonal.disabled .ripple {
|
|
272
277
|
display: none;
|
|
273
278
|
}
|
|
274
279
|
|
|
275
280
|
.button.variant-outlined {
|
|
276
|
-
--
|
|
277
|
-
--
|
|
278
|
-
--
|
|
279
|
-
--
|
|
281
|
+
--_button_outline-width: var(--outlined-button-outline-width, 0.0675rem);
|
|
282
|
+
--_button_outline-color: var(--outlined-button-outline-color);
|
|
283
|
+
--_button_label-text-color: var(--outlined-button-label-text-color);
|
|
284
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
280
285
|
}
|
|
281
286
|
.button.variant-outlined .outline {
|
|
282
287
|
display: block;
|
|
283
288
|
}
|
|
284
289
|
.button.variant-outlined:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
285
|
-
--
|
|
290
|
+
--_button_container-state-opacity: 0.08;
|
|
286
291
|
}
|
|
287
292
|
.button.variant-outlined.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
288
|
-
--
|
|
293
|
+
--_button_container-state-opacity: 0.12;
|
|
289
294
|
}
|
|
290
295
|
.button.variant-outlined.disabled {
|
|
291
|
-
--
|
|
292
|
-
--
|
|
293
|
-
--
|
|
294
|
-
--
|
|
296
|
+
--_button_outline-color: var(--color-on-surface);
|
|
297
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
298
|
+
--_button_label-text-opacity: 0.38;
|
|
299
|
+
--_button_outline-opacity: 0.12;
|
|
295
300
|
}
|
|
296
301
|
.button.variant-outlined.disabled .ripple {
|
|
297
302
|
display: none;
|
|
298
303
|
}
|
|
299
304
|
|
|
300
305
|
.button.variant-text {
|
|
301
|
-
--
|
|
302
|
-
--
|
|
306
|
+
--_button_label-text-color: var(--text-button-label-text-color);
|
|
307
|
+
--_button_container-state-color: var(--_button_label-text-color);
|
|
303
308
|
}
|
|
304
309
|
.button.variant-text:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
305
|
-
--
|
|
310
|
+
--_button_container-state-opacity: 0.08;
|
|
306
311
|
}
|
|
307
312
|
.button.variant-text.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
308
|
-
--
|
|
313
|
+
--_button_container-state-opacity: 0.12;
|
|
309
314
|
}
|
|
310
315
|
.button.variant-text.disabled {
|
|
311
|
-
--
|
|
312
|
-
--
|
|
316
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
317
|
+
--_button_label-text-opacity: 0.38;
|
|
313
318
|
}
|
|
314
319
|
.button.variant-text.disabled .ripple {
|
|
315
320
|
display: none;
|
|
316
321
|
}
|
|
317
322
|
|
|
318
323
|
.button.variant-neo {
|
|
319
|
-
--
|
|
320
|
-
--
|
|
321
|
-
--
|
|
322
|
-
--
|
|
324
|
+
--_button_container-color: var(--neo-button-container-color);
|
|
325
|
+
--_button_label-text-color: var(--neo-button-label-text-color);
|
|
326
|
+
--_button_outline-width: var(--outlined-button-outline-width, 0.125rem);
|
|
327
|
+
--_button_outline-color: var(--color-inverse-surface);
|
|
323
328
|
}
|
|
324
329
|
.button.variant-neo .outline {
|
|
325
330
|
display: block;
|
|
@@ -338,11 +343,11 @@ slot::slotted(*) {
|
|
|
338
343
|
transform: translateX(0.25rem) translateY(0.25rem);
|
|
339
344
|
}
|
|
340
345
|
.button.variant-neo.disabled {
|
|
341
|
-
--
|
|
342
|
-
--
|
|
343
|
-
--
|
|
344
|
-
--
|
|
345
|
-
--
|
|
346
|
+
--_button_container-color: var(--color-on-surface);
|
|
347
|
+
--_button_container-opacity: 0.1;
|
|
348
|
+
--_button_label-text-color: var(--color-on-surface);
|
|
349
|
+
--_button_label-text-opacity: 0.38;
|
|
350
|
+
--_button_outline-opacity: 0.12;
|
|
346
351
|
}
|
|
347
352
|
.button.variant-neo.disabled .ripple {
|
|
348
353
|
display: none;
|
|
@@ -352,7 +357,7 @@ slot::slotted(*) {
|
|
|
352
357
|
width: 100%;
|
|
353
358
|
}`;
|
|
354
359
|
|
|
355
|
-
var css_248z$1 = i`:host([color=primary]) {
|
|
360
|
+
var css_248z$1 = i`:host([color=primary]:not([toggle])) {
|
|
356
361
|
--filled-button-container-color: var(--color-primary);
|
|
357
362
|
--filled-button-label-text-color: var(--color-on-primary);
|
|
358
363
|
--tonal-button-container-color: var(--color-primary-container);
|
|
@@ -366,7 +371,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
366
371
|
--neo-button-label-text-color: var(--color-on-primary);
|
|
367
372
|
}
|
|
368
373
|
|
|
369
|
-
:host([color=
|
|
374
|
+
:host([color=primary][toggle][selected]) {
|
|
375
|
+
--filled-button-container-color: var(--color-primary);
|
|
376
|
+
--filled-button-label-text-color: var(--color-on-primary);
|
|
377
|
+
--tonal-button-container-color: var(--color-primary);
|
|
378
|
+
--tonal-button-label-text-color: var(--color-on-primary);
|
|
379
|
+
--elevated-button-container-color: var(--color-primary);
|
|
380
|
+
--elevated-button-label-text-color: var(--color-on-primary);
|
|
381
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
382
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
:host([color=primary][toggle]:not([selected])) {
|
|
386
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
387
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
388
|
+
--tonal-button-container-color: var(--color-primary-container);
|
|
389
|
+
--tonal-button-label-text-color: var(--color-on-primary-container);
|
|
390
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
391
|
+
--elevated-button-label-text-color: var(--color-primary);
|
|
392
|
+
--outlined-button-outline-color: var(--color-primary);
|
|
393
|
+
--outlined-button-label-text-color: var(--color-primary);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
:host([color=secondary]:not([toggle])) {
|
|
370
397
|
--filled-button-container-color: var(--color-secondary);
|
|
371
398
|
--filled-button-label-text-color: var(--color-on-secondary);
|
|
372
399
|
--tonal-button-container-color: var(--color-secondary-container);
|
|
@@ -380,7 +407,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
380
407
|
--neo-button-label-text-color: var(--color-on-secondary);
|
|
381
408
|
}
|
|
382
409
|
|
|
383
|
-
:host([color=
|
|
410
|
+
:host([color=secondary][toggle][selected]) {
|
|
411
|
+
--filled-button-container-color: var(--color-secondary);
|
|
412
|
+
--filled-button-label-text-color: var(--color-on-secondary);
|
|
413
|
+
--tonal-button-container-color: var(--color-secondary);
|
|
414
|
+
--tonal-button-label-text-color: var(--color-on-secondary);
|
|
415
|
+
--elevated-button-container-color: var(--color-secondary);
|
|
416
|
+
--elevated-button-label-text-color: var(--color-on-secondary);
|
|
417
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
418
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
:host([color=secondary][toggle]:not([selected])) {
|
|
422
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
423
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
424
|
+
--tonal-button-container-color: var(--color-secondary-container);
|
|
425
|
+
--tonal-button-label-text-color: var(--color-on-secondary-container);
|
|
426
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
427
|
+
--elevated-button-label-text-color: var(--color-secondary);
|
|
428
|
+
--outlined-button-outline-color: var(--color-secondary);
|
|
429
|
+
--outlined-button-label-text-color: var(--color-secondary);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
:host([color=tertiary]:not([toggle])) {
|
|
384
433
|
--filled-button-container-color: var(--color-tertiary);
|
|
385
434
|
--filled-button-label-text-color: var(--color-on-tertiary);
|
|
386
435
|
--tonal-button-container-color: var(--color-tertiary-container);
|
|
@@ -394,7 +443,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
394
443
|
--neo-button-label-text-color: var(--color-on-tertiary);
|
|
395
444
|
}
|
|
396
445
|
|
|
397
|
-
:host([color=
|
|
446
|
+
:host([color=tertiary][toggle][selected]) {
|
|
447
|
+
--filled-button-container-color: var(--color-tertiary);
|
|
448
|
+
--filled-button-label-text-color: var(--color-on-tertiary);
|
|
449
|
+
--tonal-button-container-color: var(--color-tertiary);
|
|
450
|
+
--tonal-button-label-text-color: var(--color-on-tertiary);
|
|
451
|
+
--elevated-button-container-color: var(--color-tertiary);
|
|
452
|
+
--elevated-button-label-text-color: var(--color-on-tertiary);
|
|
453
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
454
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
:host([color=tertiary][toggle]:not([selected])) {
|
|
458
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
459
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
460
|
+
--tonal-button-container-color: var(--color-tertiary-container);
|
|
461
|
+
--tonal-button-label-text-color: var(--color-on-tertiary-container);
|
|
462
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
463
|
+
--elevated-button-label-text-color: var(--color-tertiary);
|
|
464
|
+
--outlined-button-outline-color: var(--color-tertiary);
|
|
465
|
+
--outlined-button-label-text-color: var(--color-tertiary);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
:host([color=success]:not([toggle])) {
|
|
398
469
|
--filled-button-container-color: var(--color-success);
|
|
399
470
|
--filled-button-label-text-color: var(--color-on-success);
|
|
400
471
|
--tonal-button-container-color: var(--color-success-container);
|
|
@@ -408,7 +479,29 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
408
479
|
--neo-button-label-text-color: var(--color-on-success);
|
|
409
480
|
}
|
|
410
481
|
|
|
411
|
-
:host([color=
|
|
482
|
+
:host([color=success][toggle][selected]) {
|
|
483
|
+
--filled-button-container-color: var(--color-success);
|
|
484
|
+
--filled-button-label-text-color: var(--color-on-success);
|
|
485
|
+
--tonal-button-container-color: var(--color-success);
|
|
486
|
+
--tonal-button-label-text-color: var(--color-on-success);
|
|
487
|
+
--elevated-button-container-color: var(--color-success);
|
|
488
|
+
--elevated-button-label-text-color: var(--color-on-success);
|
|
489
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
490
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
:host([color=success][toggle]:not([selected])) {
|
|
494
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
495
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
496
|
+
--tonal-button-container-color: var(--color-success-container);
|
|
497
|
+
--tonal-button-label-text-color: var(--color-on-success-container);
|
|
498
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
499
|
+
--elevated-button-label-text-color: var(--color-success);
|
|
500
|
+
--outlined-button-outline-color: var(--color-success);
|
|
501
|
+
--outlined-button-label-text-color: var(--color-success);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
:host([color=danger]:not([toggle])) {
|
|
412
505
|
--filled-button-container-color: var(--color-error);
|
|
413
506
|
--filled-button-label-text-color: var(--color-on-error);
|
|
414
507
|
--tonal-button-container-color: var(--color-error-container);
|
|
@@ -422,13 +515,35 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
422
515
|
--neo-button-label-text-color: var(--color-on-error);
|
|
423
516
|
}
|
|
424
517
|
|
|
425
|
-
:host([color=
|
|
518
|
+
:host([color=danger][toggle][selected]) {
|
|
519
|
+
--filled-button-container-color: var(--color-error);
|
|
520
|
+
--filled-button-label-text-color: var(--color-on-error);
|
|
521
|
+
--tonal-button-container-color: var(--color-error);
|
|
522
|
+
--tonal-button-label-text-color: var(--color-on-error);
|
|
523
|
+
--elevated-button-container-color: var(--color-error);
|
|
524
|
+
--elevated-button-label-text-color: var(--color-on-error);
|
|
525
|
+
--outlined-button-outline-color: var(--color-inverse-surface);
|
|
526
|
+
--outlined-button-label-text-color: var(--color-inverse-on-surface);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
:host([color=danger][toggle]:not([selected])) {
|
|
530
|
+
--filled-button-container-color: var(--color-surface-container);
|
|
531
|
+
--filled-button-label-text-color: var(--color-surface-container-variant);
|
|
532
|
+
--tonal-button-container-color: var(--color-error-container);
|
|
533
|
+
--tonal-button-label-text-color: var(--color-on-error-container);
|
|
534
|
+
--elevated-button-container-color: var(--color-surface-container-low);
|
|
535
|
+
--elevated-button-label-text-color: var(--color-error);
|
|
536
|
+
--outlined-button-outline-color: var(--color-error);
|
|
537
|
+
--outlined-button-label-text-color: var(--color-error);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
:host([color=on-surface]) {
|
|
426
541
|
--filled-button-container-color: var(--color-on-surface);
|
|
427
542
|
--filled-button-label-text-color: var(--color-surface);
|
|
428
|
-
--tonal-button-container-color: var(--color-surface-container);
|
|
429
|
-
--tonal-button-label-text-color: var(--color-
|
|
430
|
-
--elevated-button-container-color: var(--color-surface
|
|
431
|
-
--elevated-button-label-text-color: var(--color-
|
|
543
|
+
--tonal-button-container-color: var(--color-on-surface-container);
|
|
544
|
+
--tonal-button-label-text-color: var(--color-surface-container-high);
|
|
545
|
+
--elevated-button-container-color: var(--color-on-surface);
|
|
546
|
+
--elevated-button-label-text-color: var(--color-surface);
|
|
432
547
|
--outlined-button-outline-color: var(--color-on-surface);
|
|
433
548
|
--outlined-button-label-text-color: var(--color-on-surface);
|
|
434
549
|
--text-button-label-text-color: var(--color-on-surface);
|
|
@@ -436,36 +551,44 @@ var css_248z$1 = i`:host([color=primary]) {
|
|
|
436
551
|
--neo-button-label-text-color: var(--color-surface);
|
|
437
552
|
}
|
|
438
553
|
|
|
439
|
-
:host([color=
|
|
440
|
-
--filled-button-container-color: var(--color-surface);
|
|
554
|
+
:host([color=surface]) {
|
|
555
|
+
--filled-button-container-color: var(--color-surface-container-high);
|
|
441
556
|
--filled-button-label-text-color: var(--color-on-surface);
|
|
442
|
-
--tonal-button-container-color: var(--color-
|
|
443
|
-
--tonal-button-label-text-color: var(--color-surface-container);
|
|
444
|
-
--elevated-button-container-color: var(--color-surface
|
|
445
|
-
--elevated-button-label-text-color: var(--color-
|
|
446
|
-
--outlined-button-outline-color: var(--color-surface);
|
|
447
|
-
--outlined-button-label-text-color: var(--color-surface);
|
|
448
|
-
--text-button-label-text-color: var(--color-surface);
|
|
557
|
+
--tonal-button-container-color: var(--color-surface-container-high);
|
|
558
|
+
--tonal-button-label-text-color: var(--color-on-surface-container);
|
|
559
|
+
--elevated-button-container-color: var(--color-surface);
|
|
560
|
+
--elevated-button-label-text-color: var(--color-on-surface);
|
|
561
|
+
--outlined-button-outline-color: var(--color-on-surface);
|
|
562
|
+
--outlined-button-label-text-color: var(--color-on-surface);
|
|
563
|
+
--text-button-label-text-color: var(--color-on-surface);
|
|
449
564
|
--neo-button-container-color: var(--color-surface);
|
|
450
565
|
--neo-button-label-text-color: var(--color-on-surface);
|
|
451
566
|
}`;
|
|
452
567
|
|
|
453
|
-
var css_248z = i
|
|
454
|
-
|
|
455
|
-
--
|
|
568
|
+
var css_248z = i`:host([size=xs]),
|
|
569
|
+
:host([size=extra-small]) {
|
|
570
|
+
--button-height: 2rem;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
:host([size=xs]) .button,
|
|
574
|
+
:host([size=extra-small]) .button {
|
|
456
575
|
--_button-icon-size: 1rem;
|
|
457
|
-
--
|
|
576
|
+
--_button_container-padding: 0.75rem;
|
|
458
577
|
font-size: 0.875rem !important;
|
|
459
578
|
font-weight: var(--font-weight-medium) !important;
|
|
460
579
|
line-height: 1.25rem !important;
|
|
461
580
|
letter-spacing: 0.1px !important;
|
|
462
581
|
}
|
|
463
582
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
--
|
|
583
|
+
:host([size=sm]),
|
|
584
|
+
:host([size=small]) {
|
|
585
|
+
--button-height: 2.5rem;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
:host([size=sm]) .button,
|
|
589
|
+
:host([size=small]) .button {
|
|
467
590
|
--_button-icon-size: 1.25rem;
|
|
468
|
-
--
|
|
591
|
+
--_button_container-padding: 1rem;
|
|
469
592
|
--_button-icon-label-spacing: 0.5rem;
|
|
470
593
|
font-size: 0.875rem !important;
|
|
471
594
|
font-weight: var(--font-weight-medium) !important;
|
|
@@ -473,71 +596,76 @@ var css_248z = i`.button.size-xs,
|
|
|
473
596
|
letter-spacing: 0.1px !important;
|
|
474
597
|
}
|
|
475
598
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
--
|
|
599
|
+
:host([size=md]),
|
|
600
|
+
:host([size=medium]) {
|
|
601
|
+
--button-height: 3.5rem;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
:host([size=md]) .button,
|
|
605
|
+
:host([size=medium]) .button {
|
|
479
606
|
--_button-icon-size: 1.5rem;
|
|
480
|
-
--
|
|
607
|
+
--_button_container-padding: 1.5rem;
|
|
481
608
|
font-size: 1rem !important;
|
|
482
609
|
font-weight: var(--font-weight-medium) !important;
|
|
483
610
|
line-height: 1.5rem !important;
|
|
484
611
|
letter-spacing: 0.15px !important;
|
|
485
612
|
}
|
|
486
613
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
--
|
|
614
|
+
:host([size=lg]),
|
|
615
|
+
:host([size=large]) {
|
|
616
|
+
--button-height: 6rem;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
:host([size=lg]) .button,
|
|
620
|
+
:host([size=large]) .button {
|
|
490
621
|
--_button-icon-size: 2rem;
|
|
491
|
-
--
|
|
622
|
+
--_button_container-padding: 3rem;
|
|
492
623
|
font-size: 1.5rem !important;
|
|
493
624
|
font-weight: var(--font-weight-regular) !important;
|
|
494
625
|
line-height: 2rem !important;
|
|
495
626
|
letter-spacing: 0 !important;
|
|
496
627
|
}
|
|
497
628
|
|
|
498
|
-
|
|
499
|
-
--
|
|
629
|
+
:host([size=xl]) {
|
|
630
|
+
--button-height: 8.5rem;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
:host([size=xl]) .button {
|
|
500
634
|
--_button-icon-size: 2.5rem;
|
|
501
|
-
--
|
|
635
|
+
--_button_container-padding: 4rem;
|
|
502
636
|
font-size: 2rem !important;
|
|
503
637
|
font-weight: var(--font-weight-regular) !important;
|
|
504
638
|
line-height: 2.5rem !important;
|
|
505
639
|
letter-spacing: 0 !important;
|
|
506
640
|
}`;
|
|
507
641
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
642
|
+
/**
|
|
643
|
+
* 3. Apply the type annotation to the variable.
|
|
644
|
+
*/
|
|
645
|
+
const BaseHyperlink = (superclass) => {
|
|
646
|
+
// Naming the class (BaseHyperlinkElement) instead of using 'Mixin' or anonymous
|
|
647
|
+
// prevents the "__childPart" visibility error.
|
|
648
|
+
class BaseHyperlinkElement extends superclass {
|
|
649
|
+
constructor() {
|
|
650
|
+
super(...arguments);
|
|
651
|
+
this.target = '_self';
|
|
513
652
|
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
render(_props) {
|
|
517
|
-
return '';
|
|
518
|
-
}
|
|
519
|
-
update(part, [props]) {
|
|
520
|
-
if (!props)
|
|
521
|
-
return;
|
|
522
|
-
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
523
|
-
for (const key in props) {
|
|
524
|
-
const value = props[key];
|
|
525
|
-
if (value === undefined || value === null) {
|
|
526
|
-
part.element.removeAttribute(key);
|
|
527
|
-
}
|
|
528
|
-
else {
|
|
529
|
-
part.element.setAttribute(key, value);
|
|
530
|
-
}
|
|
653
|
+
__isLink() {
|
|
654
|
+
return !!this.href;
|
|
531
655
|
}
|
|
532
656
|
}
|
|
533
|
-
|
|
534
|
-
|
|
657
|
+
__decorate([
|
|
658
|
+
n({ reflect: true })
|
|
659
|
+
], BaseHyperlinkElement.prototype, "href", void 0);
|
|
660
|
+
__decorate([
|
|
661
|
+
n()
|
|
662
|
+
], BaseHyperlinkElement.prototype, "target", void 0);
|
|
663
|
+
return BaseHyperlinkElement;
|
|
664
|
+
};
|
|
535
665
|
|
|
536
|
-
|
|
537
|
-
class BaseButton extends i$2 {
|
|
666
|
+
class BaseButton extends BaseHyperlink(i$1) {
|
|
538
667
|
constructor() {
|
|
539
668
|
super(...arguments);
|
|
540
|
-
_BaseButton_id.set(this, crypto.randomUUID());
|
|
541
669
|
this.htmlType = 'button';
|
|
542
670
|
/**
|
|
543
671
|
* The visual style of the button.
|
|
@@ -572,10 +700,7 @@ class BaseButton extends i$2 {
|
|
|
572
700
|
* If button is disabled, the reason why it is disabled.
|
|
573
701
|
*/
|
|
574
702
|
this.disabledReason = '';
|
|
575
|
-
|
|
576
|
-
* Sets or retrieves the window or frame at which to target content.
|
|
577
|
-
*/
|
|
578
|
-
this.target = '_self';
|
|
703
|
+
this.toggle = false;
|
|
579
704
|
this.selected = false;
|
|
580
705
|
/**
|
|
581
706
|
* Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
|
|
@@ -615,6 +740,9 @@ class BaseButton extends i$2 {
|
|
|
615
740
|
if (!isActivationClick(event) || !this.buttonElement) {
|
|
616
741
|
return;
|
|
617
742
|
}
|
|
743
|
+
if (this.toggle) {
|
|
744
|
+
this.selected = !this.selected;
|
|
745
|
+
}
|
|
618
746
|
this.focus();
|
|
619
747
|
dispatchActivationClick(this.buttonElement);
|
|
620
748
|
};
|
|
@@ -635,17 +763,14 @@ class BaseButton extends i$2 {
|
|
|
635
763
|
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
636
764
|
super.disconnectedCallback();
|
|
637
765
|
}
|
|
638
|
-
__isLink() {
|
|
639
|
-
return !!this.href;
|
|
640
|
-
}
|
|
641
766
|
__convertTypeToVariantAndColor() {
|
|
642
767
|
if (this.type === 'primary') {
|
|
643
768
|
this.color = 'primary';
|
|
644
769
|
this.variant = 'filled';
|
|
645
770
|
}
|
|
646
771
|
else if (this.type === 'secondary') {
|
|
647
|
-
this.color = '
|
|
648
|
-
this.variant = '
|
|
772
|
+
this.color = 'surface';
|
|
773
|
+
this.variant = 'filled';
|
|
649
774
|
}
|
|
650
775
|
else if (this.type === 'tertiary') {
|
|
651
776
|
this.color = 'primary';
|
|
@@ -656,21 +781,21 @@ class BaseButton extends i$2 {
|
|
|
656
781
|
this.variant = 'filled';
|
|
657
782
|
}
|
|
658
783
|
}
|
|
659
|
-
|
|
784
|
+
get __disabledReasonID() {
|
|
660
785
|
return this.disabled && this.disabledReason
|
|
661
|
-
?
|
|
662
|
-
:
|
|
786
|
+
? BaseButton.DISABLED_REASON_ID
|
|
787
|
+
: undefined;
|
|
663
788
|
}
|
|
664
789
|
__renderDisabledReason() {
|
|
665
|
-
const disabledReasonID = this.
|
|
790
|
+
const disabledReasonID = this.__disabledReasonID;
|
|
666
791
|
if (disabledReasonID)
|
|
667
792
|
return b `<div
|
|
668
|
-
id
|
|
793
|
+
id=${disabledReasonID}
|
|
669
794
|
role="tooltip"
|
|
670
795
|
aria-label=${this.disabledReason}
|
|
671
796
|
class="screen-reader-only"
|
|
672
797
|
>
|
|
673
|
-
{this.disabledReason}
|
|
798
|
+
${this.disabledReason}
|
|
674
799
|
</div>`;
|
|
675
800
|
return A;
|
|
676
801
|
}
|
|
@@ -681,7 +806,7 @@ class BaseButton extends i$2 {
|
|
|
681
806
|
return A;
|
|
682
807
|
}
|
|
683
808
|
}
|
|
684
|
-
|
|
809
|
+
BaseButton.DISABLED_REASON_ID = 'disabled-reason';
|
|
685
810
|
__decorate([
|
|
686
811
|
n({ type: String })
|
|
687
812
|
], BaseButton.prototype, "htmlType", void 0);
|
|
@@ -695,31 +820,28 @@ __decorate([
|
|
|
695
820
|
n({ reflect: true })
|
|
696
821
|
], BaseButton.prototype, "color", void 0);
|
|
697
822
|
__decorate([
|
|
698
|
-
n()
|
|
823
|
+
n({ reflect: true })
|
|
699
824
|
], BaseButton.prototype, "size", void 0);
|
|
700
825
|
__decorate([
|
|
701
826
|
n({ type: Boolean, reflect: true })
|
|
702
827
|
], BaseButton.prototype, "disabled", void 0);
|
|
703
828
|
__decorate([
|
|
704
|
-
n()
|
|
829
|
+
n({ type: Boolean, reflect: true })
|
|
705
830
|
], BaseButton.prototype, "skeleton", void 0);
|
|
706
831
|
__decorate([
|
|
707
|
-
n({ reflect: true, attribute: 'soft-disabled' })
|
|
832
|
+
n({ type: Boolean, reflect: true, attribute: 'soft-disabled' })
|
|
708
833
|
], BaseButton.prototype, "softDisabled", void 0);
|
|
709
834
|
__decorate([
|
|
710
835
|
n({ attribute: 'disabled-reason' })
|
|
711
836
|
], BaseButton.prototype, "disabledReason", void 0);
|
|
712
|
-
__decorate([
|
|
713
|
-
n({ reflect: true })
|
|
714
|
-
], BaseButton.prototype, "href", void 0);
|
|
715
837
|
__decorate([
|
|
716
838
|
n({ reflect: true })
|
|
717
839
|
], BaseButton.prototype, "configAria", void 0);
|
|
718
840
|
__decorate([
|
|
719
|
-
n()
|
|
720
|
-
], BaseButton.prototype, "
|
|
841
|
+
n({ type: Boolean, reflect: true })
|
|
842
|
+
], BaseButton.prototype, "toggle", void 0);
|
|
721
843
|
__decorate([
|
|
722
|
-
n()
|
|
844
|
+
n({ type: Boolean, reflect: true })
|
|
723
845
|
], BaseButton.prototype, "selected", void 0);
|
|
724
846
|
__decorate([
|
|
725
847
|
n()
|
|
@@ -731,7 +853,7 @@ __decorate([
|
|
|
731
853
|
r()
|
|
732
854
|
], BaseButton.prototype, "isPressed", void 0);
|
|
733
855
|
__decorate([
|
|
734
|
-
e
|
|
856
|
+
e('.button')
|
|
735
857
|
], BaseButton.prototype, "buttonElement", void 0);
|
|
736
858
|
|
|
737
859
|
var _Button_tabindex;
|
|
@@ -788,6 +910,22 @@ let Button = class Button extends BaseButton {
|
|
|
788
910
|
this.iconAlign = 'end';
|
|
789
911
|
this.slotHasContent = false;
|
|
790
912
|
}
|
|
913
|
+
focus() {
|
|
914
|
+
this.buttonElement?.focus();
|
|
915
|
+
}
|
|
916
|
+
blur() {
|
|
917
|
+
this.buttonElement?.blur();
|
|
918
|
+
}
|
|
919
|
+
connectedCallback() {
|
|
920
|
+
super.connectedCallback();
|
|
921
|
+
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
922
|
+
window.addEventListener('mouseup', this.__handlePress);
|
|
923
|
+
}
|
|
924
|
+
disconnectedCallback() {
|
|
925
|
+
window.removeEventListener('mouseup', this.__handlePress);
|
|
926
|
+
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
927
|
+
super.disconnectedCallback();
|
|
928
|
+
}
|
|
791
929
|
firstUpdated() {
|
|
792
930
|
this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
|
|
793
931
|
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
|
|
@@ -812,14 +950,15 @@ let Button = class Button extends BaseButton {
|
|
|
812
950
|
};
|
|
813
951
|
if (!isLink) {
|
|
814
952
|
return b `<button
|
|
815
|
-
class=${e$
|
|
953
|
+
class=${e$1(cssClasses)}
|
|
816
954
|
id="button"
|
|
817
955
|
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
818
956
|
type=${this.htmlType}
|
|
957
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
819
958
|
@mousedown=${this.__handlePress}
|
|
820
959
|
@keydown=${this.__handlePress}
|
|
821
960
|
@keyup=${this.__handlePress}
|
|
822
|
-
|
|
961
|
+
aria-describedby=${this.__disabledReasonID}
|
|
823
962
|
aria-disabled=${`${this.disabled || this.softDisabled}`}
|
|
824
963
|
?disabled=${this.disabled}
|
|
825
964
|
${spread(this.configAria)}
|
|
@@ -829,16 +968,17 @@ let Button = class Button extends BaseButton {
|
|
|
829
968
|
${this.__renderTooltip()}`;
|
|
830
969
|
}
|
|
831
970
|
return b `<a
|
|
832
|
-
class=${e$
|
|
971
|
+
class=${e$1(cssClasses)}
|
|
833
972
|
id="button"
|
|
834
973
|
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
835
974
|
href=${this.href}
|
|
836
975
|
target=${this.target}
|
|
976
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
837
977
|
@mousedown=${this.__handlePress}
|
|
838
978
|
@keydown=${this.__handlePress}
|
|
839
979
|
@keyup=${this.__handlePress}
|
|
840
980
|
role="button"
|
|
841
|
-
|
|
981
|
+
aria-describedby=${this.__disabledReasonID}
|
|
842
982
|
aria-disabled=${`${this.disabled}`}
|
|
843
983
|
${spread(this.configAria)}
|
|
844
984
|
>
|
|
@@ -848,7 +988,7 @@ let Button = class Button extends BaseButton {
|
|
|
848
988
|
}
|
|
849
989
|
renderButtonContent() {
|
|
850
990
|
return b `
|
|
851
|
-
<wc-focus-ring class="focus-ring" .control=${this}
|
|
991
|
+
<wc-focus-ring class="focus-ring" .control=${this} .forElement=${this.buttonElement}></wc-focus-ring>
|
|
852
992
|
<wc-elevation class="elevation"></wc-elevation>
|
|
853
993
|
<div class="neo-background"></div>
|
|
854
994
|
<div class="background"></div>
|
|
@@ -880,5 +1020,5 @@ Button = __decorate([
|
|
|
880
1020
|
IndividualComponent
|
|
881
1021
|
], Button);
|
|
882
1022
|
|
|
883
|
-
export { Button as B, css_248z$1 as a, BaseButton as b, css_248z$2 as c,
|
|
884
|
-
//# sourceMappingURL=button-
|
|
1023
|
+
export { Button as B, css_248z$1 as a, BaseButton as b, css_248z$2 as c, BaseHyperlink as d };
|
|
1024
|
+
//# sourceMappingURL=button-DMN1dPAg.js.map
|