@esri/calcite-components 1.0.0-next.323 → 1.0.0-next.327
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/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-17a5fd88.entry.js +5 -0
- package/dist/calcite/{p-0d3c30eb.system.entry.js → p-30452b98.system.entry.js} +1 -1
- package/dist/calcite/{p-c0eefed8.entry.js → p-5099e389.entry.js} +1 -1
- package/dist/calcite/p-7efe15d0.entry.js +5 -0
- package/dist/calcite/{p-84e2d36a.system.entry.js → p-87dac28d.system.entry.js} +2 -2
- package/dist/calcite/p-8e252799.system.js +1 -1
- package/dist/calcite/{p-3dd6830e.entry.js → p-9b117f75.entry.js} +1 -1
- package/dist/calcite/{p-20bc20ee.entry.js → p-9c22e936.entry.js} +1 -1
- package/dist/calcite/p-a871ba8a.system.entry.js +5 -0
- package/dist/calcite/{p-f017cbc6.system.entry.js → p-ba1cabf2.system.entry.js} +1 -1
- package/dist/calcite/{p-e633c044.system.entry.js → p-cc09e68b.system.entry.js} +1 -1
- package/dist/calcite/p-e2058b98.system.entry.js +5 -0
- package/dist/calcite/p-f834b297.entry.js +5 -0
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +10 -0
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-graph_2.cjs.entry.js +15 -4
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +10 -0
- package/dist/cjs/calcite-split-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tip_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/calcite-date-picker/calcite-date-picker.js +16 -2
- package/dist/collection/components/calcite-dropdown-item/calcite-dropdown-item.css +12 -0
- package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.js +16 -2
- package/dist/collection/components/calcite-slider/calcite-slider.css +139 -160
- package/dist/collection/components/calcite-slider/calcite-slider.js +57 -22
- package/dist/collection/components/calcite-split-button/calcite-split-button.css +4 -1
- package/dist/collection/components/calcite-tip-manager/calcite-tip-manager.css +1 -1
- package/dist/components/calcite-date-picker2.js +12 -2
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-input-date-picker.js +12 -2
- package/dist/components/calcite-slider.js +16 -4
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/custom-elements/index.js +41 -10
- package/dist/esm/calcite-date-picker_4.entry.js +10 -0
- package/dist/esm/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm/calcite-graph_2.entry.js +15 -4
- package/dist/esm/calcite-input-date-picker.entry.js +10 -0
- package/dist/esm/calcite-split-button.entry.js +1 -1
- package/dist/esm/calcite-tip_3.entry.js +1 -1
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +2 -2
- package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm-es5/calcite-split-button.entry.js +1 -1
- package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/extras/docs-json.json +31 -5
- package/dist/types/components/calcite-date-picker/calcite-date-picker.d.ts +2 -0
- package/dist/types/components/calcite-input-date-picker/calcite-input-date-picker.d.ts +2 -0
- package/dist/types/components/calcite-slider/calcite-slider.d.ts +5 -0
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +43 -11
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/calcite/p-3c906c3c.entry.js +0 -5
- package/dist/calcite/p-7a16a9e4.entry.js +0 -5
- package/dist/calcite/p-94f690de.system.entry.js +0 -5
- package/dist/calcite/p-d575e6f4.entry.js +0 -5
- package/dist/calcite/p-fa7105a4.system.entry.js +0 -5
|
@@ -90,6 +90,46 @@
|
|
|
90
90
|
display: none;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
.scale--s {
|
|
94
|
+
--calcite-slider-handle-size: 10px;
|
|
95
|
+
--calcite-slider-handle-extension-height: 6.5px;
|
|
96
|
+
--calcite-slider-container-font-size: var(--calcite-font-size--3);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.scale--s .handle__label,
|
|
100
|
+
.scale--s .tick__label {
|
|
101
|
+
line-height: .75rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.scale--m {
|
|
105
|
+
--calcite-slider-handle-size: 14px;
|
|
106
|
+
--calcite-slider-handle-extension-height: 8px;
|
|
107
|
+
--calcite-slider-container-font-size: var(--calcite-font-size--2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.scale--m .handle__label,
|
|
111
|
+
.scale--m .tick__label {
|
|
112
|
+
line-height: 1rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.scale--l {
|
|
116
|
+
--calcite-slider-handle-size: 16px;
|
|
117
|
+
--calcite-slider-handle-extension-height: 10.5px;
|
|
118
|
+
--calcite-slider-container-font-size: var(--calcite-font-size--1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.scale--l .handle__label,
|
|
122
|
+
.scale--l .tick__label {
|
|
123
|
+
line-height: 1rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.handle__label,
|
|
127
|
+
.tick__label {
|
|
128
|
+
font-weight: var(--calcite-font-weight-medium);
|
|
129
|
+
color: var(--calcite-ui-text-2);
|
|
130
|
+
font-size: var(--calcite-slider-container-font-size);
|
|
131
|
+
}
|
|
132
|
+
|
|
93
133
|
:host {
|
|
94
134
|
display: block;
|
|
95
135
|
}
|
|
@@ -97,8 +137,11 @@
|
|
|
97
137
|
.container {
|
|
98
138
|
display: block;
|
|
99
139
|
position: relative;
|
|
100
|
-
padding:
|
|
101
|
-
margin:
|
|
140
|
+
padding: calc(var(--calcite-slider-handle-size) * 0.5);
|
|
141
|
+
margin: calc(var(--calcite-slider-handle-size) * 0.5) 0;
|
|
142
|
+
--calcite-slider-full-handle-height: calc(
|
|
143
|
+
var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height)
|
|
144
|
+
);
|
|
102
145
|
}
|
|
103
146
|
|
|
104
147
|
:host([disabled]) {
|
|
@@ -111,34 +154,29 @@
|
|
|
111
154
|
background-color: var(--calcite-ui-text-3);
|
|
112
155
|
}
|
|
113
156
|
|
|
114
|
-
:
|
|
115
|
-
|
|
157
|
+
.scale--s .thumb:not(.thumb--precise) {
|
|
158
|
+
--calcite-slider-thumb-y-offset: -6px;
|
|
116
159
|
}
|
|
117
160
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* with text elements to prevent overlap
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
:host([label-handles]) .container,
|
|
124
|
-
:host([precise]:not([precise=false])) .container {
|
|
125
|
-
margin-top: 21px;
|
|
161
|
+
.scale--m .thumb:not(.thumb--precise) {
|
|
162
|
+
--calcite-slider-thumb-y-offset: -8px;
|
|
126
163
|
}
|
|
127
164
|
|
|
128
|
-
:
|
|
129
|
-
:
|
|
130
|
-
margin-bottom: 21px;
|
|
165
|
+
.scale--l .thumb:not(.thumb--precise) {
|
|
166
|
+
--calcite-slider-thumb-y-offset: -9px;
|
|
131
167
|
}
|
|
132
168
|
|
|
133
|
-
:host([precise]:not([
|
|
134
|
-
|
|
169
|
+
:host([precise]:not([has-histogram])) .container .thumb--value {
|
|
170
|
+
--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1);
|
|
135
171
|
}
|
|
136
172
|
|
|
137
|
-
|
|
138
|
-
|
|
173
|
+
.thumb-container {
|
|
174
|
+
max-width: 100%;
|
|
175
|
+
position: relative;
|
|
139
176
|
}
|
|
140
177
|
|
|
141
178
|
.thumb {
|
|
179
|
+
--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * 0.5);
|
|
142
180
|
position: absolute;
|
|
143
181
|
border-style: none;
|
|
144
182
|
background-color: transparent;
|
|
@@ -151,16 +189,7 @@
|
|
|
151
189
|
flex-direction: column;
|
|
152
190
|
align-items: center;
|
|
153
191
|
font-family: inherit;
|
|
154
|
-
|
|
155
|
-
transform: translate(7px, -8px);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.thumb .handle__label {
|
|
159
|
-
font-size: var(--calcite-font-size--2);
|
|
160
|
-
font-weight: 500;
|
|
161
|
-
line-height: 1;
|
|
162
|
-
color: var(--calcite-ui-text-2);
|
|
163
|
-
margin-bottom: 5px;
|
|
192
|
+
transform: translate(var(--calcite-slider-thumb-x-offset), var(--calcite-slider-thumb-y-offset));
|
|
164
193
|
}
|
|
165
194
|
|
|
166
195
|
.thumb .handle__label.static, .thumb .handle__label.transformed {
|
|
@@ -180,18 +209,18 @@
|
|
|
180
209
|
outline-offset: 0;
|
|
181
210
|
outline-color: transparent;
|
|
182
211
|
transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
|
|
183
|
-
height: 14px;
|
|
184
|
-
width: 14px;
|
|
185
212
|
box-sizing: border-box;
|
|
186
|
-
border-radius:
|
|
213
|
+
border-radius: 9999px;
|
|
187
214
|
background-color: var(--calcite-ui-foreground-1);
|
|
215
|
+
height: var(--calcite-slider-handle-size);
|
|
216
|
+
width: var(--calcite-slider-handle-size);
|
|
188
217
|
box-shadow: 0 0 0 2px var(--calcite-ui-text-3) inset;
|
|
189
218
|
transition: border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
|
|
190
219
|
}
|
|
191
220
|
|
|
192
221
|
.thumb .handle-extension {
|
|
193
|
-
width:
|
|
194
|
-
height:
|
|
222
|
+
width: 0.125rem;
|
|
223
|
+
height: var(--calcite-slider-handle-extension-height);
|
|
195
224
|
background-color: var(--calcite-ui-text-3);
|
|
196
225
|
}
|
|
197
226
|
|
|
@@ -206,112 +235,56 @@
|
|
|
206
235
|
.thumb:focus .handle {
|
|
207
236
|
outline: 2px solid var(--calcite-ui-brand);
|
|
208
237
|
outline-offset: 2px;
|
|
209
|
-
outline-offset: 2px;
|
|
210
238
|
}
|
|
211
239
|
|
|
212
240
|
.thumb:focus .handle-extension {
|
|
213
241
|
background-color: var(--calcite-ui-brand);
|
|
214
242
|
}
|
|
215
243
|
|
|
216
|
-
.thumb--minValue {
|
|
217
|
-
transform: translate(-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* uncomment for helpful debugging UI */
|
|
221
|
-
|
|
222
|
-
:host([label-handles]) .thumb {
|
|
223
|
-
transform: translate(50%, -25px);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
:host([label-handles]) .thumb--minValue {
|
|
227
|
-
transform: translate(-50%, -25px);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
:host([has-histogram][label-handles]) .thumb {
|
|
231
|
-
transform: translate(50%, -8px);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([has-histogram][label-handles]) .thumb .handle__label {
|
|
235
|
-
margin-bottom: unset;
|
|
236
|
-
margin-top: 5px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
:host([has-histogram][label-handles]) .thumb--minValue {
|
|
240
|
-
transform: translate(-50%, -8px);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
:host([precise]:not([precise=false])) .thumb {
|
|
244
|
-
transform: translate(7px, -21px);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
:host([precise]:not([precise=false])) .thumb--minValue {
|
|
248
|
-
transform: translate(-7px, -2px);
|
|
244
|
+
.thumb.thumb--minValue {
|
|
245
|
+
transform: translate(calc(var(--calcite-slider-thumb-x-offset) * -1), var(--calcite-slider-thumb-y-offset));
|
|
249
246
|
}
|
|
250
247
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
margin-top: 5px;
|
|
248
|
+
.thumb.thumb--precise {
|
|
249
|
+
--calcite-slider-thumb-y-offset: -2px;
|
|
254
250
|
}
|
|
255
251
|
|
|
256
|
-
:host([
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
:host([has-histogram][precise]:not([precise=false])) .thumb--minValue {
|
|
261
|
-
transform: translate(-50%, -2px);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
:host([ticks][precise]:not([precise=false])) .thumb {
|
|
265
|
-
transform: translate(7px, -20px);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
:host([ticks][precise]:not([precise=false])) .thumb--minValue {
|
|
269
|
-
transform: translate(-7px, -3px);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
:host([has-histogram][ticks][precise]:not([precise=false])) .thumb {
|
|
273
|
-
transform: translate(7px, -3px);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue {
|
|
277
|
-
transform: translate(-50%, -3px);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
:host([label-handles][precise]:not([precise=false])) .thumb {
|
|
281
|
-
transform: translate(50%, -38px);
|
|
252
|
+
:host([label-handles]) .thumb {
|
|
253
|
+
--calcite-slider-thumb-x-offset: 50%;
|
|
282
254
|
}
|
|
283
255
|
|
|
284
|
-
:host([label-handles]
|
|
285
|
-
|
|
256
|
+
:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise) {
|
|
257
|
+
--calcite-slider-thumb-y-offset: -23px;
|
|
286
258
|
}
|
|
287
259
|
|
|
288
|
-
:host([
|
|
289
|
-
|
|
260
|
+
:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise) {
|
|
261
|
+
--calcite-slider-thumb-y-offset: -30px;
|
|
290
262
|
}
|
|
291
263
|
|
|
292
|
-
:host([
|
|
293
|
-
|
|
264
|
+
:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise) {
|
|
265
|
+
--calcite-slider-thumb-y-offset: -32px;
|
|
294
266
|
}
|
|
295
267
|
|
|
296
|
-
:host([
|
|
297
|
-
|
|
268
|
+
:host([has-histogram][label-handles]) .handle__label,
|
|
269
|
+
:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label {
|
|
270
|
+
margin-top: 0.5em;
|
|
298
271
|
}
|
|
299
272
|
|
|
300
|
-
:host([
|
|
301
|
-
|
|
273
|
+
:host(:not([has-histogram]):not([precise])) .handle__label,
|
|
274
|
+
:host([label-handles]:not([has-histogram])) .thumb--value .handle__label {
|
|
275
|
+
margin-bottom: 0.5em;
|
|
302
276
|
}
|
|
303
277
|
|
|
304
|
-
:host([
|
|
305
|
-
|
|
278
|
+
:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value {
|
|
279
|
+
--calcite-slider-thumb-y-offset: -33px;
|
|
306
280
|
}
|
|
307
281
|
|
|
308
|
-
:host([
|
|
309
|
-
|
|
282
|
+
:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value {
|
|
283
|
+
--calcite-slider-thumb-y-offset: -44px;
|
|
310
284
|
}
|
|
311
285
|
|
|
312
|
-
.thumb
|
|
313
|
-
|
|
314
|
-
z-index: 3;
|
|
286
|
+
:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value {
|
|
287
|
+
--calcite-slider-thumb-y-offset: -49px;
|
|
315
288
|
}
|
|
316
289
|
|
|
317
290
|
.thumb:focus .handle,
|
|
@@ -327,18 +300,17 @@
|
|
|
327
300
|
}
|
|
328
301
|
|
|
329
302
|
.track {
|
|
330
|
-
height:
|
|
303
|
+
height: 0.125rem;
|
|
331
304
|
border-radius: 0;
|
|
332
|
-
|
|
305
|
+
position: relative;
|
|
333
306
|
background-color: var(--calcite-ui-border-2);
|
|
334
307
|
transition: all 250ms ease-in;
|
|
335
|
-
position: relative;
|
|
336
308
|
}
|
|
337
309
|
|
|
338
310
|
.track__range {
|
|
339
311
|
position: absolute;
|
|
340
312
|
top: 0;
|
|
341
|
-
height:
|
|
313
|
+
height: 0.125rem;
|
|
342
314
|
background-color: var(--calcite-ui-brand);
|
|
343
315
|
}
|
|
344
316
|
|
|
@@ -347,23 +319,24 @@
|
|
|
347
319
|
}
|
|
348
320
|
|
|
349
321
|
.container--range .track__range:after {
|
|
350
|
-
content: "";
|
|
351
322
|
position: absolute;
|
|
352
|
-
top: -5px;
|
|
353
323
|
width: 100%;
|
|
354
|
-
|
|
324
|
+
content: "";
|
|
325
|
+
top: calc(var(--calcite-slider-full-handle-height) * 0.5 * -1);
|
|
326
|
+
height: calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height));
|
|
355
327
|
}
|
|
356
328
|
|
|
357
329
|
.tick {
|
|
358
330
|
position: absolute;
|
|
331
|
+
width: 0.125rem;
|
|
332
|
+
height: 0.25rem;
|
|
333
|
+
border-width: 1px;
|
|
334
|
+
border-style: solid;
|
|
335
|
+
background-color: var(--calcite-ui-border-input);
|
|
336
|
+
border-color: var(--calcite-ui-foreground-1);
|
|
359
337
|
top: -2px;
|
|
360
|
-
width: 2px;
|
|
361
|
-
height: 4px;
|
|
362
|
-
left: var(--calcite-ui-border-1-offset);
|
|
363
|
-
margin-left: -2px;
|
|
364
|
-
border: 1px solid var(--calcite-ui-foreground-1);
|
|
365
|
-
background-color: var(--calcite-ui-border-1);
|
|
366
338
|
pointer-events: none;
|
|
339
|
+
margin-inline-start: calc(-1 * 0.125rem);
|
|
367
340
|
}
|
|
368
341
|
|
|
369
342
|
.tick--active {
|
|
@@ -371,43 +344,25 @@
|
|
|
371
344
|
}
|
|
372
345
|
|
|
373
346
|
.tick__label {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
font-weight: 500;
|
|
377
|
-
color: var(--calcite-ui-text-2);
|
|
378
|
-
width: 4em;
|
|
379
|
-
margin: 14px -2em;
|
|
380
|
-
text-align: center;
|
|
381
|
-
display: block;
|
|
347
|
+
display: flex;
|
|
348
|
+
justify-content: center;
|
|
382
349
|
pointer-events: none;
|
|
350
|
+
margin-top: 0.875rem;
|
|
383
351
|
}
|
|
384
352
|
|
|
385
353
|
.tick__label--min {
|
|
386
|
-
left: 0;
|
|
387
|
-
margin: 14px -3px;
|
|
388
|
-
text-align: left;
|
|
389
354
|
transition: opacity 150ms;
|
|
390
355
|
}
|
|
391
356
|
|
|
392
357
|
.tick__label--max {
|
|
393
|
-
left: unset;
|
|
394
|
-
right: 0;
|
|
395
|
-
margin: 14px -3px;
|
|
396
|
-
text-align: right;
|
|
397
358
|
transition: opacity 50ms;
|
|
398
359
|
}
|
|
399
360
|
|
|
400
361
|
:host([has-histogram][label-handles]) .tick__label--min,
|
|
401
|
-
:host([has-histogram][label-handles]) .tick__label--max
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
:host([has-histogram][precise]:not([precise=false])) .tick__label--min,
|
|
408
|
-
:host([has-histogram][precise]:not([precise=false])) .tick__label--max {
|
|
409
|
-
margin: 6px -3px;
|
|
410
|
-
font-weight: 300;
|
|
362
|
+
:host([has-histogram][label-handles]) .tick__label--max,
|
|
363
|
+
:host([has-histogram][precise]) .tick__label--min,
|
|
364
|
+
:host([has-histogram][precise]) .tick__label--max {
|
|
365
|
+
font-weight: var(--calcite-font-weight-normal);
|
|
411
366
|
color: var(--calcite-ui-text-3);
|
|
412
367
|
}
|
|
413
368
|
|
|
@@ -415,16 +370,40 @@
|
|
|
415
370
|
color: var(--calcite-ui-foreground-3);
|
|
416
371
|
}
|
|
417
372
|
|
|
418
|
-
:host([
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
373
|
+
:host([label-ticks][ticks]) .container {
|
|
374
|
+
padding-bottom: calc(0.875rem + var(--calcite-slider-container-font-size));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
:host([has-histogram]):host([precise][label-handles]) .container {
|
|
378
|
+
padding-bottom: calc(var(--calcite-slider-full-handle-height) + 1em);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
:host([has-histogram]):host([label-handles]:not([precise])) .container {
|
|
382
|
+
padding-bottom: calc(var(--calcite-slider-handle-size) * 0.5 + 1em);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
:host([has-histogram]):host([precise]:not([label-handles])) .container {
|
|
386
|
+
padding-bottom: var(--calcite-slider-full-handle-height);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
:host(:not([has-histogram])):host([precise]:not([label-handles])) .container {
|
|
390
|
+
padding-top: var(--calcite-slider-full-handle-height);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range {
|
|
394
|
+
padding-bottom: var(--calcite-slider-full-handle-height);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
:host(:not([has-histogram])):host([label-handles]:not([precise])) .container {
|
|
398
|
+
padding-top: calc(var(--calcite-slider-full-handle-height) + 4px);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
:host(:not([has-histogram])):host([label-handles][precise]) .container {
|
|
402
|
+
padding-top: calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px);
|
|
422
403
|
}
|
|
423
404
|
|
|
424
|
-
:host(
|
|
425
|
-
|
|
426
|
-
left: 0;
|
|
427
|
-
text-align: left;
|
|
405
|
+
:host(:not([has-histogram])):host([label-handles][precise]) .container--range {
|
|
406
|
+
padding-bottom: calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px);
|
|
428
407
|
}
|
|
429
408
|
|
|
430
409
|
::slotted(input[slot=hidden-form-input]) {
|
|
@@ -45,6 +45,10 @@ export class CalciteSlider {
|
|
|
45
45
|
this.step = 1;
|
|
46
46
|
/** Currently selected number (if single select) */
|
|
47
47
|
this.value = null;
|
|
48
|
+
/**
|
|
49
|
+
* Specify the scale of the slider, defaults to m
|
|
50
|
+
*/
|
|
51
|
+
this.scale = "m";
|
|
48
52
|
this.guid = `calcite-slider-${guid()}`;
|
|
49
53
|
this.isRange = false;
|
|
50
54
|
this.activeProp = "value";
|
|
@@ -259,7 +263,11 @@ export class CalciteSlider {
|
|
|
259
263
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()),
|
|
260
264
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString())));
|
|
261
265
|
return (h(Host, { id: id, onTouchStart: this.handleTouchStart },
|
|
262
|
-
h("div", { class: {
|
|
266
|
+
h("div", { class: {
|
|
267
|
+
["container"]: true,
|
|
268
|
+
["container--range"]: this.isRange,
|
|
269
|
+
[`scale--${this.scale}`]: true
|
|
270
|
+
} },
|
|
263
271
|
this.renderGraph(),
|
|
264
272
|
h("div", { class: "track", ref: this.storeTrackRef },
|
|
265
273
|
h("div", { class: "track__range", onPointerDown: () => this.dragStart("minMaxValue"), style: {
|
|
@@ -280,27 +288,31 @@ export class CalciteSlider {
|
|
|
280
288
|
right: mirror ? tickOffset : ""
|
|
281
289
|
} }, this.renderTickLabel(tick)));
|
|
282
290
|
}))),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
!this.
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
291
|
+
h("div", { class: "thumb-container" },
|
|
292
|
+
!this.precise && !this.labelHandles && this.isRange && minHandle,
|
|
293
|
+
!this.hasHistogram &&
|
|
294
|
+
!this.precise &&
|
|
295
|
+
this.labelHandles &&
|
|
296
|
+
this.isRange &&
|
|
297
|
+
minLabeledHandle,
|
|
298
|
+
this.precise && !this.labelHandles && this.isRange && minPreciseHandle,
|
|
299
|
+
this.precise && this.labelHandles && this.isRange && minLabeledPreciseHandle,
|
|
300
|
+
this.hasHistogram &&
|
|
301
|
+
!this.precise &&
|
|
302
|
+
this.labelHandles &&
|
|
303
|
+
this.isRange &&
|
|
304
|
+
minHistogramLabeledHandle,
|
|
305
|
+
!this.precise && !this.labelHandles && handle,
|
|
306
|
+
!this.hasHistogram && !this.precise && this.labelHandles && labeledHandle,
|
|
307
|
+
!this.hasHistogram && this.precise && !this.labelHandles && preciseHandle,
|
|
308
|
+
this.hasHistogram && this.precise && !this.labelHandles && histogramPreciseHandle,
|
|
309
|
+
!this.hasHistogram && this.precise && this.labelHandles && labeledPreciseHandle,
|
|
310
|
+
this.hasHistogram && !this.precise && this.labelHandles && histogramLabeledHandle,
|
|
311
|
+
this.hasHistogram &&
|
|
312
|
+
this.precise &&
|
|
313
|
+
this.labelHandles &&
|
|
314
|
+
histogramLabeledPreciseHandle,
|
|
315
|
+
h(HiddenFormInputSlot, { component: this })))));
|
|
304
316
|
}
|
|
305
317
|
renderGraph() {
|
|
306
318
|
return this.histogram ? (h("div", { class: "graph" },
|
|
@@ -1143,6 +1155,29 @@ export class CalciteSlider {
|
|
|
1143
1155
|
"attribute": "value",
|
|
1144
1156
|
"reflect": true,
|
|
1145
1157
|
"defaultValue": "null"
|
|
1158
|
+
},
|
|
1159
|
+
"scale": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"mutable": false,
|
|
1162
|
+
"complexType": {
|
|
1163
|
+
"original": "Scale",
|
|
1164
|
+
"resolved": "\"l\" | \"m\" | \"s\"",
|
|
1165
|
+
"references": {
|
|
1166
|
+
"Scale": {
|
|
1167
|
+
"location": "import",
|
|
1168
|
+
"path": "../interfaces"
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
"required": false,
|
|
1173
|
+
"optional": false,
|
|
1174
|
+
"docs": {
|
|
1175
|
+
"tags": [],
|
|
1176
|
+
"text": "Specify the scale of the slider, defaults to m"
|
|
1177
|
+
},
|
|
1178
|
+
"attribute": "scale",
|
|
1179
|
+
"reflect": false,
|
|
1180
|
+
"defaultValue": "\"m\""
|
|
1146
1181
|
}
|
|
1147
1182
|
}; }
|
|
1148
1183
|
static get states() { return {
|
|
@@ -179,7 +179,10 @@
|
|
|
179
179
|
width: 1px;
|
|
180
180
|
display: flex;
|
|
181
181
|
align-items: stretch;
|
|
182
|
-
transition:
|
|
182
|
+
transition-property: all;
|
|
183
|
+
transition-duration: var(--calcite-internal-animation-timing);
|
|
184
|
+
transition-timing-function: ease-in-out;
|
|
185
|
+
transition-delay: 0s;
|
|
183
186
|
background-color: var(--calcite-split-button-background);
|
|
184
187
|
}
|
|
185
188
|
|
|
@@ -202,7 +202,7 @@ h5.heading {
|
|
|
202
202
|
transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
|
|
203
203
|
margin-top: 1px;
|
|
204
204
|
animation-name: none;
|
|
205
|
-
animation-duration:
|
|
205
|
+
animation-duration: var(--calcite-internal-animation-timing);
|
|
206
206
|
height: var(--calcite-tip-manager-height);
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -285,6 +285,12 @@ let CalciteDatePicker = class extends HTMLElement {
|
|
|
285
285
|
this.activeEndDate = endDate;
|
|
286
286
|
this.activeStartDate = startDate;
|
|
287
287
|
}
|
|
288
|
+
onMinChanged(min) {
|
|
289
|
+
this.minAsDate = dateFromISO(min);
|
|
290
|
+
}
|
|
291
|
+
onMaxChanged(max) {
|
|
292
|
+
this.maxAsDate = dateFromISO(max);
|
|
293
|
+
}
|
|
288
294
|
// --------------------------------------------------------------------------
|
|
289
295
|
//
|
|
290
296
|
// Lifecycle
|
|
@@ -314,6 +320,8 @@ let CalciteDatePicker = class extends HTMLElement {
|
|
|
314
320
|
}
|
|
315
321
|
async componentWillLoad() {
|
|
316
322
|
await this.loadLocaleData();
|
|
323
|
+
this.onMinChanged(this.min);
|
|
324
|
+
this.onMaxChanged(this.max);
|
|
317
325
|
}
|
|
318
326
|
render() {
|
|
319
327
|
var _a;
|
|
@@ -434,6 +442,8 @@ let CalciteDatePicker = class extends HTMLElement {
|
|
|
434
442
|
"valueAsDate": ["handleValueAsDate"],
|
|
435
443
|
"startAsDate": ["handleRangeChange"],
|
|
436
444
|
"endAsDate": ["handleRangeChange"],
|
|
445
|
+
"min": ["onMinChanged"],
|
|
446
|
+
"max": ["onMaxChanged"],
|
|
437
447
|
"value": ["valueHandler"],
|
|
438
448
|
"start": ["startWatcher"],
|
|
439
449
|
"end": ["endWatcher"],
|
|
@@ -450,8 +460,8 @@ CalciteDatePicker = /*@__PURE__*/ proxyCustomElement(CalciteDatePicker, [1, "cal
|
|
|
450
460
|
"endAsDate": [1040],
|
|
451
461
|
"minAsDate": [1040],
|
|
452
462
|
"maxAsDate": [1040],
|
|
453
|
-
"min": [
|
|
454
|
-
"max": [
|
|
463
|
+
"min": [1025],
|
|
464
|
+
"max": [1025],
|
|
455
465
|
"intlPrevMonth": [1, "intl-prev-month"],
|
|
456
466
|
"intlNextMonth": [1, "intl-next-month"],
|
|
457
467
|
"locale": [1],
|
|
@@ -16,7 +16,7 @@ const CSS = {
|
|
|
16
16
|
containerNone: "container--none-selection"
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const calciteDropdownItemCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-internal-animation-timing-factor:var(--calcite-animation-timing-factor, 1);--calcite-internal-animation-timing:calc(150ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-quick:calc(100ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-animation-timing-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-internal-animation-timing);animation-duration:var(--calcite-internal-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}.container--s{font-size:var(--calcite-font-size--2);line-height:1rem;padding-top:0.25rem;padding-bottom:0.25rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem;-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}.container--m{font-size:var(--calcite-font-size--1);line-height:1rem;padding-top:0.5rem;padding-bottom:0.5rem;-webkit-padding-end:0.75rem;padding-inline-end:0.75rem;-webkit-padding-start:2rem;padding-inline-start:2rem}.container--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-padding-end:1rem;padding-inline-end:1rem;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;position:relative}.container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;text-decoration:none;outline:2px solid transparent;outline-offset:2px;position:relative}.dropdown-item-content{-webkit-padding-end:auto;padding-inline-end:auto;-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host,.container--link a{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.container--link{padding:0}.container--link a{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;text-decoration:none;outline:2px solid transparent;outline-offset:2px;position:relative}.container--s .dropdown-link{font-size:var(--calcite-font-size--2);line-height:1rem;padding-top:0.25rem;padding-bottom:0.25rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem;-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}.container--m .dropdown-link{font-size:var(--calcite-font-size--1);line-height:1rem;padding-top:0.5rem;padding-bottom:0.5rem;-webkit-padding-end:0.75rem;padding-inline-end:0.75rem;-webkit-padding-start:2rem;padding-inline-start:2rem}.container--l .dropdown-link{font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-padding-end:1rem;padding-inline-end:1rem;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host(:hover) .container,:host(:active) .container{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);text-decoration:none}:host(:hover) .container--link .dropdown-link,:host(:active) .container--link .dropdown-link{color:var(--calcite-ui-text-1)}:host(:focus) .container{color:var(--calcite-ui-text-1);text-decoration:none}:host(:active) .container{background-color:var(--calcite-ui-foreground-3)}:host(:hover) .container:before,:host(:active) .container:before,:host(:focus) .container:before{opacity:1}:host([active]) .container:not(.container--none-selection),:host([active]) .container--link .dropdown-link{color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium)}:host([active]) .container:not(.container--none-selection):before,:host([active]) .container--link .dropdown-link:before{opacity:1;color:var(--calcite-ui-brand)}:host([active]) .container:not(.container--none-selection) calcite-icon,:host([active]) .container--link .dropdown-link calcite-icon{color:var(--calcite-ui-brand)}.container--multi-selection:before,.container--none-selection:before{display:none}.container--s:before{inset-inline-start:0.5rem}.container--m:before{inset-inline-start:0.75rem}.container--l:before{inset-inline-start:1rem}.dropdown-item-icon{position:absolute;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(0.9);transform:scale(0.9)}.container--s .dropdown-item-icon{inset-inline-start:0.25rem}.container--m .dropdown-item-icon{inset-inline-start:0.5rem}.container--l .dropdown-item-icon{inset-inline-start:0.75rem}:host(:hover) .dropdown-item-icon{color:var(--calcite-ui-border-1);opacity:1}:host([active]) .dropdown-item-icon{color:var(--calcite-ui-brand);opacity:1}.container--s .dropdown-item-icon-start{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--s .dropdown-item-icon-end{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.container--m .dropdown-item-icon-start{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--m .dropdown-item-icon-end{-webkit-margin-start:0.75rem;margin-inline-start:0.75rem}.container--l .dropdown-item-icon-start{-webkit-margin-end:1rem;margin-inline-end:1rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--l .dropdown-item-icon-end{-webkit-margin-start:1rem;margin-inline-start:1rem}";
|
|
19
|
+
const calciteDropdownItemCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-internal-animation-timing-factor:var(--calcite-animation-timing-factor, 1);--calcite-internal-animation-timing:calc(150ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-quick:calc(100ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-animation-timing-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-animation-timing-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-internal-animation-timing);animation-duration:var(--calcite-internal-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}.container--s{font-size:var(--calcite-font-size--2);line-height:1rem;padding-top:0.25rem;padding-bottom:0.25rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem;-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}.container--m{font-size:var(--calcite-font-size--1);line-height:1rem;padding-top:0.5rem;padding-bottom:0.5rem;-webkit-padding-end:0.75rem;padding-inline-end:0.75rem;-webkit-padding-start:2rem;padding-inline-start:2rem}.container--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-padding-end:1rem;padding-inline-end:1rem;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.container--s.container--none-selection{-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}.container--m.container--none-selection{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}.container--l.container--none-selection{-webkit-padding-start:0.75rem;padding-inline-start:0.75rem}:host{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;position:relative}.container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;text-decoration:none;outline:2px solid transparent;outline-offset:2px;position:relative}.dropdown-item-content{-webkit-padding-end:auto;padding-inline-end:auto;-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host,.container--link a{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.container--link{padding:0}.container--link a{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;text-decoration:none;outline:2px solid transparent;outline-offset:2px;position:relative}.container--s .dropdown-link{font-size:var(--calcite-font-size--2);line-height:1rem;padding-top:0.25rem;padding-bottom:0.25rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem;-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}.container--m .dropdown-link{font-size:var(--calcite-font-size--1);line-height:1rem;padding-top:0.5rem;padding-bottom:0.5rem;-webkit-padding-end:0.75rem;padding-inline-end:0.75rem;-webkit-padding-start:2rem;padding-inline-start:2rem}.container--l .dropdown-link{font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-padding-end:1rem;padding-inline-end:1rem;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host(:hover) .container,:host(:active) .container{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);text-decoration:none}:host(:hover) .container--link .dropdown-link,:host(:active) .container--link .dropdown-link{color:var(--calcite-ui-text-1)}:host(:focus) .container{color:var(--calcite-ui-text-1);text-decoration:none}:host(:active) .container{background-color:var(--calcite-ui-foreground-3)}:host(:hover) .container:before,:host(:active) .container:before,:host(:focus) .container:before{opacity:1}:host([active]) .container:not(.container--none-selection),:host([active]) .container--link .dropdown-link{color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium)}:host([active]) .container:not(.container--none-selection):before,:host([active]) .container--link .dropdown-link:before{opacity:1;color:var(--calcite-ui-brand)}:host([active]) .container:not(.container--none-selection) calcite-icon,:host([active]) .container--link .dropdown-link calcite-icon{color:var(--calcite-ui-brand)}.container--multi-selection:before,.container--none-selection:before{display:none}.container--s:before{inset-inline-start:0.5rem}.container--m:before{inset-inline-start:0.75rem}.container--l:before{inset-inline-start:1rem}.dropdown-item-icon{position:absolute;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(0.9);transform:scale(0.9)}.container--s .dropdown-item-icon{inset-inline-start:0.25rem}.container--m .dropdown-item-icon{inset-inline-start:0.5rem}.container--l .dropdown-item-icon{inset-inline-start:0.75rem}:host(:hover) .dropdown-item-icon{color:var(--calcite-ui-border-1);opacity:1}:host([active]) .dropdown-item-icon{color:var(--calcite-ui-brand);opacity:1}.container--s .dropdown-item-icon-start{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--s .dropdown-item-icon-end{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.container--m .dropdown-item-icon-start{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--m .dropdown-item-icon-end{-webkit-margin-start:0.75rem;margin-inline-start:0.75rem}.container--l .dropdown-item-icon-start{-webkit-margin-end:1rem;margin-inline-end:1rem;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.container--l .dropdown-item-icon-end{-webkit-margin-start:1rem;margin-inline-start:1rem}";
|
|
20
20
|
|
|
21
21
|
let CalciteDropdownItem$1 = class extends HTMLElement {
|
|
22
22
|
constructor() {
|