@esri/calcite-components 1.0.0-next.361 → 1.0.0-next.365
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-26fd946c.entry.js +5 -0
- package/dist/calcite/p-2b48aa8c.entry.js +5 -0
- package/dist/calcite/{p-0b0ce9b2.system.entry.js → p-3280f0ac.system.entry.js} +1 -1
- package/dist/calcite/p-409d0a3f.entry.js +5 -0
- package/dist/calcite/p-40bb088d.entry.js +5 -0
- package/dist/calcite/{p-2dee637a.system.entry.js → p-5c256f31.system.entry.js} +1 -1
- package/dist/calcite/p-7cf09784.system.entry.js +5 -0
- package/dist/calcite/p-7ed5b78e.system.entry.js +5 -0
- package/dist/calcite/p-8a237191.system.entry.js +5 -0
- package/dist/calcite/p-99d32fc3.system.js +1 -1
- package/dist/calcite/p-9bfe6679.system.entry.js +5 -0
- package/dist/calcite/p-9f349c92.entry.js +5 -0
- package/dist/calcite/p-ba000c59.entry.js +5 -0
- package/dist/calcite/p-cf2be87e.entry.js +5 -0
- package/dist/calcite/p-f4614b28.system.entry.js +5 -0
- package/dist/calcite/{p-683e4cf6.entry.js → p-f90b2e7f.entry.js} +1 -1
- package/dist/calcite/{p-8b145872.system.entry.js → p-f94619be.system.entry.js} +1 -1
- package/dist/cjs/calcite-alert.cjs.entry.js +15 -9
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +15 -0
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +22 -11
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -8
- package/dist/cjs/calcite-graph_2.cjs.entry.js +15 -8
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input.cjs.entry.js +3 -0
- package/dist/cjs/calcite-radio-button.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-alert/calcite-alert.js +15 -9
- package/dist/collection/components/calcite-combobox/calcite-combobox.js +42 -13
- package/dist/collection/components/calcite-combobox/resources.js +3 -0
- package/dist/collection/components/calcite-dropdown/calcite-dropdown.css +1 -1
- package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +12 -7
- package/dist/collection/components/calcite-graph/calcite-graph.css +3 -5
- package/dist/collection/components/calcite-graph/calcite-graph.js +13 -42
- package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +15 -21
- package/dist/collection/components/calcite-input/calcite-input.js +3 -0
- package/dist/collection/components/calcite-radio-button/calcite-radio-button.css +10 -0
- package/dist/collection/components/calcite-slider/calcite-slider.css +1 -0
- package/dist/collection/components/calcite-slider/calcite-slider.js +1 -2
- package/dist/components/calcite-alert.js +15 -9
- package/dist/components/calcite-color-picker-swatch2.js +15 -0
- package/dist/components/calcite-combobox.js +21 -12
- package/dist/components/calcite-dropdown2.js +12 -8
- package/dist/components/calcite-graph2.js +14 -9
- package/dist/components/calcite-inline-editable.js +5 -5
- package/dist/components/calcite-input2.js +3 -0
- package/dist/components/calcite-radio-button.js +1 -1
- package/dist/components/calcite-slider.js +2 -2
- package/dist/components/utils2.js +4 -1
- package/dist/custom-elements/index.js +140 -95
- package/dist/esm/calcite-alert.entry.js +15 -9
- package/dist/esm/calcite-color-picker_3.entry.js +15 -0
- package/dist/esm/calcite-combobox_3.entry.js +22 -11
- package/dist/esm/calcite-dropdown_3.entry.js +12 -8
- package/dist/esm/calcite-graph_2.entry.js +16 -9
- package/dist/esm/calcite-inline-editable.entry.js +5 -5
- package/dist/esm/calcite-input.entry.js +3 -0
- package/dist/esm/calcite-radio-button.entry.js +1 -1
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/calcite-alert.entry.js +1 -1
- package/dist/esm-es5/calcite-color-picker_3.entry.js +1 -1
- package/dist/esm-es5/calcite-combobox_3.entry.js +2 -2
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-inline-editable.entry.js +2 -2
- package/dist/esm-es5/calcite-input.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-button.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 +43 -36
- package/dist/types/components/calcite-alert/calcite-alert.d.ts +2 -0
- package/dist/types/components/calcite-combobox/calcite-combobox.d.ts +4 -0
- package/dist/types/components/calcite-combobox/resources.d.ts +3 -0
- package/dist/types/components/calcite-dropdown/calcite-dropdown.d.ts +1 -0
- package/dist/types/components/calcite-graph/calcite-graph.d.ts +3 -4
- package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +5 -5
- package/dist/types/components.d.ts +18 -16
- package/dist/types/preact.d.ts +3 -3
- package/hydrate/index.js +139 -95
- package/package.json +13 -13
- package/readme.md +2 -2
- package/dist/calcite/p-1a5dae4a.entry.js +0 -5
- package/dist/calcite/p-1b3a66ec.system.entry.js +0 -5
- package/dist/calcite/p-244e0b95.entry.js +0 -5
- package/dist/calcite/p-28adfebc.entry.js +0 -5
- package/dist/calcite/p-325fcd0d.entry.js +0 -5
- package/dist/calcite/p-3b8f5ab8.system.entry.js +0 -5
- package/dist/calcite/p-5c3b9524.system.entry.js +0 -5
- package/dist/calcite/p-85fb7bc0.entry.js +0 -5
- package/dist/calcite/p-8eafaf3f.entry.js +0 -5
- package/dist/calcite/p-b4990fa4.system.entry.js +0 -5
- package/dist/calcite/p-e2ebc089.system.entry.js +0 -5
- package/dist/calcite/p-e87980ac.entry.js +0 -5
|
@@ -36,9 +36,9 @@ export class CalciteInlineEditable {
|
|
|
36
36
|
* @default "Save"
|
|
37
37
|
*/
|
|
38
38
|
this.intlConfirmChanges = TEXT.intlConfirmChanges;
|
|
39
|
-
this.transitionEnd = (
|
|
39
|
+
this.transitionEnd = () => {
|
|
40
40
|
if (!this.editingEnabled && !!this.shouldEmitCancel) {
|
|
41
|
-
this.
|
|
41
|
+
this.calciteInlineEditableEditCancel.emit();
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
this.enableEditing = () => {
|
|
@@ -90,7 +90,7 @@ export class CalciteInlineEditable {
|
|
|
90
90
|
this.confirmChangesHandler = async (e) => {
|
|
91
91
|
e.preventDefault();
|
|
92
92
|
e.stopPropagation();
|
|
93
|
-
this.
|
|
93
|
+
this.calciteInlineEditableEditConfirm.emit();
|
|
94
94
|
try {
|
|
95
95
|
if (this.afterConfirm) {
|
|
96
96
|
this.loading = true;
|
|
@@ -370,39 +370,33 @@ export class CalciteInlineEditable {
|
|
|
370
370
|
}
|
|
371
371
|
}; }
|
|
372
372
|
static get events() { return [{
|
|
373
|
-
"method": "
|
|
374
|
-
"name": "
|
|
373
|
+
"method": "calciteInlineEditableEditCancel",
|
|
374
|
+
"name": "calciteInlineEditableEditCancel",
|
|
375
375
|
"bubbles": true,
|
|
376
376
|
"cancelable": true,
|
|
377
377
|
"composed": true,
|
|
378
378
|
"docs": {
|
|
379
|
-
"tags": [
|
|
380
|
-
|
|
381
|
-
"text": undefined
|
|
382
|
-
}],
|
|
383
|
-
"text": ""
|
|
379
|
+
"tags": [],
|
|
380
|
+
"text": "Emitted when the cancel button gets clicked."
|
|
384
381
|
},
|
|
385
382
|
"complexType": {
|
|
386
|
-
"original": "
|
|
387
|
-
"resolved": "
|
|
383
|
+
"original": "void",
|
|
384
|
+
"resolved": "void",
|
|
388
385
|
"references": {}
|
|
389
386
|
}
|
|
390
387
|
}, {
|
|
391
|
-
"method": "
|
|
392
|
-
"name": "
|
|
388
|
+
"method": "calciteInlineEditableEditConfirm",
|
|
389
|
+
"name": "calciteInlineEditableEditConfirm",
|
|
393
390
|
"bubbles": true,
|
|
394
391
|
"cancelable": true,
|
|
395
392
|
"composed": true,
|
|
396
393
|
"docs": {
|
|
397
|
-
"tags": [
|
|
398
|
-
|
|
399
|
-
"text": undefined
|
|
400
|
-
}],
|
|
401
|
-
"text": ""
|
|
394
|
+
"tags": [],
|
|
395
|
+
"text": "Emitted when the check button gets clicked."
|
|
402
396
|
},
|
|
403
397
|
"complexType": {
|
|
404
|
-
"original": "
|
|
405
|
-
"resolved": "
|
|
398
|
+
"original": "void",
|
|
399
|
+
"resolved": "void",
|
|
406
400
|
"references": {}
|
|
407
401
|
}
|
|
408
402
|
}, {
|
|
@@ -215,6 +215,9 @@ export class CalciteInput {
|
|
|
215
215
|
const inputMin = this.minString ? parseFloat(this.minString) : null;
|
|
216
216
|
const valueNudgeDelayInMs = 100;
|
|
217
217
|
this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
|
|
218
|
+
if (this.nudgeNumberValueIntervalId) {
|
|
219
|
+
window.clearInterval(this.nudgeNumberValueIntervalId);
|
|
220
|
+
}
|
|
218
221
|
let firstValueNudge = true;
|
|
219
222
|
this.nudgeNumberValueIntervalId = window.setInterval(() => {
|
|
220
223
|
if (firstValueNudge) {
|
|
@@ -159,6 +159,16 @@
|
|
|
159
159
|
box-shadow: inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
@media (forced-colors: active) {
|
|
163
|
+
:host([checked]) .radio::after,
|
|
164
|
+
:host([checked][disabled]) .radio::after {
|
|
165
|
+
content: "";
|
|
166
|
+
width: 1rem;
|
|
167
|
+
height: 1rem;
|
|
168
|
+
background-color: windowText;
|
|
169
|
+
display: block;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
162
172
|
::slotted(input[slot=hidden-form-input]) {
|
|
163
173
|
bottom: 0 !important;
|
|
164
174
|
left: 0 !important;
|
|
@@ -315,8 +315,7 @@ export class CalciteSlider {
|
|
|
315
315
|
h(HiddenFormInputSlot, { component: this })))));
|
|
316
316
|
}
|
|
317
317
|
renderGraph() {
|
|
318
|
-
return this.histogram ? (h("
|
|
319
|
-
h("calcite-graph", { colorStops: this.histogramStops, data: this.histogram, "data-style": "slider-histogram", height: 48, highlightMax: this.isRange ? this.maxValue : this.value, highlightMin: this.isRange ? this.minValue : this.min, max: this.max, min: this.min, width: 300 }))) : null;
|
|
318
|
+
return this.histogram ? (h("calcite-graph", { class: "graph", colorStops: this.histogramStops, data: this.histogram, highlightMax: this.isRange ? this.maxValue : this.value, highlightMin: this.isRange ? this.minValue : this.min, max: this.max, min: this.min })) : null;
|
|
320
319
|
}
|
|
321
320
|
renderTickLabel(tick) {
|
|
322
321
|
const isMinTickLabel = tick === this.min;
|
|
@@ -67,6 +67,7 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
67
67
|
this.queued = false;
|
|
68
68
|
this.autoDismissTimeoutId = null;
|
|
69
69
|
this.trackTimer = Date.now();
|
|
70
|
+
this.activeTransitionProp = "opacity";
|
|
70
71
|
/** close and emit the closed alert and the queue */
|
|
71
72
|
this.closeAlert = () => {
|
|
72
73
|
this.autoDismissTimeoutId = null;
|
|
@@ -75,10 +76,19 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
75
76
|
this.queue = this.queue.filter((e) => e !== this.el);
|
|
76
77
|
this.determineActiveAlert();
|
|
77
78
|
this.calciteAlertSync.emit({ queue: this.queue });
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
};
|
|
80
|
+
this.transitionEnd = (event) => {
|
|
81
|
+
if (event.propertyName === this.activeTransitionProp) {
|
|
82
|
+
this.active
|
|
83
|
+
? this.calciteAlertOpen.emit({
|
|
84
|
+
el: this.el,
|
|
85
|
+
queue: this.queue
|
|
86
|
+
})
|
|
87
|
+
: this.calciteAlertClose.emit({
|
|
88
|
+
el: this.el,
|
|
89
|
+
queue: this.queue
|
|
90
|
+
});
|
|
91
|
+
}
|
|
82
92
|
};
|
|
83
93
|
}
|
|
84
94
|
watchActive() {
|
|
@@ -129,7 +139,7 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
129
139
|
container: true,
|
|
130
140
|
queued,
|
|
131
141
|
[placement]: true
|
|
132
|
-
} }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? h("div", { class: "alert-dismiss-progress" }) : null)));
|
|
142
|
+
}, onTransitionEnd: this.transitionEnd }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? h("div", { class: "alert-dismiss-progress" }) : null)));
|
|
133
143
|
}
|
|
134
144
|
// when an alert is opened or closed, update queue and determine active alert
|
|
135
145
|
alertSync(event) {
|
|
@@ -188,10 +198,6 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
188
198
|
openAlert() {
|
|
189
199
|
window.clearTimeout(this.queueTimeout);
|
|
190
200
|
this.queueTimeout = window.setTimeout(() => (this.queued = false), 300);
|
|
191
|
-
this.calciteAlertOpen.emit({
|
|
192
|
-
el: this.el,
|
|
193
|
-
queue: this.queue
|
|
194
|
-
});
|
|
195
201
|
}
|
|
196
202
|
get el() { return this; }
|
|
197
203
|
static get watchers() { return {
|
|
@@ -1876,6 +1876,21 @@ Color.prototype = {
|
|
|
1876
1876
|
return colorString.to.hex(this.rgb().round().color);
|
|
1877
1877
|
},
|
|
1878
1878
|
|
|
1879
|
+
hexa(value) {
|
|
1880
|
+
if (arguments.length > 0) {
|
|
1881
|
+
return new Color(value);
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
const rgbArray = this.rgb().round().color;
|
|
1885
|
+
let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
|
1886
|
+
|
|
1887
|
+
if (alphaHex.length === 1) {
|
|
1888
|
+
alphaHex = '0' + alphaHex;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
return colorString.to.hex(rgbArray) + alphaHex;
|
|
1892
|
+
},
|
|
1893
|
+
|
|
1879
1894
|
rgbNumber() {
|
|
1880
1895
|
const rgb = this.rgb().color;
|
|
1881
1896
|
return (rgb[0] & 0xFF) << 16 | (rgb[1] & 0xFF) << 8 | rgb[2] & 0xFF;
|
|
@@ -7,7 +7,7 @@ import { a as isSymbol, S as Symbol, d as debounce } from './debounce.js';
|
|
|
7
7
|
import { i as isArray, f as forIn } from './forIn.js';
|
|
8
8
|
import { u as updatePopper, c as createPopper, C as CSS } from './popper.js';
|
|
9
9
|
import { g as guid } from './guid.js';
|
|
10
|
-
import { C as ComboboxChildSelector, g as getItemAncestors, a as getItemChildren, h as hasActiveChildren, b as ComboboxItem, c as ComboboxItemGroup, d as ComboboxDefaultPlacement } from './utils2.js';
|
|
10
|
+
import { T as TEXT, C as ComboboxChildSelector, g as getItemAncestors, a as getItemChildren, h as hasActiveChildren, b as ComboboxItem, c as ComboboxItemGroup, d as ComboboxDefaultPlacement } from './utils2.js';
|
|
11
11
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label.js';
|
|
12
12
|
import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
|
|
13
13
|
import { c as createObserver } from './observers.js';
|
|
@@ -156,6 +156,11 @@ const filter = (data, value) => {
|
|
|
156
156
|
const calciteComboboxCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}:host([disabled]){pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);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;-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);padding:0 var(--calcite-combobox-item-spacing-unit-l) 0 var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding:0 var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.grid-input{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{-ms-flex-positive:1;flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-width:120px;margin-bottom:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-bottom:0px;margin-top:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.input-wrap--single{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.label{pointer-events:none;display:-ms-flexbox;display:flex;max-width:100%;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--spaced{padding-top:0px;padding-bottom:0px;padding-left:var(--calcite-combobox-item-spacing-unit-l);padding-right:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:-ms-flexbox;display:flex;width:1rem;cursor:pointer;-ms-flex-align:center;align-items:center}.icon-end{-ms-flex:none;flex:none}.popper-container{width:100%;display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.popper-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.popper-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.popper-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.popper-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.popper-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.popper-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.popper-container--active{pointer-events:initial;visibility:visible}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-height:100vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);width:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{height:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 2) 0;margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-width:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.chip:last-of-type{-webkit-margin-end:0;margin-inline-end:0}.item{display:block}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
157
157
|
|
|
158
158
|
const isGroup = (el) => el.tagName === ComboboxItemGroup;
|
|
159
|
+
const itemUidPrefix = "combobox-item-";
|
|
160
|
+
const chipUidPrefix = "combobox-chip-";
|
|
161
|
+
const labelUidPrefix = "combobox-label-";
|
|
162
|
+
const listboxUidPrefix = "combobox-listbox-";
|
|
163
|
+
const inputUidPrefix = "combobox-input-";
|
|
159
164
|
let CalciteCombobox$1 = class extends HTMLElement {
|
|
160
165
|
constructor() {
|
|
161
166
|
super();
|
|
@@ -196,6 +201,10 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
196
201
|
this.scale = "m";
|
|
197
202
|
/** The value(s) of the selectedItem(s) */
|
|
198
203
|
this.value = null;
|
|
204
|
+
/** string to override the English "Remove tag" text for when an item is selected.
|
|
205
|
+
* @default "Remove tag"
|
|
206
|
+
*/
|
|
207
|
+
this.intlRemoveTag = TEXT.removeTag;
|
|
199
208
|
//--------------------------------------------------------------------------
|
|
200
209
|
//
|
|
201
210
|
// Private State/Props
|
|
@@ -705,7 +714,7 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
705
714
|
const item = document.createElement(ComboboxItem);
|
|
706
715
|
item.value = value;
|
|
707
716
|
item.textLabel = value;
|
|
708
|
-
item.guid = guid()
|
|
717
|
+
item.guid = `${chipUidPrefix}${guid()}`;
|
|
709
718
|
item.selected = true;
|
|
710
719
|
this.el.appendChild(item);
|
|
711
720
|
this.resetText();
|
|
@@ -755,7 +764,7 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
755
764
|
focusChip() {
|
|
756
765
|
var _a;
|
|
757
766
|
const guid = (_a = this.selectedItems[this.activeChipIndex]) === null || _a === void 0 ? void 0 : _a.guid;
|
|
758
|
-
const chip = this.referenceEl.querySelector(
|
|
767
|
+
const chip = this.referenceEl.querySelector(`#${chipUidPrefix}${guid}`);
|
|
759
768
|
chip === null || chip === void 0 ? void 0 : chip.setFocus();
|
|
760
769
|
}
|
|
761
770
|
shiftActiveItemIndex(delta) {
|
|
@@ -801,7 +810,7 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
801
810
|
//
|
|
802
811
|
//--------------------------------------------------------------------------
|
|
803
812
|
renderChips() {
|
|
804
|
-
const { activeChipIndex, scale, selectionMode } = this;
|
|
813
|
+
const { activeChipIndex, scale, selectionMode, intlRemoveTag } = this;
|
|
805
814
|
return this.selectedItems.map((item, i) => {
|
|
806
815
|
const chipClasses = {
|
|
807
816
|
chip: true,
|
|
@@ -810,11 +819,11 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
810
819
|
const ancestors = [...getItemAncestors(item)].reverse();
|
|
811
820
|
const pathLabel = [...ancestors, item].map((el) => el.textLabel);
|
|
812
821
|
const label = selectionMode !== "ancestors" ? item.textLabel : pathLabel.join(" / ");
|
|
813
|
-
return (h("calcite-chip", {
|
|
822
|
+
return (h("calcite-chip", { class: chipClasses, dismissLabel: intlRemoveTag, dismissible: true, icon: item.icon, id: `${chipUidPrefix}${item.guid}`, key: item.textLabel, onCalciteChipDismiss: (event) => this.calciteChipDismissHandler(event, item), scale: scale, title: label, value: item.value }, label));
|
|
814
823
|
});
|
|
815
824
|
}
|
|
816
825
|
renderInput() {
|
|
817
|
-
const { active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
|
|
826
|
+
const { guid, active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
|
|
818
827
|
const single = selectionMode === "single";
|
|
819
828
|
const selectedItem = selectedItems[0];
|
|
820
829
|
const showLabel = !active && single && !!selectedItem;
|
|
@@ -824,16 +833,16 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
824
833
|
} }, showLabel && (h("span", { class: {
|
|
825
834
|
label: true,
|
|
826
835
|
"label--spaced": needsIcon
|
|
827
|
-
}, key: "label", onFocus: this.comboboxFocusHandler, tabindex: "0" }, selectedItem.textLabel)), h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": guid
|
|
836
|
+
}, key: "label", onFocus: this.comboboxFocusHandler, tabindex: "0" }, selectedItem.textLabel)), h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-label": getLabelText(this), class: {
|
|
828
837
|
input: true,
|
|
829
838
|
"input--single": true,
|
|
830
839
|
"input--transparent": this.activeChipIndex > -1,
|
|
831
840
|
"input--hidden": showLabel,
|
|
832
841
|
"input--icon": single && needsIcon
|
|
833
|
-
}, disabled: disabled, id: `${guid}
|
|
842
|
+
}, disabled: disabled, id: `${inputUidPrefix}${guid}`, key: "input", onBlur: this.comboboxBlurHandler, onFocus: this.comboboxFocusHandler, onInput: this.inputHandler, placeholder: placeholder, ref: (el) => (this.textInput = el), type: "text" })));
|
|
834
843
|
}
|
|
835
844
|
renderListBoxOptions() {
|
|
836
|
-
return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: item.guid
|
|
845
|
+
return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: `${itemUidPrefix}${item.guid}`, role: "option", tabindex: "-1" }, item.textLabel)));
|
|
837
846
|
}
|
|
838
847
|
renderPopperContainer() {
|
|
839
848
|
const { active, maxScrollerHeight, setMenuEl, setListContainerEl, hideList, open } = this;
|
|
@@ -859,12 +868,11 @@ let CalciteCombobox$1 = class extends HTMLElement {
|
|
|
859
868
|
render() {
|
|
860
869
|
const { guid, open, label } = this;
|
|
861
870
|
const single = this.selectionMode === "single";
|
|
862
|
-
|
|
863
|
-
return (h(Host, { onKeyDown: this.keydownHandler }, h("div", { "aria-autocomplete": "list", "aria-expanded": open.toString(), "aria-haspopup": "listbox", "aria-labelledby": labelId, "aria-owns": guid, class: {
|
|
871
|
+
return (h(Host, { onKeyDown: this.keydownHandler }, h("div", { "aria-autocomplete": "list", "aria-expanded": open.toString(), "aria-haspopup": "listbox", "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-owns": `${listboxUidPrefix}${guid}`, class: {
|
|
864
872
|
wrapper: true,
|
|
865
873
|
"wrapper--single": single || !this.selectedItems.length,
|
|
866
874
|
"wrapper--active": open
|
|
867
|
-
}, onClick: this.setFocusClick, ref: this.setReferenceEl, role: "combobox" }, h("div", { class: "grid-input" }, this.renderIconStart(), !single && this.renderChips(), h("label", { class: "screen-readers-only", htmlFor: `${guid}
|
|
875
|
+
}, onClick: this.setFocusClick, ref: this.setReferenceEl, role: "combobox" }, h("div", { class: "grid-input" }, this.renderIconStart(), !single && this.renderChips(), h("label", { class: "screen-readers-only", htmlFor: `${inputUidPrefix}${guid}`, id: `${labelUidPrefix}${guid}` }, label), this.renderInput()), this.renderIconEnd()), h("ul", { "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-multiselectable": "true", class: "screen-readers-only", id: `${listboxUidPrefix}${guid}`, role: "listbox", tabIndex: -1 }, this.renderListBoxOptions()), this.renderPopperContainer(), h(HiddenFormInputSlot, { component: this })));
|
|
868
876
|
}
|
|
869
877
|
get el() { return this; }
|
|
870
878
|
static get watchers() { return {
|
|
@@ -889,6 +897,7 @@ CalciteCombobox$1 = /*@__PURE__*/ proxyCustomElement(CalciteCombobox$1, [1, "cal
|
|
|
889
897
|
"selectionMode": [513, "selection-mode"],
|
|
890
898
|
"scale": [513],
|
|
891
899
|
"value": [1025],
|
|
900
|
+
"intlRemoveTag": [1, "intl-remove-tag"],
|
|
892
901
|
"items": [32],
|
|
893
902
|
"groupItems": [32],
|
|
894
903
|
"selectedItems": [32],
|
|
@@ -12,7 +12,7 @@ const SLOTS = {
|
|
|
12
12
|
dropdownTrigger: "dropdown-trigger"
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const calciteDropdownCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex:0 1 auto;flex:0 1 auto}:host([disabled]){pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}:host .calcite-dropdown-wrapper{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.calcite-dropdown-wrapper .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.calcite-dropdown-wrapper[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.calcite-dropdown-wrapper[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.calcite-dropdown-wrapper[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.calcite-dropdown-wrapper[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.calcite-dropdown-wrapper[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}:host([active]) .calcite-dropdown-wrapper{pointer-events:initial;visibility:visible}:host .calcite-dropdown-content{overflow-y:auto;background-color:var(--calcite-ui-foreground-1);
|
|
15
|
+
const calciteDropdownCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex:0 1 auto;flex:0 1 auto}:host([disabled]){pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}:host .calcite-dropdown-wrapper{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.calcite-dropdown-wrapper .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.calcite-dropdown-wrapper[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.calcite-dropdown-wrapper[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.calcite-dropdown-wrapper[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.calcite-dropdown-wrapper[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.calcite-dropdown-wrapper[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}:host([active]) .calcite-dropdown-wrapper{pointer-events:initial;visibility:visible}:host .calcite-dropdown-content{overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-ui-foreground-1);max-height:90vh;width:var(--calcite-dropdown-width)}.calcite-dropdown-trigger-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto}:host([width=s]){--calcite-dropdown-width:12rem}:host([width=m]){--calcite-dropdown-width:14rem}:host([width=l]){--calcite-dropdown-width:16rem}";
|
|
16
16
|
|
|
17
17
|
let CalciteDropdown = class extends HTMLElement {
|
|
18
18
|
constructor() {
|
|
@@ -68,6 +68,7 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
68
68
|
this.items = [];
|
|
69
69
|
this.activeTransitionProp = "visibility";
|
|
70
70
|
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
|
71
|
+
this.resizeObserver = createObserver("resize", () => this.setMaxScrollerHeight());
|
|
71
72
|
//--------------------------------------------------------------------------
|
|
72
73
|
//
|
|
73
74
|
// Private Methods
|
|
@@ -80,13 +81,15 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
80
81
|
this.reposition();
|
|
81
82
|
};
|
|
82
83
|
this.setMaxScrollerHeight = () => {
|
|
83
|
-
const { scrollerEl } = this;
|
|
84
|
-
if (scrollerEl) {
|
|
85
|
-
|
|
86
|
-
scrollerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
|
|
84
|
+
const { active, scrollerEl } = this;
|
|
85
|
+
if (!scrollerEl || !active) {
|
|
86
|
+
return;
|
|
87
87
|
}
|
|
88
|
+
const maxScrollerHeight = this.getMaxScrollerHeight();
|
|
89
|
+
scrollerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
|
|
88
90
|
};
|
|
89
91
|
this.setScrollerEl = (scrollerEl) => {
|
|
92
|
+
this.resizeObserver.observe(scrollerEl);
|
|
90
93
|
this.scrollerEl = scrollerEl;
|
|
91
94
|
};
|
|
92
95
|
this.transitionEnd = (event) => {
|
|
@@ -142,6 +145,7 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
142
145
|
}
|
|
143
146
|
maxItemsHandler() {
|
|
144
147
|
this.reposition();
|
|
148
|
+
this.setMaxScrollerHeight();
|
|
145
149
|
}
|
|
146
150
|
placementHandler() {
|
|
147
151
|
this.reposition();
|
|
@@ -161,8 +165,9 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
161
165
|
this.reposition();
|
|
162
166
|
}
|
|
163
167
|
disconnectedCallback() {
|
|
164
|
-
var _a;
|
|
168
|
+
var _a, _b;
|
|
165
169
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
170
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
166
171
|
this.destroyPopper();
|
|
167
172
|
}
|
|
168
173
|
render() {
|
|
@@ -171,7 +176,7 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
171
176
|
["calcite-dropdown-content"]: true,
|
|
172
177
|
[CSS.animation]: true,
|
|
173
178
|
[CSS.animationActive]: active
|
|
174
|
-
}, onTransitionEnd: this.transitionEnd, ref: this.setScrollerEl }, h("slot", null)))));
|
|
179
|
+
}, onTransitionEnd: this.transitionEnd, ref: this.setScrollerEl }, h("div", { hidden: !this.active }, h("slot", null))))));
|
|
175
180
|
}
|
|
176
181
|
//--------------------------------------------------------------------------
|
|
177
182
|
//
|
|
@@ -181,7 +186,6 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
181
186
|
/** Updates the position of the component. */
|
|
182
187
|
async reposition() {
|
|
183
188
|
const { popper, menuEl, placement } = this;
|
|
184
|
-
this.setMaxScrollerHeight();
|
|
185
189
|
const modifiers = this.getModifiers();
|
|
186
190
|
popper
|
|
187
191
|
? await updatePopper({
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
|
-
import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
5
|
+
import { HTMLElement, forceUpdate, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { g as guid } from './guid.js';
|
|
7
|
+
import { c as createObserver } from './observers.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Calculate slope of the tangents
|
|
@@ -104,7 +105,7 @@ function area({ data, min, max, t }) {
|
|
|
104
105
|
return `${commands} ${end} L ${maxX},${minY} Z`;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
const calciteGraphCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;
|
|
108
|
+
const calciteGraphCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;height:100%;width:100%;padding:0px}.svg .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.5}";
|
|
108
109
|
|
|
109
110
|
let CalciteGraph = class extends HTMLElement {
|
|
110
111
|
constructor() {
|
|
@@ -121,25 +122,31 @@ let CalciteGraph = class extends HTMLElement {
|
|
|
121
122
|
* These data points should be sorted by x-axis value
|
|
122
123
|
*/
|
|
123
124
|
this.data = [];
|
|
124
|
-
/** Width of graph in pixels*/
|
|
125
|
-
this.width = 300;
|
|
126
|
-
/** Width of graph in pixels*/
|
|
127
|
-
this.height = 100;
|
|
128
125
|
//--------------------------------------------------------------------------
|
|
129
126
|
//
|
|
130
127
|
// Private State/Props
|
|
131
128
|
//
|
|
132
129
|
//--------------------------------------------------------------------------
|
|
133
130
|
this.graphId = `calcite-graph-${guid()}`;
|
|
131
|
+
this.resizeObserver = createObserver("resize", () => forceUpdate(this));
|
|
134
132
|
}
|
|
135
133
|
//--------------------------------------------------------------------------
|
|
136
134
|
//
|
|
137
135
|
// Lifecycle
|
|
138
136
|
//
|
|
139
137
|
//--------------------------------------------------------------------------
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
var _a;
|
|
140
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el);
|
|
141
|
+
}
|
|
142
|
+
disconnectedCallback() {
|
|
143
|
+
var _a;
|
|
144
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
145
|
+
}
|
|
140
146
|
render() {
|
|
141
|
-
const { data, colorStops,
|
|
147
|
+
const { data, colorStops, el, highlightMax, highlightMin, min, max } = this;
|
|
142
148
|
const id = this.graphId;
|
|
149
|
+
const { clientHeight: height, clientWidth: width } = el;
|
|
143
150
|
// if we have no data, return empty svg
|
|
144
151
|
if (!data || data.length === 0) {
|
|
145
152
|
return (h("svg", { class: "svg", height: height, preserveAspectRatio: "none", viewBox: `0 0 ${width} ${height}`, width: width }));
|
|
@@ -191,8 +198,6 @@ let CalciteGraph = class extends HTMLElement {
|
|
|
191
198
|
CalciteGraph = /*@__PURE__*/ proxyCustomElement(CalciteGraph, [1, "calcite-graph", {
|
|
192
199
|
"data": [16],
|
|
193
200
|
"colorStops": [16],
|
|
194
|
-
"width": [2],
|
|
195
|
-
"height": [2],
|
|
196
201
|
"highlightMin": [2, "highlight-min"],
|
|
197
202
|
"highlightMax": [2, "highlight-max"],
|
|
198
203
|
"min": [2],
|
|
@@ -31,8 +31,8 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
31
31
|
super();
|
|
32
32
|
this.__registerHost();
|
|
33
33
|
this.__attachShadow();
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
34
|
+
this.calciteInlineEditableEditCancel = createEvent(this, "calciteInlineEditableEditCancel", 7);
|
|
35
|
+
this.calciteInlineEditableEditConfirm = createEvent(this, "calciteInlineEditableEditConfirm", 7);
|
|
36
36
|
this.calciteInlineEditableEnableEditingChange = createEvent(this, "calciteInlineEditableEnableEditingChange", 7);
|
|
37
37
|
//--------------------------------------------------------------------------
|
|
38
38
|
//
|
|
@@ -59,9 +59,9 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
59
59
|
* @default "Save"
|
|
60
60
|
*/
|
|
61
61
|
this.intlConfirmChanges = TEXT.intlConfirmChanges;
|
|
62
|
-
this.transitionEnd = (
|
|
62
|
+
this.transitionEnd = () => {
|
|
63
63
|
if (!this.editingEnabled && !!this.shouldEmitCancel) {
|
|
64
|
-
this.
|
|
64
|
+
this.calciteInlineEditableEditCancel.emit();
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
this.enableEditing = () => {
|
|
@@ -113,7 +113,7 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
113
113
|
this.confirmChangesHandler = async (e) => {
|
|
114
114
|
e.preventDefault();
|
|
115
115
|
e.stopPropagation();
|
|
116
|
-
this.
|
|
116
|
+
this.calciteInlineEditableEditConfirm.emit();
|
|
117
117
|
try {
|
|
118
118
|
if (this.afterConfirm) {
|
|
119
119
|
this.loading = true;
|
|
@@ -249,6 +249,9 @@ let CalciteInput = class extends HTMLElement {
|
|
|
249
249
|
const inputMin = this.minString ? parseFloat(this.minString) : null;
|
|
250
250
|
const valueNudgeDelayInMs = 100;
|
|
251
251
|
this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
|
|
252
|
+
if (this.nudgeNumberValueIntervalId) {
|
|
253
|
+
window.clearInterval(this.nudgeNumberValueIntervalId);
|
|
254
|
+
}
|
|
252
255
|
let firstValueNudge = true;
|
|
253
256
|
this.nudgeNumberValueIntervalId = window.setInterval(() => {
|
|
254
257
|
if (firstValueNudge) {
|
|
@@ -13,7 +13,7 @@ const CSS = {
|
|
|
13
13
|
container: "container"
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const calciteRadioButtonCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);-webkit-transition-property:all;transition-property:all;-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-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([disabled]){cursor:pointer}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([hovered][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{height:var(--calcite-radio-size);max-width:var(--calcite-radio-size);min-width:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 5px var(--calcite-ui-brand);box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 6px var(--calcite-ui-brand);box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
16
|
+
const calciteRadioButtonCss = "@-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-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-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:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);-webkit-transition-property:all;transition-property:all;-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-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([disabled]){cursor:pointer}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([hovered][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{height:var(--calcite-radio-size);max-width:var(--calcite-radio-size);min-width:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 5px var(--calcite-ui-brand);box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{-webkit-box-shadow:inset 0 0 0 6px var(--calcite-ui-brand);box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{-webkit-box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:\"\";width:1rem;height:1rem;background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
17
17
|
|
|
18
18
|
let CalciteRadioButton$1 = class extends HTMLElement {
|
|
19
19
|
constructor() {
|