@solid-design-system/components 4.1.1 → 4.1.2
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/cdn/chunks/chunk.KW5L4FQ6.js +3 -0
- package/cdn/components/switch/switch.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +1 -1
- package/cdn/solid-components.iife.js +1 -1
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.2F2YU5TY.js +1 -1
- package/cdn-versioned/chunks/chunk.2POHB7E4.js +1 -1
- package/cdn-versioned/chunks/chunk.3EINSGT6.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.6DTJTQ5Z.js +1 -1
- package/cdn-versioned/chunks/chunk.6XHUCAAC.js +1 -1
- package/cdn-versioned/chunks/chunk.7KT5V5SZ.js +4 -4
- package/cdn-versioned/chunks/chunk.AWKHYUIP.js +2 -2
- package/cdn-versioned/chunks/chunk.BMK7S33Z.js +1 -1
- package/cdn-versioned/chunks/chunk.BU5EDIFK.js +1 -1
- package/cdn-versioned/chunks/chunk.C7OWRPK7.js +2 -2
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.DOH6WUNR.js +1 -1
- package/cdn-versioned/chunks/chunk.DW5QL76L.js +2 -2
- package/cdn-versioned/chunks/chunk.EJKLI2Q4.js +1 -1
- package/cdn-versioned/chunks/chunk.G7CN4YKD.js +1 -1
- package/cdn-versioned/chunks/chunk.GQIUJUD4.js +1 -1
- package/cdn-versioned/chunks/chunk.GQU4LYQ6.js +1 -1
- package/cdn-versioned/chunks/chunk.HKKRMPWF.js +1 -1
- package/cdn-versioned/chunks/chunk.HOPUF2NO.js +1 -1
- package/cdn-versioned/chunks/chunk.HQYSQRUN.js +1 -1
- package/cdn-versioned/chunks/chunk.HRNG2LIX.js +1 -1
- package/cdn-versioned/chunks/chunk.HUSKVVWH.js +1 -1
- package/cdn-versioned/chunks/chunk.K4WR4LYF.js +4 -4
- package/cdn-versioned/chunks/chunk.KW5L4FQ6.js +3 -0
- package/cdn-versioned/chunks/chunk.LRINU3JN.js +1 -1
- package/cdn-versioned/chunks/chunk.MBU5RGYE.js +1 -1
- package/cdn-versioned/chunks/chunk.NQZZHVDV.js +1 -1
- package/cdn-versioned/chunks/chunk.NVTRGUUN.js +1 -1
- package/cdn-versioned/chunks/chunk.OPMM2RN5.js +1 -1
- package/cdn-versioned/chunks/chunk.OY3MT73P.js +1 -1
- package/cdn-versioned/chunks/chunk.PHRAQBQ7.js +1 -1
- package/cdn-versioned/chunks/chunk.PMI5K2Z2.js +1 -1
- package/cdn-versioned/chunks/chunk.QJVFSDOZ.js +1 -1
- package/cdn-versioned/chunks/chunk.QWPCVRMH.js +1 -1
- package/cdn-versioned/chunks/chunk.SIC7OWQL.js +1 -1
- package/cdn-versioned/chunks/chunk.SJ2JO4KS.js +1 -1
- package/cdn-versioned/chunks/chunk.SNCCOKIM.js +1 -1
- package/cdn-versioned/chunks/chunk.SWUGEKNC.js +1 -1
- package/cdn-versioned/chunks/chunk.SXH5LQRL.js +1 -1
- package/cdn-versioned/chunks/chunk.TET3RDMC.js +1 -1
- package/cdn-versioned/chunks/chunk.UBO6O4CS.js +1 -1
- package/cdn-versioned/chunks/chunk.V7YY3FWK.js +3 -3
- package/cdn-versioned/chunks/chunk.VOX6F6LP.js +1 -1
- package/cdn-versioned/chunks/chunk.VYV6SKST.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WADGCWRK.js +1 -1
- package/cdn-versioned/chunks/chunk.WMCAUVW6.js +1 -1
- package/cdn-versioned/chunks/chunk.XV2WIQSV.js +1 -1
- package/cdn-versioned/chunks/chunk.YFWVU3XM.js +1 -1
- package/cdn-versioned/chunks/chunk.YN6CIEPP.js +1 -1
- package/cdn-versioned/chunks/chunk.YUUAUQGB.js +1 -1
- package/cdn-versioned/chunks/chunk.ZYWB4GHH.js +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +4 -4
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.js +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +202 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +17 -17
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +17 -17
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +80 -80
- package/cdn-versioned/web-types.json +137 -137
- package/dist/chunks/{chunk.IN7RNHBF.js → chunk.XKJR2XUZ.js} +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +1 -1
- package/dist/web-types.json +1 -1
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.274HT4QS.js +3 -3
- package/dist-versioned/chunks/chunk.2FXKQI26.js +2 -2
- package/dist-versioned/chunks/chunk.4Q7KKH5Z.js +2 -2
- package/dist-versioned/chunks/chunk.4SBQOWLU.js +5 -5
- package/dist-versioned/chunks/chunk.5FOKRIWL.js +3 -3
- package/dist-versioned/chunks/chunk.5PTDC66T.js +5 -5
- package/dist-versioned/chunks/chunk.674S2Z6M.js +1 -1
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.7E7C4YEQ.js +3 -3
- package/dist-versioned/chunks/chunk.A5S7GZJI.js +3 -3
- package/dist-versioned/chunks/chunk.A625ONY2.js +2 -2
- package/dist-versioned/chunks/chunk.ACST636J.js +1 -1
- package/dist-versioned/chunks/chunk.AJ7V76EG.js +1 -1
- package/dist-versioned/chunks/chunk.AKF4KQEW.js +2 -2
- package/dist-versioned/chunks/chunk.AQZSZKBJ.js +13 -13
- package/dist-versioned/chunks/chunk.BTJACUD5.js +29 -29
- package/dist-versioned/chunks/chunk.CCQCEONR.js +2 -2
- package/dist-versioned/chunks/chunk.D26WCHLT.js +6 -6
- package/dist-versioned/chunks/chunk.D3I3AZEX.js +13 -13
- package/dist-versioned/chunks/chunk.DPY2TYIS.js +9 -9
- package/dist-versioned/chunks/chunk.DU3O42BH.js +2 -2
- package/dist-versioned/chunks/chunk.EH2FHVPN.js +3 -3
- package/dist-versioned/chunks/chunk.F63YFNZS.js +5 -5
- package/dist-versioned/chunks/chunk.FFKZQXJ2.js +2 -2
- package/dist-versioned/chunks/chunk.FTXUZOXH.js +2 -2
- package/dist-versioned/chunks/chunk.H5ARRBLT.js +2 -2
- package/dist-versioned/chunks/chunk.H5BDO4H5.js +11 -11
- package/dist-versioned/chunks/chunk.HFHUY7YD.js +1 -1
- package/dist-versioned/chunks/chunk.I5ZJV32M.js +1 -1
- package/dist-versioned/chunks/chunk.JIWTAZZS.js +5 -5
- package/dist-versioned/chunks/chunk.JZB2D4IZ.js +1 -1
- package/dist-versioned/chunks/chunk.KH4M6HPE.js +2 -2
- package/dist-versioned/chunks/chunk.KPA6BEFU.js +5 -5
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.LZA2QYUU.js +1 -1
- package/dist-versioned/chunks/chunk.NUIZDE7R.js +1 -1
- package/dist-versioned/chunks/chunk.OBWOMZNU.js +2 -2
- package/dist-versioned/chunks/chunk.OMBVLHXJ.js +1 -1
- package/dist-versioned/chunks/chunk.OR7JTZLE.js +2 -2
- package/dist-versioned/chunks/chunk.OZU372TI.js +2 -2
- package/dist-versioned/chunks/chunk.PRXP5CUW.js +5 -5
- package/dist-versioned/chunks/chunk.PT7MDSWH.js +1 -1
- package/dist-versioned/chunks/chunk.QTFIZJGB.js +2 -2
- package/dist-versioned/chunks/chunk.QUYKT56M.js +1 -1
- package/dist-versioned/chunks/chunk.RSPK767T.js +2 -2
- package/dist-versioned/chunks/chunk.SNCHAQYL.js +4 -4
- package/dist-versioned/chunks/chunk.TGJ2SBPH.js +6 -6
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UZKLVMCI.js +1 -1
- package/dist-versioned/chunks/chunk.VTUCPGYW.js +1 -1
- package/dist-versioned/chunks/{chunk.IN7RNHBF.js → chunk.XKJR2XUZ.js} +2 -2
- package/dist-versioned/chunks/chunk.XL2PSGM5.js +2 -2
- package/dist-versioned/chunks/chunk.XOL74PNU.js +26 -26
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/switch/switch.js +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +202 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +137 -137
- package/package.json +1 -1
- package/cdn/chunks/chunk.6VYBRKPB.js +0 -3
- package/cdn-versioned/chunks/chunk.6VYBRKPB.js +0 -3
|
@@ -53,7 +53,7 @@ var SdSelect = class extends SolidElement {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments);
|
|
55
55
|
this.formControlController = new FormControlController(this, {
|
|
56
|
-
assumeInteractionOn: ["sd-blur", "sd-4-1-
|
|
56
|
+
assumeInteractionOn: ["sd-blur", "sd-4-1-2-input"]
|
|
57
57
|
});
|
|
58
58
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
59
59
|
this.localize = new LocalizeController(this);
|
|
@@ -86,11 +86,11 @@ var SdSelect = class extends SolidElement {
|
|
|
86
86
|
this.styleOnValid = false;
|
|
87
87
|
this.hoist = false;
|
|
88
88
|
this.getTag = (option) => {
|
|
89
|
-
return html`<sd-4-1-
|
|
89
|
+
return html`<sd-4-1-2-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
90
90
|
base:tag__base,
|
|
91
91
|
content:tag__content,
|
|
92
92
|
removable-indicator:tag__removable-indicator,
|
|
93
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-4-1-
|
|
93
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-4-1-2-tag>`;
|
|
94
94
|
};
|
|
95
95
|
this.handleDocumentFocusIn = (event) => {
|
|
96
96
|
const path = event.composedPath();
|
|
@@ -101,7 +101,7 @@ var SdSelect = class extends SolidElement {
|
|
|
101
101
|
this.handleDocumentKeyDown = (event) => {
|
|
102
102
|
const target = event.target;
|
|
103
103
|
const isClearButton = target.closest(".select__clear") !== null;
|
|
104
|
-
const isIconButton = target.closest("sd-4-1-
|
|
104
|
+
const isIconButton = target.closest("sd-4-1-2-icon-button") !== null;
|
|
105
105
|
if (isClearButton || isIconButton) {
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
@@ -235,8 +235,8 @@ var SdSelect = class extends SolidElement {
|
|
|
235
235
|
event.preventDefault();
|
|
236
236
|
event.stopPropagation();
|
|
237
237
|
const tagParent = (_a = event.currentTarget) == null ? void 0 : _a.parentElement;
|
|
238
|
-
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-4-1-
|
|
239
|
-
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-1-
|
|
238
|
+
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-4-1-2-tag");
|
|
239
|
+
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-1-2-tag");
|
|
240
240
|
this.handleTagRemove(new CustomEvent("sd-remove"), option);
|
|
241
241
|
this.updateComplete.then(() => {
|
|
242
242
|
if (nextTag) {
|
|
@@ -256,7 +256,7 @@ var SdSelect = class extends SolidElement {
|
|
|
256
256
|
this.handleTagRemove(new CustomEvent("sd-remove"), this.selectedOptions[this.selectedOptions.length - 1]);
|
|
257
257
|
this.updateComplete.then(() => {
|
|
258
258
|
var _a;
|
|
259
|
-
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-4-1-
|
|
259
|
+
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-4-1-2-tag");
|
|
260
260
|
if (tags && tags.length > 0) {
|
|
261
261
|
tags == null ? void 0 : tags[(tags == null ? void 0 : tags.length) - 1].focus();
|
|
262
262
|
} else {
|
|
@@ -301,7 +301,7 @@ var SdSelect = class extends SolidElement {
|
|
|
301
301
|
}
|
|
302
302
|
handleOptionClick(event) {
|
|
303
303
|
const target = event.target;
|
|
304
|
-
const option = target.closest("sd-4-1-
|
|
304
|
+
const option = target.closest("sd-4-1-2-option");
|
|
305
305
|
const oldValue = this.value;
|
|
306
306
|
if (option && !option.disabled) {
|
|
307
307
|
if (this.multiple) {
|
|
@@ -326,7 +326,7 @@ var SdSelect = class extends SolidElement {
|
|
|
326
326
|
const allOptions = this.getAllOptions();
|
|
327
327
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
328
328
|
const values = [];
|
|
329
|
-
if (customElements.get("sd-4-1-
|
|
329
|
+
if (customElements.get("sd-4-1-2-option")) {
|
|
330
330
|
allOptions.forEach((option) => {
|
|
331
331
|
if (this.multiple) {
|
|
332
332
|
option.checkbox = true;
|
|
@@ -335,7 +335,7 @@ var SdSelect = class extends SolidElement {
|
|
|
335
335
|
});
|
|
336
336
|
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
337
337
|
} else {
|
|
338
|
-
customElements.whenDefined("sd-4-1-
|
|
338
|
+
customElements.whenDefined("sd-4-1-2-option").then(() => this.handleDefaultSlotChange());
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
handleTagRemove(event, option) {
|
|
@@ -352,13 +352,13 @@ var SdSelect = class extends SolidElement {
|
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
-
// Gets an array of all <sd-4-1-
|
|
355
|
+
// Gets an array of all <sd-4-1-2-option> elements
|
|
356
356
|
getAllOptions() {
|
|
357
|
-
return [...this.querySelectorAll("sd-4-1-
|
|
357
|
+
return [...this.querySelectorAll("sd-4-1-2-option")];
|
|
358
358
|
}
|
|
359
|
-
// Gets the first <sd-4-1-
|
|
359
|
+
// Gets the first <sd-4-1-2-option> element
|
|
360
360
|
getFirstOption() {
|
|
361
|
-
return this.querySelector("sd-4-1-
|
|
361
|
+
return this.querySelector("sd-4-1-2-option");
|
|
362
362
|
}
|
|
363
363
|
// Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
364
364
|
// option may be "current" at a time.
|
|
@@ -441,11 +441,11 @@ var SdSelect = class extends SolidElement {
|
|
|
441
441
|
});
|
|
442
442
|
} else {
|
|
443
443
|
return [
|
|
444
|
-
html`<sd-4-1-
|
|
444
|
+
html`<sd-4-1-2-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
445
445
|
base:tag__base,
|
|
446
446
|
content:tag__content,
|
|
447
447
|
removable-indicator:tag__removable-indicator,
|
|
448
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-1-
|
|
448
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-1-2-tag>`
|
|
449
449
|
];
|
|
450
450
|
}
|
|
451
451
|
}
|
|
@@ -460,7 +460,7 @@ var SdSelect = class extends SolidElement {
|
|
|
460
460
|
handleMouseLeave() {
|
|
461
461
|
this.hasHover = false;
|
|
462
462
|
}
|
|
463
|
-
/** Receives incoming event detail from sd-4-1-
|
|
463
|
+
/** Receives incoming event detail from sd-4-1-2-popup and updates local state for conditional styling. */
|
|
464
464
|
handleCurrentPlacement(e) {
|
|
465
465
|
const incomingPlacement = e.detail;
|
|
466
466
|
if (incomingPlacement) {
|
|
@@ -469,7 +469,7 @@ var SdSelect = class extends SolidElement {
|
|
|
469
469
|
}
|
|
470
470
|
handleUseTagsChange() {
|
|
471
471
|
const allOptions = this.getAllOptions();
|
|
472
|
-
if (customElements.get("sd-4-1-
|
|
472
|
+
if (customElements.get("sd-4-1-2-option")) {
|
|
473
473
|
allOptions.forEach((option) => {
|
|
474
474
|
option.checkbox = this.multiple;
|
|
475
475
|
});
|
|
@@ -605,7 +605,7 @@ var SdSelect = class extends SolidElement {
|
|
|
605
605
|
default: "border-neutral-800"
|
|
606
606
|
}[selectState],
|
|
607
607
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
608
|
-
)}"></div><sd-4-1-
|
|
608
|
+
)}"></div><sd-4-1-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
609
609
|
"inline-flex relative w-full",
|
|
610
610
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
611
611
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -626,35 +626,35 @@ var SdSelect = class extends SolidElement {
|
|
|
626
626
|
"select__clear flex justify-center",
|
|
627
627
|
iconMarginLeft,
|
|
628
628
|
this.value.length > 0 ? "visible" : "invisible"
|
|
629
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-1-
|
|
629
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-1-2-icon class="${cx("text-icon-fill-neutral-800", iconSize)}" library="system" name="closing-round"></sd-4-1-2-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-4-1-2-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="system" name="risk"></sd-4-1-2-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-4-1-2-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="system" name="status-check"></sd-4-1-2-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx(
|
|
630
630
|
"inline-flex ml-2 transition-all",
|
|
631
631
|
this.open ? "rotate-180" : "rotate-0",
|
|
632
632
|
this.disabled ? "text-neutral-500" : "text-primary",
|
|
633
633
|
iconSize
|
|
634
|
-
)}"><sd-4-1-
|
|
634
|
+
)}"><sd-4-1-2-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-1-2-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-multiselectable="${this.multiple ? "true" : "false"}" aria-labelledby="label" part="listbox" class="${cx(
|
|
635
635
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
636
636
|
this.open && "shadow",
|
|
637
637
|
this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default"
|
|
638
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-1-
|
|
638
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-1-2-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`;
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
SdSelect.dependencies = {
|
|
642
|
-
"sd-4-1-
|
|
643
|
-
"sd-4-1-
|
|
644
|
-
"sd-4-1-
|
|
642
|
+
"sd-4-1-2-icon": SdIcon,
|
|
643
|
+
"sd-4-1-2-popup": SdPopup,
|
|
644
|
+
"sd-4-1-2-tag": SdTag
|
|
645
645
|
};
|
|
646
646
|
/**
|
|
647
647
|
* Inherits global stylesheet including TailwindCSS
|
|
648
648
|
*/
|
|
649
649
|
SdSelect.styles = [
|
|
650
650
|
...SolidElement.styles,
|
|
651
|
-
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-1-
|
|
651
|
+
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-1-2-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-1-2-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-1-2-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-1-2-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-1-2-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`
|
|
652
652
|
];
|
|
653
653
|
__decorateClass([
|
|
654
|
-
queryAssignedElements({ selector: "sd-4-1-
|
|
654
|
+
queryAssignedElements({ selector: "sd-4-1-2-option" })
|
|
655
655
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
656
656
|
__decorateClass([
|
|
657
|
-
query("sd-4-1-
|
|
657
|
+
query("sd-4-1-2-popup")
|
|
658
658
|
], SdSelect.prototype, "popup", 2);
|
|
659
659
|
__decorateClass([
|
|
660
660
|
query('[part="combobox"]')
|
|
@@ -779,7 +779,7 @@ __decorateClass([
|
|
|
779
779
|
watch("value", { waitUntilFirstUpdate: true })
|
|
780
780
|
], SdSelect.prototype, "handleValueChange", 1);
|
|
781
781
|
SdSelect = __decorateClass([
|
|
782
|
-
customElement("sd-4-1-
|
|
782
|
+
customElement("sd-4-1-2-select")
|
|
783
783
|
], SdSelect);
|
|
784
784
|
setDefaultAnimation("select.show", {
|
|
785
785
|
keyframes: [
|
|
@@ -169,7 +169,7 @@ var SdDialog = class extends SolidElement {
|
|
|
169
169
|
)}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
|
|
170
170
|
"flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",
|
|
171
171
|
this.open && "flex opacity-100"
|
|
172
|
-
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-4-1-
|
|
172
|
+
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-4-1-2-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${cx("absolute top-2 right-2")}" name="x-lg" @click="${() => this.requestClose("close-button")}" type="button"><sd-4-1-2-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-1-2-icon></sd-4-1-2-button>` : ""}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`;
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
SdDialog.styles = [
|
|
@@ -198,7 +198,7 @@ __decorateClass([
|
|
|
198
198
|
watch("open", { waitUntilFirstUpdate: true })
|
|
199
199
|
], SdDialog.prototype, "handleOpenChange", 1);
|
|
200
200
|
SdDialog = __decorateClass([
|
|
201
|
-
customElement("sd-4-1-
|
|
201
|
+
customElement("sd-4-1-2-dialog")
|
|
202
202
|
], SdDialog);
|
|
203
203
|
setDefaultAnimation("dialog.show", {
|
|
204
204
|
keyframes: [
|
|
@@ -56,7 +56,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
56
56
|
this.pausedAutoplay = false;
|
|
57
57
|
this.autoplayController = new AutoplayController(this, () => this.next());
|
|
58
58
|
this.scrollController = new ScrollController(this);
|
|
59
|
-
this.slides = this.getElementsByTagName("sd-4-1-
|
|
59
|
+
this.slides = this.getElementsByTagName("sd-4-1-2-carousel-item");
|
|
60
60
|
// determines which slide is displayed
|
|
61
61
|
// A map containing the state of all the slides
|
|
62
62
|
this.intersectionObserverEntries = /* @__PURE__ */ new Map();
|
|
@@ -372,7 +372,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
372
372
|
)}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @click="${prevEnabled ? (e) => {
|
|
373
373
|
this.previous();
|
|
374
374
|
this.unblockAutoplay(e, this.previousButton);
|
|
375
|
-
} : null}"><slot name="previous-icon"><sd-4-1-
|
|
375
|
+
} : null}"><slot name="previous-icon"><sd-4-1-2-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-4-1-2-icon></slot></button> ${this.variant === "dot" ? html`<div part="pagination-dot" role="tablist" class="${cx("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${map(range(pagesCount), (index) => {
|
|
376
376
|
const isActive = index + 1 === currentPage;
|
|
377
377
|
return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
|
|
378
378
|
"carousel__pagination-item",
|
|
@@ -395,7 +395,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
395
395
|
)}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @click="${nextEnabled ? (e) => {
|
|
396
396
|
this.next();
|
|
397
397
|
this.unblockAutoplay(e, this.nextButton);
|
|
398
|
-
} : null}"><slot name="next-icon"><sd-4-1-
|
|
398
|
+
} : null}"><slot name="next-icon"><sd-4-1-2-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-4-1-2-icon></slot></button></div><button class="${cx(
|
|
399
399
|
"ml-6 !rounded-sm",
|
|
400
400
|
"!absolute !right-0 sd-interactive",
|
|
401
401
|
this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
|
|
@@ -405,12 +405,12 @@ var SdCarousel = class extends SolidElement {
|
|
|
405
405
|
if (e.detail) {
|
|
406
406
|
this.autoplayControls.blur();
|
|
407
407
|
}
|
|
408
|
-
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-4-1-
|
|
408
|
+
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-4-1-2-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-4-1-2-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-4-1-2-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-4-1-2-icon></slot></button></div></div>`;
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
SdCarousel.styles = [
|
|
412
412
|
...SolidElement.styles,
|
|
413
|
-
css`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-4-1-
|
|
413
|
+
css`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-4-1-2-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`
|
|
414
414
|
];
|
|
415
415
|
__decorateClass([
|
|
416
416
|
query('[part~="autoplay-controls"]')
|
|
@@ -477,7 +477,7 @@ __decorateClass([
|
|
|
477
477
|
watch("autoplay")
|
|
478
478
|
], SdCarousel.prototype, "handleAutoplayChange", 1);
|
|
479
479
|
SdCarousel = __decorateClass([
|
|
480
|
-
customElement("sd-4-1-
|
|
480
|
+
customElement("sd-4-1-2-carousel")
|
|
481
481
|
], SdCarousel);
|
|
482
482
|
|
|
483
483
|
export {
|
|
@@ -76,10 +76,10 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
76
76
|
this.formControlController.updateValidity();
|
|
77
77
|
}
|
|
78
78
|
getAllRadios() {
|
|
79
|
-
return [...this.querySelectorAll("sd-4-1-
|
|
79
|
+
return [...this.querySelectorAll("sd-4-1-2-radio, sd-4-1-2-radio-button")];
|
|
80
80
|
}
|
|
81
81
|
handleRadioClick(event) {
|
|
82
|
-
const target = event.target.closest("sd-4-1-
|
|
82
|
+
const target = event.target.closest("sd-4-1-2-radio, sd-4-1-2-radio-button");
|
|
83
83
|
const radios = this.getAllRadios();
|
|
84
84
|
const oldValue = this.value;
|
|
85
85
|
if (target.disabled) {
|
|
@@ -156,7 +156,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
158
|
);
|
|
159
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-4-1-
|
|
159
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-4-1-2-radio-button");
|
|
160
160
|
if (!radios.some((radio) => radio.checked)) {
|
|
161
161
|
if (this.hasButtonGroup) {
|
|
162
162
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -168,26 +168,26 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
if (this.hasButtonGroup) {
|
|
171
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-4-1-
|
|
171
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-4-1-2-button-group");
|
|
172
172
|
if (buttonGroup) {
|
|
173
173
|
buttonGroup.disableRole = true;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
syncRadios() {
|
|
178
|
-
if (customElements.get("sd-4-1-
|
|
178
|
+
if (customElements.get("sd-4-1-2-radio") && customElements.get("sd-4-1-2-radio-button")) {
|
|
179
179
|
this.syncRadioElements();
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
if (customElements.get("sd-4-1-
|
|
182
|
+
if (customElements.get("sd-4-1-2-radio")) {
|
|
183
183
|
this.syncRadioElements();
|
|
184
184
|
} else {
|
|
185
|
-
customElements.whenDefined("sd-4-1-
|
|
185
|
+
customElements.whenDefined("sd-4-1-2-radio").then(() => this.syncRadios());
|
|
186
186
|
}
|
|
187
|
-
if (customElements.get("sd-4-1-
|
|
187
|
+
if (customElements.get("sd-4-1-2-radio-button")) {
|
|
188
188
|
this.syncRadioElements();
|
|
189
189
|
} else {
|
|
190
|
-
customElements.whenDefined("sd-4-1-
|
|
190
|
+
customElements.whenDefined("sd-4-1-2-radio-button").then(() => this.syncRadios());
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
updateCheckedRadio() {
|
|
@@ -264,16 +264,16 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
264
264
|
vertical: "flex-col",
|
|
265
265
|
horizontal: "flex-row"
|
|
266
266
|
}[this.orientation]
|
|
267
|
-
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-4-1-
|
|
267
|
+
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-4-1-2-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-4-1-2-button-group>` : defaultSlot}</div></fieldset>${this.formControlController.renderInvalidMessage()}`;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
SdRadioGroup.dependencies = { "sd-4-1-
|
|
270
|
+
SdRadioGroup.dependencies = { "sd-4-1-2-button-group": SdButtonGroup };
|
|
271
271
|
/**
|
|
272
272
|
* Inherits Tailwind classes and includes additional styling.
|
|
273
273
|
*/
|
|
274
274
|
SdRadioGroup.styles = [
|
|
275
275
|
...SolidElement.styles,
|
|
276
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-1-
|
|
276
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-1-2-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-1-2-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-1-2-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-1-2-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-1-2-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-1-2-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`
|
|
277
277
|
];
|
|
278
278
|
__decorateClass([
|
|
279
279
|
query("slot:not([name])")
|
|
@@ -327,7 +327,7 @@ __decorateClass([
|
|
|
327
327
|
watch("value")
|
|
328
328
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
329
329
|
SdRadioGroup = __decorateClass([
|
|
330
|
-
customElement("sd-4-1-
|
|
330
|
+
customElement("sd-4-1-2-radio-group")
|
|
331
331
|
], SdRadioGroup);
|
|
332
332
|
|
|
333
333
|
export {
|
|
@@ -76,7 +76,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
76
76
|
* within the slotted trigger. This could be the slotted element itself, a child of the slotted element,
|
|
77
77
|
* or an element within the slotted elements shadow root.
|
|
78
78
|
*
|
|
79
|
-
* e.g. the accessible trigger of an <sd-4-1-
|
|
79
|
+
* e.g. the accessible trigger of an <sd-4-1-2-button> is a <button> located inside its shadow root.
|
|
80
80
|
*
|
|
81
81
|
* To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
82
82
|
* */
|
|
@@ -87,11 +87,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
87
87
|
if (accessibleTrigger) {
|
|
88
88
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
89
89
|
// Solid buttons have to update the internal button so it's announced correctly by screen readers
|
|
90
|
-
case "sd-4-1-
|
|
91
|
-
case "sd-4-1-
|
|
90
|
+
case "sd-4-1-2-button":
|
|
91
|
+
case "sd-4-1-2-icon-button":
|
|
92
92
|
target = accessibleTrigger.button;
|
|
93
93
|
break;
|
|
94
|
-
case "sd-4-1-
|
|
94
|
+
case "sd-4-1-2-navigation-item":
|
|
95
95
|
target = accessibleTrigger.button;
|
|
96
96
|
break;
|
|
97
97
|
default:
|
|
@@ -236,7 +236,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
236
236
|
}
|
|
237
237
|
addOpenListeners() {
|
|
238
238
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
|
239
|
-
this.panel.addEventListener("sd-4-1-
|
|
239
|
+
this.panel.addEventListener("sd-4-1-2-select", this.handlePanelSelect);
|
|
240
240
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
|
241
241
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
242
242
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
@@ -244,7 +244,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
244
244
|
removeOpenListeners() {
|
|
245
245
|
if (this.panel) {
|
|
246
246
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
|
247
|
-
this.panel.removeEventListener("sd-4-1-
|
|
247
|
+
this.panel.removeEventListener("sd-4-1-2-select", this.handlePanelSelect);
|
|
248
248
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
|
249
249
|
}
|
|
250
250
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -277,11 +277,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return html`<sd-4-1-
|
|
280
|
+
return html`<sd-4-1-2-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded && this.distance < 1 ? 1 : this.distance}" skidding="${this.skidding}" strategy="${this.hoist ? "fixed" : "absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${cx(
|
|
281
281
|
"shadow bg-white",
|
|
282
282
|
this.open ? "block pointer-events-auto" : "pointer-events-none",
|
|
283
283
|
this.rounded && "rounded-md"
|
|
284
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-4-1-
|
|
284
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-4-1-2-popup>`;
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
SdDropdown.styles = [
|
|
@@ -334,7 +334,7 @@ __decorateClass([
|
|
|
334
334
|
watch("open", { waitUntilFirstUpdate: true })
|
|
335
335
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
336
336
|
SdDropdown = __decorateClass([
|
|
337
|
-
customElement("sd-4-1-
|
|
337
|
+
customElement("sd-4-1-2-dropdown")
|
|
338
338
|
], SdDropdown);
|
|
339
339
|
setDefaultAnimation("dropdown.show", {
|
|
340
340
|
keyframes: [
|
|
@@ -81,7 +81,7 @@ var SdStep = class extends SolidElement {
|
|
|
81
81
|
!this.disabled && !this.current && !this.notInteractive && "text-primary group-hover:text-primary-500 group-hover:fill-primary-500",
|
|
82
82
|
this.notInteractive && "text-primary",
|
|
83
83
|
this.size === "lg" ? "text-lg" : "text-sm"
|
|
84
|
-
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-1-
|
|
84
|
+
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-1-2-icon name="status-check" library="system"></sd-4-1-2-icon>` : html`${this.index}`}</slot></${tag}>${this.noTail ? "" : html`<div part="tail" class="${cx(
|
|
85
85
|
this.orientation === "horizontal" ? "border-t w-full my-auto mr-2" : "border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",
|
|
86
86
|
!this.disabled && !this.current && !this.notInteractive ? " border-primary group-hover:border-primary-500" : "border-neutral-400"
|
|
87
87
|
)}"></div>`}</div><div part="text-container" class="${cx("mt-4 break-words flex flex-col gap-2", this.orientation === "horizontal" ? "text-center w-40" : "w-max text-left", this.disabled && "!text-neutral-700", this.notInteractive ? "ml-3" : "mr-4")}"><div part="label" id="label" class="${cx("!font-bold sd-paragraph", this.disabled && "!text-neutral-700", !this.disabled && !this.current && !this.notInteractive ? "!text-primary group-hover:!text-primary-500 group-hover:cursor-pointer" : "text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${cx("sd-paragraph sd-paragraph--size-sm", this.disabled && "!text-neutral-700")}">${this.description || html`<slot></slot>`}</div></div></div>`;
|
|
@@ -131,7 +131,7 @@ __decorateClass([
|
|
|
131
131
|
watch("notInteractive")
|
|
132
132
|
], SdStep.prototype, "handleInteractivityChange", 1);
|
|
133
133
|
SdStep = __decorateClass([
|
|
134
|
-
customElement("sd-4-1-
|
|
134
|
+
customElement("sd-4-1-2-step")
|
|
135
135
|
], SdStep);
|
|
136
136
|
|
|
137
137
|
export {
|
|
@@ -41,16 +41,16 @@ var SdAccordionGroup = class extends SolidElement {
|
|
|
41
41
|
};
|
|
42
42
|
SdAccordionGroup.styles = [
|
|
43
43
|
...SolidElement.styles,
|
|
44
|
-
css`:host{display:block}::slotted(sd-4-1-
|
|
44
|
+
css`:host{display:block}::slotted(sd-4-1-2-accordion:not(:first-of-type)){margin-top:-1px}`
|
|
45
45
|
];
|
|
46
46
|
__decorateClass([
|
|
47
|
-
queryAssignedElements({ selector: "sd-4-1-
|
|
47
|
+
queryAssignedElements({ selector: "sd-4-1-2-accordion" })
|
|
48
48
|
], SdAccordionGroup.prototype, "_accordionsInDefaultSlot", 2);
|
|
49
49
|
__decorateClass([
|
|
50
50
|
property({ attribute: "close-others", type: Boolean })
|
|
51
51
|
], SdAccordionGroup.prototype, "closeOthers", 2);
|
|
52
52
|
SdAccordionGroup = __decorateClass([
|
|
53
|
-
customElement("sd-4-1-
|
|
53
|
+
customElement("sd-4-1-2-accordion-group")
|
|
54
54
|
], SdAccordionGroup);
|
|
55
55
|
|
|
56
56
|
export {
|
|
@@ -112,16 +112,16 @@ var SdNavigationItem = class extends SolidElement {
|
|
|
112
112
|
isAccordion ? "grow" : "w-full",
|
|
113
113
|
slots["description"] || this.separated ? "pb-1" : horizontalPaddingBottom,
|
|
114
114
|
this.calculatePaddingX
|
|
115
|
-
)}">${this.divider && this.vertical ? html`<sd-4-1-
|
|
115
|
+
)}">${this.divider && this.vertical ? html`<sd-4-1-2-divider part="divider" class="${cx("w-full transition-all absolute -top-0.25 left-0", this.calculatePaddingX)}"></sd-4-1-2-divider>` : ""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated ? html`<a class="${cx(
|
|
116
116
|
"mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",
|
|
117
117
|
!slots["description"] && "py-4"
|
|
118
|
-
)}" href="${ifDefined(isLink ? this.href : void 0)}" target="${ifDefined(isLink ? this.target : void 0)}" download="${ifDefined(isLink ? this.download : void 0)}"><slot part="content" class="inline"></slot></a>` : html`<slot part="content" class="inline"></slot>`} </span>${(this.chevron || slots["children"]) && this.vertical ? this.separated ? html`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-1-
|
|
118
|
+
)}" href="${ifDefined(isLink ? this.href : void 0)}" target="${ifDefined(isLink ? this.target : void 0)}" download="${ifDefined(isLink ? this.download : void 0)}"><slot part="content" class="inline"></slot></a>` : html`<slot part="content" class="inline"></slot>`} </span>${(this.chevron || slots["children"]) && this.vertical ? this.separated ? html`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-1-2-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${cx(
|
|
119
119
|
"mr-4 h-6 w-6 transition-all",
|
|
120
120
|
isAccordion || this.separated ? this.open ? "rotate-180" : "rotate-0" : "rotate-[270deg]"
|
|
121
|
-
)}"></sd-4-1-
|
|
121
|
+
)}"></sd-4-1-2-icon></button>` : html`<sd-4-1-2-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${cx(
|
|
122
122
|
"h-6 w-6 ml-2 transition-all",
|
|
123
123
|
isAccordion ? this.open ? "rotate-180" : "rotate-0" : "rotate-[270deg]"
|
|
124
|
-
)}"></sd-4-1-
|
|
124
|
+
)}"></sd-4-1-2-icon>` : ""} </span>${slots["description"] && this.vertical ? html`<slot name="description" part="description" class="${cx(
|
|
125
125
|
"inline-block text-sm text-left text-black",
|
|
126
126
|
isAccordion || this.separated ? "grow" : "w-full",
|
|
127
127
|
this.separated ? "px-4" : this.calculatePaddingX,
|
|
@@ -186,7 +186,7 @@ __decorateClass([
|
|
|
186
186
|
property({ type: Boolean, reflect: true })
|
|
187
187
|
], SdNavigationItem.prototype, "separated", 2);
|
|
188
188
|
SdNavigationItem = __decorateClass([
|
|
189
|
-
customElement("sd-4-1-
|
|
189
|
+
customElement("sd-4-1-2-navigation-item")
|
|
190
190
|
], SdNavigationItem);
|
|
191
191
|
|
|
192
192
|
export {
|
|
@@ -142,7 +142,7 @@ var SdAccordion = class extends SolidElement {
|
|
|
142
142
|
)}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
|
|
143
143
|
"flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
|
|
144
144
|
this.open && "rotate-180"
|
|
145
|
-
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-4-1-
|
|
145
|
+
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-4-1-2-icon library="system" name="chevron-down"></sd-4-1-2-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-4-1-2-icon library="system" name="chevron-down"></sd-4-1-2-icon></slot></span></summary><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></details>`;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
SdAccordion.styles = [
|
|
@@ -168,7 +168,7 @@ __decorateClass([
|
|
|
168
168
|
watch("open", { waitUntilFirstUpdate: true })
|
|
169
169
|
], SdAccordion.prototype, "handleOpenChange", 1);
|
|
170
170
|
SdAccordion = __decorateClass([
|
|
171
|
-
customElement("sd-4-1-
|
|
171
|
+
customElement("sd-4-1-2-accordion")
|
|
172
172
|
], SdAccordion);
|
|
173
173
|
setDefaultAnimation("accordion.show", {
|
|
174
174
|
keyframes: [
|
|
@@ -91,7 +91,7 @@ var SdOption = class extends SolidElement {
|
|
|
91
91
|
)}"></span> ${this.checkbox ? html`<span id="control" part="control ${this.selected ? " control--checked" : "control--unchecked"}" class="${cx(
|
|
92
92
|
"relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",
|
|
93
93
|
this.disabled ? "border-neutral-500" : this.selected ? "bg-accent border-accent" : "border-neutral-800"
|
|
94
|
-
)}">${this.selected ? html`<sd-4-1-
|
|
94
|
+
)}">${this.selected ? html`<sd-4-1-2-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-4-1-2-icon>` : ""}</span>` : ""} ${slots["left"] ? html`<slot name="left" part="left" class="inline-flex mr-2"></slot>` : ""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${slots["right"] ? html`<slot name="right" part="right" class="inline-flex ml-2"></slot>` : ""}</div>`;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
@@ -135,7 +135,7 @@ __decorateClass([
|
|
|
135
135
|
watch("value")
|
|
136
136
|
], SdOption.prototype, "handleValueChange", 1);
|
|
137
137
|
SdOption = __decorateClass([
|
|
138
|
-
customElement("sd-4-1-
|
|
138
|
+
customElement("sd-4-1-2-option")
|
|
139
139
|
], SdOption);
|
|
140
140
|
|
|
141
141
|
export {
|
|
@@ -71,7 +71,7 @@ var SdExpandable = class extends SolidElement {
|
|
|
71
71
|
"sd-interactive sd-interactive--reset",
|
|
72
72
|
this.inverted && "sd-interactive--inverted",
|
|
73
73
|
!this.inverted ? "!focus-visible:focus-outline" : "!focus-visible:focus-outline-inverted"
|
|
74
|
-
)}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${cx("h-full justify-center w-full text-base flex items-center toggle")}">${this.open ? html`<slot name="toggle-open"><sd-4-1-
|
|
74
|
+
)}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${cx("h-full justify-center w-full text-base flex items-center toggle")}">${this.open ? html`<slot name="toggle-open"><sd-4-1-2-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-4-1-2-icon>${this.localize.term("showLess")}</slot>` : html`<slot name="toggle-closed"><sd-4-1-2-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-4-1-2-icon>${this.localize.term("showMore")}</slot>`}</div></button><details part="details" aria-hidden="${!this.open}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`;
|
|
75
75
|
}
|
|
76
76
|
firstUpdated() {
|
|
77
77
|
this.cloneContentToLightDOM();
|
|
@@ -108,7 +108,7 @@ __decorateClass([
|
|
|
108
108
|
watch("open", { waitUntilFirstUpdate: true })
|
|
109
109
|
], SdExpandable.prototype, "onOpenChange", 1);
|
|
110
110
|
SdExpandable = __decorateClass([
|
|
111
|
-
customElement("sd-4-1-
|
|
111
|
+
customElement("sd-4-1-2-expandable")
|
|
112
112
|
], SdExpandable);
|
|
113
113
|
|
|
114
114
|
export {
|