@solid-design-system/components 4.0.6 → 4.0.7
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.7JRCI5T7.js → chunk.3H546YPQ.js} +1 -1
- package/cdn/chunks/chunk.4EXZ2RBI.js +1 -0
- package/cdn/chunks/{chunk.PPMFZ77L.js → chunk.LXL4FWEA.js} +1 -1
- package/cdn/chunks/{chunk.LPJR7GDM.js → chunk.SJ2JO4KS.js} +1 -1
- package/cdn/components/animation/animation.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/custom-elements.json +677 -677
- package/cdn/solid-components.bundle.js +2 -2
- 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.25ETUACJ.js +1 -1
- package/cdn-versioned/chunks/chunk.27EYM5XP.js +4 -4
- package/cdn-versioned/chunks/chunk.2H5XA4I4.js +1 -1
- package/cdn-versioned/chunks/chunk.2OLKGLBS.js +1 -1
- package/cdn-versioned/chunks/{chunk.7JRCI5T7.js → chunk.3H546YPQ.js} +1 -1
- package/cdn-versioned/chunks/chunk.4EXZ2RBI.js +1 -0
- package/cdn-versioned/chunks/chunk.4QUXWXQ7.js +1 -1
- package/cdn-versioned/chunks/chunk.5CIQRJCC.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.7ZYFSBMR.js +1 -1
- package/cdn-versioned/chunks/chunk.A63P52TG.js +1 -1
- package/cdn-versioned/chunks/chunk.A772RQJV.js +1 -1
- package/cdn-versioned/chunks/chunk.ANH5V2SE.js +2 -2
- package/cdn-versioned/chunks/chunk.AS7L23H2.js +2 -2
- package/cdn-versioned/chunks/chunk.B3H3PR6Y.js +1 -1
- package/cdn-versioned/chunks/chunk.B5YKUN6P.js +1 -1
- package/cdn-versioned/chunks/chunk.B6I2NZMP.js +4 -4
- package/cdn-versioned/chunks/chunk.BAO3UVTY.js +1 -1
- package/cdn-versioned/chunks/chunk.CAJUSOAF.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.D4RLVVDK.js +1 -1
- package/cdn-versioned/chunks/chunk.DUM4IQT6.js +1 -1
- package/cdn-versioned/chunks/chunk.EDD4HHHP.js +1 -1
- package/cdn-versioned/chunks/chunk.EJKLI2Q4.js +1 -1
- package/cdn-versioned/chunks/chunk.EP7OA5FU.js +1 -1
- package/cdn-versioned/chunks/chunk.GNYJN5QM.js +3 -3
- package/cdn-versioned/chunks/chunk.GQU4LYQ6.js +1 -1
- package/cdn-versioned/chunks/chunk.GX6NOXTL.js +1 -1
- package/cdn-versioned/chunks/chunk.JUGW2WJP.js +1 -1
- package/cdn-versioned/chunks/chunk.LPXG67S4.js +1 -1
- package/cdn-versioned/chunks/chunk.LQZOBUFT.js +1 -1
- package/cdn-versioned/chunks/chunk.LVDI5OTS.js +1 -1
- package/cdn-versioned/chunks/{chunk.PPMFZ77L.js → chunk.LXL4FWEA.js} +1 -1
- package/cdn-versioned/chunks/chunk.MOQCXANY.js +2 -2
- package/cdn-versioned/chunks/chunk.N5OYRZY6.js +1 -1
- package/cdn-versioned/chunks/chunk.OCT5SOOS.js +1 -1
- package/cdn-versioned/chunks/chunk.QA3NVZY4.js +1 -1
- package/cdn-versioned/chunks/chunk.QOQO2KP5.js +1 -1
- package/cdn-versioned/chunks/chunk.QV7OIYLT.js +1 -1
- package/cdn-versioned/chunks/chunk.QWPCVRMH.js +1 -1
- package/cdn-versioned/chunks/{chunk.LPJR7GDM.js → chunk.SJ2JO4KS.js} +1 -1
- package/cdn-versioned/chunks/chunk.SWUGEKNC.js +1 -1
- package/cdn-versioned/chunks/chunk.TR52VDPR.js +1 -1
- package/cdn-versioned/chunks/chunk.U5SOEJO4.js +1 -1
- package/cdn-versioned/chunks/chunk.V3WIIJLB.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.WG3IQMLL.js +1 -1
- package/cdn-versioned/chunks/chunk.WNV6OGRG.js +1 -1
- package/cdn-versioned/chunks/chunk.WVYVGVBF.js +1 -1
- package/cdn-versioned/chunks/chunk.Y67MAFTR.js +1 -1
- package/cdn-versioned/chunks/chunk.ZWWTEE7R.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/animation/animation.js +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +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/drawer/drawer.js +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/navigation-item/navigation-item.js +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/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 +876 -876
- 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.32MPDFO4.js → chunk.F63YFNZS.js} +1 -1
- package/dist/chunks/{chunk.LU65KM4S.js → chunk.OZU372TI.js} +6 -3
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/audio/audio.js +2 -2
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/navigation-item/navigation-item.js +1 -1
- package/dist/custom-elements.json +677 -677
- package/dist/solid-components.js +14 -14
- 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.4MHQ63NW.js +26 -26
- package/dist-versioned/chunks/chunk.4Q7KKH5Z.js +2 -2
- 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.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.BJIZPRT4.js +5 -5
- package/dist-versioned/chunks/chunk.CCQCEONR.js +2 -2
- package/dist-versioned/chunks/chunk.D26WCHLT.js +6 -6
- 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.32MPDFO4.js → chunk.F63YFNZS.js} +6 -6
- 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.HP2TVELZ.js +1 -1
- package/dist-versioned/chunks/chunk.IN7RNHBF.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.K3JCC7KV.js +5 -5
- package/dist-versioned/chunks/chunk.KH4M6HPE.js +2 -2
- package/dist-versioned/chunks/chunk.KPA6BEFU.js +5 -5
- package/dist-versioned/chunks/{chunk.TGJ2SBPH.js → chunk.KQAHFLVX.js} +9 -9
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.L32THKSR.js +3 -3
- package/dist-versioned/chunks/chunk.L5XQ7O4S.js +2 -2
- package/dist-versioned/chunks/{chunk.DCTW5WAP.js → chunk.LZA2QYUU.js} +4 -4
- package/dist-versioned/chunks/chunk.NUIZDE7R.js +1 -1
- package/dist-versioned/chunks/chunk.NY5S53W2.js +13 -13
- 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.LU65KM4S.js → chunk.OZU372TI.js} +7 -4
- 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.SNCHAQYL.js +4 -4
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.VTUCPGYW.js +1 -1
- package/dist-versioned/chunks/chunk.X2PI2F35.js +1 -1
- package/dist-versioned/chunks/chunk.XL2PSGM5.js +2 -2
- package/dist-versioned/chunks/chunk.XQNY7RZD.js +29 -29
- package/dist-versioned/chunks/chunk.Y7254YJM.js +2 -2
- 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/animation/animation.js +2 -2
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +2 -2
- 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/drawer/drawer.js +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/navigation-item/navigation-item.js +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/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 +876 -876
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +14 -14
- 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.OF353WP5.js +0 -1
- package/cdn-versioned/chunks/chunk.OF353WP5.js +0 -1
- package/dist/chunks/{chunk.TGJ2SBPH.js → chunk.KQAHFLVX.js} +3 -3
- package/dist/chunks/{chunk.DCTW5WAP.js → chunk.LZA2QYUU.js} +3 -3
|
@@ -70,7 +70,7 @@ var SdRadio = class extends SolidElement {
|
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
72
|
return html`<span part="base" class="${cx(
|
|
73
|
-
"sd-4-0-
|
|
73
|
+
"sd-4-0-7-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",
|
|
74
74
|
this.disabled && "hover:cursor-not-allowed",
|
|
75
75
|
{
|
|
76
76
|
/* sizes, fonts */
|
|
@@ -122,7 +122,7 @@ __decorateClass([
|
|
|
122
122
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
123
123
|
], SdRadio.prototype, "handleDisabledChange", 1);
|
|
124
124
|
SdRadio = __decorateClass([
|
|
125
|
-
customElement("sd-4-0-
|
|
125
|
+
customElement("sd-4-0-7-radio")
|
|
126
126
|
], SdRadio);
|
|
127
127
|
|
|
128
128
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
animations
|
|
3
|
-
} from "./chunk.TJOP7HQP.js";
|
|
4
1
|
import {
|
|
5
2
|
watch
|
|
6
3
|
} from "./chunk.X2OQMWGY.js";
|
|
4
|
+
import {
|
|
5
|
+
animations
|
|
6
|
+
} from "./chunk.TJOP7HQP.js";
|
|
7
7
|
import {
|
|
8
8
|
SolidElement,
|
|
9
9
|
customElement
|
|
@@ -208,7 +208,7 @@ __decorateClass([
|
|
|
208
208
|
watch("playbackRate")
|
|
209
209
|
], SdAnimation.prototype, "handlePlaybackRateChange", 1);
|
|
210
210
|
SdAnimation = __decorateClass([
|
|
211
|
-
customElement("sd-4-0-
|
|
211
|
+
customElement("sd-4-0-7-animation")
|
|
212
212
|
], SdAnimation);
|
|
213
213
|
|
|
214
214
|
export {
|
|
@@ -25,7 +25,7 @@ SdCarouselItem.styles = [
|
|
|
25
25
|
css`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`
|
|
26
26
|
];
|
|
27
27
|
SdCarouselItem = __decorateClass([
|
|
28
|
-
customElement("sd-4-0-
|
|
28
|
+
customElement("sd-4-0-7-carousel-item")
|
|
29
29
|
], SdCarouselItem);
|
|
30
30
|
|
|
31
31
|
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-0-
|
|
79
|
+
return [...this.querySelectorAll("sd-4-0-7-radio, sd-4-0-7-radio-button")];
|
|
80
80
|
}
|
|
81
81
|
handleRadioClick(event) {
|
|
82
|
-
const target = event.target.closest("sd-4-0-
|
|
82
|
+
const target = event.target.closest("sd-4-0-7-radio, sd-4-0-7-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-0-
|
|
159
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-4-0-7-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-0-
|
|
171
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-4-0-7-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-0-
|
|
178
|
+
if (customElements.get("sd-4-0-7-radio") && customElements.get("sd-4-0-7-radio-button")) {
|
|
179
179
|
this.syncRadioElements();
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
if (customElements.get("sd-4-0-
|
|
182
|
+
if (customElements.get("sd-4-0-7-radio")) {
|
|
183
183
|
this.syncRadioElements();
|
|
184
184
|
} else {
|
|
185
|
-
customElements.whenDefined("sd-4-0-
|
|
185
|
+
customElements.whenDefined("sd-4-0-7-radio").then(() => this.syncRadios());
|
|
186
186
|
}
|
|
187
|
-
if (customElements.get("sd-4-0-
|
|
187
|
+
if (customElements.get("sd-4-0-7-radio-button")) {
|
|
188
188
|
this.syncRadioElements();
|
|
189
189
|
} else {
|
|
190
|
-
customElements.whenDefined("sd-4-0-
|
|
190
|
+
customElements.whenDefined("sd-4-0-7-radio-button").then(() => this.syncRadios());
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
updateCheckedRadio() {
|
|
@@ -259,16 +259,16 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
259
259
|
vertical: "flex-col",
|
|
260
260
|
horizontal: "flex-row"
|
|
261
261
|
}[this.orientation]
|
|
262
|
-
)}"><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-0-
|
|
262
|
+
)}"><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-0-7-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-4-0-7-button-group>` : defaultSlot}</div></fieldset>${this.formControlController.renderInvalidMessage()}`;
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
SdRadioGroup.dependencies = { "sd-4-0-
|
|
265
|
+
SdRadioGroup.dependencies = { "sd-4-0-7-button-group": SdButtonGroup };
|
|
266
266
|
/**
|
|
267
267
|
* Inherits Tailwind classes and includes additional styling.
|
|
268
268
|
*/
|
|
269
269
|
SdRadioGroup.styles = [
|
|
270
270
|
...SolidElement.styles,
|
|
271
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-0-
|
|
271
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-0-7-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-0-7-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-0-7-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-0-7-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-7-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-7-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`
|
|
272
272
|
];
|
|
273
273
|
__decorateClass([
|
|
274
274
|
query("slot:not([name])")
|
|
@@ -322,7 +322,7 @@ __decorateClass([
|
|
|
322
322
|
watch("value")
|
|
323
323
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
324
324
|
SdRadioGroup = __decorateClass([
|
|
325
|
-
customElement("sd-4-0-
|
|
325
|
+
customElement("sd-4-0-7-radio-group")
|
|
326
326
|
], SdRadioGroup);
|
|
327
327
|
|
|
328
328
|
export {
|
|
@@ -75,7 +75,7 @@ var SdLink = class extends SolidElement {
|
|
|
75
75
|
};
|
|
76
76
|
SdLink.styles = [
|
|
77
77
|
...SolidElement.styles,
|
|
78
|
-
css`::slotted(sd-4-0-
|
|
78
|
+
css`::slotted(sd-4-0-7-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-4-0-7-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-4-0-7-icon){font-size:var(--sd-font-size-xl,1.5rem)}`
|
|
79
79
|
];
|
|
80
80
|
__decorateClass([
|
|
81
81
|
query("a")
|
|
@@ -99,7 +99,7 @@ __decorateClass([
|
|
|
99
99
|
property()
|
|
100
100
|
], SdLink.prototype, "download", 2);
|
|
101
101
|
SdLink = __decorateClass([
|
|
102
|
-
customElement("sd-4-0-
|
|
102
|
+
customElement("sd-4-0-7-link")
|
|
103
103
|
], SdLink);
|
|
104
104
|
|
|
105
105
|
export {
|
|
@@ -82,7 +82,7 @@ var SdRadioButton = class extends SolidElement {
|
|
|
82
82
|
};
|
|
83
83
|
SdRadioButton.styles = [
|
|
84
84
|
...SolidElement.styles,
|
|
85
|
-
css`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-
|
|
85
|
+
css`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-7-button-group__button--first:not(.sd-4-0-7-button-group__button--last)) button{border-bottom-right-radius:var(--sd-border-radius-none,0);border-top-right-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-7-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-7-button-group__button--last:not(.sd-4-0-7-button-group__button--first)) button{border-bottom-left-radius:var(--sd-border-radius-none,0);border-top-left-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-7-button-group__button:not(.sd-4-0-7-button-group__button--first)){margin-inline-start:-1px}:host(.sd-4-0-7-button-group__button--hover){z-index:10}:host(.sd-4-0-7-button-group__button--focus),:host(.sd-4-0-7-button-group__button[checked]){z-index:20}`
|
|
86
86
|
];
|
|
87
87
|
__decorateClass([
|
|
88
88
|
query(".button")
|
|
@@ -109,7 +109,7 @@ __decorateClass([
|
|
|
109
109
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
110
110
|
], SdRadioButton.prototype, "handleDisabledChange", 1);
|
|
111
111
|
SdRadioButton = __decorateClass([
|
|
112
|
-
customElement("sd-4-0-
|
|
112
|
+
customElement("sd-4-0-7-radio-button")
|
|
113
113
|
], SdRadioButton);
|
|
114
114
|
|
|
115
115
|
export {
|
|
@@ -35,7 +35,6 @@ import {
|
|
|
35
35
|
|
|
36
36
|
// src/components/drawer/drawer.ts
|
|
37
37
|
import { css, html } from "lit";
|
|
38
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
39
38
|
import { property, query } from "lit/decorators.js";
|
|
40
39
|
|
|
41
40
|
// src/internal/string.ts
|
|
@@ -112,6 +111,7 @@ var SdDrawer = class extends SolidElement {
|
|
|
112
111
|
}
|
|
113
112
|
await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);
|
|
114
113
|
this.drawer.hidden = false;
|
|
114
|
+
this.drawer.removeAttribute("inert");
|
|
115
115
|
requestAnimationFrame(() => {
|
|
116
116
|
const sdInitialFocus = this.emit("sd-initial-focus", { cancelable: true });
|
|
117
117
|
if (!sdInitialFocus.defaultPrevented) {
|
|
@@ -123,6 +123,8 @@ var SdDrawer = class extends SolidElement {
|
|
|
123
123
|
}
|
|
124
124
|
if (autoFocusTarget) {
|
|
125
125
|
autoFocusTarget.setAttribute("autofocus", "");
|
|
126
|
+
} else {
|
|
127
|
+
this.closeButton.focus();
|
|
126
128
|
}
|
|
127
129
|
});
|
|
128
130
|
const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {
|
|
@@ -157,6 +159,7 @@ var SdDrawer = class extends SolidElement {
|
|
|
157
159
|
})
|
|
158
160
|
]);
|
|
159
161
|
this.drawer.hidden = true;
|
|
162
|
+
this.drawer.setAttribute("inert", "");
|
|
160
163
|
this.overlay.hidden = false;
|
|
161
164
|
this.panel.hidden = false;
|
|
162
165
|
const trigger = this.originalTrigger;
|
|
@@ -201,12 +204,12 @@ var SdDrawer = class extends SolidElement {
|
|
|
201
204
|
"block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",
|
|
202
205
|
this.contained ? "absolute" : "fixed"
|
|
203
206
|
)}" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
|
|
204
|
-
"absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",
|
|
207
|
+
"absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",
|
|
205
208
|
{
|
|
206
209
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
207
210
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
208
211
|
}[this.placement]
|
|
209
|
-
)}" role="dialog" aria-modal="true" aria-
|
|
212
|
+
)}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-4-0-7-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-4-0-7-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-0-7-icon></sd-4-0-7-button></div></header>` : html`<sd-4-0-7-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-4-0-7-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-0-7-icon></sd-4-0-7-button>`}<div part="body" class="flex-auto block px-4" role="region" tabindex="0"><slot></slot></div><footer part="footer" class="${cx(this.hasSlotController.test("footer") ? "text-left p-4" : "hidden")}"><slot name="footer"></slot></footer></div></div>`;
|
|
210
213
|
}
|
|
211
214
|
};
|
|
212
215
|
SdDrawer.styles = [
|
|
@@ -247,7 +250,7 @@ __decorateClass([
|
|
|
247
250
|
watch("contained", { waitUntilFirstUpdate: true })
|
|
248
251
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
|
249
252
|
SdDrawer = __decorateClass([
|
|
250
|
-
customElement("sd-4-0-
|
|
253
|
+
customElement("sd-4-0-7-drawer")
|
|
251
254
|
], SdDrawer);
|
|
252
255
|
setDefaultAnimation("drawer.showStart", {
|
|
253
256
|
keyframes: [
|
|
@@ -24,11 +24,11 @@ var SdOptgroup = class extends SolidElement {
|
|
|
24
24
|
this.label = "";
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Syncs the disabled prop for all slotted sd-4-0-
|
|
27
|
+
* Syncs the disabled prop for all slotted sd-4-0-7-options when it is triggered
|
|
28
28
|
*/
|
|
29
29
|
handleDisableOptions() {
|
|
30
30
|
const { disabled } = this;
|
|
31
|
-
this.defaultSlot.assignedElements().filter((opt) => opt.tagName.toLowerCase() === "sd-4-0-
|
|
31
|
+
this.defaultSlot.assignedElements().filter((opt) => opt.tagName.toLowerCase() === "sd-4-0-7-option").forEach((opt) => {
|
|
32
32
|
opt.disabled = disabled;
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -37,11 +37,11 @@ var SdOptgroup = class extends SolidElement {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const { disabled } = this;
|
|
40
|
-
return html`<div role="${disabled ? "presentation" : "group"}" class="${cx(this.disabled ? "text-neutral-500" : "")}" part="base" aria-labelledby="group-label"><sd-4-0-
|
|
40
|
+
return html`<div role="${disabled ? "presentation" : "group"}" class="${cx(this.disabled ? "text-neutral-500" : "")}" part="base" aria-labelledby="group-label"><sd-4-0-7-divider id="divider" class="pt-2 pb-4" part="divider"></sd-4-0-7-divider><div part="label-container" class="${cx(this.disabled ? "text-neutral-500" : "text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="group" part="options"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
SdOptgroup.dependencies = {
|
|
44
|
-
"sd-4-0-
|
|
44
|
+
"sd-4-0-7-divider": SdDivider
|
|
45
45
|
};
|
|
46
46
|
SdOptgroup.styles = [
|
|
47
47
|
...SolidElement.styles,
|
|
@@ -60,7 +60,7 @@ __decorateClass([
|
|
|
60
60
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
61
61
|
], SdOptgroup.prototype, "handleDisabledChange", 1);
|
|
62
62
|
SdOptgroup = __decorateClass([
|
|
63
|
-
customElement("sd-4-0-
|
|
63
|
+
customElement("sd-4-0-7-optgroup")
|
|
64
64
|
], SdOptgroup);
|
|
65
65
|
|
|
66
66
|
export {
|
|
@@ -54,7 +54,7 @@ var SdStepGroup = class extends SolidElement {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
getAllSteps() {
|
|
57
|
-
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-4-0-
|
|
57
|
+
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-4-0-7-step");
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Sets the active step.
|
|
@@ -116,7 +116,7 @@ __decorateClass([
|
|
|
116
116
|
watch("notInteractive")
|
|
117
117
|
], SdStepGroup.prototype, "handleInteractivityChange", 1);
|
|
118
118
|
SdStepGroup = __decorateClass([
|
|
119
|
-
customElement("sd-4-0-
|
|
119
|
+
customElement("sd-4-0-7-step-group")
|
|
120
120
|
], SdStepGroup);
|
|
121
121
|
|
|
122
122
|
export {
|
|
@@ -214,7 +214,7 @@ var SdButton = class extends SolidElement {
|
|
|
214
214
|
md: "ml-2",
|
|
215
215
|
lg: "ml-2"
|
|
216
216
|
}[this.size]
|
|
217
|
-
)}"></slot>${this.loading ? html`<sd-4-0-
|
|
217
|
+
)}"></slot>${this.loading ? html`<sd-4-0-7-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-4-0-7-spinner>` : ""}</${tag}>`;
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
@@ -222,13 +222,13 @@ var SdButton = class extends SolidElement {
|
|
|
222
222
|
*/
|
|
223
223
|
SdButton.styles = [
|
|
224
224
|
...SolidElement.styles,
|
|
225
|
-
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-
|
|
225
|
+
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-7-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-4-0-7-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-4-0-7-icon),sd-4-0-7-spinner{font-size:calc(var(--tw-varspacing)/2)}`
|
|
226
226
|
];
|
|
227
227
|
__decorateClass([
|
|
228
228
|
query("a, button")
|
|
229
229
|
], SdButton.prototype, "button", 2);
|
|
230
230
|
__decorateClass([
|
|
231
|
-
queryAssignedElements({ selector: "sd-4-0-
|
|
231
|
+
queryAssignedElements({ selector: "sd-4-0-7-icon" })
|
|
232
232
|
], SdButton.prototype, "_iconsInDefaultSlot", 2);
|
|
233
233
|
__decorateClass([
|
|
234
234
|
state()
|
|
@@ -291,7 +291,7 @@ __decorateClass([
|
|
|
291
291
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
292
292
|
], SdButton.prototype, "handleDisabledChange", 1);
|
|
293
293
|
SdButton = __decorateClass([
|
|
294
|
-
customElement("sd-4-0-
|
|
294
|
+
customElement("sd-4-0-7-button")
|
|
295
295
|
], SdButton);
|
|
296
296
|
|
|
297
297
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/combobox/utils.ts
|
|
2
2
|
var getAssignedElementsForSlot = (slot) => Array.from(slot.assignedElements({ flatten: true }));
|
|
3
|
-
var getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-4-0-
|
|
4
|
-
var isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-4-0-
|
|
3
|
+
var getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-4-0-7-option" ? item : Array.from(item.querySelectorAll(":scope > sd-4-0-7-option"));
|
|
4
|
+
var isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-4-0-7-optgroup";
|
|
5
5
|
var getAllOptions = (items) => items.map(getOptionOrNestedOptions);
|
|
6
6
|
var filterOnlyOptgroups = (items) => items.filter(isOptgroup);
|
|
7
7
|
var normalizeString = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
@@ -323,7 +323,7 @@ __decorateClass([
|
|
|
323
323
|
property({ attribute: "auto-size-padding", type: Number })
|
|
324
324
|
], SdPopup.prototype, "autoSizePadding", 2);
|
|
325
325
|
SdPopup = __decorateClass([
|
|
326
|
-
customElement("sd-4-0-
|
|
326
|
+
customElement("sd-4-0-7-popup")
|
|
327
327
|
], SdPopup);
|
|
328
328
|
|
|
329
329
|
export {
|
|
@@ -21,7 +21,7 @@ var SdTab = class extends SolidElement {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.attrId = ++id;
|
|
24
|
-
this.componentId = `sd-4-0-
|
|
24
|
+
this.componentId = `sd-4-0-7-tab-${this.attrId}`;
|
|
25
25
|
this.hasSlotController = new HasSlotController(this, "left");
|
|
26
26
|
this.variant = "default";
|
|
27
27
|
this.active = false;
|
|
@@ -91,7 +91,7 @@ __decorateClass([
|
|
|
91
91
|
watch("disabled")
|
|
92
92
|
], SdTab.prototype, "handleDisabledChange", 1);
|
|
93
93
|
SdTab = __decorateClass([
|
|
94
|
-
customElement("sd-4-0-
|
|
94
|
+
customElement("sd-4-0-7-tab")
|
|
95
95
|
], SdTab);
|
|
96
96
|
|
|
97
97
|
export {
|
|
@@ -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-0-
|
|
56
|
+
assumeInteractionOn: ["sd-blur", "sd-4-0-7-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-0-
|
|
89
|
+
return html`<sd-4-0-7-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-0-
|
|
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-0-7-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-0-
|
|
104
|
+
const isIconButton = target.closest("sd-4-0-7-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-0-
|
|
239
|
-
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-0-
|
|
238
|
+
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-4-0-7-tag");
|
|
239
|
+
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-4-0-7-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-0-
|
|
259
|
+
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-4-0-7-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-0-
|
|
304
|
+
const option = target.closest("sd-4-0-7-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-0-
|
|
329
|
+
if (customElements.get("sd-4-0-7-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-0-
|
|
338
|
+
customElements.whenDefined("sd-4-0-7-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-0-
|
|
355
|
+
// Gets an array of all <sd-4-0-7-option> elements
|
|
356
356
|
getAllOptions() {
|
|
357
|
-
return [...this.querySelectorAll("sd-4-0-
|
|
357
|
+
return [...this.querySelectorAll("sd-4-0-7-option")];
|
|
358
358
|
}
|
|
359
|
-
// Gets the first <sd-4-0-
|
|
359
|
+
// Gets the first <sd-4-0-7-option> element
|
|
360
360
|
getFirstOption() {
|
|
361
|
-
return this.querySelector("sd-4-0-
|
|
361
|
+
return this.querySelector("sd-4-0-7-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-0-
|
|
444
|
+
html`<sd-4-0-7-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-0-
|
|
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-0-7-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-0-
|
|
463
|
+
/** Receives incoming event detail from sd-4-0-7-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-0-
|
|
472
|
+
if (customElements.get("sd-4-0-7-option")) {
|
|
473
473
|
allOptions.forEach((option) => {
|
|
474
474
|
option.checkbox = this.multiple;
|
|
475
475
|
});
|
|
@@ -603,7 +603,7 @@ var SdSelect = class extends SolidElement {
|
|
|
603
603
|
default: "border-neutral-800"
|
|
604
604
|
}[selectState],
|
|
605
605
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
606
|
-
)}"></div><sd-4-0-
|
|
606
|
+
)}"></div><sd-4-0-7-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
607
607
|
"inline-flex relative w-full",
|
|
608
608
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
609
609
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -624,35 +624,35 @@ var SdSelect = class extends SolidElement {
|
|
|
624
624
|
"select__clear flex justify-center",
|
|
625
625
|
iconMarginLeft,
|
|
626
626
|
this.value.length > 0 ? "visible" : "invisible"
|
|
627
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-
|
|
627
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-7-icon class="${cx("text-icon-fill-neutral-800", iconSize)}" library="system" name="closing-round"></sd-4-0-7-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-4-0-7-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="system" name="risk"></sd-4-0-7-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-4-0-7-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="system" name="status-check"></sd-4-0-7-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx(
|
|
628
628
|
"inline-flex ml-2 transition-all",
|
|
629
629
|
this.open ? "rotate-180" : "rotate-0",
|
|
630
630
|
this.disabled ? "text-neutral-500" : "text-primary",
|
|
631
631
|
iconSize
|
|
632
|
-
)}"><sd-4-0-
|
|
632
|
+
)}"><sd-4-0-7-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-7-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(
|
|
633
633
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
634
634
|
this.open && "shadow",
|
|
635
635
|
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"
|
|
636
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-0-
|
|
636
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-0-7-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()}`;
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
SdSelect.dependencies = {
|
|
640
|
-
"sd-4-0-
|
|
641
|
-
"sd-4-0-
|
|
642
|
-
"sd-4-0-
|
|
640
|
+
"sd-4-0-7-icon": SdIcon,
|
|
641
|
+
"sd-4-0-7-popup": SdPopup,
|
|
642
|
+
"sd-4-0-7-tag": SdTag
|
|
643
643
|
};
|
|
644
644
|
/**
|
|
645
645
|
* Inherits global stylesheet including TailwindCSS
|
|
646
646
|
*/
|
|
647
647
|
SdSelect.styles = [
|
|
648
648
|
...SolidElement.styles,
|
|
649
|
-
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-0-
|
|
649
|
+
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-0-7-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-7-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-0-7-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-7-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-7-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))}`
|
|
650
650
|
];
|
|
651
651
|
__decorateClass([
|
|
652
|
-
queryAssignedElements({ selector: "sd-4-0-
|
|
652
|
+
queryAssignedElements({ selector: "sd-4-0-7-option" })
|
|
653
653
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
654
654
|
__decorateClass([
|
|
655
|
-
query("sd-4-0-
|
|
655
|
+
query("sd-4-0-7-popup")
|
|
656
656
|
], SdSelect.prototype, "popup", 2);
|
|
657
657
|
__decorateClass([
|
|
658
658
|
query('[part="combobox"]')
|
|
@@ -777,7 +777,7 @@ __decorateClass([
|
|
|
777
777
|
watch("value", { waitUntilFirstUpdate: true })
|
|
778
778
|
], SdSelect.prototype, "handleValueChange", 1);
|
|
779
779
|
SdSelect = __decorateClass([
|
|
780
|
-
customElement("sd-4-0-
|
|
780
|
+
customElement("sd-4-0-7-select")
|
|
781
781
|
], SdSelect);
|
|
782
782
|
setDefaultAnimation("select.show", {
|
|
783
783
|
keyframes: [
|