@redvars/peacock 3.6.3 → 3.8.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/ButtonConstants-D06bY4uy.js +114 -0
- package/dist/ButtonConstants-D06bY4uy.js.map +1 -0
- package/dist/{BaseHyperlinkMixin-BNuwbiEf.js → NativeHyperlinkMixin-DrYXyfMQ.js} +8 -10
- package/dist/NativeHyperlinkMixin-DrYXyfMQ.js.map +1 -0
- package/dist/assets/components.css +1 -1
- package/dist/assets/components.css.map +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/{button-colors-Cg6oxiz-.js → button-colors-DSuBHd-i.js} +200 -186
- package/dist/button-colors-DSuBHd-i.js.map +1 -0
- package/dist/button-group.js +8 -8
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +224 -124
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +0 -1
- package/dist/calendar-column-view.js.map +1 -1
- package/dist/calendar-month-view.js +0 -1
- package/dist/calendar-month-view.js.map +1 -1
- package/dist/card-content.js +0 -1
- package/dist/card-content.js.map +1 -1
- package/dist/card.js +96 -90
- package/dist/card.js.map +1 -1
- package/dist/cb-compound-expression.js +4 -1
- package/dist/cb-compound-expression.js.map +1 -1
- package/dist/cb-divider.js +0 -1
- package/dist/cb-divider.js.map +1 -1
- package/dist/cb-expression.js +0 -2
- package/dist/cb-expression.js.map +1 -1
- package/dist/cb-predicate.js +0 -1
- package/dist/cb-predicate.js.map +1 -1
- package/dist/code-highlighter.js +23 -6
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +5102 -18408
- package/dist/custom-elements.json +19630 -20205
- package/dist/fab.js +181 -117
- package/dist/fab.js.map +1 -1
- package/dist/{flow-designer-node-9Bqyn6qx.js → flow-designer-node-BWrPuxAR.js} +1 -2
- package/dist/flow-designer-node-BWrPuxAR.js.map +1 -0
- package/dist/flow-designer-node.js +1 -1
- package/dist/flow-designer.js +5 -5
- package/dist/icon-button-CYqrnMnF.js +318 -0
- package/dist/icon-button-CYqrnMnF.js.map +1 -0
- package/dist/index.js +8 -8
- package/dist/{navigation-rail-DAUuJ_Yp.js → navigation-rail-CM_svs5_.js} +511 -295
- package/dist/navigation-rail-CM_svs5_.js.map +1 -0
- package/dist/observe-slot-change-D8Xg-kSS.js +60 -0
- package/dist/observe-slot-change-D8Xg-kSS.js.map +1 -0
- package/dist/peacock-loader.js +7 -7
- package/dist/peacock-loader.js.map +1 -1
- package/dist/popover-content.js +0 -1
- package/dist/popover-content.js.map +1 -1
- package/dist/search.js +4 -1
- package/dist/search.js.map +1 -1
- package/dist/src/__controllers/attachable-controller.d.ts +109 -0
- package/dist/src/__mixins/{BaseButtonMixin.d.ts → NativeButtonMixin.d.ts} +3 -3
- package/dist/src/__mixins/{BaseHyperlinkMixin.d.ts → NativeHyperlinkMixin.d.ts} +3 -4
- package/dist/src/__utils/is-link.d.ts +1 -0
- package/dist/src/__utils/observe-slot-change.d.ts +1 -1
- package/dist/src/accordion/accordion-item.d.ts +0 -1
- package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +0 -1
- package/dist/src/button/ButtonConstants.d.ts +1 -0
- package/dist/src/button/GroupButtonInterface.d.ts +4 -0
- package/dist/src/button/button/button.d.ts +32 -7
- package/dist/src/button/button-group/button-group.d.ts +2 -1
- package/dist/src/button/icon-button/icon-button.d.ts +26 -5
- package/dist/src/button/index.d.ts +1 -1
- package/dist/src/calendar/calendar-column-view.d.ts +0 -1
- package/dist/src/calendar/calendar-month-view.d.ts +0 -1
- package/dist/src/card/card-content.d.ts +0 -1
- package/dist/src/card/card.d.ts +9 -6
- package/dist/src/chip/chip/chip.d.ts +22 -3
- package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -1
- package/dist/src/condition-builder/cb-divider.d.ts +0 -1
- package/dist/src/condition-builder/cb-expression.d.ts +0 -1
- package/dist/src/condition-builder/cb-predicate.d.ts +0 -1
- package/dist/src/fab/fab.d.ts +20 -6
- package/dist/src/flow-designer/flow-designer-node.d.ts +0 -1
- package/dist/src/focus-ring/focus-ring.d.ts +26 -20
- package/dist/src/item/item.d.ts +2 -1
- package/dist/src/link/link.d.ts +1 -1
- package/dist/src/list/list-item.d.ts +1 -2
- package/dist/src/menu/menu-item/menu-item.d.ts +1 -2
- package/dist/src/menu/sub-menu/sub-menu.d.ts +0 -1
- package/dist/src/navigation-rail/navigation-rail-item.d.ts +0 -2
- package/dist/src/popover/popover-content.d.ts +0 -1
- package/dist/src/ripple/ripple.d.ts +9 -1
- package/dist/src/segmented-button/segmented-button.d.ts +0 -1
- package/dist/src/select/option.d.ts +0 -1
- package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +0 -1
- package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +0 -1
- package/dist/src/tabs/tab-panel.d.ts +0 -1
- package/dist/src/tabs/tab.d.ts +4 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/readme.md +2 -2
- package/scss/components.scss +0 -1
- package/scss/mixin.scss +10 -13
- package/scss/styles.scss +1 -3
- package/src/__controllers/attachable-controller.ts +198 -0
- package/src/__mixins/NativeButtonMixin.ts +87 -0
- package/src/__mixins/{BaseHyperlinkMixin.ts → NativeHyperlinkMixin.ts} +15 -15
- package/src/__utils/is-link.ts +3 -0
- package/src/__utils/observe-slot-change.ts +46 -14
- package/src/accordion/accordion-item.scss +1 -1
- package/src/accordion/accordion-item.ts +0 -1
- package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +0 -1
- package/src/button/ButtonConstants.ts +1 -0
- package/src/button/GroupButtonInterface.ts +4 -0
- package/src/button/button/button-colors.scss +2 -2
- package/src/button/button/button-layers.scss +124 -0
- package/src/button/button/button-sizes.scss +20 -42
- package/src/button/button/button.scss +71 -169
- package/src/button/button/button.ts +229 -78
- package/src/button/button/only-button.scss +13 -0
- package/src/button/button-group/button-group.ts +59 -17
- package/src/button/icon-button/icon-button-sizes.scss +6 -21
- package/src/button/icon-button/icon-button.ts +198 -93
- package/src/button/index.ts +1 -1
- package/src/calendar/calendar-column-view.ts +0 -1
- package/src/calendar/calendar-month-view.ts +0 -1
- package/src/card/card-content.ts +2 -3
- package/src/card/card.scss +87 -95
- package/src/card/card.ts +62 -60
- package/src/chip/chip/chip.scss +65 -70
- package/src/chip/chip/chip.ts +155 -56
- package/src/code-highlighter/code-highlighter.scss +1 -1
- package/src/code-highlighter/code-highlighter.ts +20 -5
- package/src/condition-builder/cb-compound-expression.scss +4 -0
- package/src/condition-builder/cb-compound-expression.ts +0 -1
- package/src/condition-builder/cb-divider.ts +0 -1
- package/src/condition-builder/cb-expression.scss +0 -1
- package/src/condition-builder/cb-expression.ts +0 -1
- package/src/condition-builder/cb-predicate.ts +0 -1
- package/src/elevation/elevation.scss +5 -1
- package/src/fab/fab-colors.scss +2 -2
- package/src/fab/fab-sizes.scss +24 -34
- package/src/fab/fab.scss +77 -71
- package/src/fab/fab.ts +141 -65
- package/src/flow-designer/flow-designer-node.ts +0 -1
- package/src/focus-ring/focus-ring.ts +81 -72
- package/src/item/item.scss +77 -66
- package/src/item/item.ts +61 -39
- package/src/link/link.scss +1 -10
- package/src/link/link.ts +4 -2
- package/src/list/list-item.ts +8 -8
- package/src/menu/menu-item/menu-item.ts +17 -8
- package/src/menu/sub-menu/sub-menu.ts +0 -1
- package/src/navigation-rail/navigation-rail-item.scss +5 -0
- package/src/navigation-rail/navigation-rail-item.ts +10 -15
- package/src/peacock-loader.ts +1 -1
- package/src/popover/popover-content.ts +0 -1
- package/src/ripple/ripple.ts +52 -20
- package/src/search/search.scss +3 -0
- package/src/segmented-button/segmented-button.ts +0 -1
- package/src/select/option.ts +0 -1
- package/src/sidebar-menu/sidebar-menu-item.ts +0 -1
- package/src/sidebar-menu/sidebar-sub-menu.ts +0 -1
- package/src/skeleton/skeleton.scss +5 -1
- package/src/tabs/tab-panel.ts +0 -1
- package/src/tabs/tab.ts +60 -70
- package/src/text/text.css-component.scss +3 -21
- package/src/tooltip/tooltip.scss +5 -8
- package/src/tooltip/tooltip.ts +1 -2
- package/dist/BaseButton-BNFAYn-S.js +0 -219
- package/dist/BaseButton-BNFAYn-S.js.map +0 -1
- package/dist/BaseHyperlinkMixin-BNuwbiEf.js.map +0 -1
- package/dist/button-colors-Cg6oxiz-.js.map +0 -1
- package/dist/flow-designer-node-9Bqyn6qx.js.map +0 -1
- package/dist/icon-button-AdJBEoNy.js +0 -251
- package/dist/icon-button-AdJBEoNy.js.map +0 -1
- package/dist/navigation-rail-DAUuJ_Yp.js.map +0 -1
- package/dist/observe-slot-change-BGJfgg2E.js +0 -31
- package/dist/observe-slot-change-BGJfgg2E.js.map +0 -1
- package/dist/src/button/BaseButton.d.ts +0 -28
- package/dist/src/focus-ring/FocusAttachableController.d.ts +0 -8
- package/src/__mixins/BaseButtonMixin.ts +0 -83
- package/src/button/BaseButton.ts +0 -113
- package/src/focus-ring/FocusAttachableController.ts +0 -28
- package/src/popover/tooltip.css-component.scss +0 -19
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use '../../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
// Mixin for the shared transition logic
|
|
4
|
+
@mixin button-transition {
|
|
5
|
+
transition-property: inset, width, height, transform, border-radius, opacity;
|
|
6
|
+
transition-duration: 200ms;
|
|
7
|
+
transition-timing-function: var(--easing-standard);
|
|
8
|
+
will-change: inset, transform, border-radius, opacity;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.button {
|
|
12
|
+
@include button-transition;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.background {
|
|
16
|
+
display: block;
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
|
|
21
|
+
background-color: var(--private-button-container-color);
|
|
22
|
+
opacity: var(--private-button-container-opacity, 1);
|
|
23
|
+
|
|
24
|
+
border-start-start-radius: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
25
|
+
border-start-end-radius: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
26
|
+
border-end-start-radius: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
27
|
+
border-end-end-radius: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
28
|
+
corner-shape: var(--private-button-container-shape-variant);
|
|
29
|
+
@include button-transition;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.neo-background {
|
|
33
|
+
display: block;
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset: 0;
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
|
|
38
|
+
background: var(--color-inverse-surface);
|
|
39
|
+
transform: translateX(0.25rem) translateY(0.25rem);
|
|
40
|
+
|
|
41
|
+
border-start-start-radius: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
42
|
+
border-start-end-radius: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
43
|
+
border-end-start-radius: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
44
|
+
border-end-end-radius: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
45
|
+
corner-shape: var(--private-button-container-shape-variant);
|
|
46
|
+
@include button-transition;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.focus-ring {
|
|
50
|
+
z-index: 2;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
|
|
53
|
+
--focus-ring-container-shape-start-start: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
54
|
+
--focus-ring-container-shape-start-end: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
55
|
+
--focus-ring-container-shape-end-start: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
56
|
+
--focus-ring-container-shape-end-end: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
57
|
+
--focus-ring-container-shape-variant: var(--private-button-container-shape-variant);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ripple {
|
|
61
|
+
border-start-start-radius: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
62
|
+
border-start-end-radius: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
63
|
+
border-end-start-radius: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
64
|
+
border-end-end-radius: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
65
|
+
corner-shape: var(--private-button-container-shape-variant);
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
|
|
68
|
+
--ripple-state-opacity: var(--private-button-state-opacity, 0);
|
|
69
|
+
--ripple-pressed-color: var(--private-button-state-color);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
.skeleton {
|
|
74
|
+
display: block;
|
|
75
|
+
position: absolute;
|
|
76
|
+
inset: 0;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
|
|
79
|
+
z-index: 2;
|
|
80
|
+
|
|
81
|
+
--skeleton-container-shape-start-start: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
82
|
+
--skeleton-container-shape-start-end: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
83
|
+
--skeleton-container-shape-end-start: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
84
|
+
--skeleton-container-shape-end-end: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
85
|
+
--skeleton-container-shape-variant: var(--private-button-container-shape-variant);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
.elevation {
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
transition-duration: 280ms;
|
|
92
|
+
--elevation-container-shape-start-start: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
93
|
+
--elevation-container-shape-start-end: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
94
|
+
--elevation-container-shape-end-start: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
95
|
+
--elevation-container-shape-end-end: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
96
|
+
--elevation-container-shape-variant: var(--private-button-container-shape-variant);
|
|
97
|
+
|
|
98
|
+
--elevation-level: var(--private-button-container-elevation-level);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
.outline {
|
|
104
|
+
display: block;
|
|
105
|
+
position: absolute;
|
|
106
|
+
inset: 0;
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
|
|
109
|
+
z-index: 0;
|
|
110
|
+
|
|
111
|
+
border: var(--private-button-outline-width) solid var(--private-button-outline-color);
|
|
112
|
+
opacity: var(--private-button-outline-opacity, 1);
|
|
113
|
+
border-start-start-radius: var(--private-button-container-shape-start-start, var(--private-button-container-shape));
|
|
114
|
+
border-start-end-radius: var(--private-button-container-shape-start-end, var(--private-button-container-shape));
|
|
115
|
+
border-end-start-radius: var(--private-button-container-shape-end-start, var(--private-button-container-shape));
|
|
116
|
+
border-end-end-radius: var(--private-button-container-shape-end-end, var(--private-button-container-shape));
|
|
117
|
+
corner-shape: var(--private-button-container-shape-variant);
|
|
118
|
+
|
|
119
|
+
@include button-transition;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tooltip {
|
|
123
|
+
z-index: 1;
|
|
124
|
+
}
|
|
@@ -1,84 +1,62 @@
|
|
|
1
1
|
@use '../../../scss/mixin';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
:host([size='xs']),
|
|
5
4
|
:host([size='extra-small']) {
|
|
6
5
|
--button-height: 2rem;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host([size='xs']) .button,
|
|
10
|
-
:host([size='extra-small']) .button {
|
|
11
6
|
--private-button-icon-size: 1rem;
|
|
12
7
|
--private-button-container-padding: 0.75rem;
|
|
13
8
|
|
|
14
|
-
font-size:
|
|
15
|
-
font-weight: var(--font-weight-medium) !important;
|
|
16
|
-
line-height: 1.25rem !important;
|
|
17
|
-
letter-spacing: 0.1px !important;
|
|
9
|
+
--private-button-font-size: 0.875rem !important;
|
|
10
|
+
--private-button-font-weight: var(--font-weight-medium) !important;
|
|
11
|
+
--private-button-line-height: 1.25rem !important;
|
|
12
|
+
--private-button-letter-spacing: 0.1px !important;
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
|
|
21
15
|
:host([size='sm']),
|
|
22
16
|
:host([size='small']) {
|
|
23
17
|
--button-height: 2.5rem;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([size='sm']) .button,
|
|
27
|
-
:host([size='small']) .button {
|
|
28
18
|
--private-button-icon-size: 1.25rem;
|
|
29
19
|
--private-button-container-padding: 1rem;
|
|
30
20
|
--private-button-icon-label-spacing: 0.5rem;
|
|
31
21
|
|
|
32
|
-
font-size:
|
|
33
|
-
font-weight: var(--font-weight-medium) !important;
|
|
34
|
-
line-height: 1.25rem !important;
|
|
35
|
-
letter-spacing: 0.1px !important;
|
|
22
|
+
--private-button-font-size: 0.875rem !important;
|
|
23
|
+
--private-button-font-weight: var(--font-weight-medium) !important;
|
|
24
|
+
--private-button-line-height: 1.25rem !important;
|
|
25
|
+
--private-button-letter-spacing: 0.1px !important;
|
|
36
26
|
}
|
|
37
27
|
|
|
38
28
|
:host([size='md']),
|
|
39
29
|
:host([size='medium']) {
|
|
40
30
|
--button-height: 3.5rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host([size='md']) .button,
|
|
44
|
-
:host([size='medium']) .button {
|
|
45
31
|
--private-button-icon-size: 1.5rem;
|
|
46
32
|
--private-button-container-padding: 1.5rem;
|
|
47
33
|
|
|
48
|
-
font-size:
|
|
49
|
-
font-weight: var(--font-weight-medium) !important;
|
|
50
|
-
line-height: 1.5rem !important;
|
|
51
|
-
letter-spacing: 0.15px !important;
|
|
34
|
+
--private-button-font-size: 1rem !important;
|
|
35
|
+
--private-button-font-weight: var(--font-weight-medium) !important;
|
|
36
|
+
--private-button-line-height: 1.5rem !important;
|
|
37
|
+
--private-button-letter-spacing: 0.15px !important;
|
|
52
38
|
}
|
|
53
39
|
|
|
54
40
|
:host([size='lg']),
|
|
55
41
|
:host([size='large']) {
|
|
56
42
|
--button-height: 6rem;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host([size='lg']) .button,
|
|
60
|
-
:host([size='large']) .button {
|
|
61
43
|
--private-button-icon-size: 2rem;
|
|
62
44
|
--private-button-container-padding: 3rem;
|
|
63
45
|
|
|
64
|
-
font-size:
|
|
65
|
-
font-weight: var(--font-weight-regular) !important;
|
|
66
|
-
line-height: 2rem !important;
|
|
67
|
-
letter-spacing: 0 !important;
|
|
46
|
+
--private-button-font-size: 1.5rem !important;
|
|
47
|
+
--private-button-font-weight: var(--font-weight-regular) !important;
|
|
48
|
+
--private-button-line-height: 2rem !important;
|
|
49
|
+
--private-button-letter-spacing: 0 !important;
|
|
68
50
|
}
|
|
69
51
|
|
|
70
52
|
:host([size='xl']),
|
|
71
53
|
:host([size='extra-large']) {
|
|
72
54
|
--button-height: 8.5rem;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:host([size='xl']) .button,
|
|
76
|
-
:host([size='extra-large']) .button {
|
|
77
55
|
--private-button-icon-size: 2.5rem;
|
|
78
56
|
--private-button-container-padding: 4rem;
|
|
79
57
|
|
|
80
|
-
font-size:
|
|
81
|
-
font-weight: var(--font-weight-regular) !important;
|
|
82
|
-
line-height: 2.5rem !important;
|
|
83
|
-
letter-spacing: 0 !important;
|
|
58
|
+
--private-button-font-size: 2rem !important;
|
|
59
|
+
--private-button-font-weight: var(--font-weight-regular) !important;
|
|
60
|
+
--private-button-line-height: 2.5rem !important;
|
|
61
|
+
--private-button-letter-spacing: 0 !important;
|
|
84
62
|
}
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--button-height: unset;
|
|
11
7
|
--button-icon-size: unset;
|
|
12
8
|
--button-container-padding: unset;
|
|
13
9
|
--button-container-shape: var(--shape-corner-medium);
|
|
@@ -18,13 +14,16 @@
|
|
|
18
14
|
--button-container-shape-variant: squircle;
|
|
19
15
|
}
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
--
|
|
27
|
-
--
|
|
17
|
+
:host {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
min-height: var(--button-height);
|
|
21
|
+
|
|
22
|
+
--private-button-container-shape-start-start: var(--button-container-shape-start-start, var(--button-container-shape));
|
|
23
|
+
--private-button-container-shape-start-end: var(--button-container-shape-start-end, var(--button-container-shape));
|
|
24
|
+
--private-button-container-shape-end-start: var(--button-container-shape-end-start, var(--button-container-shape));
|
|
25
|
+
--private-button-container-shape-end-end: var(--button-container-shape-end-end, var(--button-container-shape));
|
|
26
|
+
--private-button-container-shape-variant: var(--button-container-shape-variant);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
/*
|
|
@@ -38,181 +37,99 @@ slot::slotted(*) {
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
.button {
|
|
41
|
-
position: relative;
|
|
42
40
|
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
41
|
align-items: center;
|
|
45
42
|
justify-content: center;
|
|
46
43
|
height: var(--button-height);
|
|
47
44
|
padding: 0 var(--button-container-padding, var(--private-button-container-padding));
|
|
48
45
|
width: 100%;
|
|
49
|
-
|
|
50
|
-
cursor: pointer;
|
|
46
|
+
z-index: 0;
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
--private-button-container-shape-start-end: var(--button-container-shape-start-end, var(--button-container-shape));
|
|
54
|
-
--private-button-container-shape-end-start: var(--button-container-shape-end-start, var(--button-container-shape));
|
|
55
|
-
--private-button-container-shape-end-end: var(--button-container-shape-end-end, var(--button-container-shape));
|
|
56
|
-
--private-button-container-shape-variant: var(--button-container-shape-variant);
|
|
48
|
+
cursor: pointer;
|
|
57
49
|
|
|
58
50
|
|
|
59
|
-
.button-content {
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
gap: var(--private-button-icon-label-spacing);
|
|
65
|
-
width: 100%;
|
|
66
|
-
height: 100%;
|
|
67
|
-
z-index: 0;
|
|
68
51
|
|
|
52
|
+
.label {
|
|
53
|
+
font-family: var(--font-family-sans) !important;
|
|
54
|
+
font-size: var(--private-button-font-size);
|
|
55
|
+
font-weight: var(--private-button-font-weight);
|
|
56
|
+
line-height: var(--private-button-line-height);
|
|
57
|
+
letter-spacing: var(--private-button-letter-spacing);
|
|
69
58
|
color: var(--private-button-label-text-color);
|
|
70
|
-
|
|
59
|
+
|
|
71
60
|
--icon-size: var(--button-icon-size, var(--private-button-icon-size));
|
|
72
61
|
--icon-color: var(--private-button-label-text-color);
|
|
73
62
|
|
|
74
|
-
|
|
75
|
-
display: none;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.disabled {
|
|
81
|
-
cursor: not-allowed;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/*
|
|
85
|
-
Background layers
|
|
86
|
-
*/
|
|
87
|
-
.focus-ring {
|
|
88
|
-
z-index: 2;
|
|
89
|
-
|
|
90
|
-
@include mixin.copy-container-shape(private-button, focus-ring);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.ripple {
|
|
94
|
-
@include mixin.apply-container-shape(private-button);
|
|
95
|
-
|
|
96
|
-
--ripple-state-opacity: var(--private-button-state-opacity, 0);
|
|
97
|
-
--ripple-pressed-color: var(--private-button-state-color);
|
|
63
|
+
pointer-events: none;
|
|
98
64
|
}
|
|
99
65
|
|
|
100
|
-
.
|
|
101
|
-
display: block;
|
|
66
|
+
.touch {
|
|
102
67
|
position: absolute;
|
|
103
|
-
|
|
104
|
-
width: 100%;
|
|
68
|
+
min-height: 2.5rem;
|
|
105
69
|
height: 100%;
|
|
106
|
-
background-color: var(--private-button-container-color);
|
|
107
|
-
opacity: var(--private-button-container-opacity, 1);
|
|
108
|
-
@include mixin.apply-container-shape(private-button);
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.skeleton {
|
|
113
|
-
display: none;
|
|
114
70
|
width: 100%;
|
|
115
|
-
|
|
116
|
-
z-index: 2;
|
|
117
|
-
position: absolute;
|
|
118
|
-
top: 0;
|
|
71
|
+
top: auto;
|
|
119
72
|
left: 0;
|
|
120
|
-
|
|
121
|
-
@include mixin.copy-container-shape(private-button, skeleton);
|
|
122
73
|
}
|
|
123
74
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.neo-background {
|
|
132
|
-
display: none;
|
|
133
|
-
position: absolute;
|
|
134
|
-
background: var(--color-inverse-surface);
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 100%;
|
|
75
|
+
/* make the icon slot itself collapsible so removal animates smoothly */
|
|
76
|
+
.icon-slot {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
overflow: hidden;
|
|
137
80
|
pointer-events: none;
|
|
138
|
-
transform: translateX(0.25rem) translateY(0.25rem);
|
|
139
|
-
|
|
140
|
-
@include mixin.apply-container-shape(private-button);
|
|
141
81
|
}
|
|
142
82
|
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
left: 0;
|
|
148
|
-
width: 100%;
|
|
149
|
-
height: 100%;
|
|
150
|
-
pointer-events: none;
|
|
151
|
-
border: var(--private-button-outline-width) solid var(--private-button-outline-color);
|
|
152
|
-
opacity: var(--private-button-outline-opacity, 1);
|
|
153
|
-
@include mixin.apply-container-shape(private-button);
|
|
83
|
+
.icon-slot::slotted(*) {
|
|
84
|
+
--icon-size: var(--button-icon-size, var(--private-button-icon-size));
|
|
85
|
+
--icon-color: var(--private-button-label-text-color);
|
|
86
|
+
opacity: var(--private-button-label-text-opacity, 1);
|
|
154
87
|
}
|
|
155
88
|
|
|
89
|
+
}
|
|
156
90
|
|
|
157
|
-
&.has-content {
|
|
158
|
-
.slot-container {
|
|
159
|
-
display: flex;
|
|
160
|
-
flex: none;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&.show-skeleton {
|
|
166
|
-
.background {
|
|
167
|
-
display: none;
|
|
168
|
-
}
|
|
169
|
-
.neo-background {
|
|
170
|
-
display: none;
|
|
171
|
-
&:before {
|
|
172
|
-
display: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
.ripple {
|
|
176
|
-
display: none;
|
|
177
|
-
}
|
|
178
|
-
.skeleton {
|
|
179
|
-
display: block;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
91
|
|
|
183
|
-
|
|
184
|
-
|
|
92
|
+
:host([disabled]) , :host([soft-disabled]) {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
}
|
|
185
95
|
|
|
96
|
+
:host(:not([skeleton])) {
|
|
97
|
+
.skeleton {
|
|
98
|
+
display: none;
|
|
186
99
|
}
|
|
100
|
+
}
|
|
187
101
|
|
|
188
|
-
|
|
189
|
-
|
|
102
|
+
:host([skeleton]) {
|
|
103
|
+
.background {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
.ripple {
|
|
107
|
+
display: none;
|
|
190
108
|
}
|
|
191
|
-
|
|
192
109
|
}
|
|
193
110
|
|
|
111
|
+
|
|
194
112
|
/**
|
|
195
113
|
* Button variant definitions
|
|
196
114
|
*/
|
|
197
|
-
|
|
198
|
-
.button.variant-elevated {
|
|
115
|
+
:host([variant=elevated]) {
|
|
199
116
|
--private-button-container-color: var(--elevated-button-container-color);
|
|
200
117
|
--private-button-label-text-color: var(--elevated-button-label-text-color);
|
|
201
118
|
--private-button-container-elevation-level: 1;
|
|
202
119
|
|
|
203
120
|
--private-button-state-color: var(--private-button-label-text-color);
|
|
204
121
|
|
|
205
|
-
&:hover:not(
|
|
122
|
+
&:host(:hover:not([disabled], [soft-disabled], [skeleton])) {
|
|
206
123
|
--private-button-container-elevation-level: 2;
|
|
207
124
|
--private-button-state-opacity: 0.08;
|
|
208
125
|
}
|
|
209
126
|
|
|
210
|
-
|
|
127
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
211
128
|
--private-button-container-elevation-level: 1;
|
|
212
129
|
--private-button-state-opacity: 0.12;
|
|
213
130
|
}
|
|
214
131
|
|
|
215
|
-
|
|
132
|
+
&:host([disabled]) {
|
|
216
133
|
--private-button-container-color: var(--color-on-surface);
|
|
217
134
|
--private-button-container-opacity: 0.1;
|
|
218
135
|
--private-button-label-text-color: var(--color-on-surface);
|
|
@@ -225,23 +142,23 @@ slot::slotted(*) {
|
|
|
225
142
|
}
|
|
226
143
|
|
|
227
144
|
|
|
228
|
-
|
|
145
|
+
:host([variant=filled]) {
|
|
229
146
|
--private-button-container-color: var(--filled-button-container-color);
|
|
230
147
|
--private-button-label-text-color: var(--filled-button-label-text-color);
|
|
231
148
|
--private-button-state-color: var(--private-button-label-text-color);
|
|
232
149
|
|
|
233
150
|
|
|
234
|
-
&:hover:not(
|
|
151
|
+
&:host(:hover:not([disabled], [soft-disabled], [skeleton])) {
|
|
235
152
|
--private-button-container-elevation-level: 1;
|
|
236
153
|
--private-button-state-opacity: 0.08;
|
|
237
154
|
}
|
|
238
155
|
|
|
239
|
-
|
|
156
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
240
157
|
--private-button-container-elevation-level: 0;
|
|
241
158
|
--private-button-state-opacity: 0.1;
|
|
242
159
|
}
|
|
243
160
|
|
|
244
|
-
|
|
161
|
+
&:host([disabled]) {
|
|
245
162
|
--private-button-container-color: var(--color-on-surface);
|
|
246
163
|
--private-button-container-opacity: 0.1;
|
|
247
164
|
--private-button-label-text-color: var(--color-on-surface);
|
|
@@ -253,24 +170,23 @@ slot::slotted(*) {
|
|
|
253
170
|
}
|
|
254
171
|
}
|
|
255
172
|
|
|
256
|
-
|
|
257
|
-
.button.variant-tonal {
|
|
173
|
+
:host([variant=tonal]) {
|
|
258
174
|
--private-button-container-color: var(--tonal-button-container-color);
|
|
259
175
|
--private-button-label-text-color: var(--tonal-button-label-text-color);
|
|
260
176
|
|
|
261
177
|
--private-button-state-color: var(--private-button-label-text-color);
|
|
262
178
|
|
|
263
|
-
&:hover:not(
|
|
179
|
+
&:host(:hover:not([disabled], [soft-disabled], [skeleton])) {
|
|
264
180
|
--private-button-container-elevation-level: 1;
|
|
265
181
|
--private-button-state-opacity: 0.08;
|
|
266
182
|
}
|
|
267
183
|
|
|
268
|
-
|
|
184
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
269
185
|
--private-button-container-elevation-level: 0;
|
|
270
186
|
--private-button-state-opacity: 0.12;
|
|
271
187
|
}
|
|
272
188
|
|
|
273
|
-
|
|
189
|
+
&:host([disabled]) {
|
|
274
190
|
--private-button-container-color: var(--color-on-surface);
|
|
275
191
|
--private-button-container-opacity: 0.1;
|
|
276
192
|
--private-button-label-text-color: var(--color-on-surface);
|
|
@@ -282,27 +198,22 @@ slot::slotted(*) {
|
|
|
282
198
|
}
|
|
283
199
|
}
|
|
284
200
|
|
|
285
|
-
|
|
286
|
-
.button.variant-outlined {
|
|
201
|
+
:host([variant=outlined]) {
|
|
287
202
|
--private-button-outline-width: var(--outlined-button-outline-width, 0.0675rem);
|
|
288
203
|
--private-button-outline-color: var(--outlined-button-outline-color);
|
|
289
204
|
--private-button-label-text-color: var(--outlined-button-label-text-color);
|
|
290
205
|
|
|
291
206
|
--private-button-state-color: var(--private-button-label-text-color);
|
|
292
207
|
|
|
293
|
-
|
|
294
|
-
display: block;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
&:hover:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
208
|
+
&:host(:hover:not([disabled], [soft-disabled], [skeleton])) {
|
|
298
209
|
--private-button-state-opacity: 0.08;
|
|
299
210
|
}
|
|
300
211
|
|
|
301
|
-
|
|
212
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
302
213
|
--private-button-state-opacity: 0.12;
|
|
303
214
|
}
|
|
304
215
|
|
|
305
|
-
|
|
216
|
+
&:host([disabled]) {
|
|
306
217
|
--private-button-outline-color: var(--color-on-surface);
|
|
307
218
|
--private-button-label-text-color: var(--color-on-surface);
|
|
308
219
|
--private-button-label-text-opacity: 0.38;
|
|
@@ -314,21 +225,20 @@ slot::slotted(*) {
|
|
|
314
225
|
}
|
|
315
226
|
}
|
|
316
227
|
|
|
317
|
-
|
|
318
|
-
.button.variant-text {
|
|
228
|
+
:host([variant=text]) {
|
|
319
229
|
|
|
320
230
|
--private-button-label-text-color: var(--text-button-label-text-color);
|
|
321
231
|
--private-button-state-color: var(--private-button-label-text-color);
|
|
322
232
|
|
|
323
|
-
&:hover:not(
|
|
233
|
+
&:host(:hover:not([disabled], [soft-disabled], [skeleton])) {
|
|
324
234
|
--private-button-state-opacity: 0.08;
|
|
325
235
|
}
|
|
326
236
|
|
|
327
|
-
|
|
237
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
328
238
|
--private-button-state-opacity: 0.12;
|
|
329
239
|
}
|
|
330
240
|
|
|
331
|
-
|
|
241
|
+
&:host([disabled]) {
|
|
332
242
|
--private-button-label-text-color: var(--color-on-surface);
|
|
333
243
|
--private-button-label-text-opacity: 0.38;
|
|
334
244
|
|
|
@@ -338,7 +248,7 @@ slot::slotted(*) {
|
|
|
338
248
|
}
|
|
339
249
|
}
|
|
340
250
|
|
|
341
|
-
|
|
251
|
+
:host([variant=neo]) {
|
|
342
252
|
|
|
343
253
|
--private-button-container-color: var(--neo-button-container-color);
|
|
344
254
|
--private-button-label-text-color: var(--neo-button-label-text-color);
|
|
@@ -346,14 +256,6 @@ slot::slotted(*) {
|
|
|
346
256
|
--private-button-outline-width: var(--outlined-button-outline-width, 0.125rem);
|
|
347
257
|
--private-button-outline-color: var(--color-inverse-surface);
|
|
348
258
|
|
|
349
|
-
.outline {
|
|
350
|
-
display: block;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.neo-background {
|
|
354
|
-
display: block;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
259
|
.focus-ring {
|
|
358
260
|
--focus-ring-color: var(--color-primary-container);
|
|
359
261
|
--focus-ring-inset: -2px;
|
|
@@ -363,13 +265,13 @@ slot::slotted(*) {
|
|
|
363
265
|
display: none;
|
|
364
266
|
}
|
|
365
267
|
|
|
366
|
-
|
|
367
|
-
.background, .button
|
|
268
|
+
&:host([pressed]:not([disabled], [soft-disabled], [skeleton])) {
|
|
269
|
+
.background, .button, .outline, .focus-ring {
|
|
368
270
|
transform: translateX(0.25rem) translateY(0.25rem);
|
|
369
271
|
}
|
|
370
272
|
}
|
|
371
273
|
|
|
372
|
-
|
|
274
|
+
&:host([disabled]) {
|
|
373
275
|
--private-button-container-color: var(--color-on-surface);
|
|
374
276
|
--private-button-container-opacity: 0.1;
|
|
375
277
|
--private-button-label-text-color: var(--color-on-surface);
|