@redvars/peacock 3.4.0 → 3.5.1
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/BaseButton-DuASuVth.js +219 -0
- package/dist/BaseButton-DuASuVth.js.map +1 -0
- package/dist/BaseHyperlinkMixin-BNuwbiEf.js +65 -0
- package/dist/BaseHyperlinkMixin-BNuwbiEf.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/banner.js +187 -0
- package/dist/banner.js.map +1 -0
- package/dist/bottom-sheet.js +2 -2
- package/dist/{button-COYCtuA8.js → button-DouvOfEU.js} +92 -283
- package/dist/button-DouvOfEU.js.map +1 -0
- package/dist/{button-group-DsXquZQn.js → button-group-CEdMwvJJ.js} +72 -48
- package/dist/button-group-CEdMwvJJ.js.map +1 -0
- package/dist/button-group.js +8 -5
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +7 -4
- package/dist/button.js.map +1 -1
- package/dist/card.js +29 -74
- package/dist/card.js.map +1 -1
- package/dist/chart-bar.js +2 -2
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js +2 -2
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js +2 -2
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js +2 -2
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/{class-map-3TAnCMAX.js → class-map-YU7g0o3B.js} +2 -2
- package/dist/{class-map-3TAnCMAX.js.map → class-map-YU7g0o3B.js.map} +1 -1
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +4 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +5 -4
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +6627 -3477
- package/dist/custom-elements.json +10954 -7810
- 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.js +423 -0
- package/dist/fab.js.map +1 -0
- package/dist/index.js +17 -9
- package/dist/index.js.map +1 -1
- package/dist/{observe-theme-change-DKAIv5BB.js → is-dark-mode-DicqGkCJ.js} +6 -2
- package/dist/is-dark-mode-DicqGkCJ.js.map +1 -0
- package/dist/{select-C3XAzenC.js → navigation-rail-Lxetd5-Z.js} +2426 -898
- package/dist/navigation-rail-Lxetd5-Z.js.map +1 -0
- package/dist/notification.js +418 -0
- package/dist/notification.js.map +1 -0
- package/dist/number-counter.js +2 -2
- 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 +48 -13
- package/dist/peacock-loader.js.map +1 -1
- package/dist/search.js +456 -0
- package/dist/search.js.map +1 -0
- package/dist/side-sheet.js +2 -2
- package/dist/src/__mixins/BaseButtonMixin.d.ts +20 -0
- package/dist/src/__mixins/BaseHyperlinkMixin.d.ts +18 -0
- package/dist/src/__mixins/MixinConstructor.d.ts +1 -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 +43 -0
- package/dist/src/banner/index.d.ts +1 -0
- package/dist/src/button/BaseButton.d.ts +7 -57
- package/dist/src/button/button/button.d.ts +32 -3
- package/dist/src/button/button-group/button-group.d.ts +4 -4
- package/dist/src/button/icon-button/icon-button.d.ts +33 -8
- package/dist/src/card/card.d.ts +4 -15
- package/dist/src/empty-state/empty-state.d.ts +1 -1
- package/dist/src/fab/fab.d.ts +80 -0
- package/dist/src/fab/index.d.ts +1 -0
- package/dist/src/focus-ring/focus-ring.d.ts +11 -5
- package/dist/src/index.d.ts +8 -1
- package/dist/src/link/link.d.ts +3 -10
- package/dist/src/menu/menu/menu.d.ts +3 -2
- package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
- package/dist/src/navigation-rail/index.d.ts +2 -0
- package/dist/src/navigation-rail/navigation-rail-item.d.ts +55 -0
- package/dist/src/navigation-rail/navigation-rail.d.ts +71 -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/search/index.d.ts +1 -0
- package/dist/src/search/search.d.ts +76 -0
- package/dist/src/select/select.d.ts +3 -5
- package/dist/src/sidebar-menu/index.d.ts +3 -0
- package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +58 -0
- package/dist/src/sidebar-menu/sidebar-menu.d.ts +38 -0
- package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +35 -0
- package/dist/src/slider/slider.d.ts +4 -0
- package/dist/src/snackbar/snackbar.d.ts +14 -1
- package/dist/src/toolbar/index.d.ts +1 -0
- package/dist/src/toolbar/toolbar.d.ts +86 -0
- package/dist/src/tooltip/tooltip.d.ts +3 -0
- package/dist/src/url-field/index.d.ts +1 -0
- package/dist/src/url-field/url-field.d.ts +48 -0
- package/dist/{style-map-CRFEoCEg.js → style-map-DVmWOuYy.js} +2 -2
- package/dist/{style-map-CRFEoCEg.js.map → style-map-DVmWOuYy.js.map} +1 -1
- package/dist/test/banner.test.d.ts +1 -0
- package/dist/test/search.test.d.ts +1 -0
- package/dist/test/sidebar-menu.test.d.ts +1 -0
- package/dist/test/toolbar.test.d.ts +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-D3GHRaGQ.js → unsafe-html-BsGUjx94.js} +2 -2
- package/dist/{unsafe-html-D3GHRaGQ.js.map → unsafe-html-BsGUjx94.js.map} +1 -1
- package/package.json +1 -1
- package/readme.md +73 -65
- package/scss/mixin.scss +16 -0
- package/scss/styles.scss +4 -0
- package/src/__mixins/BaseButtonMixin.ts +83 -0
- package/src/__mixins/BaseHyperlinkMixin.ts +68 -0
- package/src/__mixins/MixinConstructor.ts +1 -0
- package/src/__mixins/README.md +19 -0
- package/src/__utils/cache-fetch.ts +65 -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 +83 -0
- package/src/banner/banner.ts +101 -0
- package/src/banner/index.ts +1 -0
- package/src/button/BaseButton.ts +13 -115
- package/src/button/button/button-colors.scss +14 -14
- package/src/button/button/button-sizes.scss +4 -2
- package/src/button/button/button.ts +80 -26
- package/src/button/button-group/button-group.ts +5 -5
- package/src/button/icon-button/icon-button.ts +79 -44
- package/src/card/card.ts +50 -100
- package/src/chart-bar/chart-bar.ts +10 -15
- package/src/chart-bar/chart-stacked-bar.ts +15 -19
- package/src/chart-doughnut/chart-doughnut.ts +24 -28
- package/src/chart-pie/chart-pie.ts +20 -24
- package/src/checkbox/checkbox.scss +17 -34
- package/src/checkbox/checkbox.ts +4 -2
- package/src/clock/clock.ts +1 -1
- package/src/code-editor/code-editor.ts +4 -4
- package/src/code-highlighter/code-highlighter.scss +1 -0
- package/src/code-highlighter/code-highlighter.ts +3 -3
- package/src/date-picker/date-picker.ts +6 -3
- package/src/divider/divider.ts +3 -1
- package/src/elevation/elevation.scss +5 -5
- package/src/empty-state/empty-state.scss +7 -9
- package/src/empty-state/empty-state.ts +1 -1
- 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 +214 -0
- package/src/fab/index.ts +1 -0
- package/src/field/field.ts +3 -1
- package/src/focus-ring/focus-ring.ts +47 -40
- 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 +8 -1
- package/src/input/input.ts +8 -3
- package/src/link/link.ts +2 -15
- package/src/menu/menu/menu.scss +7 -0
- package/src/menu/menu/menu.ts +7 -4
- package/src/menu/menu-item/menu-item.ts +3 -1
- package/src/menu/sub-menu/sub-menu.ts +1 -0
- package/src/navigation-rail/index.ts +2 -0
- package/src/navigation-rail/navigation-rail-item.scss +216 -0
- package/src/navigation-rail/navigation-rail-item.ts +223 -0
- package/src/navigation-rail/navigation-rail.scss +72 -0
- package/src/navigation-rail/navigation-rail.ts +149 -0
- package/src/notification/index.ts +1 -0
- package/src/notification/notification.scss +201 -0
- package/src/notification/notification.ts +207 -0
- package/src/number-counter/number-counter.ts +3 -1
- package/src/number-field/number-field.ts +10 -6
- package/src/pagination/pagination.scss +33 -24
- package/src/pagination/pagination.ts +115 -60
- package/src/peacock-loader.ts +42 -5
- package/src/radio/radio.ts +3 -1
- 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 +244 -0
- package/src/select/option.ts +1 -1
- package/src/select/select.scss +5 -0
- package/src/select/select.ts +71 -37
- package/src/sidebar-menu/demo/index.html +68 -0
- package/src/sidebar-menu/index.ts +3 -0
- package/src/sidebar-menu/sidebar-menu-item.scss +102 -0
- package/src/sidebar-menu/sidebar-menu-item.ts +151 -0
- package/src/{tree-view/tree-view.scss → sidebar-menu/sidebar-menu.scss} +1 -1
- package/src/sidebar-menu/sidebar-menu.ts +182 -0
- package/src/sidebar-menu/sidebar-sub-menu.scss +130 -0
- package/src/sidebar-menu/sidebar-sub-menu.ts +160 -0
- package/src/skeleton/skeleton.scss +18 -24
- package/src/slider/slider.scss +19 -0
- package/src/slider/slider.ts +30 -19
- package/src/snackbar/snackbar.scss +62 -31
- package/src/snackbar/snackbar.ts +91 -11
- package/src/switch/switch.ts +3 -1
- package/src/table/table.ts +3 -1
- package/src/tabs/tab.ts +10 -6
- package/src/text/text.css-component.scss +7 -1
- package/src/textarea/textarea.ts +4 -2
- package/src/time-picker/time-picker.ts +5 -3
- 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/src/tooltip/tooltip.ts +24 -0
- package/src/url-field/index.ts +1 -0
- package/src/url-field/url-field.scss +50 -0
- package/src/url-field/url-field.ts +239 -0
- package/dist/button-COYCtuA8.js.map +0 -1
- package/dist/button-group-DsXquZQn.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-DKAIv5BB.js.map +0 -1
- package/dist/select-C3XAzenC.js.map +0 -1
- package/dist/src/styleMixins.css.d.ts +0 -9
- package/dist/src/tree-view/index.d.ts +0 -2
- package/dist/src/tree-view/tree-node.d.ts +0 -69
- package/dist/src/tree-view/tree-view.d.ts +0 -40
- package/dist/src/tree-view/wc-tree-view.d.ts +0 -6
- package/dist/src/utils.d.ts +0 -9
- package/dist/test/tree-view.test.d.ts +0 -1
- package/src/styleMixins.css.ts +0 -55
- package/src/tree-view/demo/index.html +0 -57
- package/src/tree-view/index.ts +0 -2
- package/src/tree-view/tree-node.scss +0 -101
- package/src/tree-view/tree-node.ts +0 -268
- package/src/tree-view/tree-view.ts +0 -182
- package/src/tree-view/wc-tree-view.ts +0 -9
- 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/src/{spread.ts → __directive/spread.ts} +0 -0
- /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
- /package/src/{utils → __utils}/dispatch-event-utils.ts +0 -0
- /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
@include mixin.base-styles;
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: block;
|
|
7
|
+
--toolbar-container-shape: var(--shape-corner-full);
|
|
8
|
+
--toolbar-docked-container-shape: var(--shape-corner-extra-large) var(--shape-corner-extra-large) var(--shape-corner-none) var(--shape-corner-none);
|
|
9
|
+
--toolbar-height: 5rem; /* 80dp - small/default docked */
|
|
10
|
+
--toolbar-padding-inline: 0.75rem;
|
|
11
|
+
--toolbar-gap: 0.5rem;
|
|
12
|
+
--toolbar-shadow: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* ---- Shared toolbar base ---- */
|
|
16
|
+
|
|
17
|
+
.toolbar {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--toolbar-gap);
|
|
22
|
+
padding-inline: var(--toolbar-padding-inline);
|
|
23
|
+
min-height: var(--toolbar-height);
|
|
24
|
+
width: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
color: var(--_toolbar-title-color);
|
|
27
|
+
--icon-color: var(--_toolbar-icon-color);
|
|
28
|
+
box-shadow: var(--toolbar-shadow);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.toolbar-content {
|
|
32
|
+
position: relative;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.background {
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
background-color: var(--_toolbar-container-color);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
z-index: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ---- Docked variant ---- */
|
|
48
|
+
|
|
49
|
+
.toolbar.variant-docked {
|
|
50
|
+
width: 100%;
|
|
51
|
+
padding-inline: var(--toolbar-padding-inline);
|
|
52
|
+
padding-block-start: 0.5rem;
|
|
53
|
+
padding-block-end: calc(0.5rem + env(safe-area-inset-bottom, 0px));
|
|
54
|
+
|
|
55
|
+
.background {
|
|
56
|
+
border-radius: var(--toolbar-docked-container-shape);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.toolbar-content {
|
|
60
|
+
width: 100%;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
gap: var(--toolbar-gap);
|
|
63
|
+
overflow-x: auto;
|
|
64
|
+
overflow-y: hidden;
|
|
65
|
+
scrollbar-width: none;
|
|
66
|
+
|
|
67
|
+
&::-webkit-scrollbar {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
::slotted(*) {
|
|
73
|
+
position: relative;
|
|
74
|
+
z-index: 1;
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
::slotted(wc-icon-button) {
|
|
79
|
+
--button-container-shape: var(--shape-corner-full);
|
|
80
|
+
--button-container-shape-variant: round;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Size variants */
|
|
84
|
+
&.size-small {
|
|
85
|
+
--toolbar-height: 5rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.size-medium {
|
|
89
|
+
--toolbar-height: 6rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.size-large {
|
|
93
|
+
--toolbar-height: 7rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.elevated {
|
|
97
|
+
--toolbar-shadow: var(--elevation-shadow-level-3, 0 4px 8px rgba(0, 0, 0, 0.15));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ---- Floating variant ---- */
|
|
102
|
+
|
|
103
|
+
.toolbar.variant-floating {
|
|
104
|
+
--toolbar-container-shape: var(--shape-corner-full);
|
|
105
|
+
|
|
106
|
+
border-radius: var(--toolbar-container-shape);
|
|
107
|
+
width: auto;
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
padding: 0.75rem;
|
|
110
|
+
gap: 0.5rem;
|
|
111
|
+
|
|
112
|
+
.elevation {
|
|
113
|
+
--elevation-level: 3;
|
|
114
|
+
--elevation-container-shape: var(--toolbar-container-shape);
|
|
115
|
+
--elevation-container-shape-variant: round;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.background {
|
|
119
|
+
border-radius: var(--toolbar-container-shape);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.toolbar-content {
|
|
123
|
+
width: auto;
|
|
124
|
+
gap: 0.5rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
::slotted(*) {
|
|
128
|
+
position: relative;
|
|
129
|
+
z-index: 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
::slotted(wc-icon-button) {
|
|
133
|
+
--button-container-shape: var(--shape-corner-full);
|
|
134
|
+
--button-container-shape-variant: round;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.orientation-horizontal {
|
|
138
|
+
min-height: auto;
|
|
139
|
+
padding-block: 0.5rem;
|
|
140
|
+
padding-inline: 0.75rem;
|
|
141
|
+
|
|
142
|
+
.toolbar-content {
|
|
143
|
+
flex-direction: row;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.orientation-vertical {
|
|
149
|
+
min-height: auto;
|
|
150
|
+
width: auto;
|
|
151
|
+
padding-block: 0.75rem;
|
|
152
|
+
padding-inline: 0.5rem;
|
|
153
|
+
|
|
154
|
+
.toolbar-content {
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
align-items: center;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.elevated {
|
|
161
|
+
.elevation {
|
|
162
|
+
--elevation-level: 4;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { LitElement, html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
|
+
import styles from './toolbar.scss';
|
|
6
|
+
import colorStyles from './toolbar-colors.scss';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @label Toolbar
|
|
10
|
+
* @tag wc-toolbar
|
|
11
|
+
* @rawTag toolbar
|
|
12
|
+
*
|
|
13
|
+
* @summary A Material 3 toolbar / app bar for navigation and actions.
|
|
14
|
+
* @overview
|
|
15
|
+
* <p>The toolbar component implements the Material 3 app bar pattern. It supports a
|
|
16
|
+
* docked (attached) variant for bottom-panel navigation and a floating (detached pill-shaped)
|
|
17
|
+
* variant. The floating variant supports both horizontal and vertical orientations.</p>
|
|
18
|
+
*
|
|
19
|
+
* <p>Render toolbar actions directly as children of the component. The docked variant is
|
|
20
|
+
* optimized for a horizontal action row, while the floating variant supports both horizontal
|
|
21
|
+
* and vertical layouts.</p>
|
|
22
|
+
*
|
|
23
|
+
* @cssprop --toolbar-container-color - Background color of the toolbar.
|
|
24
|
+
* @cssprop --toolbar-container-shape - Border radius of the toolbar. Relevant for the floating variant.
|
|
25
|
+
* @cssprop --toolbar-height - Height of the toolbar (docked horizontal / floating horizontal).
|
|
26
|
+
* @cssprop --toolbar-padding-inline - Inline padding of the toolbar.
|
|
27
|
+
* @cssprop --toolbar-gap - Gap between toolbar sections.
|
|
28
|
+
* @cssprop --toolbar-icon-color - Color of icon slots.
|
|
29
|
+
* @cssprop --toolbar-title-color - Color of the title (default slot) text.
|
|
30
|
+
* @cssprop --toolbar-shadow - Box-shadow of the toolbar.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```html
|
|
34
|
+
* <!-- Docked toolbar -->
|
|
35
|
+
* <wc-toolbar>
|
|
36
|
+
* <wc-icon-button variant="text"><wc-icon name="home"></wc-icon></wc-icon-button>
|
|
37
|
+
* <wc-icon-button variant="tonal"><wc-icon name="search"></wc-icon></wc-icon-button>
|
|
38
|
+
* <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
|
|
39
|
+
* <wc-icon-button variant="text"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
|
|
40
|
+
* </wc-toolbar>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```html
|
|
45
|
+
* <!-- Floating horizontal toolbar -->
|
|
46
|
+
* <wc-toolbar variant="floating" orientation="horizontal">
|
|
47
|
+
* <wc-icon-button variant="tonal"><wc-icon name="home"></wc-icon></wc-icon-button>
|
|
48
|
+
* <wc-icon-button variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
|
|
49
|
+
* <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
|
|
50
|
+
* </wc-toolbar>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```html
|
|
55
|
+
* <!-- Floating vertical toolbar -->
|
|
56
|
+
* <wc-toolbar variant="floating" orientation="vertical">
|
|
57
|
+
* <wc-icon-button variant="tonal"><wc-icon name="home"></wc-icon></wc-icon-button>
|
|
58
|
+
* <wc-icon-button variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
|
|
59
|
+
* <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
|
|
60
|
+
* </wc-toolbar>
|
|
61
|
+
* ```
|
|
62
|
+
* @tags display navigation
|
|
63
|
+
*/
|
|
64
|
+
@IndividualComponent
|
|
65
|
+
export class Toolbar extends LitElement {
|
|
66
|
+
static styles = [styles, colorStyles];
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Visual and layout variant of the toolbar.
|
|
70
|
+
* - `"docked"`: A full-width bar attached to the edge of the screen (default).
|
|
71
|
+
* - `"floating"`: A detached pill-shaped toolbar that floats over content.
|
|
72
|
+
*/
|
|
73
|
+
@property({ type: String, reflect: true })
|
|
74
|
+
variant: 'docked' | 'floating' = 'docked';
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Orientation of the toolbar content.
|
|
78
|
+
* - `"horizontal"`: Items are laid out left to right (default).
|
|
79
|
+
* - `"vertical"`: Items are stacked top to bottom. Primarily useful for the floating variant.
|
|
80
|
+
*/
|
|
81
|
+
@property({ type: String, reflect: true })
|
|
82
|
+
orientation: 'horizontal' | 'vertical' = 'horizontal';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Size of the docked toolbar.
|
|
86
|
+
* - `"small"`: 80dp height (default).
|
|
87
|
+
* - `"medium"`: 96dp height.
|
|
88
|
+
* - `"large"`: 112dp height.
|
|
89
|
+
*/
|
|
90
|
+
@property({ type: String, reflect: true })
|
|
91
|
+
size: 'small' | 'medium' | 'large' = 'small';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Whether the toolbar is visually elevated (adds a shadow).
|
|
95
|
+
*/
|
|
96
|
+
@property({ type: Boolean, reflect: true })
|
|
97
|
+
elevated: boolean = false;
|
|
98
|
+
|
|
99
|
+
override render() {
|
|
100
|
+
const cssClasses = {
|
|
101
|
+
toolbar: true,
|
|
102
|
+
[`variant-${this.variant}`]: true,
|
|
103
|
+
[`orientation-${this.orientation}`]: true,
|
|
104
|
+
[`size-${this.size}`]: true,
|
|
105
|
+
elevated: this.elevated,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
if (this.variant === 'floating') {
|
|
109
|
+
return Toolbar.__renderFloating(cssClasses);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return Toolbar.__renderDocked(cssClasses);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private static __renderDocked(cssClasses: Record<string, boolean>) {
|
|
116
|
+
return html`
|
|
117
|
+
<div class=${classMap(cssClasses)} role="toolbar">
|
|
118
|
+
<div class="background"></div>
|
|
119
|
+
<div class="toolbar-content">
|
|
120
|
+
<slot></slot>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private static __renderFloating(cssClasses: Record<string, boolean>) {
|
|
127
|
+
return html`
|
|
128
|
+
<div class=${classMap(cssClasses)} role="toolbar">
|
|
129
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
130
|
+
<div class="background"></div>
|
|
131
|
+
<div class="toolbar-content">
|
|
132
|
+
<slot></slot>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
`;
|
|
136
|
+
}
|
|
137
|
+
}
|
package/src/tooltip/tooltip.ts
CHANGED
|
@@ -133,6 +133,30 @@ export class Tooltip extends LitElement {
|
|
|
133
133
|
this._target = null;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
_focusTarget?: HTMLElement;
|
|
137
|
+
|
|
138
|
+
set forElement(value: HTMLElement | null) {
|
|
139
|
+
if (value) {
|
|
140
|
+
this._focusTarget = value;
|
|
141
|
+
} else {
|
|
142
|
+
this._focusTarget = undefined;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
__getFocusTarget(): HTMLElement | null {
|
|
147
|
+
|
|
148
|
+
if (this._focusTarget) {
|
|
149
|
+
return this._focusTarget;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const focusTarget = document.getElementById(this.for);
|
|
153
|
+
if (focusTarget) {
|
|
154
|
+
return focusTarget
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return this.parentElement;
|
|
158
|
+
}
|
|
159
|
+
|
|
136
160
|
private attachListeners() {
|
|
137
161
|
this.detachListeners(); // Cleanup old target if it exists
|
|
138
162
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UrlField } from './url-field.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
@include mixin.base-styles;
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: block;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.url-input {
|
|
11
|
+
flex: 1;
|
|
12
|
+
width: 100%;
|
|
13
|
+
border: none;
|
|
14
|
+
outline: none;
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
background: none;
|
|
18
|
+
cursor: inherit;
|
|
19
|
+
font: inherit;
|
|
20
|
+
color: inherit;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.url-display {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.url-link {
|
|
31
|
+
flex: 1;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
color: var(--color-primary);
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
text-decoration: underline;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.url-placeholder {
|
|
44
|
+
color: var(--color-on-surface-variant);
|
|
45
|
+
opacity: 0.6;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.edit-button {
|
|
49
|
+
--button-container-shape: var(--shape-corner-full);
|
|
50
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
|
+
import { property, query, state } from 'lit/decorators.js';
|
|
3
|
+
|
|
4
|
+
import { redispatchEvent } from '@/__utils/dispatch-event-utils.js';
|
|
5
|
+
|
|
6
|
+
import BaseInput from '../input/BaseInput.js';
|
|
7
|
+
import styles from './url-field.scss';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @label URL Field
|
|
11
|
+
* @tag wc-url-field
|
|
12
|
+
* @rawTag url-field
|
|
13
|
+
*
|
|
14
|
+
* @summary A field for entering and displaying URLs with validation.
|
|
15
|
+
* @overview
|
|
16
|
+
* <p>URL Field wraps an input with URL validation, showing a clickable link preview when not in edit mode.</p>
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <wc-url-field label="Website" value="https://example.com"></wc-url-field>
|
|
21
|
+
* ```
|
|
22
|
+
* @tags form
|
|
23
|
+
*/
|
|
24
|
+
export class UrlField extends BaseInput {
|
|
25
|
+
static styles = [styles];
|
|
26
|
+
|
|
27
|
+
@property({ type: String })
|
|
28
|
+
value: string = '';
|
|
29
|
+
|
|
30
|
+
@property({ type: String })
|
|
31
|
+
name: string = '';
|
|
32
|
+
|
|
33
|
+
@property({ type: String })
|
|
34
|
+
placeholder: string = '';
|
|
35
|
+
|
|
36
|
+
@property({ type: String })
|
|
37
|
+
label: string = '';
|
|
38
|
+
|
|
39
|
+
@property({ type: Boolean, reflect: true })
|
|
40
|
+
editing: boolean = false;
|
|
41
|
+
|
|
42
|
+
@property({ type: Number })
|
|
43
|
+
debounce: number = 300;
|
|
44
|
+
|
|
45
|
+
@property({ type: String, reflect: true })
|
|
46
|
+
size: 'sm' | 'md' | 'lg' = 'md';
|
|
47
|
+
|
|
48
|
+
@property({ type: String })
|
|
49
|
+
variant: 'filled' | 'outlined' | 'default' = 'default';
|
|
50
|
+
|
|
51
|
+
@property({ type: String, attribute: 'helper-text' })
|
|
52
|
+
helperText: string = '';
|
|
53
|
+
|
|
54
|
+
@property({ type: Boolean })
|
|
55
|
+
error: boolean = false;
|
|
56
|
+
|
|
57
|
+
@property({ type: String, attribute: 'error-text' })
|
|
58
|
+
errorText: string = '';
|
|
59
|
+
|
|
60
|
+
@property({ type: Boolean })
|
|
61
|
+
warning: boolean = false;
|
|
62
|
+
|
|
63
|
+
@property({ type: String, attribute: 'warning-text' })
|
|
64
|
+
warningText: string = '';
|
|
65
|
+
|
|
66
|
+
@state()
|
|
67
|
+
private focused: boolean = false;
|
|
68
|
+
|
|
69
|
+
@state()
|
|
70
|
+
private isValid: boolean = true;
|
|
71
|
+
|
|
72
|
+
@query('.url-input')
|
|
73
|
+
private inputElement?: HTMLInputElement;
|
|
74
|
+
|
|
75
|
+
private debounceTimer?: ReturnType<typeof setTimeout>;
|
|
76
|
+
|
|
77
|
+
override disconnectedCallback(): void {
|
|
78
|
+
super.disconnectedCallback();
|
|
79
|
+
if (this.debounceTimer) {
|
|
80
|
+
clearTimeout(this.debounceTimer);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
override focus() {
|
|
85
|
+
if (!this.editing && !this.disabled && !this.readonly) {
|
|
86
|
+
this.startEditing();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.inputElement?.focus();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
override blur() {
|
|
93
|
+
this.inputElement?.blur();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private startEditing() {
|
|
97
|
+
if (this.disabled || this.readonly) return;
|
|
98
|
+
this.editing = true;
|
|
99
|
+
setTimeout(() => this.inputElement?.focus(), 80);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private closeEditing() {
|
|
103
|
+
this.isValid = this.validateUrl(this.value);
|
|
104
|
+
this.dispatchEvent(
|
|
105
|
+
new CustomEvent('input-invalid', {
|
|
106
|
+
detail: !this.isValid,
|
|
107
|
+
bubbles: true,
|
|
108
|
+
composed: true,
|
|
109
|
+
}),
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
if (this.isValid) {
|
|
113
|
+
this.editing = false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private validateUrl(url: string): boolean {
|
|
118
|
+
if (!url) return true;
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
new URL(url);
|
|
122
|
+
return true;
|
|
123
|
+
} catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private handleInput(event: InputEvent) {
|
|
129
|
+
this.value = (event.target as HTMLInputElement).value;
|
|
130
|
+
this.isValid = true;
|
|
131
|
+
|
|
132
|
+
if (this.debounceTimer) {
|
|
133
|
+
clearTimeout(this.debounceTimer);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
this.debounceTimer = setTimeout(() => {
|
|
137
|
+
this.dispatchEvent(
|
|
138
|
+
new CustomEvent('value-change', {
|
|
139
|
+
detail: this.value,
|
|
140
|
+
bubbles: true,
|
|
141
|
+
composed: true,
|
|
142
|
+
}),
|
|
143
|
+
);
|
|
144
|
+
}, this.debounce);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
private handleFocusChange() {
|
|
148
|
+
this.focused = this.inputElement?.matches(':focus') ?? false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private handleBlur() {
|
|
152
|
+
this.focused = false;
|
|
153
|
+
this.closeEditing();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
private handleChange(event: Event) {
|
|
157
|
+
redispatchEvent(this, event);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
private renderDisplayValue() {
|
|
161
|
+
if (!this.value) {
|
|
162
|
+
return html`<span class="url-placeholder">${this.placeholder}</span>`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return html`
|
|
166
|
+
<a
|
|
167
|
+
class="url-link"
|
|
168
|
+
href=${this.value}
|
|
169
|
+
target="_blank"
|
|
170
|
+
rel="noopener noreferrer"
|
|
171
|
+
>
|
|
172
|
+
${this.value}
|
|
173
|
+
</a>
|
|
174
|
+
`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
render() {
|
|
178
|
+
const hasValue = !!this.value;
|
|
179
|
+
const showInvalidState = this.error || !this.isValid;
|
|
180
|
+
const resolvedErrorText = !this.isValid
|
|
181
|
+
? 'Please enter a valid URL'
|
|
182
|
+
: this.errorText;
|
|
183
|
+
|
|
184
|
+
return html`
|
|
185
|
+
<wc-field
|
|
186
|
+
label=${this.label}
|
|
187
|
+
?required=${this.required}
|
|
188
|
+
?disabled=${this.disabled}
|
|
189
|
+
?readonly=${this.readonly}
|
|
190
|
+
?skeleton=${this.skeleton}
|
|
191
|
+
helper-text=${this.helperText}
|
|
192
|
+
?error=${showInvalidState}
|
|
193
|
+
error-text=${resolvedErrorText}
|
|
194
|
+
?warning=${this.warning}
|
|
195
|
+
warning-text=${this.warningText}
|
|
196
|
+
variant=${this.variant}
|
|
197
|
+
?populated=${hasValue || this.editing}
|
|
198
|
+
?focused=${this.focused}
|
|
199
|
+
.host=${this}
|
|
200
|
+
class="url-field-wrapper"
|
|
201
|
+
>
|
|
202
|
+
${this.editing
|
|
203
|
+
? html`
|
|
204
|
+
<input
|
|
205
|
+
class="url-input"
|
|
206
|
+
name=${this.name}
|
|
207
|
+
type="url"
|
|
208
|
+
placeholder=${this.placeholder}
|
|
209
|
+
.value=${this.value}
|
|
210
|
+
?readonly=${this.readonly}
|
|
211
|
+
?required=${this.required}
|
|
212
|
+
?disabled=${this.disabled}
|
|
213
|
+
@input=${this.handleInput}
|
|
214
|
+
@change=${this.handleChange}
|
|
215
|
+
@focus=${this.handleFocusChange}
|
|
216
|
+
@blur=${this.handleBlur}
|
|
217
|
+
/>
|
|
218
|
+
`
|
|
219
|
+
: html`<div class="url-display">${this.renderDisplayValue()}</div>`}
|
|
220
|
+
|
|
221
|
+
${!this.editing && !this.disabled && !this.readonly
|
|
222
|
+
? html`
|
|
223
|
+
<wc-icon-button
|
|
224
|
+
class="edit-button"
|
|
225
|
+
slot="field-end"
|
|
226
|
+
variant="text"
|
|
227
|
+
@click=${(event: MouseEvent) => {
|
|
228
|
+
event.stopPropagation();
|
|
229
|
+
this.startEditing();
|
|
230
|
+
}}
|
|
231
|
+
>
|
|
232
|
+
<wc-icon name="edit"></wc-icon>
|
|
233
|
+
</wc-icon-button>
|
|
234
|
+
`
|
|
235
|
+
: nothing}
|
|
236
|
+
</wc-field>
|
|
237
|
+
`;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-COYCtuA8.js","sources":["../../src/spread.ts","../../src/button/BaseButton.ts","../../src/button/button/button.ts"],"sourcesContent":["import {\n directive,\n Directive,\n ElementPart,\n PartInfo,\n PartType,\n} from 'lit/directive.js';\n\nclass SpreadDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error('spread() can only be used on elements');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n render(_props: { [key: string]: any } | undefined) {\n return '';\n }\n\n update(part: ElementPart, [props]: [{ [key: string]: any } | undefined]) {\n if (!props) return;\n // eslint-disable-next-line guard-for-in,no-restricted-syntax\n for (const key in props) {\n const value = props[key];\n if (value === undefined || value === null) {\n part.element.removeAttribute(key);\n } else {\n part.element.setAttribute(key, value);\n }\n }\n }\n}\n\nexport const spread = directive(SpreadDirective);\n","import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { dispatchActivationClick, isActivationClick } from '../utils/dispatch-event-utils.js';\n\nexport class BaseButton extends LitElement {\n #id = crypto.randomUUID();\n\n @property({ type: String }) htmlType: 'button' | 'submit' | 'reset' =\n 'button';\n\n /**\n * Type is preset of color and variant. Type will be only applied.\n *\n */\n @property({ type: String }) type?: 'primary' | 'secondary' | 'tertiary';\n\n /**\n * The visual style of the button.\n *\n * Possible variant values:\n * `\"filled\"` is a filled button.\n * `\"outlined\"` is an outlined button.\n * `\"text\"` is a transparent button.\n * `\"tonal\"` is a light color button.\n * `\"elevated\"` is elevated button\n */\n @property() variant:\n | 'elevated'\n | 'filled'\n | 'tonal'\n | 'outlined'\n | 'text'\n | 'neo' = 'filled';\n\n /**\n * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.\n */\n @property({ reflect: true }) color:\n | 'primary'\n | 'success'\n | 'danger'\n | 'warning'\n | 'light'\n | 'dark' = 'primary';\n\n /**\n * Button size.\n * Possible values are `\"sm\"`, `\"md\"`, `\"lg\"`. Defaults to `\"md\"`.\n */\n @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * If true, the user cannot interact with the button. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n\n /**\n * If true, the user cannot interact with the button and the button is visually styled as disabled. But the button is still focusable. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'soft-disabled' })\n softDisabled: boolean = false;\n\n /**\n * If button is disabled, the reason why it is disabled.\n */\n @property({ attribute: 'disabled-reason' })\n disabledReason: string = '';\n\n /**\n * Hyperlink to navigate to on click.\n */\n @property({ reflect: true }) href?: string;\n\n /**\n * Sets or retrieves the window or frame at which to target content.\n */\n @property() target: string = '_self';\n \n\n @property({ reflect: true })\n configAria?: { [key: string]: any };\n\n \n\n @property({ type: Boolean, reflect: true }) toggle: boolean = false;\n\n @property({ type: Boolean, reflect: true }) selected: boolean = false;\n\n /**\n * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.\n */\n @property() throttleDelay = 200;\n\n @property() tooltip?: string;\n\n /**\n * States\n */\n @state()\n isPressed = false;\n\n @query('.button') readonly buttonElement!: HTMLElement | null;\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n window.addEventListener('mouseup', this.__handlePress);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('mouseup', this.__handlePress);\n this.removeEventListener('click', this.__dispatchClickWithThrottle);\n super.disconnectedCallback();\n }\n\n __handlePress = (event: KeyboardEvent | MouseEvent) => {\n if (this.disabled || this.skeleton || this.softDisabled) return;\n if (\n event instanceof KeyboardEvent &&\n event.type === 'keydown' &&\n (event.key === 'Enter' || event.key === ' ')\n ) {\n this.isPressed = true;\n } else if (event.type === 'mousedown') {\n this.isPressed = true;\n } else {\n this.isPressed = false;\n }\n };\n\n __isLink() {\n return !!this.href;\n }\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =\n event => {\n this.__dispatchClick(event);\n };\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // If the button is soft-disabled or a disabled link, we need to explicitly\n // prevent the click from propagating to other event listeners as well as\n // prevent the default action.\n if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n\n if (this.toggle) {\n this.selected = !this.selected;\n }\n\n this.focus();\n dispatchActivationClick(this.buttonElement);\n };\n\n __convertTypeToVariantAndColor() {\n if (this.type === 'primary') {\n this.color = 'primary';\n this.variant = 'filled';\n } else if (this.type === 'secondary') {\n this.color = 'dark';\n this.variant = 'outlined';\n } else if (this.type === 'tertiary') {\n this.color = 'primary';\n this.variant = 'text';\n } else if (this.type === 'danger') {\n this.color = 'danger';\n this.variant = 'filled';\n }\n }\n\n __getDisabledReasonID() {\n return this.disabled && this.disabledReason\n ? `disabled-reason-${this.#id}`\n : nothing;\n }\n\n __renderDisabledReason() {\n const disabledReasonID = this.__getDisabledReasonID();\n if (disabledReasonID)\n return html`<div\n id=\"disabled-reason-${this.#id}\"\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n {this.disabledReason}\n </div>`;\n return nothing;\n }\n\n __renderTooltip() {\n if (this.tooltip) {\n return html`<wc-tooltip for=\"button\">${this.tooltip}</wc-tooltip>`;\n }\n return nothing;\n }\n}\n","import { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from 'src/IndividualComponent.js';\nimport styles from './button.scss';\nimport colorStyles from './button-colors.scss';\nimport sizeStyles from './button-sizes.scss';\nimport { observerSlotChangesWithCallback, throttle } from '../../utils.js';\nimport { spread } from '../../spread.js';\nimport { BaseButton } from '../BaseButton.js';\n\n/**\n * @label Button\n * @tag wc-button\n * @rawTag button\n *\n * @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.\n * @overview\n * <p>Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.</p>\n *\n * @cssprop --button-container-shape: Defines the border radius of the button container shape.\n *\n * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.\n * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.\n *\n *\n * @cssprop --filled-button-container-color: Color of the filled button container.\n * @cssprop --filled-button-label-text-color: Text color of the filled button label.\n *\n * @cssprop --outlined-button-container-color: Color of the outlined button container.\n * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.\n *\n * @cssprop --text-button-label-text-color: Text color of the text button label.\n *\n * @cssprop --tonal-button-container-color: Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.\n *\n * @cssprop --elevated-button-container-color: Color of the elevated button container.\n * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.\n *\n * @cssprop --neo-button-container-color: Color of the neo button container.\n * @cssprop --neo-button-label-text-color: Text color of the neo button label.\n *\n * @fires {MouseEvent} click - Dispatched when the button is clicked.\n *\n * @example\n * ```html\n * <wc-button>Button</wc-button>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Button extends BaseButton {\n static override styles = [styles, colorStyles, sizeStyles];\n\n #tabindex?: number = 0;\n\n /**\n * Icon alignment.\n * Possible values are `\"start\"`, `\"end\"`. Defaults to `\"end\"`.\n */\n @property({ attribute: 'icon-align' })\n iconAlign: 'start' | 'end' = 'end';\n\n @state()\n private slotHasContent = false;\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n window.addEventListener('mouseup', this.__handlePress);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('mouseup', this.__handlePress);\n this.removeEventListener('click', this.__dispatchClickWithThrottle);\n super.disconnectedCallback();\n }\n\n override firstUpdated() {\n this.__dispatchClickWithThrottle = throttle(\n this.__dispatchClick,\n this.throttleDelay,\n );\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n\n this.__convertTypeToVariantAndColor();\n }\n\n override render() {\n const isLink = this.__isLink();\n\n const cssClasses = {\n button: true,\n 'button-element': true,\n [`size-${this.size}`]: true,\n [`variant-${this.variant}`]: true,\n [`color-${this.color}`]: true,\n disabled: this.disabled || this.softDisabled,\n pressed: this.isPressed,\n 'has-content': this.slotHasContent,\n 'show-skeleton': this.skeleton,\n [`icon-align-${this.iconAlign}`]: true,\n };\n\n if (!isLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"button\"\n tabindex=${this.#tabindex}\n type=${this.htmlType}\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n ?aria-describedby=${this.__getDisabledReasonID()}\n aria-disabled=${`${this.disabled || this.softDisabled}`}\n ?disabled=${this.disabled}\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </button>\n ${this.__renderTooltip()}`;\n }\n return html`<a\n class=${classMap(cssClasses)}\n id=\"button\"\n tabindex=${this.#tabindex}\n href=${this.href}\n target=${this.target}\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n role=\"button\"\n ?aria-describedby=${this.__getDisabledReasonID()}\n aria-disabled=${`${this.disabled}`}\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </a>\n ${this.__renderTooltip()}`;\n }\n\n renderButtonContent() {\n return html`\n <wc-focus-ring class=\"focus-ring\" .control=${this} .forElement=${this.buttonElement}></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"neo-background\"></div>\n <div class=\"background\"></div>\n <div class=\"outline\"></div>\n <wc-ripple class=\"ripple\"></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <div class=\"button-content\">\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n\n <slot name=\"icon\"></slot>\n </div>\n\n ${this.__renderDisabledReason()}\n `;\n }\n}\n"],"names":["Directive","PartType","directive","LitElement","nothing","html","property","state","query","classMap","styles","colorStyles","sizeStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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