@solid-design-system/components 4.5.0 → 4.5.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/{cdn-versioned/chunks/chunk.JDSUZDP4.js → cdn/chunks/chunk.V2NDECMV.js} +1 -1
- package/cdn/components/teaser/teaser.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.247MZWMU.js +1 -1
- package/cdn-versioned/chunks/chunk.2BLQ3VDT.js +4 -4
- package/cdn-versioned/chunks/chunk.2HJF2D4H.js +2 -2
- package/cdn-versioned/chunks/chunk.43NFQGWL.js +1 -1
- package/cdn-versioned/chunks/chunk.5AILWWY2.js +1 -1
- package/cdn-versioned/chunks/chunk.5TTHL3M2.js +3 -3
- package/cdn-versioned/chunks/chunk.5YWPH3S7.js +2 -2
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.7TRFUW6U.js +1 -1
- package/cdn-versioned/chunks/chunk.BHWV44KN.js +1 -1
- package/cdn-versioned/chunks/chunk.BWMHPT4Y.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.CNGIUOE5.js +1 -1
- package/cdn-versioned/chunks/chunk.DDLTKNEO.js +1 -1
- package/cdn-versioned/chunks/chunk.DLY5AX2P.js +1 -1
- package/cdn-versioned/chunks/chunk.E5FCRWHS.js +1 -1
- package/cdn-versioned/chunks/chunk.F45IDVYA.js +1 -1
- package/cdn-versioned/chunks/chunk.FHU3KJ7Y.js +1 -1
- package/cdn-versioned/chunks/chunk.FVXID42E.js +1 -1
- package/cdn-versioned/chunks/chunk.HT2MRC4Z.js +1 -1
- package/cdn-versioned/chunks/chunk.I2WEQVU3.js +1 -1
- package/cdn-versioned/chunks/chunk.IUC5UQ2V.js +1 -1
- package/cdn-versioned/chunks/chunk.JCNKLGIS.js +1 -1
- package/cdn-versioned/chunks/chunk.KLNBBP4R.js +4 -4
- package/cdn-versioned/chunks/chunk.KV424MMD.js +1 -1
- package/cdn-versioned/chunks/chunk.KWNRVZ54.js +1 -1
- package/cdn-versioned/chunks/chunk.LET4FMBB.js +1 -1
- package/cdn-versioned/chunks/chunk.LKO4ZRE7.js +1 -1
- package/cdn-versioned/chunks/chunk.NFQN6UG4.js +1 -1
- package/cdn-versioned/chunks/chunk.NOJV6ZZF.js +1 -1
- package/cdn-versioned/chunks/chunk.NQXQB7LN.js +1 -1
- package/cdn-versioned/chunks/chunk.NW6W2FSS.js +1 -1
- package/cdn-versioned/chunks/chunk.NZT4ORYP.js +1 -1
- package/cdn-versioned/chunks/chunk.O3IRROA2.js +1 -1
- package/cdn-versioned/chunks/chunk.ONLECFTO.js +1 -1
- package/cdn-versioned/chunks/chunk.PDIUABFP.js +1 -1
- package/cdn-versioned/chunks/chunk.PGBIGG5I.js +1 -1
- package/cdn-versioned/chunks/chunk.QWMQJ6TF.js +1 -1
- package/cdn-versioned/chunks/chunk.RCLIOOS5.js +1 -1
- package/cdn-versioned/chunks/chunk.RGJXEMYT.js +1 -1
- package/cdn-versioned/chunks/chunk.SDZ6E4CH.js +1 -1
- package/{cdn/chunks/chunk.JDSUZDP4.js → cdn-versioned/chunks/chunk.V2NDECMV.js} +1 -1
- package/cdn-versioned/chunks/chunk.V3YHI2G2.js +1 -1
- package/cdn-versioned/chunks/chunk.VZSFEHBE.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WJ55QSS3.js +1 -1
- package/cdn-versioned/chunks/chunk.WMV7GLXF.js +1 -1
- package/cdn-versioned/chunks/chunk.WUTY672B.js +1 -1
- package/cdn-versioned/chunks/chunk.XYZ5DKTA.js +1 -1
- package/cdn-versioned/chunks/chunk.Y4PTSCEB.js +1 -1
- package/cdn-versioned/chunks/chunk.YBNWPLWL.js +1 -1
- package/cdn-versioned/chunks/chunk.ZN24IDXT.js +1 -1
- package/cdn-versioned/chunks/chunk.ZVVSLR3B.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/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/teaser/teaser.js +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 +16 -16
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +16 -16
- 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.WJHCLJNK.js → chunk.5W3UXUG2.js} +1 -1
- package/dist/components/teaser/teaser.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.3UO2LKG5.js +13 -13
- package/dist-versioned/chunks/chunk.3YTMF6YZ.js +2 -2
- package/dist-versioned/chunks/chunk.5AX4S2QZ.js +2 -2
- package/dist-versioned/chunks/chunk.5V7TZU4Q.js +5 -5
- package/dist-versioned/chunks/{chunk.WJHCLJNK.js → chunk.5W3UXUG2.js} +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6MMBMCHF.js +9 -9
- package/dist-versioned/chunks/chunk.6S3CCHLZ.js +1 -1
- package/dist-versioned/chunks/chunk.73HAOWEX.js +2 -2
- package/dist-versioned/chunks/chunk.7SZFMAVT.js +1 -1
- package/dist-versioned/chunks/chunk.AWASHA2T.js +1 -1
- package/dist-versioned/chunks/chunk.BFHRLREK.js +1 -1
- package/dist-versioned/chunks/chunk.CVHGDRIM.js +2 -2
- package/dist-versioned/chunks/chunk.DI4CIT2A.js +1 -1
- package/dist-versioned/chunks/chunk.DNHLNGIL.js +13 -13
- package/dist-versioned/chunks/chunk.F4BRIYYD.js +1 -1
- package/dist-versioned/chunks/chunk.G6KPFA3G.js +4 -4
- package/dist-versioned/chunks/chunk.GQXJC6ZE.js +2 -2
- package/dist-versioned/chunks/chunk.GWCHNKGW.js +1 -1
- package/dist-versioned/chunks/chunk.H54CZFCF.js +5 -5
- package/dist-versioned/chunks/chunk.HJ3ZUH4A.js +1 -1
- package/dist-versioned/chunks/chunk.I2JBWY5C.js +2 -2
- package/dist-versioned/chunks/chunk.IKWY7WM6.js +3 -3
- package/dist-versioned/chunks/chunk.JD5XFZKL.js +2 -2
- package/dist-versioned/chunks/chunk.JMAPLJHF.js +2 -2
- package/dist-versioned/chunks/chunk.JPGDK3CW.js +2 -2
- package/dist-versioned/chunks/chunk.K5MKZJEB.js +5 -5
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.L5QYLWGO.js +6 -6
- package/dist-versioned/chunks/chunk.LRQ55FZL.js +1 -1
- package/dist-versioned/chunks/chunk.LUV3NLSJ.js +3 -3
- package/dist-versioned/chunks/chunk.MCUC6LS6.js +2 -2
- package/dist-versioned/chunks/chunk.MKZ5TRQH.js +1 -1
- package/dist-versioned/chunks/chunk.MYCUDMGG.js +2 -2
- package/dist-versioned/chunks/chunk.OENW3EQT.js +5 -5
- package/dist-versioned/chunks/chunk.ONBGPY5D.js +5 -5
- package/dist-versioned/chunks/chunk.QN2ROZHZ.js +3 -3
- package/dist-versioned/chunks/chunk.QUK3F6GK.js +1 -1
- package/dist-versioned/chunks/chunk.RFVRT5UG.js +2 -2
- package/dist-versioned/chunks/chunk.SH45GYZL.js +1 -1
- package/dist-versioned/chunks/chunk.T5VRGBLR.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UXEDWUMA.js +26 -26
- package/dist-versioned/chunks/chunk.WHFYHMF4.js +2 -2
- package/dist-versioned/chunks/chunk.WPHOQL7V.js +2 -2
- package/dist-versioned/chunks/chunk.WZGJQPPD.js +2 -2
- package/dist-versioned/chunks/chunk.X7HEAUGJ.js +2 -2
- package/dist-versioned/chunks/chunk.XCNH2K2U.js +5 -5
- package/dist-versioned/chunks/chunk.XNH47HGG.js +29 -29
- package/dist-versioned/chunks/chunk.Y6WJUTMM.js +6 -6
- package/dist-versioned/chunks/chunk.ZH6BP5XL.js +3 -3
- package/dist-versioned/chunks/chunk.ZJGD23K6.js +3 -3
- package/dist-versioned/chunks/chunk.ZWJNBDIV.js +11 -11
- 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/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/teaser/teaser.js +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
|
@@ -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-5-
|
|
56
|
+
assumeInteractionOn: ["sd-blur", "sd-4-5-1-input"]
|
|
57
57
|
});
|
|
58
58
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
59
59
|
this.localize = new LocalizeController(this);
|
|
@@ -87,11 +87,11 @@ var SdSelect = class extends SolidElement {
|
|
|
87
87
|
this.styleOnValid = false;
|
|
88
88
|
this.hoist = false;
|
|
89
89
|
this.getTag = (option) => {
|
|
90
|
-
return html`<sd-4-5-
|
|
90
|
+
return html`<sd-4-5-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
91
91
|
base:tag__base,
|
|
92
92
|
content:tag__content,
|
|
93
93
|
removable-indicator:tag__removable-indicator,
|
|
94
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-4-5-
|
|
94
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-4-5-1-tag>`;
|
|
95
95
|
};
|
|
96
96
|
this.handleDocumentFocusIn = (event) => {
|
|
97
97
|
const path = event.composedPath();
|
|
@@ -102,7 +102,7 @@ var SdSelect = class extends SolidElement {
|
|
|
102
102
|
this.handleDocumentKeyDown = (event) => {
|
|
103
103
|
const target = event.target;
|
|
104
104
|
const isClearButton = target.closest(".select__clear") !== null;
|
|
105
|
-
const isIconButton = target.closest("sd-4-5-
|
|
105
|
+
const isIconButton = target.closest("sd-4-5-1-icon-button") !== null;
|
|
106
106
|
if (isClearButton || isIconButton) {
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
@@ -236,8 +236,8 @@ var SdSelect = class extends SolidElement {
|
|
|
236
236
|
event.preventDefault();
|
|
237
237
|
event.stopPropagation();
|
|
238
238
|
const tagParent = (_a = event.currentTarget) == null ? void 0 : _a.parentElement;
|
|
239
|
-
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-4-5-
|
|
240
|
-
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-5-
|
|
239
|
+
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-4-5-1-tag");
|
|
240
|
+
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-5-1-tag");
|
|
241
241
|
this.handleTagRemove(new CustomEvent("sd-remove"), option);
|
|
242
242
|
this.updateComplete.then(() => {
|
|
243
243
|
if (nextTag) {
|
|
@@ -257,7 +257,7 @@ var SdSelect = class extends SolidElement {
|
|
|
257
257
|
this.handleTagRemove(new CustomEvent("sd-remove"), this.selectedOptions[this.selectedOptions.length - 1]);
|
|
258
258
|
this.updateComplete.then(() => {
|
|
259
259
|
var _a;
|
|
260
|
-
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-4-5-
|
|
260
|
+
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-4-5-1-tag");
|
|
261
261
|
if (tags && tags.length > 0) {
|
|
262
262
|
tags == null ? void 0 : tags[(tags == null ? void 0 : tags.length) - 1].focus();
|
|
263
263
|
} else {
|
|
@@ -302,7 +302,7 @@ var SdSelect = class extends SolidElement {
|
|
|
302
302
|
}
|
|
303
303
|
handleOptionClick(event) {
|
|
304
304
|
const target = event.target;
|
|
305
|
-
const option = target.closest("sd-4-5-
|
|
305
|
+
const option = target.closest("sd-4-5-1-option");
|
|
306
306
|
const oldValue = this.value;
|
|
307
307
|
if (option && !option.disabled) {
|
|
308
308
|
if (this.multiple) {
|
|
@@ -327,7 +327,7 @@ var SdSelect = class extends SolidElement {
|
|
|
327
327
|
const allOptions = this.getAllOptions();
|
|
328
328
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
329
329
|
const values = [];
|
|
330
|
-
if (customElements.get("sd-4-5-
|
|
330
|
+
if (customElements.get("sd-4-5-1-option")) {
|
|
331
331
|
allOptions.forEach((option) => {
|
|
332
332
|
if (this.multiple) {
|
|
333
333
|
option.checkbox = true;
|
|
@@ -336,7 +336,7 @@ var SdSelect = class extends SolidElement {
|
|
|
336
336
|
});
|
|
337
337
|
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
338
338
|
} else {
|
|
339
|
-
customElements.whenDefined("sd-4-5-
|
|
339
|
+
customElements.whenDefined("sd-4-5-1-option").then(() => this.handleDefaultSlotChange());
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
handleTagRemove(event, option) {
|
|
@@ -353,13 +353,13 @@ var SdSelect = class extends SolidElement {
|
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
// Gets an array of all <sd-4-5-
|
|
356
|
+
// Gets an array of all <sd-4-5-1-option> elements
|
|
357
357
|
getAllOptions() {
|
|
358
|
-
return [...this.querySelectorAll("sd-4-5-
|
|
358
|
+
return [...this.querySelectorAll("sd-4-5-1-option")];
|
|
359
359
|
}
|
|
360
|
-
// Gets the first <sd-4-5-
|
|
360
|
+
// Gets the first <sd-4-5-1-option> element
|
|
361
361
|
getFirstOption() {
|
|
362
|
-
return this.querySelector("sd-4-5-
|
|
362
|
+
return this.querySelector("sd-4-5-1-option");
|
|
363
363
|
}
|
|
364
364
|
// Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
365
365
|
// option may be "current" at a time.
|
|
@@ -442,11 +442,11 @@ var SdSelect = class extends SolidElement {
|
|
|
442
442
|
});
|
|
443
443
|
} else {
|
|
444
444
|
return [
|
|
445
|
-
html`<sd-4-5-
|
|
445
|
+
html`<sd-4-5-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
446
446
|
base:tag__base,
|
|
447
447
|
content:tag__content,
|
|
448
448
|
removable-indicator:tag__removable-indicator,
|
|
449
|
-
" 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-5-
|
|
449
|
+
" 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-5-1-tag>`
|
|
450
450
|
];
|
|
451
451
|
}
|
|
452
452
|
}
|
|
@@ -461,7 +461,7 @@ var SdSelect = class extends SolidElement {
|
|
|
461
461
|
handleMouseLeave() {
|
|
462
462
|
this.hasHover = false;
|
|
463
463
|
}
|
|
464
|
-
/** Receives incoming event detail from sd-4-5-
|
|
464
|
+
/** Receives incoming event detail from sd-4-5-1-popup and updates local state for conditional styling. */
|
|
465
465
|
handleCurrentPlacement(e) {
|
|
466
466
|
const incomingPlacement = e.detail;
|
|
467
467
|
if (incomingPlacement) {
|
|
@@ -470,7 +470,7 @@ var SdSelect = class extends SolidElement {
|
|
|
470
470
|
}
|
|
471
471
|
handleUseTagsChange() {
|
|
472
472
|
const allOptions = this.getAllOptions();
|
|
473
|
-
if (customElements.get("sd-4-5-
|
|
473
|
+
if (customElements.get("sd-4-5-1-option")) {
|
|
474
474
|
allOptions.forEach((option) => {
|
|
475
475
|
option.checkbox = this.multiple;
|
|
476
476
|
});
|
|
@@ -607,7 +607,7 @@ var SdSelect = class extends SolidElement {
|
|
|
607
607
|
default: "border-neutral-800"
|
|
608
608
|
}[selectState],
|
|
609
609
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
610
|
-
)}"></div><sd-4-5-
|
|
610
|
+
)}"></div><sd-4-5-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
611
611
|
"inline-flex relative w-full",
|
|
612
612
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
613
613
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -628,35 +628,35 @@ var SdSelect = class extends SolidElement {
|
|
|
628
628
|
"select__clear flex justify-center",
|
|
629
629
|
iconMarginLeft,
|
|
630
630
|
this.value.length > 0 ? "visible" : "invisible"
|
|
631
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-5-
|
|
631
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-5-1-icon class="${cx("text-icon-fill-neutral-800", iconSize)}" library="system" name="closing-round"></sd-4-5-1-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-4-5-1-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="system" name="risk"></sd-4-5-1-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-4-5-1-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="system" name="status-check"></sd-4-5-1-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx(
|
|
632
632
|
"inline-flex ml-2 transition-all",
|
|
633
633
|
this.open ? "rotate-180" : "rotate-0",
|
|
634
634
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-primary",
|
|
635
635
|
iconSize
|
|
636
|
-
)}"><sd-4-5-
|
|
636
|
+
)}"><sd-4-5-1-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-5-1-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(
|
|
637
637
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
638
638
|
this.open && "shadow",
|
|
639
639
|
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"
|
|
640
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-5-
|
|
640
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-5-1-popup></div><div class="text-sm text-neutral-700 mt-2" 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()}`;
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
643
|
SdSelect.dependencies = {
|
|
644
|
-
"sd-4-5-
|
|
645
|
-
"sd-4-5-
|
|
646
|
-
"sd-4-5-
|
|
644
|
+
"sd-4-5-1-icon": SdIcon,
|
|
645
|
+
"sd-4-5-1-popup": SdPopup,
|
|
646
|
+
"sd-4-5-1-tag": SdTag
|
|
647
647
|
};
|
|
648
648
|
/**
|
|
649
649
|
* Inherits global stylesheet including TailwindCSS
|
|
650
650
|
*/
|
|
651
651
|
SdSelect.styles = [
|
|
652
652
|
...SolidElement.styles,
|
|
653
|
-
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-5-
|
|
653
|
+
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-5-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-5-1-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-5-1-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-5-1-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-5-1-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))}`
|
|
654
654
|
];
|
|
655
655
|
__decorateClass([
|
|
656
|
-
queryAssignedElements({ selector: "sd-4-5-
|
|
656
|
+
queryAssignedElements({ selector: "sd-4-5-1-option" })
|
|
657
657
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
658
658
|
__decorateClass([
|
|
659
|
-
query("sd-4-5-
|
|
659
|
+
query("sd-4-5-1-popup")
|
|
660
660
|
], SdSelect.prototype, "popup", 2);
|
|
661
661
|
__decorateClass([
|
|
662
662
|
query('[part="combobox"]')
|
|
@@ -784,7 +784,7 @@ __decorateClass([
|
|
|
784
784
|
watch("value", { waitUntilFirstUpdate: true })
|
|
785
785
|
], SdSelect.prototype, "handleValueChange", 1);
|
|
786
786
|
SdSelect = __decorateClass([
|
|
787
|
-
customElement("sd-4-5-
|
|
787
|
+
customElement("sd-4-5-1-select")
|
|
788
788
|
], SdSelect);
|
|
789
789
|
setDefaultAnimation("select.show", {
|
|
790
790
|
keyframes: [
|
|
@@ -288,10 +288,10 @@ var SdAudio = class extends SolidElement {
|
|
|
288
288
|
)}" part="audio-controls"><button class="${cx(
|
|
289
289
|
"playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",
|
|
290
290
|
this.inverted && "sd-interactive--inverted"
|
|
291
|
-
)}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-5-
|
|
291
|
+
)}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-5-1-button ?inverted="${this.inverted ? true : false}" part="play-button" size="lg" @click="${!this.isPlaying ? this.playAudio : this.pauseAudio}" aria-label="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" title="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying ? html`<slot name="pause-icon"><sd-4-5-1-icon class="text-3xl" name="pause" library="system"></sd-4-5-1-icon></slot>` : html`<slot name="play-icon"><sd-4-5-1-icon class="text-3xl" name="start" library="system"></sd-4-5-1-icon></slot>`}</sd-4-5-1-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript") ? html`<button class="${cx(
|
|
292
292
|
"mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",
|
|
293
293
|
this.inverted && "sd-interactive--inverted"
|
|
294
|
-
)}" aria-label="${this.isTranscriptOpen ? this.localize.term("transcriptIsOpen") : this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0" part="transcript"><sd-4-5-
|
|
294
|
+
)}" aria-label="${this.isTranscriptOpen ? this.localize.term("transcriptIsOpen") : this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0" part="transcript"><sd-4-5-1-icon class="w-6 h-6" name="transcript" library="system"></sd-4-5-1-icon></button>` : null} <button class="${cx("w-6 h-6 hover:cursor-pointer sd-interactive", this.inverted && "sd-interactive--inverted")}" part="volume" aria-label="${!this.isMuted ? this.localize.term("mute") : this.localize.term("unmute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-5-1-icon class="w-6 h-6" name="${this.isMuted ? "mute" : "volume"}" library="system"></sd-4-5-1-icon></button></div></div>`;
|
|
295
295
|
const renderTimestamps = html`<div class="${cx(
|
|
296
296
|
"w-full flex justify-between",
|
|
297
297
|
this.reversedLayout ? "mb-2" : "mt-2",
|
|
@@ -301,12 +301,12 @@ var SdAudio = class extends SolidElement {
|
|
|
301
301
|
return html`<div class="${cx("w-full flex relative", this.reversedLayout ? "flex-col-reverse" : "flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated || this.animated && this.reversedLayout ? renderAudioControls : null}<div class="relative">${this.animated && !this.reversedLayout ? html`${renderAudioControls}` : null} ${this.animated ? html`<canvas class="w-full h-16"></canvas>` : null} ${!this.hideTimestamps && this.animated && this.reversedLayout ? renderTimestamps : null} <input class="${cx(
|
|
302
302
|
"progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",
|
|
303
303
|
this.inverted && "sd-interactive--inverted"
|
|
304
|
-
)}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" aria-label="${this.localize.term("seekBar")}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted ? "rgb(var(--sd-color-white, 255 255 255) / 1)" : "rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${progressPercentage}%,${this.animated ? "transparent" : this.inverted ? "rgb(var(--sd-color-primary-400, 153 171 208) / 1)" : "rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${progressPercentage}%)"></div>${this.hasSlotController.test("transcript") ? html`<sd-4-5-
|
|
304
|
+
)}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" aria-label="${this.localize.term("seekBar")}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted ? "rgb(var(--sd-color-white, 255 255 255) / 1)" : "rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${progressPercentage}%,${this.animated ? "transparent" : this.inverted ? "rgb(var(--sd-color-primary-400, 153 171 208) / 1)" : "rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${progressPercentage}%)"></div>${this.hasSlotController.test("transcript") ? html`<sd-4-5-1-drawer><slot name="transcript"></slot></sd-4-5-1-drawer>` : null} ${!this.hideTimestamps && (!this.animated || !this.reversedLayout) ? renderTimestamps : null}</div>`;
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
307
|
SdAudio.styles = [
|
|
308
308
|
...SolidElement.styles,
|
|
309
|
-
css`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-5-
|
|
309
|
+
css`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-5-1-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-5-1-button::part(label){align-items:center;display:flex;flex-grow:0}`
|
|
310
310
|
];
|
|
311
311
|
__decorateClass([
|
|
312
312
|
property({ type: Boolean, reflect: true, attribute: "reversed-layout" })
|
|
@@ -348,13 +348,13 @@ __decorateClass([
|
|
|
348
348
|
query('[part="audio-player"]')
|
|
349
349
|
], SdAudio.prototype, "audioPlayerContainer", 2);
|
|
350
350
|
__decorateClass([
|
|
351
|
-
query("sd-4-5-
|
|
351
|
+
query("sd-4-5-1-drawer")
|
|
352
352
|
], SdAudio.prototype, "drawer", 2);
|
|
353
353
|
__decorateClass([
|
|
354
354
|
query("canvas")
|
|
355
355
|
], SdAudio.prototype, "canvas", 2);
|
|
356
356
|
SdAudio = __decorateClass([
|
|
357
|
-
customElement("sd-4-5-
|
|
357
|
+
customElement("sd-4-5-1-audio")
|
|
358
358
|
], SdAudio);
|
|
359
359
|
|
|
360
360
|
export {
|
|
@@ -64,10 +64,10 @@ var SdQuickfact = class extends SdAccordion {
|
|
|
64
64
|
!this.expandable && "hidden"
|
|
65
65
|
)}
|
|
66
66
|
><slot name="expand-icon" class=${cx(this.open && "hidden")}>
|
|
67
|
-
<sd-4-5-
|
|
67
|
+
<sd-4-5-1-icon library="system" name="chevron-down"></sd-4-5-1-icon>
|
|
68
68
|
</slot>
|
|
69
69
|
<slot name="collapse-icon" class=${cx(!this.open && "hidden")}>
|
|
70
|
-
<sd-4-5-
|
|
70
|
+
<sd-4-5-1-icon library="system" name="chevron-down"></sd-4-5-1-icon> </slot
|
|
71
71
|
></span>
|
|
72
72
|
</${header}>
|
|
73
73
|
<div part="content" id="content" class=${cx("overflow-hidden", !this.expandable && "hidden")}>
|
|
@@ -85,7 +85,7 @@ __decorateClass([
|
|
|
85
85
|
property({ type: Boolean, reflect: true })
|
|
86
86
|
], SdQuickfact.prototype, "expandable", 2);
|
|
87
87
|
SdQuickfact = __decorateClass([
|
|
88
|
-
customElement("sd-4-5-
|
|
88
|
+
customElement("sd-4-5-1-quickfact")
|
|
89
89
|
], SdQuickfact);
|
|
90
90
|
setDefaultAnimation("quickfact.show", {
|
|
91
91
|
keyframes: [
|
|
@@ -378,7 +378,7 @@ var SdInput = class extends SolidElement {
|
|
|
378
378
|
this.size === "sm" ? "h-6" : "h-8",
|
|
379
379
|
textSize,
|
|
380
380
|
this.visuallyDisabled && "cursor-not-allowed"
|
|
381
|
-
)}" type="${this.type === "password" && this.passwordVisible ? "text" : this.type}" title="${this.title}" name="${ifDefined(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" .value="${live(this.value)}" autocapitalize="${ifDefined(this.type === "password" ? "off" : this.autocapitalize)}" autocomplete="${ifDefined(this.type === "password" ? "off" : this.autocomplete)}" autocorrect="${ifDefined(this.type === "password" ? "off" : this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled || this.disabled ? "true" : "false"}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-5-
|
|
381
|
+
)}" type="${this.type === "password" && this.passwordVisible ? "text" : this.type}" title="${this.title}" name="${ifDefined(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" .value="${live(this.value)}" autocapitalize="${ifDefined(this.type === "password" ? "off" : this.autocapitalize)}" autocomplete="${ifDefined(this.type === "password" ? "off" : this.autocomplete)}" autocorrect="${ifDefined(this.type === "password" ? "off" : this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled || this.disabled ? "true" : "false"}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-5-1-icon class="${cx("icon-fill-neutral-800", iconSize)}" library="system" name="closing-round"></sd-4-5-1-icon></slot></button>` : ""} ${this.passwordToggle && this.type === "password" ? html`<button aria-label="${this.localize.term(this.passwordVisible ? "hidePassword" : "showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible ? html`<slot name="show-password-icon"><sd-4-5-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye"></sd-4-5-1-icon></slot>` : html`<slot name="hide-password-icon"><sd-4-5-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye-crossed-out"></sd-4-5-1-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-4-5-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="calendar"></sd-4-5-1-icon>` : ""} ${this.type === "time" ? html`<sd-4-5-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="clock"></sd-4-5-1-icon>` : ""} ${this.type === "search" ? html`<button class="${cx("flex items-center sd-interactive", iconMarginLeft)}" type="button" @click="${this.handleSearchClick}"><sd-4-5-1-icon class="${cx(iconColor, iconSize)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-4-5-1-icon></button>` : ""} ${this.showInvalidStyle ? html`<sd-4-5-1-icon part="invalid-icon" class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-4-5-1-icon>` : ""} ${this.showValidStyle && this.styleOnValid ? html`<sd-4-5-1-icon class="${cx("text-success flex-shrink-0", iconMarginLeft, iconSize)}" library="system" name="status-check" part="valid-icon"></sd-4-5-1-icon>` : ""} ${slots["right"] ? html`<slot name="right" part="right" class="${cx("inline-flex", iconColor, iconMarginLeft, iconSize)}"></slot>` : ""} ${this.type === "number" && this.spinButtons ? html`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${longPress({ start: () => this.handleStepDown(), end: () => this.handleChange() })} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-5-1-icon name="system/minus-circle" label="Decrease value" class="${cx(iconColor, iconMarginLeft, iconSize)}"></sd-4-5-1-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange() })} tabindex="-1"><slot name="increment-number-stepper"><sd-4-5-1-icon name="system/plus-circle" label="Decrease value" class="${cx(iconColor, iconMarginLeft, iconSize)}"></sd-4-5-1-icon></slot></button></div>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-2", hasHelpText ? "block" : "hidden")}" aria-hidden="${!hasHelpText}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
/**
|
|
@@ -386,7 +386,7 @@ var SdInput = class extends SolidElement {
|
|
|
386
386
|
*/
|
|
387
387
|
SdInput.styles = [
|
|
388
388
|
...SolidElement.styles,
|
|
389
|
-
css`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-5-
|
|
389
|
+
css`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-5-1-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`
|
|
390
390
|
];
|
|
391
391
|
__decorateClass([
|
|
392
392
|
query("#input")
|
|
@@ -516,7 +516,7 @@ __decorateClass([
|
|
|
516
516
|
watch("value", { waitUntilFirstUpdate: true })
|
|
517
517
|
], SdInput.prototype, "handleValueChange", 1);
|
|
518
518
|
SdInput = __decorateClass([
|
|
519
|
-
customElement("sd-4-5-
|
|
519
|
+
customElement("sd-4-5-1-input")
|
|
520
520
|
], SdInput);
|
|
521
521
|
|
|
522
522
|
export {
|
|
@@ -17,19 +17,19 @@ var SdButtonGroup = class extends SolidElement {
|
|
|
17
17
|
}
|
|
18
18
|
handleFocus(event) {
|
|
19
19
|
const button = findButton(event.target);
|
|
20
|
-
button == null ? void 0 : button.classList.add("sd-4-5-
|
|
20
|
+
button == null ? void 0 : button.classList.add("sd-4-5-1-button-group__button--focus");
|
|
21
21
|
}
|
|
22
22
|
handleBlur(event) {
|
|
23
23
|
const button = findButton(event.target);
|
|
24
|
-
button == null ? void 0 : button.classList.remove("sd-4-5-
|
|
24
|
+
button == null ? void 0 : button.classList.remove("sd-4-5-1-button-group__button--focus");
|
|
25
25
|
}
|
|
26
26
|
handleMouseOver(event) {
|
|
27
27
|
const button = findButton(event.target);
|
|
28
|
-
button == null ? void 0 : button.classList.add("sd-4-5-
|
|
28
|
+
button == null ? void 0 : button.classList.add("sd-4-5-1-button-group__button--hover");
|
|
29
29
|
}
|
|
30
30
|
handleMouseOut(event) {
|
|
31
31
|
const button = findButton(event.target);
|
|
32
|
-
button == null ? void 0 : button.classList.remove("sd-4-5-
|
|
32
|
+
button == null ? void 0 : button.classList.remove("sd-4-5-1-button-group__button--hover");
|
|
33
33
|
}
|
|
34
34
|
handleSlotChange() {
|
|
35
35
|
const slottedElements = [...this.defaultSlot.assignedElements({ flatten: true })];
|
|
@@ -37,11 +37,11 @@ var SdButtonGroup = class extends SolidElement {
|
|
|
37
37
|
const index = slottedElements.indexOf(el);
|
|
38
38
|
const button = findButton(el);
|
|
39
39
|
if (button !== null) {
|
|
40
|
-
button.classList.add("sd-4-5-
|
|
41
|
-
button.classList.toggle("sd-4-5-
|
|
42
|
-
button.classList.toggle("sd-4-5-
|
|
43
|
-
button.classList.toggle("sd-4-5-
|
|
44
|
-
button.classList.toggle("sd-4-5-
|
|
40
|
+
button.classList.add("sd-4-5-1-button-group__button");
|
|
41
|
+
button.classList.toggle("sd-4-5-1-button-group__button--first", index === 0);
|
|
42
|
+
button.classList.toggle("sd-4-5-1-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
|
|
43
|
+
button.classList.toggle("sd-4-5-1-button-group__button--last", index === slottedElements.length - 1);
|
|
44
|
+
button.classList.toggle("sd-4-5-1-button-group__button--radio", button.tagName.toLowerCase() === "sd-4-5-1-radio-button");
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -63,11 +63,11 @@ __decorateClass([
|
|
|
63
63
|
property()
|
|
64
64
|
], SdButtonGroup.prototype, "label", 2);
|
|
65
65
|
SdButtonGroup = __decorateClass([
|
|
66
|
-
customElement("sd-4-5-
|
|
66
|
+
customElement("sd-4-5-1-button-group")
|
|
67
67
|
], SdButtonGroup);
|
|
68
68
|
function findButton(el) {
|
|
69
69
|
var _a;
|
|
70
|
-
const selector = "sd-4-5-
|
|
70
|
+
const selector = "sd-4-5-1-button, sd-4-5-1-radio-button";
|
|
71
71
|
return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -9,9 +9,9 @@ import type SdOptgroup from '../optgroup/optgroup.js';
|
|
|
9
9
|
import type SdOption from '../option/option';
|
|
10
10
|
export default class SdCombobox extends SolidElement implements SolidFormControl {
|
|
11
11
|
static dependencies: {
|
|
12
|
-
'sd-4-5-
|
|
13
|
-
'sd-4-5-
|
|
14
|
-
'sd-4-5-
|
|
12
|
+
'sd-4-5-1-icon': typeof SdIcon;
|
|
13
|
+
'sd-4-5-1-popup': typeof SdPopup;
|
|
14
|
+
'sd-4-5-1-tag': typeof SdTag;
|
|
15
15
|
};
|
|
16
16
|
private readonly formControlController;
|
|
17
17
|
private readonly hasSlotController;
|
|
@@ -126,6 +126,6 @@ export default class SdCombobox extends SolidElement implements SolidFormControl
|
|
|
126
126
|
}
|
|
127
127
|
declare global {
|
|
128
128
|
interface HTMLElementTagNameMap {
|
|
129
|
-
'sd-4-5-
|
|
129
|
+
'sd-4-5-1-combobox': SdCombobox;
|
|
130
130
|
}
|
|
131
131
|
}
|