xv-webcomponents 1.19.2 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{_vars-A07oKwJ_.js → _vars-DMytunQw.js} +9 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{xv-accordion-v2_47.cjs.entry.js → xv-accordion-v2_48.cjs.entry.js} +448 -90
- package/dist/cjs/xv-header-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +8 -8
- package/dist/collection/components/xv-button/xv-button.js +25 -2
- package/dist/collection/components/xv-button-group/xv-button-group.css +173 -0
- package/dist/collection/components/xv-button-group/xv-button-group.js +206 -0
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +2 -2
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.js +1 -1
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.js +2 -2
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +2 -2
- package/dist/collection/components/xv-data-table/xv-data-table.js +1 -1
- package/dist/collection/components/xv-datepicker/xv-datepicker.js +2 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +1 -1
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.css +4 -71
- package/dist/collection/components/xv-header/xv-header.js +10 -4
- package/dist/collection/components/xv-header-next/xv-header-next.js +1 -1
- package/dist/collection/components/xv-image-viewer/xv-image-viewer.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +2 -2
- package/dist/collection/components/xv-mega-menu-next/xv-mega-menu-next.js +2 -2
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.js +2 -2
- package/dist/collection/components/xv-overflow-menu/_vars.js +7 -6
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +48 -8
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +84 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +28 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +373 -22
- package/dist/collection/components/xv-pagination/xv-pagination.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-radio/xv-radio.js +2 -2
- package/dist/collection/components/xv-slider/xv-slider.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.css +7 -0
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +37 -9
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
- package/dist/esm/{_vars-C6jsOjam.js → _vars-CDEU4jkD.js} +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{xv-accordion-v2_47.entry.js → xv-accordion-v2_48.entry.js} +448 -91
- package/dist/esm/xv-header-next.entry.js +2 -2
- package/dist/esm/xv-mega-menu-next.entry.js +2 -2
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-button/xv-button.d.ts +2 -0
- package/dist/types/components/xv-button-group/xv-button-group.d.ts +54 -0
- package/dist/types/components/xv-overflow-menu/_vars.d.ts +14 -5
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.d.ts +10 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +43 -3
- package/dist/types/components/xv-tag-combobox/xv-tag-combobox.d.ts +1 -0
- package/dist/types/components.d.ts +177 -0
- package/dist/xv-webcomponents/{p-9284f4be.entry.js → p-0b0ce8e2.entry.js} +1 -1
- package/dist/xv-webcomponents/p-9edaba20.entry.js +8 -0
- package/dist/xv-webcomponents/p-CDEU4jkD.js +1 -0
- package/dist/xv-webcomponents/{p-3a20074c.entry.js → p-fa1779f0.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/xv-webcomponents/p-6bb184f5.entry.js +0 -8
- package/dist/xv-webcomponents/p-C6jsOjam.js +0 -1
|
@@ -10,6 +10,9 @@ export class XvTagCombobox {
|
|
|
10
10
|
this.allowCreate = true;
|
|
11
11
|
this.maxSuggestions = 200;
|
|
12
12
|
this.disabled = false;
|
|
13
|
+
// Shows an inline spinner and blocks interaction while an external save is in flight
|
|
14
|
+
// (e.g. assigning/unassigning tags) — without the greyed-out look of `disabled`.
|
|
15
|
+
this.loading = false;
|
|
13
16
|
this.readonly = false;
|
|
14
17
|
this.error = false;
|
|
15
18
|
this.warning = false;
|
|
@@ -31,7 +34,7 @@ export class XvTagCombobox {
|
|
|
31
34
|
[SIZE_VAR.XL]: 'lg',
|
|
32
35
|
};
|
|
33
36
|
this.onKeyDown = (ev) => {
|
|
34
|
-
if (this.disabled || this.readonly)
|
|
37
|
+
if (this.disabled || this.readonly || this.loading)
|
|
35
38
|
return;
|
|
36
39
|
const key = ev.key;
|
|
37
40
|
if (key === 'ArrowDown') {
|
|
@@ -89,10 +92,13 @@ export class XvTagCombobox {
|
|
|
89
92
|
this.selected = this.valueToOpts(this.value);
|
|
90
93
|
this.recomputeFiltered();
|
|
91
94
|
this.onDocumentClick = this.onDocumentClick.bind(this);
|
|
92
|
-
|
|
95
|
+
// Capture phase: some sibling components (xv-datepicker, xv-overflow-menu, xv-link) call
|
|
96
|
+
// stopPropagation() on click, which would prevent a bubble-phase listener from ever firing
|
|
97
|
+
// when the user clicks outside onto them. Capture runs before any descendant can stop it.
|
|
98
|
+
window.addEventListener('click', this.onDocumentClick, true);
|
|
93
99
|
}
|
|
94
100
|
disconnectedCallback() {
|
|
95
|
-
window.removeEventListener('click', this.onDocumentClick);
|
|
101
|
+
window.removeEventListener('click', this.onDocumentClick, true);
|
|
96
102
|
}
|
|
97
103
|
watchOptions() {
|
|
98
104
|
this.normalizedOptions = this.normalizeOptions(this.options);
|
|
@@ -138,6 +144,8 @@ export class XvTagCombobox {
|
|
|
138
144
|
this.filtered = [...starts, ...contains].slice(0, this.maxSuggestions);
|
|
139
145
|
}
|
|
140
146
|
onInput(e) {
|
|
147
|
+
if (this.loading)
|
|
148
|
+
return;
|
|
141
149
|
const t = e.target;
|
|
142
150
|
this.inputValue = t.value;
|
|
143
151
|
this.inputChange.emit(this.inputValue);
|
|
@@ -146,7 +154,7 @@ export class XvTagCombobox {
|
|
|
146
154
|
this.recomputeFiltered();
|
|
147
155
|
}
|
|
148
156
|
selectOption(opt) {
|
|
149
|
-
if (this.disabled)
|
|
157
|
+
if (this.disabled || this.loading)
|
|
150
158
|
return;
|
|
151
159
|
if (!this.selected.find(s => s.value === opt.value)) {
|
|
152
160
|
this.selected = [...this.selected, opt];
|
|
@@ -170,7 +178,7 @@ export class XvTagCombobox {
|
|
|
170
178
|
removeTag(idx, e) {
|
|
171
179
|
var _a;
|
|
172
180
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
173
|
-
if (this.disabled)
|
|
181
|
+
if (this.disabled || this.loading)
|
|
174
182
|
return;
|
|
175
183
|
this.selected = this.selected.filter((_, i) => i !== idx);
|
|
176
184
|
this.emitChange();
|
|
@@ -208,13 +216,13 @@ export class XvTagCombobox {
|
|
|
208
216
|
];
|
|
209
217
|
}
|
|
210
218
|
onOpen() {
|
|
211
|
-
if (this.disabled || this.readonly)
|
|
219
|
+
if (this.disabled || this.readonly || this.loading)
|
|
212
220
|
return;
|
|
213
221
|
this.open = true;
|
|
214
222
|
}
|
|
215
223
|
blockClick() {
|
|
216
224
|
var _a;
|
|
217
|
-
if (this.disabled || this.readonly)
|
|
225
|
+
if (this.disabled || this.readonly || this.loading)
|
|
218
226
|
return;
|
|
219
227
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
220
228
|
this.onOpen();
|
|
@@ -232,12 +240,12 @@ export class XvTagCombobox {
|
|
|
232
240
|
const suggestionsVisible = this.open && this.filtered.length > 0;
|
|
233
241
|
const ariaOwns = suggestionsVisible ? `${this.uid}-listbox` : undefined;
|
|
234
242
|
const activedesc = this.highlighted >= 0 ? this.optionId(this.highlighted) : undefined;
|
|
235
|
-
return (h(Host, { key: '
|
|
243
|
+
return (h(Host, { key: '3a14655c87e6d715566d304395091bdcfe742652', class: "xv-combobox", part: "root", size: this.size }, this.label && h("label", { key: '1e51067d648b448ea1367afaeddf597ee23ba4a4', class: "label" }, this.label), h("div", { key: 'b17d0ec6cfef073a893f955764608cdeead8937c', class: {
|
|
236
244
|
'control': true,
|
|
237
245
|
'control--disabled': this.disabled,
|
|
238
246
|
'control--error': !!this.error,
|
|
239
247
|
'control--readonly': !!this.readonly,
|
|
240
|
-
}, onClick: () => this.blockClick() }, h("div", { key: '
|
|
248
|
+
}, onClick: () => this.blockClick() }, h("div", { key: 'b6707597986341dc70924ba077ed30d5529b7814', class: "control-chips", role: "list" }, this.selected.map((s, i) => (h("xv-tag-v2", { role: "listitem", part: "chip", "data-value": s.value, size: this.COMPARE_TAG_SIZE[this.size], disabled: this.disabled, bg: (s === null || s === void 0 ? void 0 : s.bg) || 'var(--layer-accent-01, #F7F7F7)', color: (s === null || s === void 0 ? void 0 : s.color) || 'var(--text-primary, #333)', closeable: !this.readonly, onCloseClick: ({ detail }) => this.removeTag(i, detail) }, s.label))), h("input", { key: '02275e2394eeb0a835ab96d7820025813ff8daf4', ref: (el) => (this.inputEl = el), class: "control-input", readonly: this.readonly, placeholder: this.selected.length ? '' : this.placeholder, value: this.inputValue, onInput: (e) => this.onInput(e), onKeyDown: (e) => this.onKeyDown(e), onFocus: () => { this.onOpen(); this.recomputeFiltered(); }, "aria-autocomplete": "list", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": ariaOwns, "aria-activedescendant": activedesc, disabled: this.disabled })), this.loading && (h("span", { key: 'e0c388e2da8530e765fb1f092af284ab38b2d7a0', class: "control-loader", part: "loader", "aria-hidden": "true" }, h("xv-loader-v2", { key: 'b3da8bf830b8c1389d4989f88d9177017e0ab603', size: "sm", variant: "horizontal" })))), this.error && typeof this.error === 'string' && (h("p", { key: '0435384109a1e0b0693b7d9e449d92897c5e02e8', class: "message message--error" }, this.error)), this.warning && typeof this.warning === 'string' && (h("p", { key: '9d03aaf496e4a2d48aa9909db9564632b99a61b7', class: "message message--warning" }, this.warning)), suggestionsVisible && (h("ul", { key: '8fb23fee1e8b47cbd089dd89a8e7fd98f4971d68', id: `${this.uid}-listbox`, class: "suggestions", role: "listbox", part: "listbox" }, this.filtered.map((opt, idx) => (h("li", { id: this.optionId(idx), class: { 'suggestions-opt': true, 'suggestions-opt--highlight': idx === this.highlighted }, role: "option", "aria-selected": idx === this.highlighted, onMouseEnter: () => this.onOptionMouseEnter(idx), onMouseDown: (ev) => ev.preventDefault(), onClick: () => this.selectOption(opt) }, h("div", { class: "suggestions-opt-content" }, opt.bg ? h("span", { class: "suggestions-opt-content--color", style: { background: opt.bg } }) : null, h("span", { class: "suggestions-opt-content--label" }, this.highlightLabel(opt.label).map((seg, i) => typeof seg === 'string' ? h("span", { key: i }, seg) : h("strong", { key: i }, seg.match)))))))))));
|
|
241
249
|
}
|
|
242
250
|
static get is() { return "xv-tag-combobox"; }
|
|
243
251
|
static get encapsulation() { return "shadow"; }
|
|
@@ -403,6 +411,26 @@ export class XvTagCombobox {
|
|
|
403
411
|
"attribute": "disabled",
|
|
404
412
|
"defaultValue": "false"
|
|
405
413
|
},
|
|
414
|
+
"loading": {
|
|
415
|
+
"type": "boolean",
|
|
416
|
+
"mutable": false,
|
|
417
|
+
"complexType": {
|
|
418
|
+
"original": "boolean",
|
|
419
|
+
"resolved": "boolean",
|
|
420
|
+
"references": {}
|
|
421
|
+
},
|
|
422
|
+
"required": false,
|
|
423
|
+
"optional": false,
|
|
424
|
+
"docs": {
|
|
425
|
+
"tags": [],
|
|
426
|
+
"text": ""
|
|
427
|
+
},
|
|
428
|
+
"getter": false,
|
|
429
|
+
"setter": false,
|
|
430
|
+
"reflect": false,
|
|
431
|
+
"attribute": "loading",
|
|
432
|
+
"defaultValue": "false"
|
|
433
|
+
},
|
|
406
434
|
"readonly": {
|
|
407
435
|
"type": "boolean",
|
|
408
436
|
"mutable": false,
|
|
@@ -23,13 +23,13 @@ export class XvTextInput {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '8387dcd3101789c9104a378fcca8a820122ada26', class: { disabled: !!this.disabled } }, h("label", { key: 'ad90119fef9b51d06e64b52e11c8fdde1150a461', class: "control" }, this.label && h("span", { key: '24d5aba160ccf7cd7df356a147c5f86194683bce', class: "control_label" }, this.label), h("div", { key: '65ce0ede9c3837d47c29b3f95a53993468ad6b67', class: {
|
|
27
27
|
'control_input': true,
|
|
28
28
|
readonly: !!this.readonly,
|
|
29
29
|
[this.size]: true,
|
|
30
30
|
error: !!this.error,
|
|
31
31
|
warning: !!this.warning,
|
|
32
|
-
} }, h("input", { key: '
|
|
32
|
+
} }, h("input", { key: 'b620357a84e7b5953360631fa369b8d63c2898dd', autocomplete: this.autocomplete, type: (this.type === 'password' && this.isPasswordVisible && 'text') || this.type, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onInput: this.handleInput, name: this.name, value: this.value }), h("div", { key: 'a72facc2aae1c24dda755aba84eb284b5bd76024', class: "control_input__icons" }, this.loading && h("xv-loader-v2", { key: '648fba1f66bf7a1ce7d08dd0eb921d772659b4a5', size: SIZE_VAR.XS }), !!this.error ? (h("span", { class: "status-icon error", "aria-hidden": "true" }, "!")) : !!this.warning ? (h("span", { class: "status-icon warning", "aria-hidden": "true" }, "\u26A0")) : null, this.type === 'password' && (h("button", { key: 'a5ef25d6ccecef77953943f3c22c7586f90e575b', onClick: this.togglePassword, disabled: this.disabled, class: "status-icon" }, h("svg", { key: '34cdf5a09935c2c46a94c7db1693f45d6f3f4afe', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512", width: 16, height: 16 }, this.isPasswordVisible ? (h("path", { fill: "currentColor", d: "M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z" })) : (h("path", { fill: "currentColor", d: "M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z" })))))))), this.helper && h("p", { key: 'cb7926af03a4faa965e34f3a1edcb55145da1d7c', class: "message" }, this.helper), typeof this.error === 'string' ? (h("p", { class: "message error" }, this.error)) : typeof this.warning === 'string' ? (h("p", { class: "message warning" }, this.warning)) : null));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "xv-text-input-v2"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,12 +20,12 @@ export class XvTextarea {
|
|
|
20
20
|
this.value && this.internals.setFormValue(this.value);
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '0d6ad5edfcf8fb6773d78a643aa704cdfecc12a0', class: { disabled: !!this.disabled } }, h("label", { key: '4d3c7642d2b5be570e40310e9468862446dc32fb', class: "control" }, (this.label || this.max) && (h("p", { key: 'ca2d4769a3fb69f1afd35e0723de1007fdd78c79', class: "control_label" }, h("span", { key: '1e6aab8fcfbb386f12da1eb6fc7a6dd526e94fdf' }, this.label, this.info && h("xv-tooltip-v2", { key: '6bc26411f61475177cf92753e0776424c7d7d634', message: this.info })), this.max !== undefined && !this.counterHide && (h("span", { key: 'f65de7346b7ca086e11acca0a4c4c7f0767b4ae8', class: "control_label__count" }, this.value.length || 0, "/", this.max)))), h("div", { key: '492ff2c4fb75057050d5a4b7db3d9ac10f282418', class: {
|
|
24
24
|
'control_input': true,
|
|
25
25
|
readonly: !!this.readonly,
|
|
26
26
|
error: !!this.error,
|
|
27
27
|
warning: this.warning !== undefined,
|
|
28
|
-
} }, h("textarea", { key: '
|
|
28
|
+
} }, h("textarea", { key: '731266a637bbdcae5a3da8c689c315979964cbb1', class: { 'no-resize': !!this.noResize }, name: this.name, rows: this.rows, value: this.value, maxLength: this.max, disabled: this.disabled, readOnly: this.readonly, placeholder: this.placeholder, onInput: this.onInput }), h("div", { key: 'd472bb9145c8e1ce7252a290d28bbf8369e45bdd', class: "control_input__icons" }, this._renderIcon()))), this.helper && h("p", { key: '9dcd6fb14615c2471eb3848c7fd2513874cd6035', class: "message" }, this.helper), typeof this.error === 'string' ? (h("p", { class: "message error" }, this.error)) : typeof this.warning === 'string' ? (h("p", { class: "message warning" }, this.warning)) : null));
|
|
29
29
|
}
|
|
30
30
|
_renderIcon() {
|
|
31
31
|
if (this.loading)
|
|
@@ -29,7 +29,7 @@ export class XvTile {
|
|
|
29
29
|
this.checked = !this.checked;
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'ec3ba694a1f3eb783b60fecbcdd14287d588c4de', class: "xv-tile--host" }, h("label", { key: '65a21f79a250dd79316d064dde627f6fe5b2805b', class: {
|
|
33
33
|
[this.el.className]: !!this.el.className,
|
|
34
34
|
'xv-tile': true,
|
|
35
35
|
[`xv-tile--variant-${this.variant}`]: !!this.variant,
|
|
@@ -37,7 +37,7 @@ export class XvTile {
|
|
|
37
37
|
'xv-tile--disabled': !!this.disabled,
|
|
38
38
|
'selected': !!this.checked,
|
|
39
39
|
'xv-tile--error': !!this.error,
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, h("div", { key: '761e9416ca4b1754e03316de73fee32efb023152', class: "xv-tile_content" }, this.label && h("p", { key: '496e4275da6567d1264a38b69b78cf8283c640d0', class: "xv-tile_content__title" }, this.label), h("slot", { key: '567e6e6a8d0cd895ba9edc4f5b5377763ab10108' })), this.variant === 'selectable' && (h("div", { key: '2eb9b60a3eb578c88002160e9e7adcee7d209056', class: "xv-tile_control" }, this.multiple ? (h("input", { type: "checkbox", disabled: this.disabled || this.readonly, readonly: this.readonly, onChange: this.handleChange, name: this.name, value: this.value, checked: this.checked })) : (h("input", { type: "radio", disabled: this.disabled || this.readonly, readonly: this.readonly, onChange: this.handleChange, name: this.name, value: this.value, checked: this.checked })))), (this.variant === 'clickable' || this.variant === 'expandable') && (h("div", { key: 'd4c28994dde438425291164e59ec08e08e4eaaf8', class: "xv-tile_footer" }, h("button", { key: 'da3f09412c3e88322484cf51eb5a7f0878e4a1fc', class: { 'xv-tile_footer__icon': true, [`icon--${this.variant}`]: true, open: this.checked } }))), h("div", { key: '28c41a2a9021f39672c45ecee44bc6aad691dc9d', class: { 'xv-tile_expandable': true, open: this.checked } }, h("slot", { key: 'ebd93394a333447d68881658ed80b6341205586c', name: "expandable" })))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "xv-tile"; }
|
|
43
43
|
static get originalStyleUrls() {
|
|
@@ -15,7 +15,7 @@ export class XvToggle {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '824523810a78d1bfd3fd5278913047d97f330c2c', class: { 'xv-toggle': true, disabled: this.disabled, readonly: !!this.readonly, block: !!this.block } }, this.label && h("span", { key: '7ba4c98ffa0443a330c7010d9e41f36ae6be558b', class: "label" }, this.label), h("label", { key: 'd581495423115bcca7b9c0517f5523dc88350b64', class: "control" }, h("slot", { key: 'f7b1184d763da297f9687ccce68dfbafbb189c08', name: "before" }), h("div", { key: '03a6f7dc0bc8020894524bd5b316e1b88201f247', class: "control_input" }, h("input", { key: 'e50cdd77b125f43ecb36365ab7347fddd0061dbf', type: "checkbox", readonly: this.readonly, name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.readonly, onChange: this.onChange }), h("span", { key: '8e2af7a7f3a075982c7b7e8103d6d03946f901c4', class: "toggle" })), h("slot", { key: 'd249ca7ca0e97f12ba7921a12f5480a77bc9560f', name: "after" }))));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "xv-toggle"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -67,7 +67,7 @@ export class XvToggleTip {
|
|
|
67
67
|
}
|
|
68
68
|
;
|
|
69
69
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '95144bb5e1e8e7dfe22f7191d9920f902b8f0d1b', class: "xv-toggle-tip" }, h("div", { key: '7c8a669f220c3b47c9245af85aa0699e474447ed', class: { 'trigger': true, 'trigger--block': this.block }, role: "button", tabindex: "0", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "popover", onClick: () => this.setPopover(!this.open), ref: (el) => (this.triggerEl = el) }, h("slot", { key: '905567440f32e2fdeba80cede5506e2a51e9da99', name: "trigger" }, h("svg", { key: 'b3db10d581509498b3905749e1aac47c7c04c99e', class: "trigger_icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, h("path", { key: '6f1c4e71c07e51e5b41a3a3b06840cdccb4f5856', fill: "currentColor", d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" })))), h("div", { key: '3f652e88df9d5fc7f4b757b2c4e99ae095ce784e', class: { popover: true, autoSize: !!this.autoSize }, role: "tooltip", tabindex: "-1", ref: (el) => (this.popoverEl = el) }, h("div", { key: 'c0ba1c8d7e51dc0cc6e02ebf1f0c698778dbe4cd', class: "popover-tip", part: "tip", "data-popper-arrow": "" }), h("div", { key: '13a4ca0eea582bd93ca920cd3664a10fe6861921', class: "popover-content" }, h("slot", { key: '44bacb0a3f6e02a2ed2d389e76fb518a890c9e9d', name: "header" }), h("slot", { key: 'f41b3b2d09f670dfcae2b91bf6ced0ec6eb291c6', name: "body" }), h("slot", { key: '59f1312c1307273e7fcdf2438f0f67aee0741a6a', name: "footer" })))));
|
|
71
71
|
}
|
|
72
72
|
disconnectedCallback() {
|
|
73
73
|
this.destroyPopper();
|
|
@@ -38,11 +38,11 @@ export class XvTooltip {
|
|
|
38
38
|
this.destroyTooltip();
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '980414b5a2987f07d7a2b5fe6e26f3fc6e8740a4', role: "tooltip", class: {
|
|
42
42
|
'xv-tooltip-wrapper': true,
|
|
43
43
|
[`xv-tooltip-wrapper__block`]: !!this.block,
|
|
44
44
|
[`xv-tooltip-wrapper__dashed`]: !!this.dashed,
|
|
45
|
-
} }, h("slot", { key: '
|
|
45
|
+
} }, h("slot", { key: '2ec5dd1c79e1702cc33ac5ab63b38e590824ae9f' }, h("svg", { key: '801c3f35ef506e36fc002cab0cf803f29ac89964', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, h("path", { key: 'b8b4de91aa61294482a8ba6a1c35fe182ca72b6d', fill: "currentColor", d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" })))));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "xv-tooltip-v2"; }
|
|
48
48
|
static get originalStyleUrls() {
|
|
@@ -13,11 +13,11 @@ var XV_SORT_DIR;
|
|
|
13
13
|
XV_SORT_DIR["NONE"] = "none";
|
|
14
14
|
})(XV_SORT_DIR || (XV_SORT_DIR = {}));
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const OverflowMenuVariant = {
|
|
17
|
+
DEFAULT: '',
|
|
18
|
+
GHOST: 'ghost',
|
|
19
|
+
};
|
|
20
|
+
/** Tag used to discover menu items (roving keyboard navigation, size mirroring). */
|
|
21
|
+
const OverflowMenuItemSelector = 'xv-overflow-menu-v2-item';
|
|
22
22
|
|
|
23
|
-
export { OverflowMenuVariant as O, SIZE_VAR as S, XV_SORT_DIR as X };
|
|
23
|
+
export { OverflowMenuVariant as O, SIZE_VAR as S, XV_SORT_DIR as X, OverflowMenuItemSelector as a };
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-Cv2gugMt.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["xv-accordion-
|
|
7
|
+
return bootstrapLazy([["xv-accordion-v2_48",[[0,"xv-header",{"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"loading":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]],[257,"xv-dropdown-v2",{"search":[516],"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"readonly":[516],"open":[1540],"error":[520],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"searchPlaceholder":[1,"search-placeholder"],"size":[1],"defaultValue":[8,"default-value"],"value":[1032],"variant":[1],"position":[1],"selected":[32],"selectedMap":[32],"resolvedPosition":[32]},[[0,"itemSelected","handleItemSelected"],[0,"keydown","handleKeyDown"]],{"open":[{"openChangeHandle":0}],"multiple":[{"multipleChangeHandle":0}],"value":[{"valueChange":1}]}],[257,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"group":[4],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32],"reorderable":[32],"reorderHandleMode":[32],"close":[64]}],[65,"xv-datepicker",{"value":[1040],"variant":[1],"label":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513],"min":[1],"max":[1],"month":[32],"days":[32],"open":[32],"localError":[32]},[[4,"click","handleClickOutside"]],{"open":[{"openChange":0}],"month":[{"getCalendarGrid":0}],"value":[{"handleValueChange":0}]}],[1,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"buttonVariant":[1,"button-variant"],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32],"clearFiles":[64]}],[65,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513]}],[1,"xv-pagination",{"total":[2],"page":[1026],"size":[1],"block":[4],"variant":[1],"responsiveVariant":[16],"totalItems":[2,"total-items"],"itemsPerPage":[32],"currentVariant":[32]}],[257,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":[{"checkedChangeHandle":0}]}],[1,"xv-tag-combobox",{"options":[16],"label":[1],"size":[1],"placeholder":[1],"allowCreate":[4,"allow-create"],"maxSuggestions":[2,"max-suggestions"],"disabled":[4],"loading":[4],"readonly":[4],"error":[8],"warning":[8],"value":[16],"normalizedOptions":[32],"selected":[32],"inputValue":[32],"open":[32],"filtered":[32],"highlighted":[32],"focusInput":[64],"clear":[64]},null,{"options":[{"watchOptions":0}],"value":[{"watchValue":0}]}],[65,"xv-textarea",{"value":[1025],"name":[1],"label":[1],"placeholder":[1],"helper":[1],"info":[1],"error":[8],"warning":[8],"disabled":[4],"readonly":[4],"block":[4],"counterHide":[4,"counter-hide"],"noResize":[4,"no-resize"],"loading":[4],"max":[2],"rows":[2],"size":[513]}],[257,"xv-data-table",{"size":[1],"block":[520],"loading":[4],"columnWidths":[16],"multiple":[516],"hover":[4],"reorderable":[516],"reorderHandle":[513,"reorder-handle"]},null,{"reorderable":[{"reorderableChanged":0}],"reorderHandle":[{"reorderHandleChanged":0}]}],[257,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540],"multiple":[516],"size":[513]},[[0,"click","handleClick"]]],[257,"xv-image-viewer",{"src":[1],"fullscreenSrc":[1,"fullscreen-src"],"alt":[1],"placeholder":[1],"lazy":[4],"isFullscreen":[32],"loaded":[32],"fullscreenLoaded":[32],"errored":[32]}],[257,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[257,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":[{"setColsSizeTemplate":0}]}],[257,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"hideSingleTab":[4,"hide-single-tab"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[257,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[257,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[260,"xv-breadcrumbs-v2"],[257,"xv-button-group-v2",{"variant":[513],"multiple":[516],"value":[1025]},[[0,"click","handleClick"]],{"value":[{"onSelectionInputChange":0}],"multiple":[{"onSelectionInputChange":0}]}],[257,"xv-content-switcher-item-v2",{"value":[520],"label":[513],"icon":[513],"disabled":[516]}],[257,"xv-content-switcher-v2",{"selected":[1544],"size":[513],"iconOnly":[516,"icon-only"],"disabled":[516],"block":[516],"controlled":[516],"items":[32]}],[257,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[0,"xv-footer",{"data":[32]},[[8,"xv:metaNav-update","handleLoadData"]]],[257,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":[{"updateChildItems":0}]}],[257,"xv-progress-indicator-v2-item",{"status":[1]}],[324,"xv-radio-v2",{"name":[1],"value":[1],"label":[1],"checked":[1028],"indeterminate":[4],"block":[4],"disabled":[4],"required":[4],"reverse":[4],"readonly":[4],"error":[8],"warning":[520],"size":[1]},null,{"checked":[{"onCheckedChange":0}]}],[65,"xv-slider-v2",{"label":[1],"name":[1],"min":[2],"max":[2],"value":[1026],"step":[2],"disabled":[4],"readonly":[4],"notEditable":[4,"not-editable"]}],[257,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[260,"xv-tile",{"variant":[513],"label":[1],"error":[4],"multiple":[4],"disabled":[4],"block":[4],"name":[1],"message":[513],"value":[1025],"checked":[1028],"readonly":[1028]},[[4,"tileChange","tileChangeHandle"],[0,"click","handleClick"]]],[321,"xv-toggle",{"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"readonly":[4],"size":[513],"block":[4]}],[257,"xv-mega-menu",{"open":[1540],"activeItem":[32],"activeGroup":[32],"menuItems":[32],"applicationContext":[32],"menuLoading":[32]},[[4,"click","handleClickOutside"]]],[257,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[520],"width":[1],"align":[1],"tooltip":[1]},[[0,"click","handleSort"]]],[257,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[2,"xv-login-modal",{"visible":[4],"urls":[32],"loading":[32],"errorMessage":[32]}],[257,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"alignment":[1],"size":[1],"tooltip":[1],"anchor":[1],"activeId":[32],"openMenu":[64],"closeMenu":[64],"toggleMenu":[64]},[[0,"keydown","handleKeyDown"]],{"open":[{"openChangeHandle":0}],"anchor":[{"anchorChangeHandle":0}]}],[257,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[513],"clickable":[4],"href":[1],"target":[1],"divider":[516],"hasIcon":[32],"hasIconEnd":[32]},[[0,"click","handleClick"]]],[257,"xv-toggle-tip",{"open":[1540],"autoSize":[516,"auto-size"],"block":[4],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":[{"openChangeHandle":0}]}],[257,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"loading":[4],"openModal":[64],"closeModal":[64]}],[257,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[65,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"autocomplete":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513],"isPasswordVisible":[32]}],[257,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[257,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[321,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"align":[513],"hasFocus":[32]},null,{"checked":[{"onCheckedChange":0}]}],[257,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[260,"xv-tooltip-v2",{"message":[1],"position":[1],"block":[4],"dashed":[4]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[321,"xv-button-v2",{"value":[1],"name":[1],"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"active":[516],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[257,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]],["xv-mega-menu-next",[[257,"xv-mega-menu-next",{"open":[1540],"menuData":[1,"menu-data"],"activeItem":[32],"activeGroup":[32],"menuItems":[32],"applicationContext":[32],"menuLoading":[32]},[[4,"click","handleClickOutside"]],{"menuData":[{"onMenuDataChange":0}]}]]],["xv-header-next",[[0,"xv-header-next",{"menuData":[1,"menu-data"],"currentLocale":[1,"current-locale"],"locales":[1],"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"loading":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|