@redvars/peacock 3.2.7 → 3.2.9
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/PeacockComponent-CxJc63xj.js +73 -0
- package/dist/PeacockComponent-CxJc63xj.js.map +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/button-2MeDq0Yy.js +898 -0
- package/dist/button-2MeDq0Yy.js.map +1 -0
- package/dist/button-group.js +7 -5
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +7 -0
- package/dist/button.js.map +1 -0
- package/dist/{class-map-BmCohX9p.js → class-map-BvQRv7eW.js} +2 -2
- package/dist/{class-map-BmCohX9p.js.map → class-map-BvQRv7eW.js.map} +1 -1
- package/dist/clock.js +26 -24
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +43877 -0
- package/dist/code-editor.js.map +1 -0
- package/dist/code-highlighter.js +9 -7
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +561 -0
- package/dist/custom-elements.json +838 -227
- package/dist/{utils-DGMeCC48.js → dispatch-event-utils-vbdiOSeC.js} +19 -2
- package/dist/dispatch-event-utils-vbdiOSeC.js.map +1 -0
- package/dist/image-DK6VQW7N.js +7042 -0
- package/dist/image-DK6VQW7N.js.map +1 -0
- package/dist/index.js +10 -33
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +7 -5
- package/dist/number-counter.js.map +1 -1
- package/dist/observe-theme-change-NneLARW8.js +51 -0
- package/dist/observe-theme-change-NneLARW8.js.map +1 -0
- package/dist/peacock-loader.js +973 -37
- package/dist/peacock-loader.js.map +1 -1
- package/dist/src/PeacockComponent.d.ts +1 -0
- package/dist/src/code-editor/code-editor.d.ts +45 -0
- package/dist/src/code-editor/index.d.ts +2 -0
- package/dist/src/image/image.d.ts +45 -0
- package/dist/src/image/index.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/dispatch-event-utils.d.ts +72 -0
- package/dist/src/utils/observe-theme-change.d.ts +3 -0
- package/dist/src/utils.d.ts +1 -72
- package/dist/{state-CV1fRmOT.js → state-B09bP3XH.js} +2 -2
- package/dist/{state-CV1fRmOT.js.map → state-B09bP3XH.js.map} +1 -1
- package/dist/{style-map-CdmclYgz.js → style-map-B8xgVEc9.js} +2 -2
- package/dist/{style-map-CdmclYgz.js.map → style-map-B8xgVEc9.js.map} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-BS8X6Gto.js → unsafe-html-B-dV3Jps.js} +2 -2
- package/dist/{unsafe-html-BS8X6Gto.js.map → unsafe-html-B-dV3Jps.js.map} +1 -1
- package/package.json +5 -3
- package/readme.md +2 -2
- package/scss/styles.scss +57 -1
- package/scss/tokens.css +1 -0
- package/src/PeacockComponent.ts +3 -0
- package/src/accordion/accordion-item/accordion-item.scss +1 -1
- package/src/button/BaseButton.ts +1 -1
- package/src/button/button/button.ts +3 -1
- package/src/button/button-group/button-group.ts +2 -0
- package/src/clock/clock.ts +4 -1
- package/src/code-editor/code-editor.scss +52 -0
- package/src/code-editor/code-editor.ts +215 -0
- package/src/code-editor/demo/index.html +37 -0
- package/src/code-editor/index.ts +3 -0
- package/src/code-highlighter/code-highlighter.ts +2 -0
- package/src/container/container.scss +1 -1
- package/src/date-picker/date-picker.ts +1 -1
- package/src/image/image.scss +49 -0
- package/src/image/image.ts +135 -0
- package/src/image/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/input/input.ts +1 -2
- package/src/menu/menu-item/menu-item.scss +5 -4
- package/src/menu/menu-list/menu-list.scss +1 -0
- package/src/number-counter/number-counter.ts +2 -0
- package/src/number-field/number-field.ts +1 -1
- package/src/peacock-loader.ts +7 -0
- package/src/textarea/textarea.ts +1 -1
- package/src/time-picker/time-picker.ts +1 -1
- package/src/utils/dispatch-event-utils.ts +131 -0
- package/src/utils/observe-theme-change.ts +30 -0
- package/src/utils.ts +5 -131
- package/dist/BaseButton.js +0 -209
- package/dist/BaseButton.js.map +0 -1
- package/dist/BaseInput.js +0 -27
- package/dist/BaseInput.js.map +0 -1
- package/dist/accordion-item.js +0 -191
- package/dist/accordion-item.js.map +0 -1
- package/dist/accordion.js +0 -142
- package/dist/accordion.js.map +0 -1
- package/dist/avatar.js +0 -106
- package/dist/avatar.js.map +0 -1
- package/dist/badge.js +0 -84
- package/dist/badge.js.map +0 -1
- package/dist/base-progress.js +0 -33
- package/dist/base-progress.js.map +0 -1
- package/dist/breadcrumb-item.js +0 -160
- package/dist/breadcrumb-item.js.map +0 -1
- package/dist/breadcrumb.js +0 -84
- package/dist/breadcrumb.js.map +0 -1
- package/dist/checkbox.js +0 -530
- package/dist/checkbox.js.map +0 -1
- package/dist/chip.js +0 -303
- package/dist/chip.js.map +0 -1
- package/dist/container.js +0 -135
- package/dist/container.js.map +0 -1
- package/dist/divider.js +0 -126
- package/dist/divider.js.map +0 -1
- package/dist/elevation.js +0 -79
- package/dist/elevation.js.map +0 -1
- package/dist/empty-state.js +0 -171
- package/dist/empty-state.js.map +0 -1
- package/dist/field.js +0 -416
- package/dist/field.js.map +0 -1
- package/dist/focus-ring.js +0 -107
- package/dist/focus-ring.js.map +0 -1
- package/dist/icon.js +0 -183
- package/dist/icon.js.map +0 -1
- package/dist/link.js +0 -91
- package/dist/link.js.map +0 -1
- package/dist/lit-element-CA46RFZ_.js +0 -28
- package/dist/lit-element-CA46RFZ_.js.map +0 -1
- package/dist/menu-item.js +0 -232
- package/dist/menu-item.js.map +0 -1
- package/dist/menu-list.js +0 -108
- package/dist/menu-list.js.map +0 -1
- package/dist/menu.js +0 -117
- package/dist/menu.js.map +0 -1
- package/dist/property-DNVWDdPC.js +0 -45
- package/dist/property-DNVWDdPC.js.map +0 -1
- package/dist/query-QBcUV-L_.js +0 -15
- package/dist/query-QBcUV-L_.js.map +0 -1
- package/dist/ripple.js +0 -128
- package/dist/ripple.js.map +0 -1
- package/dist/skeleton.js +0 -113
- package/dist/skeleton.js.map +0 -1
- package/dist/spinner.js +0 -93
- package/dist/spinner.js.map +0 -1
- package/dist/spread-axRTFMoH.js +0 -32
- package/dist/spread-axRTFMoH.js.map +0 -1
- package/dist/switch-DqxIiVsB.js +0 -2738
- package/dist/switch-DqxIiVsB.js.map +0 -1
- package/dist/tag.js +0 -323
- package/dist/tag.js.map +0 -1
- package/dist/tooltip.js +0 -1857
- package/dist/tooltip.js.map +0 -1
- package/dist/utils-DGMeCC48.js.map +0 -1
package/dist/chip.js
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, n } from './property-DNVWDdPC.js';
|
|
2
|
-
import { i, a as i$1, b, A } from './lit-element-CA46RFZ_.js';
|
|
3
|
-
import { e } from './class-map-BmCohX9p.js';
|
|
4
|
-
import './directive-Cuw6h7YA.js';
|
|
5
|
-
|
|
6
|
-
var css_248z$2 = i`* {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.screen-reader-only {
|
|
11
|
-
display: none !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host {
|
|
15
|
-
display: inline-block;
|
|
16
|
-
--chip-container-color: var(--color-surface);
|
|
17
|
-
--chip-label-text-color: var(--color-on-surface);
|
|
18
|
-
--chip-outline-color: var(--color-outline);
|
|
19
|
-
--chip-container-shape: var(--shape-corner-small);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host-context([data-theme=dark]) {
|
|
23
|
-
--chip-hover-color: var(--color-primary-30);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.chip {
|
|
27
|
-
position: relative;
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
height: var(--chip-height, var(--_chip-height, 2rem));
|
|
33
|
-
padding: 0 var(--_container-padding, 1rem);
|
|
34
|
-
width: 100%;
|
|
35
|
-
border-radius: var(--chip-container-shape);
|
|
36
|
-
}
|
|
37
|
-
.chip .tag-content {
|
|
38
|
-
position: relative;
|
|
39
|
-
z-index: 1;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
max-width: 100%;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
color: var(--chip-label-text-color);
|
|
48
|
-
font-family: var(--typography-label-small-font-family) !important;
|
|
49
|
-
font-size: var(--typography-label-small-font-size) !important;
|
|
50
|
-
font-weight: var(--typography-label-small-font-weight) !important;
|
|
51
|
-
line-height: var(--typography-label-small-line-height) !important;
|
|
52
|
-
letter-spacing: var(--typography-label-small-letter-spacing) !important;
|
|
53
|
-
gap: 0.5rem;
|
|
54
|
-
}
|
|
55
|
-
.chip .tag-content .tag-image {
|
|
56
|
-
width: 1.125rem;
|
|
57
|
-
height: 1.125rem;
|
|
58
|
-
border-radius: 100%;
|
|
59
|
-
background: var(--chip-hover-color);
|
|
60
|
-
}
|
|
61
|
-
.chip .close-btn {
|
|
62
|
-
border-radius: 12px;
|
|
63
|
-
padding: 0;
|
|
64
|
-
margin: 0;
|
|
65
|
-
border: none;
|
|
66
|
-
background: transparent;
|
|
67
|
-
line-height: 0;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
--icon-size: 1rem;
|
|
70
|
-
}
|
|
71
|
-
.chip .close-btn .close-btn-icon {
|
|
72
|
-
--icon-size: 1rem;
|
|
73
|
-
}
|
|
74
|
-
.chip .close-btn:hover {
|
|
75
|
-
background: var(--chip-hover-color);
|
|
76
|
-
}
|
|
77
|
-
.chip .close-btn:hover .close-btn-icon {
|
|
78
|
-
color: var(--background);
|
|
79
|
-
}
|
|
80
|
-
.chip {
|
|
81
|
-
/**
|
|
82
|
-
* Tag background layers
|
|
83
|
-
*/
|
|
84
|
-
}
|
|
85
|
-
.chip .background {
|
|
86
|
-
display: block;
|
|
87
|
-
position: absolute;
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 100%;
|
|
90
|
-
border-radius: inherit;
|
|
91
|
-
background: var(--chip-container-color);
|
|
92
|
-
pointer-events: none;
|
|
93
|
-
}
|
|
94
|
-
.chip .outline {
|
|
95
|
-
display: block;
|
|
96
|
-
position: absolute;
|
|
97
|
-
width: 100%;
|
|
98
|
-
height: 100%;
|
|
99
|
-
border-radius: inherit;
|
|
100
|
-
border: 1px solid var(--chip-outline-color);
|
|
101
|
-
}
|
|
102
|
-
.chip .elevation {
|
|
103
|
-
--elevation-level: 0;
|
|
104
|
-
transition-duration: 280ms;
|
|
105
|
-
border-radius: inherit;
|
|
106
|
-
}
|
|
107
|
-
.chip.dismissible .tag-content {
|
|
108
|
-
padding-inline-end: 0.25rem;
|
|
109
|
-
}
|
|
110
|
-
.chip.selected {
|
|
111
|
-
color: var(--background);
|
|
112
|
-
background: var(--chip-hover-color);
|
|
113
|
-
}
|
|
114
|
-
.chip.selected .close-btn-icon {
|
|
115
|
-
color: var(--background);
|
|
116
|
-
}`;
|
|
117
|
-
|
|
118
|
-
var css_248z$1 = i`:host([color=red]) {
|
|
119
|
-
--chip-container-color: var(--color-red-container);
|
|
120
|
-
--chip-outline-color: var(--color-on-red-container);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:host([color=green]) {
|
|
124
|
-
--chip-container-color: var(--color-green-container);
|
|
125
|
-
--chip-label-text-color: var(--color-on-green-container);
|
|
126
|
-
--chip-outline-color: var(--color-on-green-container);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([color=blue]) {
|
|
130
|
-
--chip-container-color: var(--color-blue-container);
|
|
131
|
-
--chip-label-text-color: var(--color-on-blue-container);
|
|
132
|
-
--chip-outline-color: var(--color-on-blue-container);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host([color=yellow]) {
|
|
136
|
-
--chip-container-color: var(--color-yellow-container);
|
|
137
|
-
--chip-label-text-color: var(--color-on-yellow-container);
|
|
138
|
-
--chip-outline-color: var(--color-on-yellow-container);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:host([color=purple]) {
|
|
142
|
-
--chip-container-color: var(--color-purple-container);
|
|
143
|
-
--chip-label-text-color: var(--color-on-purple-container);
|
|
144
|
-
--chip-outline-color: var(--color-on-purple-container);
|
|
145
|
-
}`;
|
|
146
|
-
|
|
147
|
-
var css_248z = i`.tag {
|
|
148
|
-
font-family: var(--font-family-sans) !important;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.tag.size-xs,
|
|
152
|
-
.tag.size-extra-small {
|
|
153
|
-
--_button-height: 2rem;
|
|
154
|
-
--_button-icon-size: 1.25rem;
|
|
155
|
-
--_container-padding: 0.75rem;
|
|
156
|
-
font-size: 0.875rem !important;
|
|
157
|
-
font-weight: var(--font-weight-medium) !important;
|
|
158
|
-
line-height: 1.25rem !important;
|
|
159
|
-
letter-spacing: 0.1px !important;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.tag.size-sm,
|
|
163
|
-
.tag.size-small {
|
|
164
|
-
--_button-height: 2.5rem;
|
|
165
|
-
--_button-icon-size: 1.25rem;
|
|
166
|
-
--_container-padding: 1rem;
|
|
167
|
-
font-size: 0.875rem !important;
|
|
168
|
-
font-weight: var(--font-weight-medium) !important;
|
|
169
|
-
line-height: 1.25rem !important;
|
|
170
|
-
letter-spacing: 0.1px !important;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.button.size-md,
|
|
174
|
-
.button.size-medium {
|
|
175
|
-
--_button-height: 3.5rem;
|
|
176
|
-
--_button-icon-size: 1.5rem;
|
|
177
|
-
--_container-padding: 1.5rem;
|
|
178
|
-
font-size: 1rem !important;
|
|
179
|
-
font-weight: var(--font-weight-medium) !important;
|
|
180
|
-
line-height: 1.5rem !important;
|
|
181
|
-
letter-spacing: 0.15px !important;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.button.size-lg,
|
|
185
|
-
.button.size-large {
|
|
186
|
-
--_button-height: 6rem;
|
|
187
|
-
--_button-icon-size: 2rem;
|
|
188
|
-
--_container-padding: 3rem;
|
|
189
|
-
font-size: 1.5rem !important;
|
|
190
|
-
font-weight: var(--font-weight-regular) !important;
|
|
191
|
-
line-height: 2rem !important;
|
|
192
|
-
letter-spacing: 0 !important;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.button.size-xl {
|
|
196
|
-
--_button-height: 8.5rem;
|
|
197
|
-
--_button-icon-size: 2.5rem;
|
|
198
|
-
--_container-padding: 4rem;
|
|
199
|
-
font-size: 2rem !important;
|
|
200
|
-
font-weight: var(--font-weight-regular) !important;
|
|
201
|
-
line-height: 2.5rem !important;
|
|
202
|
-
letter-spacing: 0 !important;
|
|
203
|
-
}`;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @label Chip
|
|
207
|
-
* @tag base-chip
|
|
208
|
-
* @rawTag chip
|
|
209
|
-
* @summary
|
|
210
|
-
*
|
|
211
|
-
* @example
|
|
212
|
-
* ```html
|
|
213
|
-
* <base-tag>Link</base-tag>
|
|
214
|
-
* ```
|
|
215
|
-
* @tags display
|
|
216
|
-
*/
|
|
217
|
-
class Chip extends i$1 {
|
|
218
|
-
constructor() {
|
|
219
|
-
super(...arguments);
|
|
220
|
-
/** If true, the tag will have a close icon. */
|
|
221
|
-
this.dismissible = false;
|
|
222
|
-
/** Tag color. */
|
|
223
|
-
this.color = 'default';
|
|
224
|
-
/** Tag value. */
|
|
225
|
-
this.value = '';
|
|
226
|
-
/** If true, the tag will be selected. */
|
|
227
|
-
this.selected = false;
|
|
228
|
-
}
|
|
229
|
-
_dismissClickHandler(e) {
|
|
230
|
-
e.stopPropagation();
|
|
231
|
-
const detail = { value: this.value || this.textContent?.trim() };
|
|
232
|
-
// Custom Event: tag--dismiss
|
|
233
|
-
this.dispatchEvent(new CustomEvent('tag--dismiss', {
|
|
234
|
-
detail,
|
|
235
|
-
bubbles: true,
|
|
236
|
-
composed: true,
|
|
237
|
-
}));
|
|
238
|
-
}
|
|
239
|
-
_renderCloseButton() {
|
|
240
|
-
if (!this.dismissible)
|
|
241
|
-
return null;
|
|
242
|
-
return b `
|
|
243
|
-
<button
|
|
244
|
-
class="close-btn"
|
|
245
|
-
@click=${this._dismissClickHandler}
|
|
246
|
-
aria-label="Dismiss"
|
|
247
|
-
>
|
|
248
|
-
<base-icon class="close-btn-icon" name="close"></base-icon>
|
|
249
|
-
</button>
|
|
250
|
-
`;
|
|
251
|
-
}
|
|
252
|
-
_renderImage() {
|
|
253
|
-
if (this.imageSrc)
|
|
254
|
-
return b `<img
|
|
255
|
-
src=${this.imageSrc}
|
|
256
|
-
class="tag-image"
|
|
257
|
-
alt="Tag Logo"
|
|
258
|
-
/>`;
|
|
259
|
-
return A;
|
|
260
|
-
}
|
|
261
|
-
render() {
|
|
262
|
-
const classes = {
|
|
263
|
-
chip: true,
|
|
264
|
-
selected: this.selected,
|
|
265
|
-
dismissible: this.dismissible,
|
|
266
|
-
[`color-${this.color}`]: true,
|
|
267
|
-
};
|
|
268
|
-
return b `
|
|
269
|
-
<div class="${e(classes)}">
|
|
270
|
-
<base-elevation class="elevation"></base-elevation>
|
|
271
|
-
<div class="background"></div>
|
|
272
|
-
<div class="outline"></div>
|
|
273
|
-
|
|
274
|
-
<div class="tag-content">
|
|
275
|
-
<slot name="icon"></slot>
|
|
276
|
-
<slot></slot>
|
|
277
|
-
${this._renderCloseButton()}
|
|
278
|
-
</div>
|
|
279
|
-
</div>
|
|
280
|
-
`;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
// Define styles (Lit handles Scoping via Shadow DOM by default)
|
|
284
|
-
// You would typically import your tag.scss.js here or use the css tag
|
|
285
|
-
Chip.styles = [css_248z$2, css_248z$1, css_248z];
|
|
286
|
-
__decorate([
|
|
287
|
-
n({ type: Boolean })
|
|
288
|
-
], Chip.prototype, "dismissible", void 0);
|
|
289
|
-
__decorate([
|
|
290
|
-
n({ type: String, reflect: true })
|
|
291
|
-
], Chip.prototype, "color", void 0);
|
|
292
|
-
__decorate([
|
|
293
|
-
n({ type: String, reflect: true })
|
|
294
|
-
], Chip.prototype, "value", void 0);
|
|
295
|
-
__decorate([
|
|
296
|
-
n({ type: Boolean, reflect: true })
|
|
297
|
-
], Chip.prototype, "selected", void 0);
|
|
298
|
-
__decorate([
|
|
299
|
-
n({ type: String })
|
|
300
|
-
], Chip.prototype, "imageSrc", void 0);
|
|
301
|
-
|
|
302
|
-
export { Chip };
|
|
303
|
-
//# sourceMappingURL=chip.js.map
|
package/dist/chip.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../src/chip/chip/chip.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './chip.scss';\nimport colorStyles from './chip-colors.scss';\nimport sizeStyles from './chip-sizes.scss';\n\n/**\n * @label Chip\n * @tag base-chip\n * @rawTag chip\n * @summary\n *\n * @example\n * ```html\n * <base-tag>Link</base-tag>\n * ```\n * @tags display\n */\nexport class Chip extends LitElement {\n // Define styles (Lit handles Scoping via Shadow DOM by default)\n // You would typically import your tag.scss.js here or use the css tag\n static styles = [styles, colorStyles, sizeStyles];\n\n /** If true, the tag will have a close icon. */\n @property({ type: Boolean }) dismissible = false;\n\n /** Tag color. */\n @property({ type: String, reflect: true }) color?:\n | 'default'\n | 'blue'\n | 'green'\n | 'red'\n | 'yellow' = 'default';\n\n /** Tag value. */\n @property({ type: String, reflect: true }) value = '';\n\n /** If true, the tag will be selected. */\n @property({ type: Boolean, reflect: true }) selected = false;\n\n /** Image source. */\n @property({ type: String }) imageSrc?: string;\n\n private _dismissClickHandler(e: MouseEvent) {\n e.stopPropagation();\n const detail = { value: this.value || this.textContent?.trim() };\n\n // Custom Event: tag--dismiss\n this.dispatchEvent(\n new CustomEvent('tag--dismiss', {\n detail,\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _renderCloseButton() {\n if (!this.dismissible) return null;\n\n return html`\n <button\n class=\"close-btn\"\n @click=${this._dismissClickHandler}\n aria-label=\"Dismiss\"\n >\n <base-icon class=\"close-btn-icon\" name=\"close\"></base-icon>\n </button>\n `;\n }\n\n private _renderImage() {\n if (this.imageSrc)\n return html`<img\n src=${this.imageSrc}\n class=\"tag-image\"\n alt=\"Tag Logo\"\n />`;\n return nothing;\n }\n\n render() {\n const classes = {\n chip: true,\n selected: this.selected,\n dismissible: this.dismissible,\n [`color-${this.color}`]: true,\n };\n\n return html`\n <div class=\"${classMap(classes)}\">\n <base-elevation class=\"elevation\"></base-elevation>\n <div class=\"background\"></div>\n <div class=\"outline\"></div>\n\n <div class=\"tag-content\">\n <slot name=\"icon\"></slot>\n <slot></slot>\n ${this._renderCloseButton()}\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","styles","colorStyles","sizeStyles","property"],"mappings":"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"}
|
package/dist/container.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, n } from './property-DNVWDdPC.js';
|
|
2
|
-
import { i, a as i$1, b } from './lit-element-CA46RFZ_.js';
|
|
3
|
-
import { e } from './class-map-BmCohX9p.js';
|
|
4
|
-
import './directive-Cuw6h7YA.js';
|
|
5
|
-
|
|
6
|
-
var css_248z = i`* {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.screen-reader-only {
|
|
11
|
-
display: none !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host {
|
|
15
|
-
display: block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.container-wrapper {
|
|
19
|
-
container: containerwrapper/inline-size;
|
|
20
|
-
}
|
|
21
|
-
.container-wrapper.size-max .container {
|
|
22
|
-
max-width: var(--container-max);
|
|
23
|
-
}
|
|
24
|
-
.container-wrapper.size-xl .container {
|
|
25
|
-
max-width: var(--container-xl);
|
|
26
|
-
}
|
|
27
|
-
.container-wrapper.size-sm .container {
|
|
28
|
-
max-width: var(--container-sm);
|
|
29
|
-
}
|
|
30
|
-
.container-wrapper.size-md .container {
|
|
31
|
-
max-width: var(--container-md);
|
|
32
|
-
}
|
|
33
|
-
.container-wrapper.size-lg .container {
|
|
34
|
-
max-width: var(--container-lg);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.container {
|
|
38
|
-
margin: auto;
|
|
39
|
-
width: 100%;
|
|
40
|
-
}
|
|
41
|
-
.container .content {
|
|
42
|
-
padding: v(--spacing-200);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host(.debug) {
|
|
46
|
-
border-width: 0 1px;
|
|
47
|
-
border-color: var(--color-red);
|
|
48
|
-
border-style: solid;
|
|
49
|
-
background: var(--color-red-50);
|
|
50
|
-
}
|
|
51
|
-
:host(.debug) .container {
|
|
52
|
-
border-width: 0 1px;
|
|
53
|
-
border-color: var(--color-blue);
|
|
54
|
-
border-style: solid;
|
|
55
|
-
background: var(--color-blue-100);
|
|
56
|
-
}
|
|
57
|
-
:host(.debug) .container .content {
|
|
58
|
-
border-width: 0 1px;
|
|
59
|
-
border-color: var(--color-green);
|
|
60
|
-
border-style: solid;
|
|
61
|
-
background: var(--color-green-100);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.content {
|
|
65
|
-
margin-inline: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@container containerwrapper (min-width: 672px) {
|
|
69
|
-
.content {
|
|
70
|
-
margin-inline: var(--spacing-200);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
@container containerwrapper (min-width: 1056px) {
|
|
74
|
-
.content {
|
|
75
|
-
margin-inline: var(--spacing-200);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
@container containerwrapper (min-width: 1312px) {
|
|
79
|
-
.content {
|
|
80
|
-
margin-inline: var(--spacing-200);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
@container containerwrapper (min-width: 1584px) {
|
|
84
|
-
.content {
|
|
85
|
-
margin-inline: var(--spacing-300);
|
|
86
|
-
}
|
|
87
|
-
}`;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @label Container
|
|
91
|
-
* @tag base-container
|
|
92
|
-
* @rawTag container
|
|
93
|
-
* @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.
|
|
94
|
-
*
|
|
95
|
-
* @cssprop --avatar-border-radius - Controls the border radius of the avatar.
|
|
96
|
-
* @cssprop --avatar-background-color - Controls the color of the avatar.
|
|
97
|
-
* @cssprop --avatar-size - Controls the size of the avatar.
|
|
98
|
-
* @cssprop --avatar-text-color - Controls the color of the text inside the avatar.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```html
|
|
103
|
-
* <base-container>Container</base-avatar>
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @tags display
|
|
107
|
-
*/
|
|
108
|
-
class Container extends i$1 {
|
|
109
|
-
constructor() {
|
|
110
|
-
super(...arguments);
|
|
111
|
-
this.size = 'full';
|
|
112
|
-
}
|
|
113
|
-
render() {
|
|
114
|
-
const wrapperClasses = {
|
|
115
|
-
'container-wrapper': true,
|
|
116
|
-
[`size-${this.size}`]: true,
|
|
117
|
-
};
|
|
118
|
-
return b `
|
|
119
|
-
<div class=${e(wrapperClasses)}>
|
|
120
|
-
<div class="container">
|
|
121
|
-
<div class="content">
|
|
122
|
-
<slot></slot>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
Container.styles = [css_248z];
|
|
130
|
-
__decorate([
|
|
131
|
-
n({ type: String, reflect: true })
|
|
132
|
-
], Container.prototype, "size", void 0);
|
|
133
|
-
|
|
134
|
-
export { Container };
|
|
135
|
-
//# sourceMappingURL=container.js.map
|
package/dist/container.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sources":["../../src/container/container.ts"],"sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './container.scss';\n\ntype ContainerSize = 'max' | 'xl' | 'lg' | 'md' | 'sm' | 'full';\n\n/**\n * @label Container\n * @tag base-container\n * @rawTag container\n * @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.\n *\n * @cssprop --avatar-border-radius - Controls the border radius of the avatar.\n * @cssprop --avatar-background-color - Controls the color of the avatar.\n * @cssprop --avatar-size - Controls the size of the avatar.\n * @cssprop --avatar-text-color - Controls the color of the text inside the avatar.\n *\n *\n * @example\n * ```html\n * <base-container>Container</base-avatar>\n * ```\n *\n * @tags display\n */\nexport class Container extends LitElement {\n @property({ type: String, reflect: true })\n size: ContainerSize = 'full';\n\n static styles = [styles];\n\n render() {\n const wrapperClasses = {\n 'container-wrapper': true,\n [`size-${this.size}`]: true,\n };\n\n return html`\n <div class=${classMap(wrapperClasses)}>\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}"],"names":["LitElement","html","classMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;AAkBG;AACG,MAAO,SAAU,SAAQA,GAAU,CAAA;AAAzC,IAAA,WAAA,GAAA;;QAEE,IAAA,CAAA,IAAI,GAAkB,MAAM;IAoB9B;IAhBE,MAAM,GAAA;AACJ,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI;SAC5B;AAED,QAAA,OAAOC,CAAI,CAAA;mBACIC,CAAQ,CAAC,cAAc,CAAC,CAAA;;;;;;;KAOtC;IACH;;AAjBO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAFxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACZ,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;;;;"}
|
package/dist/divider.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, n } from './property-DNVWDdPC.js';
|
|
2
|
-
import { i, a as i$1, b } from './lit-element-CA46RFZ_.js';
|
|
3
|
-
import { r } from './state-CV1fRmOT.js';
|
|
4
|
-
import { e } from './class-map-BmCohX9p.js';
|
|
5
|
-
import { o as observerSlotChangesWithCallback } from './utils-DGMeCC48.js';
|
|
6
|
-
import './directive-Cuw6h7YA.js';
|
|
7
|
-
|
|
8
|
-
var css_248z = i`* {
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.screen-reader-only {
|
|
13
|
-
display: none !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host {
|
|
17
|
-
display: block;
|
|
18
|
-
--divider-color: var(--color-outline-variant);
|
|
19
|
-
--divider-spacing: var(--spacing-200);
|
|
20
|
-
--divider-line-thinkness: 2px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.divider {
|
|
24
|
-
display: flex;
|
|
25
|
-
margin: 0;
|
|
26
|
-
font-family: var(--typography-body-medium-font-family) !important;
|
|
27
|
-
font-size: var(--typography-body-medium-font-size) !important;
|
|
28
|
-
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
29
|
-
line-height: var(--typography-body-medium-line-height) !important;
|
|
30
|
-
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
31
|
-
color: var(--divider-color);
|
|
32
|
-
--_line-border: var(--divider-line-thinkness) solid var(--divider-color);
|
|
33
|
-
}
|
|
34
|
-
.divider:not(.vertical) {
|
|
35
|
-
width: 100%;
|
|
36
|
-
padding: var(--divider-spacing) 0;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
}
|
|
40
|
-
.divider:not(.vertical) .line {
|
|
41
|
-
width: 100%;
|
|
42
|
-
border-top: var(--_line-border);
|
|
43
|
-
}
|
|
44
|
-
.divider:not(.vertical).slot-has-content .slot-container {
|
|
45
|
-
padding: 0 var(--spacing-200);
|
|
46
|
-
}
|
|
47
|
-
.divider.vertical {
|
|
48
|
-
height: 100%;
|
|
49
|
-
padding: 0 var(--divider-spacing);
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
}
|
|
54
|
-
.divider.vertical .line {
|
|
55
|
-
height: 100%;
|
|
56
|
-
border-right: var(--_line-border);
|
|
57
|
-
}
|
|
58
|
-
.divider.vertical.slot-has-content .slot-container {
|
|
59
|
-
padding: var(--spacing-200) 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:host(:not([vertical])) {
|
|
63
|
-
width: auto;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([vertical]) {
|
|
67
|
-
height: auto;
|
|
68
|
-
}`;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @label Divider
|
|
72
|
-
* @tag base-divider
|
|
73
|
-
* @rawTag divider
|
|
74
|
-
*
|
|
75
|
-
* @summary The divider component is used to visually separate content.
|
|
76
|
-
* @overview
|
|
77
|
-
* - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.
|
|
78
|
-
* - They can be oriented either vertically or horizontally, depending on the layout requirements.
|
|
79
|
-
*
|
|
80
|
-
* @cssprop --divider-color - Controls the color of the divider.
|
|
81
|
-
* @cssprop --divider-padding - Controls the padding of the divider.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```html
|
|
85
|
-
* <base-divider style="width: 12rem;">or</base-divider>
|
|
86
|
-
* ```
|
|
87
|
-
* @tags display
|
|
88
|
-
*/
|
|
89
|
-
class Divider extends i$1 {
|
|
90
|
-
constructor() {
|
|
91
|
-
super(...arguments);
|
|
92
|
-
this.vertical = false;
|
|
93
|
-
this.slotHasContent = false;
|
|
94
|
-
}
|
|
95
|
-
firstUpdated() {
|
|
96
|
-
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
|
|
97
|
-
this.slotHasContent = hasContent;
|
|
98
|
-
this.requestUpdate();
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
render() {
|
|
102
|
-
return b `<div
|
|
103
|
-
class=${e({
|
|
104
|
-
divider: true,
|
|
105
|
-
vertical: this.vertical,
|
|
106
|
-
'slot-has-content': this.slotHasContent,
|
|
107
|
-
})}
|
|
108
|
-
>
|
|
109
|
-
<div class="line"></div>
|
|
110
|
-
<div class="slot-container">
|
|
111
|
-
<slot></slot>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="line"></div>
|
|
114
|
-
</div>`;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
Divider.styles = [css_248z];
|
|
118
|
-
__decorate([
|
|
119
|
-
n({ type: Boolean, reflect: true })
|
|
120
|
-
], Divider.prototype, "vertical", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
r()
|
|
123
|
-
], Divider.prototype, "slotHasContent", void 0);
|
|
124
|
-
|
|
125
|
-
export { Divider };
|
|
126
|
-
//# sourceMappingURL=divider.js.map
|
package/dist/divider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../src/divider/divider.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './divider.scss';\nimport { observerSlotChangesWithCallback } from '../utils.js';\n\n/**\n * @label Divider\n * @tag base-divider\n * @rawTag divider\n *\n * @summary The divider component is used to visually separate content.\n * @overview\n * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.\n * - They can be oriented either vertically or horizontally, depending on the layout requirements.\n *\n * @cssprop --divider-color - Controls the color of the divider.\n * @cssprop --divider-padding - Controls the padding of the divider.\n *\n * @example\n * ```html\n * <base-divider style=\"width: 12rem;\">or</base-divider>\n * ```\n * @tags display\n */\nexport class Divider extends LitElement {\n static styles = [styles];\n\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n @state()\n slotHasContent = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n render() {\n return html`<div\n class=${classMap({\n divider: true,\n vertical: this.vertical,\n 'slot-has-content': this.slotHasContent,\n })}\n >\n <div class=\"line\"></div>\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n <div class=\"line\"></div>\n </div>`;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;AAkBG;AACG,MAAO,OAAQ,SAAQA,GAAU,CAAA;AAAvC,IAAA,WAAA,GAAA;;QAG8C,IAAA,CAAA,QAAQ,GAAG,KAAK;QAG5D,IAAA,CAAA,cAAc,GAAG,KAAK;IA2BxB;IAzBE,YAAY,GAAA;AACV,QAAA,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,IAAG;AACX,YAAA,IAAI,CAAC,cAAc,GAAG,UAAU;YAChC,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CACF;IACH;IAEA,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA,CAAA;AACD,YAAA,EAAAC,CAAQ,CAAC;AACf,YAAA,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG;IACT;;AA/BO,OAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAEoB,UAAA,CAAA;IAA3CC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAAmB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG7D,UAAA,CAAA;AADC,IAAAC,CAAK;AACiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;;;;"}
|
package/dist/elevation.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { i, a as i$1, b } from './lit-element-CA46RFZ_.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = i`/**
|
|
4
|
-
* Derived from Material Design Elevation
|
|
5
|
-
* https://github.com/material-components/material-web/blob/main/elevation/internal/_elevation.scss
|
|
6
|
-
*/
|
|
7
|
-
:host,
|
|
8
|
-
.shadow,
|
|
9
|
-
.shadow::before,
|
|
10
|
-
.shadow::after {
|
|
11
|
-
border-start-start-radius: var(--elevation-container-shape-start-start, var(--elevation-container-shape));
|
|
12
|
-
border-start-end-radius: var(--elevation-container-shape-start-end, var(--elevation-container-shape));
|
|
13
|
-
border-end-start-radius: var(--elevation-container-shape-end-start, var(--elevation-container-shape));
|
|
14
|
-
border-end-end-radius: var(--elevation-container-shape-end-end, var(--elevation-container-shape));
|
|
15
|
-
corner-shape: var(--elevation-container-shape-variant);
|
|
16
|
-
inset: 0;
|
|
17
|
-
position: absolute;
|
|
18
|
-
transition-duration: inherit;
|
|
19
|
-
transition-property: inherit;
|
|
20
|
-
transition-timing-function: inherit;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host {
|
|
24
|
-
display: flex;
|
|
25
|
-
pointer-events: none;
|
|
26
|
-
transition-property: box-shadow, opacity;
|
|
27
|
-
--elevation-level: 0;
|
|
28
|
-
--elevation-color: var(--elevation-color-default, black);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.shadow::before,
|
|
32
|
-
.shadow::after {
|
|
33
|
-
content: "";
|
|
34
|
-
transition-property: box-shadow, opacity;
|
|
35
|
-
--_level: var(--elevation-level);
|
|
36
|
-
--_shadow-color: var(--elevation-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.shadow::before {
|
|
40
|
-
box-shadow: 0 calc(1px * (clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 3, 1) + 2 * clamp(0, var(--_level) - 4, 1))) calc(1px * (2 * clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 2, 1) + clamp(0, var(--_level) - 4, 1))) 0 var(--_shadow-color);
|
|
41
|
-
opacity: 0.3;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.shadow::after {
|
|
45
|
-
box-shadow: 0 calc(1px * (clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 1, 1) + 2 * clamp(0, var(--_level) - 2, 3))) calc(1px * (3 * clamp(0, var(--_level), 2) + 2 * clamp(0, var(--_level) - 2, 3))) calc(1px * (clamp(0, var(--_level), 4) + 2 * clamp(0, var(--_level) - 4, 1))) var(--_shadow-color);
|
|
46
|
-
opacity: 0.15;
|
|
47
|
-
}`;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @label Elevation
|
|
51
|
-
* @tag base-elevation
|
|
52
|
-
* @rawTag elevation
|
|
53
|
-
*
|
|
54
|
-
* @summary Adds elevation to an element.
|
|
55
|
-
* @overview
|
|
56
|
-
* - Elevation adds a shadow effect to an element to give it depth.
|
|
57
|
-
* - It can be used to create a sense of hierarchy or to draw attention to a particular element.
|
|
58
|
-
*
|
|
59
|
-
* @cssprop --elevation-level - Controls the elevation level of the shadow.
|
|
60
|
-
* @cssprop --elevation-color - Controls the color of the shadow.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```html
|
|
64
|
-
* <div style="position: relative; padding: var(--spacing-200);">
|
|
65
|
-
* <base-elevation style='--elevation-level: 2; --elevation-container-shape: var(--shape-corner-extra-small);'></base-elevation>
|
|
66
|
-
* Level 2
|
|
67
|
-
* </div>
|
|
68
|
-
* ```
|
|
69
|
-
* @tags display
|
|
70
|
-
*/
|
|
71
|
-
class Elevation extends i$1 {
|
|
72
|
-
render() {
|
|
73
|
-
return b `<span class="shadow"></span>`;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
Elevation.styles = [css_248z];
|
|
77
|
-
|
|
78
|
-
export { Elevation };
|
|
79
|
-
//# sourceMappingURL=elevation.js.map
|
package/dist/elevation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.js","sources":["../../src/elevation/elevation.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport styles from './elevation.scss';\n\n/**\n * @label Elevation\n * @tag base-elevation\n * @rawTag elevation\n *\n * @summary Adds elevation to an element.\n * @overview\n * - Elevation adds a shadow effect to an element to give it depth.\n * - It can be used to create a sense of hierarchy or to draw attention to a particular element.\n *\n * @cssprop --elevation-level - Controls the elevation level of the shadow.\n * @cssprop --elevation-color - Controls the color of the shadow.\n *\n * @example\n * ```html\n * <div style=\"position: relative; padding: var(--spacing-200);\">\n * <base-elevation style='--elevation-level: 2; --elevation-container-shape: var(--shape-corner-extra-small);'></base-elevation>\n * Level 2\n * </div>\n * ```\n * @tags display\n */\nexport class Elevation extends LitElement {\n static styles = [styles];\n\n render() {\n return html`<span class=\"shadow\"></span>`;\n }\n}\n"],"names":["LitElement","html","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACG,MAAO,SAAU,SAAQA,GAAU,CAAA;IAGvC,MAAM,GAAA;QACJ,OAAOC,CAAI,CAAA,CAAA,4BAAA,CAA8B;IAC3C;;AAJO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;;;;"}
|