@getflip/swirl-components 0.86.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +57 -8
- package/dist/cjs/index-506fe4ea.js +4 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-autocomplete.cjs.entry.js +99 -15
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
- package/dist/cjs/{swirl-option-list.cjs.entry.js → swirl-option-list_2.cjs.entry.js} +29 -0
- package/dist/cjs/swirl-select.cjs.entry.js +2 -2
- package/dist/cjs/swirl-text-input.cjs.entry.js +1 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +0 -22
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.css +15 -0
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.js +155 -26
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.spec.js +12 -14
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.stories.js +15 -7
- package/dist/collection/components/swirl-form-control/swirl-form-control.css +19 -0
- package/dist/collection/components/swirl-option-list/swirl-option-list.js +5 -0
- package/dist/collection/components/swirl-select/swirl-select.css +2 -1
- package/dist/collection/components/swirl-select/swirl-select.js +1 -1
- package/dist/collection/components/swirl-text-input/swirl-text-input.css +8 -0
- package/dist/collection/components/swirl-text-input/swirl-text-input.stories.js +1 -0
- package/dist/components/assets/pdfjs/pdf.worker.min.js +0 -22
- package/dist/components/swirl-autocomplete.js +142 -38
- package/dist/components/swirl-form-control.js +1 -1
- package/dist/components/swirl-option-list2.js +5 -0
- package/dist/components/swirl-select.js +2 -2
- package/dist/components/swirl-text-input2.js +1 -1
- package/dist/esm/index-99d0060d.js +4 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-autocomplete.entry.js +99 -15
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-form-control.entry.js +1 -1
- package/dist/esm/{swirl-option-list.entry.js → swirl-option-list_2.entry.js} +29 -1
- package/dist/esm/swirl-select.entry.js +2 -2
- package/dist/esm/swirl-text-input.entry.js +1 -1
- package/dist/swirl-components/p-01a47a2e.entry.js +1 -0
- package/dist/swirl-components/p-7dafac36.entry.js +1 -0
- package/dist/swirl-components/p-8153cd85.entry.js +1 -0
- package/dist/swirl-components/p-bf258885.entry.js +1 -0
- package/dist/swirl-components/{p-ce1cd2e1.entry.js → p-e9e6bea8.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.css +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-autocomplete/swirl-autocomplete.d.ts +11 -4
- package/dist/types/components/swirl-autocomplete/swirl-autocomplete.stories.d.ts +7 -0
- package/dist/types/components.d.ts +11 -7
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/vscode-data.json +8 -4
- package/dist/cjs/swirl-tag.cjs.entry.js +0 -30
- package/dist/esm/swirl-tag.entry.js +0 -26
- package/dist/swirl-components/p-18a16156.entry.js +0 -1
- package/dist/swirl-components/p-7521afa2.entry.js +0 -1
- package/dist/swirl-components/p-9c5e2b99.entry.js +0 -1
- package/dist/swirl-components/p-c3d23855.entry.js +0 -1
- package/dist/swirl-components/p-f299ab14.entry.js +0 -1
|
@@ -2,40 +2,81 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { a as autoUpdate, c as computePosition, o as offset } from './floating-ui.dom.esm.js';
|
|
3
3
|
import { c as classnames } from './index2.js';
|
|
4
4
|
import { d as debounce } from './utils.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
5
|
+
import { d as defineCustomElement$h } from './swirl-icon-cancel2.js';
|
|
6
|
+
import { d as defineCustomElement$g } from './swirl-icon-check-small2.js';
|
|
7
|
+
import { d as defineCustomElement$f } from './swirl-icon-check-strong2.js';
|
|
8
|
+
import { d as defineCustomElement$e } from './swirl-icon-close2.js';
|
|
9
|
+
import { d as defineCustomElement$d } from './swirl-icon-drag-handle2.js';
|
|
10
|
+
import { d as defineCustomElement$c } from './swirl-icon-expand-less2.js';
|
|
11
|
+
import { d as defineCustomElement$b } from './swirl-icon-expand-more2.js';
|
|
12
|
+
import { d as defineCustomElement$a } from './swirl-icon-visibility2.js';
|
|
13
|
+
import { d as defineCustomElement$9 } from './swirl-icon-visibility-off2.js';
|
|
14
|
+
import { d as defineCustomElement$8 } from './swirl-option-list2.js';
|
|
15
|
+
import { d as defineCustomElement$7 } from './swirl-option-list-item2.js';
|
|
16
|
+
import { d as defineCustomElement$6 } from './swirl-spinner2.js';
|
|
17
|
+
import { d as defineCustomElement$5 } from './swirl-stack2.js';
|
|
18
|
+
import { d as defineCustomElement$4 } from './swirl-tag2.js';
|
|
16
19
|
import { d as defineCustomElement$3 } from './swirl-text-input2.js';
|
|
17
20
|
import { d as defineCustomElement$2 } from './swirl-visually-hidden2.js';
|
|
18
21
|
|
|
19
|
-
const swirlAutocompleteCss = ".sc-swirl-autocomplete-h{display:block}.sc-swirl-autocomplete-h *.sc-swirl-autocomplete{box-sizing:border-box}.autocomplete--inactive.sc-swirl-autocomplete .autocomplete__listbox-container.sc-swirl-autocomplete{display:none}.autocomplete__listbox-container.sc-swirl-autocomplete{position:fixed;z-index:var(--s-z-40);overflow:hidden;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);border-radius:var(--s-border-radius-sm);background-color:var(--s-surface-overlay-default);box-shadow:var(--s-shadow-level-1)}.autocomplete__listbox-container.sc-swirl-autocomplete:empty{display:none}.autocomplete__spinner.sc-swirl-autocomplete{display:flex;padding:var(--s-space-16);justify-content:center;align-items:center}";
|
|
22
|
+
const swirlAutocompleteCss = ".sc-swirl-autocomplete-h{display:block}.sc-swirl-autocomplete-h *.sc-swirl-autocomplete{box-sizing:border-box}.autocomplete--inactive.sc-swirl-autocomplete .autocomplete__listbox-container.sc-swirl-autocomplete{display:none}.autocomplete__listbox-container.sc-swirl-autocomplete{position:fixed;z-index:var(--s-z-40);overflow:hidden;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);border-radius:var(--s-border-radius-sm);background-color:var(--s-surface-overlay-default);animation:autocomplete-enter 0.1s;box-shadow:var(--s-shadow-level-1)}.autocomplete__listbox-container.sc-swirl-autocomplete:empty{display:none}.autocomplete__spinner.sc-swirl-autocomplete{display:flex;padding:var(--s-space-16);justify-content:center;align-items:center}.autocomplete__multi-select-tags.sc-swirl-autocomplete{margin-bottom:var(--s-space-4);margin-top:var(--swirl-autocomplete-tags-margin-top)}@keyframes autocomplete-enter{from{opacity:0}to{opacity:1}}";
|
|
20
23
|
|
|
21
24
|
const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomplete extends HTMLElement {
|
|
22
25
|
constructor() {
|
|
23
26
|
super();
|
|
24
27
|
this.__registerHost();
|
|
25
28
|
this.valueChange = createEvent(this, "valueChange", 7);
|
|
26
|
-
this.onChange =
|
|
27
|
-
|
|
28
|
-
this.
|
|
29
|
-
|
|
29
|
+
this.onChange = (event) => {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
this.updateTerm(event);
|
|
32
|
+
};
|
|
33
|
+
this.updateTerm = debounce(async (event) => {
|
|
34
|
+
this.updateSuggestions(event.detail);
|
|
30
35
|
this.open();
|
|
36
|
+
if (this.multiSelect) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!Boolean(event.detail) || event.detail === "") {
|
|
40
|
+
this.value = undefined;
|
|
41
|
+
this.valueChange.emit(this.value);
|
|
42
|
+
}
|
|
31
43
|
}, 250, false);
|
|
32
|
-
this.onSelect = (event) => {
|
|
33
|
-
|
|
34
|
-
|
|
44
|
+
this.onSelect = async (event) => {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
if (this.multiSelect) {
|
|
47
|
+
const selectedItemIds = event.detail;
|
|
48
|
+
const unselectedItemIds = this.suggestions
|
|
49
|
+
.filter((suggestion) => !selectedItemIds.includes(suggestion.id))
|
|
50
|
+
.map((suggestion) => suggestion.id);
|
|
51
|
+
this.value = [
|
|
52
|
+
...this.value.filter((item) => !unselectedItemIds.includes(item.id)),
|
|
53
|
+
...this.suggestions.filter((suggestion) => selectedItemIds.includes(suggestion.id) &&
|
|
54
|
+
!this.value.some((item) => item.id === suggestion.id)),
|
|
55
|
+
];
|
|
35
56
|
this.valueChange.emit(this.value);
|
|
57
|
+
this.inputEl.querySelector("input")?.focus();
|
|
58
|
+
await this.updateSuggestions(this.inputEl.querySelector("input").value);
|
|
36
59
|
}
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
else {
|
|
61
|
+
if (Boolean(event.detail[0])) {
|
|
62
|
+
const itemId = event.detail[0];
|
|
63
|
+
const suggestion = this.suggestions.find((suggestion) => suggestion.id === itemId);
|
|
64
|
+
if (!Boolean(suggestion)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.value = suggestion;
|
|
68
|
+
this.valueChange.emit(this.value);
|
|
69
|
+
this.inputEl.querySelector("input")?.focus();
|
|
70
|
+
this.close();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
this.onRemoveValue = (value) => {
|
|
75
|
+
if (!Array.isArray(this.value)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.value = this.value.filter((item) => item.id !== value);
|
|
79
|
+
this.valueChange.emit(this.value);
|
|
39
80
|
};
|
|
40
81
|
this.onFocusOut = (event) => {
|
|
41
82
|
const relatedTarget = event.relatedTarget;
|
|
@@ -50,6 +91,7 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
50
91
|
this.onKeyDown = (event) => {
|
|
51
92
|
if (event.code === "Escape") {
|
|
52
93
|
event.preventDefault();
|
|
94
|
+
event.stopPropagation();
|
|
53
95
|
this.inputEl.querySelector("input").focus();
|
|
54
96
|
this.close();
|
|
55
97
|
}
|
|
@@ -70,6 +112,8 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
70
112
|
this.maxLength = undefined;
|
|
71
113
|
this.menuLabel = "Suggestions";
|
|
72
114
|
this.mode = undefined;
|
|
115
|
+
this.multiSelect = undefined;
|
|
116
|
+
this.placeholder = undefined;
|
|
73
117
|
this.required = undefined;
|
|
74
118
|
this.spellCheck = undefined;
|
|
75
119
|
this.swirlAriaDescribedby = undefined;
|
|
@@ -82,6 +126,7 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
82
126
|
componentWillLoad() {
|
|
83
127
|
const index = document.querySelectorAll("swirl-datepicker").length;
|
|
84
128
|
this.id = `autocomplete-${index}`;
|
|
129
|
+
this.handleInitialValue();
|
|
85
130
|
}
|
|
86
131
|
onWindowClick(event) {
|
|
87
132
|
const target = event.target;
|
|
@@ -89,6 +134,9 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
89
134
|
this.close();
|
|
90
135
|
}
|
|
91
136
|
}
|
|
137
|
+
watchMultiSelect() {
|
|
138
|
+
this.handleInitialValue();
|
|
139
|
+
}
|
|
92
140
|
async close() {
|
|
93
141
|
if (!this.active) {
|
|
94
142
|
return;
|
|
@@ -96,6 +144,16 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
96
144
|
if (this.disableAutoUpdate) {
|
|
97
145
|
this.disableAutoUpdate();
|
|
98
146
|
}
|
|
147
|
+
const inputEl = this.inputEl.querySelector("input");
|
|
148
|
+
if (Boolean(inputEl)) {
|
|
149
|
+
if (this.multiSelect) {
|
|
150
|
+
inputEl.value = "";
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
inputEl.value =
|
|
154
|
+
this.value?.label || "";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
99
157
|
this.active = false;
|
|
100
158
|
}
|
|
101
159
|
async open() {
|
|
@@ -108,8 +166,9 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
108
166
|
if (this.disableAutoUpdate) {
|
|
109
167
|
this.disableAutoUpdate();
|
|
110
168
|
}
|
|
111
|
-
this.disableAutoUpdate = autoUpdate(this.inputEl, this.listboxContainerEl, this.reposition.bind(this));
|
|
169
|
+
this.disableAutoUpdate = autoUpdate(this.inputEl, this.listboxContainerEl, this.reposition.bind(this), { animationFrame: true });
|
|
112
170
|
this.listboxContainerEl.scrollTop = 0;
|
|
171
|
+
this.updateSuggestions(this.inputEl.querySelector("input").value);
|
|
113
172
|
});
|
|
114
173
|
}
|
|
115
174
|
async reposition() {
|
|
@@ -122,24 +181,52 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
122
181
|
strategy: "fixed",
|
|
123
182
|
});
|
|
124
183
|
}
|
|
125
|
-
async updateSuggestions() {
|
|
184
|
+
async updateSuggestions(term) {
|
|
126
185
|
this.loading = true;
|
|
127
186
|
this.suggestions = [];
|
|
128
|
-
this.suggestions = await this.generateSuggestions(
|
|
187
|
+
this.suggestions = await this.generateSuggestions(term);
|
|
129
188
|
this.loading = false;
|
|
130
189
|
}
|
|
190
|
+
handleInitialValue() {
|
|
191
|
+
if (this.multiSelect && !Array.isArray(this.value)) {
|
|
192
|
+
this.value = [];
|
|
193
|
+
}
|
|
194
|
+
if (!this.multiSelect && Array.isArray(this.value)) {
|
|
195
|
+
this.value = undefined;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
131
198
|
render() {
|
|
132
199
|
const suggestionsMenuId = `${this.id}-suggestions`;
|
|
200
|
+
const clearable = this.clearable && !this.multiSelect;
|
|
201
|
+
const optionListValue = this.multiSelect
|
|
202
|
+
? this.value.map((item) => item.id)
|
|
203
|
+
: Boolean(this.value)
|
|
204
|
+
? [this.value.id]
|
|
205
|
+
: [];
|
|
206
|
+
const valueLabel = this.multiSelect
|
|
207
|
+
? undefined
|
|
208
|
+
: this.value?.label || "";
|
|
133
209
|
const className = classnames("autocomplete", {
|
|
134
210
|
"autocomplete--inactive": !this.active,
|
|
135
211
|
});
|
|
136
|
-
return (h(Host, null, h("div", { class: className, onFocusout: this.onFocusOut, onKeyDown: this.onKeyDown },
|
|
212
|
+
return (h(Host, null, h("div", { class: className, onFocusout: this.onFocusOut, onKeyDown: this.onKeyDown }, this.multiSelect &&
|
|
213
|
+
Array.isArray(this.value) &&
|
|
214
|
+
this.value.length > 0 && (h("div", { class: "autocomplete__multi-select-tags" }, h("swirl-stack", { orientation: "horizontal", spacing: "8", wrap: true }, this.value.map((item) => {
|
|
215
|
+
return (h("swirl-tag", { key: item.id, label: item.label,
|
|
216
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
217
|
+
onRemove: () => this.onRemoveValue(item.id), removable: !this.disabled }));
|
|
218
|
+
})))), h("swirl-text-input", { autoSelect: this.autoSelect, class: "autocomplete__input", clearable: clearable, clearButtonLabel: this.clearButtonLabel, disabled: this.disabled, disableDynamicWidth: true, id: this.id, inline: this.inline, invalid: this.invalid, onInputFocus: this.onFocus, onKeyDown: this.onInputKeyDown, onValueChange: this.onChange, maxLength: this.maxLength, mode: this.mode, placeholder: this.placeholder, ref: (el) => (this.inputEl = el), required: this.required, spellCheck: this.spellCheck, swirlAriaAutocomplete: "list", swirlAriaControls: suggestionsMenuId, swirlAriaDescribedby: this.swirlAriaDescribedby, swirlAriaExpanded: String(this.active), swirlRole: "combobox", value: valueLabel }), h("div", { class: "autocomplete__listbox-container", ref: (el) => (this.listboxContainerEl = el), style: {
|
|
137
219
|
top: Boolean(this.position) ? `${this.position?.y}px` : "",
|
|
138
220
|
left: Boolean(this.position) ? `${this.position?.x}px` : "",
|
|
139
221
|
width: `${this.inputEl?.getBoundingClientRect().width + 32}px`,
|
|
140
|
-
} }, this.loading && (h("div", { class: "autocomplete__spinner" }, h("swirl-spinner", null))), this.suggestions.length > 0 && (h("swirl-option-list", { label: this.menuLabel, onValueChange: this.onSelect, optionListId: suggestionsMenuId, ref: (el) => (this.listboxEl = el), value:
|
|
222
|
+
} }, this.loading && (h("div", { class: "autocomplete__spinner" }, h("swirl-spinner", null))), this.suggestions.length > 0 && (h("swirl-option-list", { allowDeselect: this.multiSelect === true, label: this.menuLabel, multiSelect: this.multiSelect, onValueChange: this.onSelect, optionListId: suggestionsMenuId, ref: (el) => (this.listboxEl = el), value: optionListValue }, this.suggestions.map((suggestion) => (h("swirl-option-list-item", { selected: Array.isArray(this.value)
|
|
223
|
+
? this.value.some((item) => item.id === suggestion.id)
|
|
224
|
+
: this.value?.id === suggestion.id, key: suggestion.id, disabled: suggestion.disabled, label: suggestion.label, value: suggestion.id })))))))));
|
|
141
225
|
}
|
|
142
226
|
get el() { return this; }
|
|
227
|
+
static get watchers() { return {
|
|
228
|
+
"multiSelect": ["watchMultiSelect"]
|
|
229
|
+
}; }
|
|
143
230
|
static get style() { return swirlAutocompleteCss; }
|
|
144
231
|
}, [2, "swirl-autocomplete", {
|
|
145
232
|
"autoSelect": [4, "auto-select"],
|
|
@@ -152,10 +239,12 @@ const SwirlAutocomplete$1 = /*@__PURE__*/ proxyCustomElement(class SwirlAutocomp
|
|
|
152
239
|
"maxLength": [2, "max-length"],
|
|
153
240
|
"menuLabel": [1, "menu-label"],
|
|
154
241
|
"mode": [1],
|
|
242
|
+
"multiSelect": [4, "multi-select"],
|
|
243
|
+
"placeholder": [1],
|
|
155
244
|
"required": [4],
|
|
156
245
|
"spellCheck": [4, "spell-check"],
|
|
157
246
|
"swirlAriaDescribedby": [1, "swirl-aria-describedby"],
|
|
158
|
-
"value": [
|
|
247
|
+
"value": [1040],
|
|
159
248
|
"active": [32],
|
|
160
249
|
"loading": [32],
|
|
161
250
|
"position": [32],
|
|
@@ -165,7 +254,7 @@ function defineCustomElement$1() {
|
|
|
165
254
|
if (typeof customElements === "undefined") {
|
|
166
255
|
return;
|
|
167
256
|
}
|
|
168
|
-
const components = ["swirl-autocomplete", "swirl-icon-cancel", "swirl-icon-check-small", "swirl-icon-check-strong", "swirl-icon-drag-handle", "swirl-icon-expand-less", "swirl-icon-expand-more", "swirl-icon-visibility", "swirl-icon-visibility-off", "swirl-option-list", "swirl-option-list-item", "swirl-spinner", "swirl-text-input", "swirl-visually-hidden"];
|
|
257
|
+
const components = ["swirl-autocomplete", "swirl-icon-cancel", "swirl-icon-check-small", "swirl-icon-check-strong", "swirl-icon-close", "swirl-icon-drag-handle", "swirl-icon-expand-less", "swirl-icon-expand-more", "swirl-icon-visibility", "swirl-icon-visibility-off", "swirl-option-list", "swirl-option-list-item", "swirl-spinner", "swirl-stack", "swirl-tag", "swirl-text-input", "swirl-visually-hidden"];
|
|
169
258
|
components.forEach(tagName => { switch (tagName) {
|
|
170
259
|
case "swirl-autocomplete":
|
|
171
260
|
if (!customElements.get(tagName)) {
|
|
@@ -174,55 +263,70 @@ function defineCustomElement$1() {
|
|
|
174
263
|
break;
|
|
175
264
|
case "swirl-icon-cancel":
|
|
176
265
|
if (!customElements.get(tagName)) {
|
|
177
|
-
defineCustomElement$
|
|
266
|
+
defineCustomElement$h();
|
|
178
267
|
}
|
|
179
268
|
break;
|
|
180
269
|
case "swirl-icon-check-small":
|
|
181
270
|
if (!customElements.get(tagName)) {
|
|
182
|
-
defineCustomElement$
|
|
271
|
+
defineCustomElement$g();
|
|
183
272
|
}
|
|
184
273
|
break;
|
|
185
274
|
case "swirl-icon-check-strong":
|
|
186
275
|
if (!customElements.get(tagName)) {
|
|
187
|
-
defineCustomElement$
|
|
276
|
+
defineCustomElement$f();
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
279
|
+
case "swirl-icon-close":
|
|
280
|
+
if (!customElements.get(tagName)) {
|
|
281
|
+
defineCustomElement$e();
|
|
188
282
|
}
|
|
189
283
|
break;
|
|
190
284
|
case "swirl-icon-drag-handle":
|
|
191
285
|
if (!customElements.get(tagName)) {
|
|
192
|
-
defineCustomElement$
|
|
286
|
+
defineCustomElement$d();
|
|
193
287
|
}
|
|
194
288
|
break;
|
|
195
289
|
case "swirl-icon-expand-less":
|
|
196
290
|
if (!customElements.get(tagName)) {
|
|
197
|
-
defineCustomElement$
|
|
291
|
+
defineCustomElement$c();
|
|
198
292
|
}
|
|
199
293
|
break;
|
|
200
294
|
case "swirl-icon-expand-more":
|
|
201
295
|
if (!customElements.get(tagName)) {
|
|
202
|
-
defineCustomElement$
|
|
296
|
+
defineCustomElement$b();
|
|
203
297
|
}
|
|
204
298
|
break;
|
|
205
299
|
case "swirl-icon-visibility":
|
|
206
300
|
if (!customElements.get(tagName)) {
|
|
207
|
-
defineCustomElement$
|
|
301
|
+
defineCustomElement$a();
|
|
208
302
|
}
|
|
209
303
|
break;
|
|
210
304
|
case "swirl-icon-visibility-off":
|
|
211
305
|
if (!customElements.get(tagName)) {
|
|
212
|
-
defineCustomElement$
|
|
306
|
+
defineCustomElement$9();
|
|
213
307
|
}
|
|
214
308
|
break;
|
|
215
309
|
case "swirl-option-list":
|
|
216
310
|
if (!customElements.get(tagName)) {
|
|
217
|
-
defineCustomElement$
|
|
311
|
+
defineCustomElement$8();
|
|
218
312
|
}
|
|
219
313
|
break;
|
|
220
314
|
case "swirl-option-list-item":
|
|
221
315
|
if (!customElements.get(tagName)) {
|
|
222
|
-
defineCustomElement$
|
|
316
|
+
defineCustomElement$7();
|
|
223
317
|
}
|
|
224
318
|
break;
|
|
225
319
|
case "swirl-spinner":
|
|
320
|
+
if (!customElements.get(tagName)) {
|
|
321
|
+
defineCustomElement$6();
|
|
322
|
+
}
|
|
323
|
+
break;
|
|
324
|
+
case "swirl-stack":
|
|
325
|
+
if (!customElements.get(tagName)) {
|
|
326
|
+
defineCustomElement$5();
|
|
327
|
+
}
|
|
328
|
+
break;
|
|
329
|
+
case "swirl-tag":
|
|
226
330
|
if (!customElements.get(tagName)) {
|
|
227
331
|
defineCustomElement$4();
|
|
228
332
|
}
|
|
@@ -4,7 +4,7 @@ import { b as getActiveElement } from './utils.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './swirl-icon-error2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './swirl-inline-error2.js';
|
|
6
6
|
|
|
7
|
-
const swirlFormControlCss = ".sc-swirl-form-control-h{display:block;width:100%}.sc-swirl-form-control-h *.sc-swirl-form-control{box-sizing:border-box}.form-control.sc-swirl-form-control{display:block;width:100%;line-height:var(--s-line-height-sm)}.form-control.form-control--has-focus.sc-swirl-form-control:not(.form-control--disabled) .form-control__label.sc-swirl-form-control{border-color:var(--s-border-highlight);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__input.sc-swirl-form-control{overflow:hidden;max-height:0}.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%);opacity:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .select__label.sc-swirl-form-control{overflow:hidden;max-height:0;pointer-events:none}.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%);opacity:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.form-control--label-position-outside.sc-swirl-form-control{padding-top:calc(var(--s-line-height-sm) + var(--s-space-4))}.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--is-select) .form-control__label.sc-swirl-form-control{cursor:text}.form-control--label-position-outside.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.375rem + 2 * var(--s-border-width-default));padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control--label-position-outside.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.25rem + 2 * var(--s-border-width-default))}}.form-control--label-position-outside.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{bottom:calc(100% + var(--s-space-4));left:0;color:var(--s-text-default);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);transform:none;opacity:1}.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{color:var(--s-text-disabled)}.form-control--label-position-outside.form-control--has-character-counter.sc-swirl-form-control .form-control__description.sc-swirl-form-control{max-width:calc(100% - 6rem)}.form-control--invalid.form-control--has-focus.sc-swirl-form-control:not(.form-control--disabled) .form-control__label.sc-swirl-form-control{border-color:var(--s-border-critical);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-critical)}.form-control--invalid.sc-swirl-form-control .form-control__label.sc-swirl-form-control{border-color:var(--s-border-critical)}.form-control--disabled.sc-swirl-form-control .form-control__label.sc-swirl-form-control{border-color:var(--s-border-disabled);color:var(--s-text-disabled)}.form-control--disabled.sc-swirl-form-control .form-control__description.sc-swirl-form-control{color:var(--s-text-disabled)}.form-control--inline.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.375rem + 2 * var(--s-border-width-default));padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control--inline.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.25rem + 2 * var(--s-border-width-default))}}.form-control--inline.sc-swirl-form-control:not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{right:var(--s-space-12);left:var(--s-space-12);transition:none;opacity:0}.form-control--inline.form-control--has-character-counter.sc-swirl-form-control .form-control__description.sc-swirl-form-control{max-width:calc(100% - 6rem)}.form-control--hide-label.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control{position:absolute;display:inline;overflow:hidden;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;word-wrap:normal;clip:rect(0, 0, 0, 0)}.form-control__label.sc-swirl-form-control{position:relative;display:flex;width:100%;min-height:4.375rem;padding:calc(var(--s-space-12) + 1.25rem) var(--s-space-16) var(--s-space-12);justify-content:center;border:var(--s-border-width-default) solid var(--s-border-strong);border-radius:var(--s-border-radius-sm);color:var(--s-text-subdued);flex-direction:column;gap:var(--s-space-2)}.form-control__label-text.sc-swirl-form-control{position:absolute;right:var(--s-space-16);bottom:calc(100% - 1.25rem - var(--s-space-12));left:var(--s-space-16);overflow:hidden;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis;transition:font-size 0.15s, transform 0.15s, top 0.15s;transform:none}.form-control__description.sc-swirl-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}.form-control__error-message.sc-swirl-form-control{display:block;margin-top:var(--s-space-4)}";
|
|
7
|
+
const swirlFormControlCss = ".sc-swirl-form-control-h{display:block;width:100%}.sc-swirl-form-control-h *.sc-swirl-form-control{box-sizing:border-box}.form-control.sc-swirl-form-control{--swirl-autocomplete-tags-margin-top:var(--s-space-4);display:block;width:100%;line-height:var(--s-line-height-sm)}.form-control.form-control--has-focus.sc-swirl-form-control:not(.form-control--disabled) .form-control__label.sc-swirl-form-control{border-color:var(--s-border-highlight);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__input.sc-swirl-form-control{overflow:hidden;max-height:0}.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%);opacity:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .select__label.sc-swirl-form-control{overflow:hidden;max-height:0;pointer-events:none}.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%);opacity:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control.sc-swirl-form-control{--swirl-text-input-placeholder-size:var(--s-font-size-sm)}}.form-control--label-position-outside.sc-swirl-form-control{--swirl-text-input-placeholder-size:var(--s-font-size-base);--swirl-autocomplete-tags-margin-top:0;padding-top:calc(var(--s-line-height-sm) + var(--s-space-4))}.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--is-select) .form-control__label.sc-swirl-form-control{cursor:text}.form-control--label-position-outside.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.375rem + 2 * var(--s-border-width-default));padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control--label-position-outside.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.25rem + 2 * var(--s-border-width-default))}}.form-control--label-position-outside.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{bottom:calc(100% + var(--s-space-4));left:0;color:var(--s-text-default);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);transform:none;opacity:1}.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select):not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control,.form-control--label-position-outside.form-control--disabled.sc-swirl-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-swirl-form-control{color:var(--s-text-disabled)}.form-control--label-position-outside.form-control--has-character-counter.sc-swirl-form-control .form-control__description.sc-swirl-form-control{max-width:calc(100% - 6rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control--label-position-outside.sc-swirl-form-control{--swirl-text-input-placeholder-size:var(--s-font-size-sm)}}.form-control--invalid.form-control--has-focus.sc-swirl-form-control:not(.form-control--disabled) .form-control__label.sc-swirl-form-control{border-color:var(--s-border-critical);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-critical)}.form-control--invalid.sc-swirl-form-control .form-control__label.sc-swirl-form-control{border-color:var(--s-border-critical)}.form-control--disabled.sc-swirl-form-control .form-control__label.sc-swirl-form-control{border-color:var(--s-border-disabled);color:var(--s-text-disabled)}.form-control--disabled.sc-swirl-form-control .form-control__description.sc-swirl-form-control{color:var(--s-text-disabled)}.form-control--inline.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.375rem + 2 * var(--s-border-width-default));padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.form-control--inline.sc-swirl-form-control .form-control__label.sc-swirl-form-control{min-height:calc(2.25rem + 2 * var(--s-border-width-default))}}.form-control--inline.sc-swirl-form-control:not(.form-control--has-placeholder) .form-control__label-text.sc-swirl-form-control{right:var(--s-space-12);left:var(--s-space-12);transition:none;opacity:0}.form-control--inline.form-control--has-character-counter.sc-swirl-form-control .form-control__description.sc-swirl-form-control{max-width:calc(100% - 6rem)}.form-control--hide-label.sc-swirl-form-control .form-control__label-text.sc-swirl-form-control{position:absolute;display:inline;overflow:hidden;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;word-wrap:normal;clip:rect(0, 0, 0, 0)}.form-control__label.sc-swirl-form-control{position:relative;display:flex;width:100%;min-height:4.375rem;padding:calc(var(--s-space-12) + 1.25rem) var(--s-space-16) var(--s-space-12);justify-content:center;border:var(--s-border-width-default) solid var(--s-border-strong);border-radius:var(--s-border-radius-sm);color:var(--s-text-subdued);flex-direction:column;gap:var(--s-space-2)}.form-control__label-text.sc-swirl-form-control{position:absolute;right:var(--s-space-16);bottom:calc(100% - 1.25rem - var(--s-space-12));left:var(--s-space-16);overflow:hidden;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis;transition:font-size 0.15s, transform 0.15s, top 0.15s;transform:none}.form-control__description.sc-swirl-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}.form-control__error-message.sc-swirl-form-control{display:block;margin-top:var(--s-space-4)}";
|
|
8
8
|
|
|
9
9
|
const SwirlFormControl$1 = /*@__PURE__*/ proxyCustomElement(class SwirlFormControl extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -155,6 +155,11 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class SwirlOptionList e
|
|
|
155
155
|
observeSlotChanges() {
|
|
156
156
|
this.observer = new MutationObserver(() => {
|
|
157
157
|
this.updateItems();
|
|
158
|
+
this.setItemAllowDragState();
|
|
159
|
+
this.setItemDisabledState();
|
|
160
|
+
this.setItemContext();
|
|
161
|
+
this.syncItemsWithValue();
|
|
162
|
+
this.setupDragDrop();
|
|
158
163
|
});
|
|
159
164
|
this.observer.observe(this.listboxEl, { childList: true });
|
|
160
165
|
}
|
|
@@ -10,7 +10,7 @@ import { d as defineCustomElement$4 } from './swirl-popover-trigger2.js';
|
|
|
10
10
|
import { d as defineCustomElement$3 } from './swirl-tag2.js';
|
|
11
11
|
import { d as defineCustomElement$2 } from './swirl-visually-hidden2.js';
|
|
12
12
|
|
|
13
|
-
const swirlSelectCss = ".sc-swirl-select-h{display:block;width:100%}.sc-swirl-select-h *.sc-swirl-select{box-sizing:border-box}.select.sc-swirl-select{position:relative;display:flex;width:100%}.select.sc-swirl-select .sc-swirl-select::part(popover__content){margin-top:var(--s-space-16)}.select--placement-top-start.sc-swirl-select .sc-swirl-select::part(popover__content){margin-top:-2.25rem}.select--multi.sc-swirl-select .select__input.sc-swirl-select{position:absolute;
|
|
13
|
+
const swirlSelectCss = ".sc-swirl-select-h{display:block;width:100%}.sc-swirl-select-h *.sc-swirl-select{box-sizing:border-box}.select.sc-swirl-select{position:relative;display:flex;width:100%}.select.sc-swirl-select .sc-swirl-select::part(popover__content){margin-top:var(--s-space-16)}.select--placement-top-start.sc-swirl-select .sc-swirl-select::part(popover__content){margin-top:-2.25rem}.select--multi.sc-swirl-select .select__input.sc-swirl-select{position:absolute;width:100%;height:100%;pointer-events:none;opacity:0}.select--multi.sc-swirl-select .select__multi-select-values.sc-swirl-select{display:flex}.select--disabled.sc-swirl-select .select__input.sc-swirl-select{color:var(--s-text-disabled)}.select--disabled.sc-swirl-select .select__indicator.sc-swirl-select{color:var(--s-icon-disabled)}.select--inline.sc-swirl-select .select__indicator.sc-swirl-select{transform:translateY(-50%)}.select__input.sc-swirl-select{display:block;overflow:hidden;width:100%;height:1.25rem;margin:0;padding:0;padding-right:calc(1.5rem + var(--s-space-8));border:none;background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:left;white-space:nowrap;text-overflow:ellipsis;cursor:default}.select__input.sc-swirl-select:focus{outline:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.select__input.sc-swirl-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.select__multi-select-values.sc-swirl-select{display:none;overflow:hidden;width:100%;min-height:1.25rem;padding-right:calc(1.5rem + var(--s-space-8));flex-wrap:wrap;gap:var(--s-space-8)}.select__multi-select-values.sc-swirl-select .sc-swirl-select::part(tag){height:1.25rem;padding:0 var(--s-space-4)}.select__indicator.sc-swirl-select{position:absolute;top:50%;right:0;display:inline-flex;color:var(--s-icon-default);transform:translateY(calc(-50% - var(--s-space-8)))}";
|
|
14
14
|
|
|
15
15
|
const SwirlSelect$1 = /*@__PURE__*/ proxyCustomElement(class SwirlSelect extends HTMLElement {
|
|
16
16
|
constructor() {
|
|
@@ -44,7 +44,7 @@ const SwirlSelect$1 = /*@__PURE__*/ proxyCustomElement(class SwirlSelect extends
|
|
|
44
44
|
this.onKeyDown = (event) => {
|
|
45
45
|
if (event.code === "Space" || event.code === "Enter") {
|
|
46
46
|
event.preventDefault();
|
|
47
|
-
this.popover.open();
|
|
47
|
+
this.popover.open(this.el);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
this.allowDeselect = true;
|
|
@@ -7,7 +7,7 @@ import { d as defineCustomElement$3 } from './swirl-icon-expand-more2.js';
|
|
|
7
7
|
import { d as defineCustomElement$2 } from './swirl-icon-visibility2.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './swirl-icon-visibility-off2.js';
|
|
9
9
|
|
|
10
|
-
const swirlTextInputCss = ".sc-swirl-text-input-h{display:block;width:100%}.sc-swirl-text-input-h *.sc-swirl-text-input{box-sizing:border-box}.text-input.sc-swirl-text-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);font:inherit;line-height:var(--s-line-height-sm);cursor:text}.text-input--auto-grow.sc-swirl-text-input .text-input__input.sc-swirl-text-input{max-height:none}.text-input--clearable.sc-swirl-text-input,.text-input--type-number.sc-swirl-text-input,.text-input--type-password.sc-swirl-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--show-password.sc-swirl-text-input .text-input__input.sc-swirl-text-input{width:100%}.text-input--disabled.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{color:var(--s-text-disabled)}.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input{width:2rem;height:1.125rem;justify-content:center;background-color:var(--s-surface-raised-default)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:first-of-type{border-top-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:last-of-type{border-bottom-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:hover{background-color:var(--s-surface-raised-hovered)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-less.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-more.sc-swirl-text-input{width:1rem}.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:0}}.text-input--inline.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{top:calc(100% + var(--s-space-12) + var(--s-border-width-default));right:calc(-1 * var(--s-space-12));max-width:6rem}.text-input__input.sc-swirl-text-input{display:inline-flex;width:100%;max-height:13.75rem;margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);resize:none;caret-color:var(--s-border-highlight)}.text-input__input.sc-swirl-text-input:focus{outline:none}.text-input__input.sc-swirl-text-input:disabled{color:var(--s-text-disabled);background-color:transparent}.text-input__input.sc-swirl-text-input::-webkit-outer-spin-button,.text-input__input.sc-swirl-text-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.text-input__input[type=\"number\"].sc-swirl-text-input{-moz-appearance:textfield}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__input.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}input.text-input__input.sc-swirl-text-input:not([type=\"password\"]){width:0.25rem;min-width:0.25rem}.text-input--disable-dynamic-width.sc-swirl-text-input input.text-input__input.sc-swirl-text-input:not([type=\"password\"]){width:100%;min-width:0}.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__clear-button.sc-swirl-text-input:focus:not(:focus-visible),.text-input__password-toggle.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__clear-button.sc-swirl-text-input:focus-visible,.text-input__password-toggle.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{top:-0.625rem}}.text-input__stepper.sc-swirl-text-input{position:absolute;top:-1.4375rem;right:0;display:flex;flex-direction:column}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__stepper.sc-swirl-text-input{top:-1.25rem}}.text-input__step-button.sc-swirl-text-input{display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__step-button.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__step-button.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}.text-input__character-counter.sc-swirl-text-input{position:absolute;top:-1.375rem;right:0;display:flex;color:var(--s-text-subdued);line-height:var(--s-line-height-sm);flex-direction:column}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__character-counter.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text-input__prefix.sc-swirl-text-input{padding-right:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}.text-input__suffix.sc-swirl-text-input{padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}";
|
|
10
|
+
const swirlTextInputCss = ".sc-swirl-text-input-h{display:block;width:100%}.sc-swirl-text-input-h *.sc-swirl-text-input{box-sizing:border-box}.text-input.sc-swirl-text-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);font:inherit;line-height:var(--s-line-height-sm);cursor:text}.text-input--auto-grow.sc-swirl-text-input .text-input__input.sc-swirl-text-input{max-height:none}.text-input--clearable.sc-swirl-text-input,.text-input--type-number.sc-swirl-text-input,.text-input--type-password.sc-swirl-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--show-password.sc-swirl-text-input .text-input__input.sc-swirl-text-input{width:100%}.text-input--disabled.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{color:var(--s-text-disabled)}.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__stepper.sc-swirl-text-input{top:calc(-1 * var(--s-space-8));right:calc(-1 * var(--s-space-12))}}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input{width:2rem;height:1.125rem;justify-content:center;background-color:var(--s-surface-raised-default)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:first-of-type{border-top-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:last-of-type{border-bottom-right-radius:var(--s-border-radius-sm)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input:hover{background-color:var(--s-surface-raised-hovered)}.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-less.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__step-button.sc-swirl-text-input swirl-icon-expand-more.sc-swirl-text-input{width:1rem}.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input--inline.sc-swirl-text-input .text-input__clear-button.sc-swirl-text-input,.text-input--inline.sc-swirl-text-input .text-input__password-toggle.sc-swirl-text-input{top:0}}.text-input--inline.sc-swirl-text-input .text-input__character-counter.sc-swirl-text-input{top:calc(100% + var(--s-space-12) + var(--s-border-width-default));right:calc(-1 * var(--s-space-12));max-width:6rem}.text-input__input.sc-swirl-text-input{display:inline-flex;width:100%;max-height:13.75rem;margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);resize:none;caret-color:var(--s-border-highlight)}.text-input__input.sc-swirl-text-input:focus{outline:none}.text-input__input.sc-swirl-text-input:disabled{color:var(--s-text-disabled);background-color:transparent}.text-input__input.sc-swirl-text-input::-webkit-outer-spin-button,.text-input__input.sc-swirl-text-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.text-input__input[type=\"number\"].sc-swirl-text-input{-moz-appearance:textfield}.text-input__input.sc-swirl-text-input::-moz-placeholder{font-size:var(--swirl-text-input-placeholder-size)}.text-input__input.sc-swirl-text-input::placeholder{font-size:var(--swirl-text-input-placeholder-size)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__input.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}input.text-input__input.sc-swirl-text-input:not([type=\"password\"]){width:0.25rem;min-width:0.25rem}.text-input--disable-dynamic-width.sc-swirl-text-input input.text-input__input.sc-swirl-text-input:not([type=\"password\"]){width:100%;min-width:0}.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__clear-button.sc-swirl-text-input:focus:not(:focus-visible),.text-input__password-toggle.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__clear-button.sc-swirl-text-input:focus-visible,.text-input__password-toggle.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__clear-button.sc-swirl-text-input,.text-input__password-toggle.sc-swirl-text-input{top:-0.625rem}}.text-input__stepper.sc-swirl-text-input{position:absolute;top:-1.4375rem;right:0;display:flex;flex-direction:column}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__stepper.sc-swirl-text-input{top:-1.25rem}}.text-input__step-button.sc-swirl-text-input{display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__step-button.sc-swirl-text-input:focus:not(:focus-visible){outline:none}.text-input__step-button.sc-swirl-text-input:focus-visible{outline-color:var(--s-focus-default)}.text-input__character-counter.sc-swirl-text-input{position:absolute;top:-1.375rem;right:0;display:flex;color:var(--s-text-subdued);line-height:var(--s-line-height-sm);flex-direction:column}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text-input__character-counter.sc-swirl-text-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text-input__prefix.sc-swirl-text-input{padding-right:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}.text-input__suffix.sc-swirl-text-input{padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}";
|
|
11
11
|
|
|
12
12
|
const SwirlTextInput = /*@__PURE__*/ proxyCustomElement(class SwirlTextInput extends HTMLElement {
|
|
13
13
|
constructor() {
|
|
@@ -3035,10 +3035,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
3035
3035
|
return import(
|
|
3036
3036
|
/* webpackMode: "lazy" */
|
|
3037
3037
|
'./swirl-tab-bar.entry.js').then(processMod, consoleError);
|
|
3038
|
-
case 'swirl-tag':
|
|
3039
|
-
return import(
|
|
3040
|
-
/* webpackMode: "lazy" */
|
|
3041
|
-
'./swirl-tag.entry.js').then(processMod, consoleError);
|
|
3042
3038
|
case 'swirl-text-input':
|
|
3043
3039
|
return import(
|
|
3044
3040
|
/* webpackMode: "lazy" */
|
|
@@ -3063,14 +3059,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
3063
3059
|
return import(
|
|
3064
3060
|
/* webpackMode: "lazy" */
|
|
3065
3061
|
'./swirl-icon-cancel_4.entry.js').then(processMod, consoleError);
|
|
3066
|
-
case '
|
|
3062
|
+
case 'swirl-option-list_2':
|
|
3067
3063
|
return import(
|
|
3068
3064
|
/* webpackMode: "lazy" */
|
|
3069
|
-
'./
|
|
3070
|
-
case '
|
|
3065
|
+
'./swirl-option-list_2.entry.js').then(processMod, consoleError);
|
|
3066
|
+
case 'wc-datepicker':
|
|
3071
3067
|
return import(
|
|
3072
3068
|
/* webpackMode: "lazy" */
|
|
3073
|
-
'./
|
|
3069
|
+
'./wc-datepicker.entry.js').then(processMod, consoleError);
|
|
3074
3070
|
case 'swirl-icon-check-small_3':
|
|
3075
3071
|
return import(
|
|
3076
3072
|
/* webpackMode: "lazy" */
|