@solid-design-system/components 5.4.3 → 5.4.4
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.XHCQ2HAX.js → chunk.Z4JAMQF6.js} +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/custom-elements.json +437 -437
- 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.22RZ6TMN.js +1 -1
- package/cdn-versioned/chunks/chunk.2ZCIEZ7L.js +1 -1
- package/cdn-versioned/chunks/chunk.37MMMQAE.js +4 -4
- package/cdn-versioned/chunks/chunk.3J5KIUOG.js +1 -1
- package/cdn-versioned/chunks/chunk.44UUKD5Y.js +1 -1
- package/cdn-versioned/chunks/chunk.4QEWHV7D.js +1 -1
- package/cdn-versioned/chunks/chunk.6AZBNEBJ.js +1 -1
- package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
- package/cdn-versioned/chunks/chunk.6KS2ASKZ.js +1 -1
- package/cdn-versioned/chunks/chunk.6O2SO5QT.js +1 -1
- package/cdn-versioned/chunks/chunk.AB24SDUG.js +1 -1
- package/cdn-versioned/chunks/chunk.ABD2C3S7.js +1 -1
- package/cdn-versioned/chunks/chunk.AHE6RU7L.js +1 -1
- package/cdn-versioned/chunks/chunk.AQNGYRPO.js +1 -1
- package/cdn-versioned/chunks/chunk.AUFZNGGE.js +1 -1
- package/cdn-versioned/chunks/chunk.BQBDCD43.js +1 -1
- package/cdn-versioned/chunks/chunk.BQUVRGBQ.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.CISFWT2K.js +1 -1
- package/cdn-versioned/chunks/chunk.D6WXGJKA.js +1 -1
- package/cdn-versioned/chunks/chunk.DMQJUJKP.js +1 -1
- package/cdn-versioned/chunks/chunk.FMDEKAH2.js +1 -1
- package/cdn-versioned/chunks/chunk.FUDO6HHH.js +1 -1
- package/cdn-versioned/chunks/chunk.I3CJWUNI.js +1 -1
- package/cdn-versioned/chunks/chunk.I3FJGGZ3.js +1 -1
- package/cdn-versioned/chunks/chunk.IDRPZQRX.js +1 -1
- package/cdn-versioned/chunks/chunk.IUWNRXYW.js +1 -1
- package/cdn-versioned/chunks/chunk.J4TCNBTX.js +1 -1
- package/cdn-versioned/chunks/chunk.JBN3F7U4.js +1 -1
- package/cdn-versioned/chunks/chunk.JWE6CJMP.js +2 -2
- package/cdn-versioned/chunks/chunk.KHY5O4PT.js +1 -1
- package/cdn-versioned/chunks/chunk.KMC7EIBY.js +1 -1
- package/cdn-versioned/chunks/chunk.KPXMHFEA.js +2 -2
- package/cdn-versioned/chunks/chunk.LPEHFYRQ.js +1 -1
- package/cdn-versioned/chunks/chunk.MIGHPO6I.js +1 -1
- package/cdn-versioned/chunks/chunk.O4HSOKLJ.js +4 -4
- package/cdn-versioned/chunks/chunk.O775J6XQ.js +1 -1
- package/cdn-versioned/chunks/chunk.P6C6ODMQ.js +1 -1
- package/cdn-versioned/chunks/chunk.S5XOCA5O.js +1 -1
- package/cdn-versioned/chunks/chunk.T5MUPWZ5.js +1 -1
- package/cdn-versioned/chunks/chunk.T6E3LAEG.js +1 -1
- package/cdn-versioned/chunks/chunk.T6LPMALU.js +1 -1
- package/cdn-versioned/chunks/chunk.UMVIOATK.js +3 -3
- package/cdn-versioned/chunks/chunk.W5IMHZGX.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WFLJWMLS.js +1 -1
- package/cdn-versioned/chunks/chunk.WFMWVMAD.js +1 -1
- package/cdn-versioned/chunks/chunk.WR3DFUYK.js +1 -1
- package/cdn-versioned/chunks/chunk.XO4OTCQR.js +1 -1
- package/cdn-versioned/chunks/chunk.YBWN6AYL.js +1 -1
- package/cdn-versioned/chunks/chunk.YQFJEUR4.js +1 -1
- package/cdn-versioned/chunks/{chunk.XHCQ2HAX.js → chunk.Z4JAMQF6.js} +1 -1
- package/cdn-versioned/chunks/chunk.ZNRYPR2Z.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/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 +1 -1
- 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/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- 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 +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- 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 +647 -647
- 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/components/audio/audio.js +1 -1
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/custom-elements.json +437 -437
- 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.3EFIPRDK.js +2 -2
- package/dist-versioned/chunks/chunk.4L2ZJWMT.js +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.AEC7OUIU.js +1 -1
- package/dist-versioned/chunks/chunk.AQSNQIE2.js +8 -8
- package/dist-versioned/chunks/chunk.BHMQ7JTH.js +1 -1
- package/dist-versioned/chunks/chunk.BMOZ4UCJ.js +2 -2
- package/dist-versioned/chunks/chunk.BNHWLWIO.js +2 -2
- package/dist-versioned/chunks/chunk.BNKXTELX.js +1 -1
- package/dist-versioned/chunks/chunk.CWRYUKKN.js +2 -2
- package/dist-versioned/chunks/chunk.DKMBAQNN.js +1 -1
- package/dist-versioned/chunks/chunk.DVE7LUSU.js +6 -6
- package/dist-versioned/chunks/chunk.E3L4D5JB.js +1 -1
- package/dist-versioned/chunks/chunk.EPTG3T3K.js +5 -5
- package/dist-versioned/chunks/chunk.ER5WL52L.js +4 -4
- package/dist-versioned/chunks/chunk.I3TERPA7.js +2 -2
- package/dist-versioned/chunks/chunk.IAVZSNZM.js +2 -2
- package/dist-versioned/chunks/chunk.J2MWZHOR.js +26 -26
- package/dist-versioned/chunks/chunk.JDGZXKQ6.js +1 -1
- package/dist-versioned/chunks/chunk.JDURQSHD.js +3 -3
- package/dist-versioned/chunks/chunk.K4NJXWOJ.js +4 -4
- package/dist-versioned/chunks/chunk.KHDJQVLW.js +1 -1
- package/dist-versioned/chunks/chunk.KNR2TKCV.js +2 -2
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.MGZNYUU5.js +5 -5
- package/dist-versioned/chunks/chunk.MQHKJBMI.js +1 -1
- package/dist-versioned/chunks/chunk.NJDUDBH3.js +5 -5
- package/dist-versioned/chunks/chunk.O6ZCXYG7.js +2 -2
- package/dist-versioned/chunks/chunk.OYISVPRT.js +3 -3
- package/dist-versioned/chunks/chunk.PMMQGCWE.js +1 -1
- package/dist-versioned/chunks/chunk.POPZOOPO.js +6 -6
- package/dist-versioned/chunks/chunk.QH3LDBIV.js +1 -1
- package/dist-versioned/chunks/chunk.QHFL2NPD.js +11 -11
- package/dist-versioned/chunks/chunk.QT7I3AD5.js +24 -24
- package/dist-versioned/chunks/chunk.R4RNIJUR.js +4 -4
- package/dist-versioned/chunks/chunk.RJEVYRGU.js +2 -2
- package/dist-versioned/chunks/chunk.TICMXROB.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.VBUX2EMW.js +3 -3
- package/dist-versioned/chunks/chunk.VWCNE6RW.js +2 -2
- package/dist-versioned/chunks/chunk.VYA3GCBI.js +3 -3
- package/dist-versioned/chunks/chunk.WNKRVUCI.js +5 -5
- package/dist-versioned/chunks/chunk.WPSQV3EJ.js +1 -1
- package/dist-versioned/chunks/{chunk.WOZNRS7M.js → chunk.X3F32DMB.js} +12 -12
- package/dist-versioned/chunks/chunk.XOBAD7BT.js +2 -2
- package/dist-versioned/chunks/chunk.XVPNFAM2.js +14 -14
- package/dist-versioned/chunks/chunk.Y7RW6FN5.js +1 -1
- package/dist-versioned/chunks/chunk.YA5MP52V.js +9 -9
- package/dist-versioned/chunks/chunk.YHPP5HHG.js +2 -2
- package/dist-versioned/chunks/chunk.YR7FBXEK.js +3 -3
- package/dist-versioned/chunks/chunk.ZFCSAN3P.js +1 -1
- package/dist-versioned/chunks/chunk.ZKAEJF4D.js +2 -2
- package/dist-versioned/chunks/chunk.ZWGFV5US.js +12 -12
- 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/audio/audio.js +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 +1 -1
- 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/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- 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 +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- 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 +647 -647
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +137 -137
- package/package.json +1 -1
- package/dist/chunks/{chunk.WOZNRS7M.js → chunk.X3F32DMB.js} +10 -10
|
@@ -113,6 +113,16 @@ var SdDrawer = class extends SolidElement {
|
|
|
113
113
|
await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);
|
|
114
114
|
this.drawer.hidden = false;
|
|
115
115
|
this.drawer.removeAttribute("inert");
|
|
116
|
+
const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {
|
|
117
|
+
dir: this.localize.dir()
|
|
118
|
+
});
|
|
119
|
+
const overlayAnimation = getAnimation(this, "drawer.overlay.show", { dir: this.localize.dir() });
|
|
120
|
+
await Promise.all([
|
|
121
|
+
animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
|
|
122
|
+
animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)
|
|
123
|
+
]);
|
|
124
|
+
closeButtonBase == null ? void 0 : closeButtonBase.setAttribute("aria-controls", "drawer");
|
|
125
|
+
closeButtonBase == null ? void 0 : closeButtonBase.setAttribute("aria-expanded", "true");
|
|
116
126
|
requestAnimationFrame(() => {
|
|
117
127
|
const sdInitialFocus = this.emit("sd-initial-focus", { cancelable: true });
|
|
118
128
|
if (!sdInitialFocus.defaultPrevented) {
|
|
@@ -128,16 +138,6 @@ var SdDrawer = class extends SolidElement {
|
|
|
128
138
|
this.closeButton.focus();
|
|
129
139
|
}
|
|
130
140
|
});
|
|
131
|
-
const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {
|
|
132
|
-
dir: this.localize.dir()
|
|
133
|
-
});
|
|
134
|
-
const overlayAnimation = getAnimation(this, "drawer.overlay.show", { dir: this.localize.dir() });
|
|
135
|
-
await Promise.all([
|
|
136
|
-
animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
|
|
137
|
-
animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)
|
|
138
|
-
]);
|
|
139
|
-
closeButtonBase == null ? void 0 : closeButtonBase.setAttribute("aria-controls", "drawer");
|
|
140
|
-
closeButtonBase == null ? void 0 : closeButtonBase.setAttribute("aria-expanded", "true");
|
|
141
141
|
this.emit("sd-after-show");
|
|
142
142
|
} else {
|
|
143
143
|
this.emit("sd-hide");
|
|
@@ -210,7 +210,7 @@ var SdDrawer = class extends SolidElement {
|
|
|
210
210
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
211
211
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
212
212
|
}[this.placement]
|
|
213
|
-
)}" 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-5-4-
|
|
213
|
+
)}" 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-5-4-4-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-5-4-4-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-4-4-icon></sd-5-4-4-button></div></header>` : html`<sd-5-4-4-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-5-4-4-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-4-4-icon></sd-5-4-4-button>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" 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></section>`;
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
SdDrawer.styles = [
|
|
@@ -251,7 +251,7 @@ __decorateClass([
|
|
|
251
251
|
watch("contained", { waitUntilFirstUpdate: true })
|
|
252
252
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
|
253
253
|
SdDrawer = __decorateClass([
|
|
254
|
-
customElement("sd-5-4-
|
|
254
|
+
customElement("sd-5-4-4-drawer")
|
|
255
255
|
], SdDrawer);
|
|
256
256
|
setDefaultAnimation("drawer.showStart", {
|
|
257
257
|
keyframes: [
|
|
@@ -84,7 +84,7 @@ var SdRadioButton = class extends SolidElement {
|
|
|
84
84
|
};
|
|
85
85
|
SdRadioButton.styles = [
|
|
86
86
|
...SolidElement.styles,
|
|
87
|
-
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-5-4-
|
|
87
|
+
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-5-4-4-button-group__button--first:not(.sd-5-4-4-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-5-4-4-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-5-4-4-button-group__button--last:not(.sd-5-4-4-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-5-4-4-button-group__button:not(.sd-5-4-4-button-group__button--first)){margin-inline-start:-1px}:host(.sd-5-4-4-button-group__button--hover){z-index:10}:host(.sd-5-4-4-button-group__button--focus),:host(.sd-5-4-4-button-group__button[checked]){z-index:20}`
|
|
88
88
|
];
|
|
89
89
|
__decorateClass([
|
|
90
90
|
query(".button")
|
|
@@ -114,7 +114,7 @@ __decorateClass([
|
|
|
114
114
|
watch(["disabled", "visually-disabled"], { waitUntilFirstUpdate: true })
|
|
115
115
|
], SdRadioButton.prototype, "handleDisabledChange", 1);
|
|
116
116
|
SdRadioButton = __decorateClass([
|
|
117
|
-
customElement("sd-5-4-
|
|
117
|
+
customElement("sd-5-4-4-radio-button")
|
|
118
118
|
], SdRadioButton);
|
|
119
119
|
|
|
120
120
|
export {
|
|
@@ -29,8 +29,8 @@ var SdTabGroup = class extends SolidElement {
|
|
|
29
29
|
}
|
|
30
30
|
connectedCallback() {
|
|
31
31
|
const whenAllDefined = Promise.all([
|
|
32
|
-
customElements.whenDefined("sd-5-4-
|
|
33
|
-
customElements.whenDefined("sd-5-4-
|
|
32
|
+
customElements.whenDefined("sd-5-4-4-tab"),
|
|
33
|
+
customElements.whenDefined("sd-5-4-4-tab-panel")
|
|
34
34
|
]);
|
|
35
35
|
super.connectedCallback();
|
|
36
36
|
this.resizeObserver = new ResizeObserver(() => {
|
|
@@ -70,20 +70,20 @@ var SdTabGroup = class extends SolidElement {
|
|
|
70
70
|
}
|
|
71
71
|
getAllTabs(options = { includeDisabled: true }) {
|
|
72
72
|
const slot = this.shadowRoot.querySelector('slot[name="nav"]');
|
|
73
|
-
return Array.from(slot.assignedElements()).map((el) => el.tagName.toLocaleLowerCase() === "sd-5-4-
|
|
74
|
-
return el && options.includeDisabled ? el.tagName.toLowerCase() === "sd-5-4-
|
|
73
|
+
return Array.from(slot.assignedElements()).map((el) => el.tagName.toLocaleLowerCase() === "sd-5-4-4-tab" ? el : el.querySelector("sd-5-4-4-tab")).filter((el) => {
|
|
74
|
+
return el && options.includeDisabled ? el.tagName.toLowerCase() === "sd-5-4-4-tab" : el.tagName.toLowerCase() === "sd-5-4-4-tab" && !el.disabled;
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
getAllPanels() {
|
|
78
|
-
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-5-4-
|
|
78
|
+
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-5-4-4-tab-panel");
|
|
79
79
|
}
|
|
80
80
|
getActiveTab() {
|
|
81
81
|
return this.tabs.find((t) => t.matches(":focus"));
|
|
82
82
|
}
|
|
83
83
|
handleClick(event) {
|
|
84
84
|
const target = event.target;
|
|
85
|
-
const tab = target.closest("sd-5-4-
|
|
86
|
-
const tabGroup = tab == null ? void 0 : tab.closest("sd-5-4-
|
|
85
|
+
const tab = target.closest("sd-5-4-4-tab");
|
|
86
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-5-4-4-tab-group");
|
|
87
87
|
if (tabGroup !== this) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
@@ -93,8 +93,8 @@ var SdTabGroup = class extends SolidElement {
|
|
|
93
93
|
}
|
|
94
94
|
handleKeyDown(event) {
|
|
95
95
|
const target = event.target;
|
|
96
|
-
const tab = target.closest("sd-5-4-
|
|
97
|
-
const tabGroup = tab == null ? void 0 : tab.closest("sd-5-4-
|
|
96
|
+
const tab = target.closest("sd-5-4-4-tab");
|
|
97
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-5-4-4-tab-group");
|
|
98
98
|
if (tabGroup !== this) {
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
@@ -119,7 +119,7 @@ var SdTabGroup = class extends SolidElement {
|
|
|
119
119
|
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) {
|
|
120
120
|
const activeEl = this.tabs.find((t) => t.matches(":focus"));
|
|
121
121
|
const isRtl = this.localize.dir() === "rtl";
|
|
122
|
-
if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "sd-5-4-
|
|
122
|
+
if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "sd-5-4-4-tab") {
|
|
123
123
|
let index = this.tabs.indexOf(activeEl);
|
|
124
124
|
if (event.key === "Home") {
|
|
125
125
|
index = 0;
|
|
@@ -215,15 +215,15 @@ var SdTabGroup = class extends SolidElement {
|
|
|
215
215
|
return html`<div part="base" class="${cx("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${cx(this.hasScrollControls && "relative py-0 px-12")}">${this.hasScrollControls ? html`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${cx(
|
|
216
216
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
217
217
|
this.localize.dir() === "rtl" && "left-auto right-0"
|
|
218
|
-
)}" @click="${this.handleScrollToStart}"><sd-5-4-
|
|
218
|
+
)}" @click="${this.handleScrollToStart}"><sd-5-4-4-icon library="_internal" name="${isRtl ? "chevron-up" : "chevron-down"}" label="previous" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-5-4-4-icon></button>` : ""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${cx("flex flex-auto relative flex-row")}" role="tablist"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls ? html`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${cx(
|
|
219
219
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
220
220
|
this.localize.dir() === "rtl" && "right-auto left-0"
|
|
221
|
-
)}" @click="${this.handleScrollToEnd}"><sd-5-4-
|
|
221
|
+
)}" @click="${this.handleScrollToEnd}"><sd-5-4-4-icon library="_internal" name="${isRtl ? "chevron-down" : "chevron-up"}" label="next" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-5-4-4-icon></button>` : ""}</div><slot part="body" class="${cx("block auto py-8 px-6", this.variant === "container" && "border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`;
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
SdTabGroup.styles = [
|
|
225
225
|
...SolidElement.styles,
|
|
226
|
-
css`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-5-4-
|
|
226
|
+
css`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-5-4-4-tab-panel){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}::slotted(sd-5-4-4-tab-panel){--padding:1rem 0}`
|
|
227
227
|
];
|
|
228
228
|
__decorateClass([
|
|
229
229
|
query("[part=base]")
|
|
@@ -244,7 +244,7 @@ __decorateClass([
|
|
|
244
244
|
property({ type: String, reflect: true })
|
|
245
245
|
], SdTabGroup.prototype, "activation", 2);
|
|
246
246
|
SdTabGroup = __decorateClass([
|
|
247
|
-
customElement("sd-5-4-
|
|
247
|
+
customElement("sd-5-4-4-tab-group")
|
|
248
248
|
], SdTabGroup);
|
|
249
249
|
|
|
250
250
|
export {
|
|
@@ -76,7 +76,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
76
76
|
* within the slotted trigger. This could be the slotted element itself, a child of the slotted element,
|
|
77
77
|
* or an element within the slotted elements shadow root.
|
|
78
78
|
*
|
|
79
|
-
* e.g. the accessible trigger of an <sd-5-4-
|
|
79
|
+
* e.g. the accessible trigger of an <sd-5-4-4-button> is a <button> located inside its shadow root.
|
|
80
80
|
*
|
|
81
81
|
* To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
82
82
|
* */
|
|
@@ -87,11 +87,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
87
87
|
if (accessibleTrigger) {
|
|
88
88
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
89
89
|
// Solid buttons have to update the internal button so it's announced correctly by screen readers
|
|
90
|
-
case "sd-5-4-
|
|
91
|
-
case "sd-5-4-
|
|
90
|
+
case "sd-5-4-4-button":
|
|
91
|
+
case "sd-5-4-4-icon-button":
|
|
92
92
|
target = accessibleTrigger.button;
|
|
93
93
|
break;
|
|
94
|
-
case "sd-5-4-
|
|
94
|
+
case "sd-5-4-4-navigation-item":
|
|
95
95
|
target = accessibleTrigger.button;
|
|
96
96
|
break;
|
|
97
97
|
default:
|
|
@@ -236,7 +236,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
236
236
|
}
|
|
237
237
|
addOpenListeners() {
|
|
238
238
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
|
239
|
-
this.panel.addEventListener("sd-5-4-
|
|
239
|
+
this.panel.addEventListener("sd-5-4-4-select", this.handlePanelSelect);
|
|
240
240
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
|
241
241
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
242
242
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
@@ -244,7 +244,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
244
244
|
removeOpenListeners() {
|
|
245
245
|
if (this.panel) {
|
|
246
246
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
|
247
|
-
this.panel.removeEventListener("sd-5-4-
|
|
247
|
+
this.panel.removeEventListener("sd-5-4-4-select", this.handlePanelSelect);
|
|
248
248
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
|
249
249
|
}
|
|
250
250
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -277,11 +277,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return html`<sd-5-4-
|
|
280
|
+
return html`<sd-5-4-4-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded && this.distance < 1 ? 1 : this.distance}" skidding="${this.skidding}" strategy="${this.hoist ? "fixed" : "absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${cx(
|
|
281
281
|
"shadow bg-white block",
|
|
282
282
|
this.open ? "pointer-events-auto" : "pointer-events-none",
|
|
283
283
|
this.rounded && "rounded-md"
|
|
284
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-5-4-
|
|
284
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-5-4-4-popup>`;
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
SdDropdown.styles = [
|
|
@@ -334,7 +334,7 @@ __decorateClass([
|
|
|
334
334
|
watch("open", { waitUntilFirstUpdate: true })
|
|
335
335
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
336
336
|
SdDropdown = __decorateClass([
|
|
337
|
-
customElement("sd-5-4-
|
|
337
|
+
customElement("sd-5-4-4-dropdown")
|
|
338
338
|
], SdDropdown);
|
|
339
339
|
setDefaultAnimation("dropdown.show", {
|
|
340
340
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -174,7 +174,7 @@ var SdDialog = class extends SolidElement {
|
|
|
174
174
|
)}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
|
|
175
175
|
"flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",
|
|
176
176
|
this.open && "flex opacity-100"
|
|
177
|
-
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${ifDefined(this.headline ? this.headline : void 0)}" aria-labelledby="${ifDefined(!this.headline ? "title" : void 0)}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-5-4-
|
|
177
|
+
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${ifDefined(this.headline ? this.headline : void 0)}" aria-labelledby="${ifDefined(!this.headline ? "title" : void 0)}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-5-4-4-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${cx("absolute top-2 right-2")}" name="x-lg" @click="${() => this.requestClose("close-button")}" type="button"><sd-5-4-4-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-5-4-4-icon></sd-5-4-4-button>` : ""}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`;
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
SdDialog.styles = [
|
|
@@ -203,7 +203,7 @@ __decorateClass([
|
|
|
203
203
|
watch("open", { waitUntilFirstUpdate: true })
|
|
204
204
|
], SdDialog.prototype, "handleOpenChange", 1);
|
|
205
205
|
SdDialog = __decorateClass([
|
|
206
|
-
customElement("sd-5-4-
|
|
206
|
+
customElement("sd-5-4-4-dialog")
|
|
207
207
|
], SdDialog);
|
|
208
208
|
setDefaultAnimation("dialog.show", {
|
|
209
209
|
keyframes: [
|
|
@@ -208,7 +208,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
208
208
|
this.readonly ? "bg-neutral-100" : "bg-white",
|
|
209
209
|
textareaState === "disabled" || textareaState === "visuallyDisabled" ? "text-neutral-500" : "text-black"
|
|
210
210
|
)}"><textarea part="textarea" id="input" class="${cx(
|
|
211
|
-
"ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-5-4-
|
|
211
|
+
"ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-5-4-4-icon]:pe-8",
|
|
212
212
|
{
|
|
213
213
|
sm: "py-1",
|
|
214
214
|
md: "py-1",
|
|
@@ -216,7 +216,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
216
216
|
}[this.size],
|
|
217
217
|
this.disabled && "cursor-not-allowed",
|
|
218
218
|
textSize
|
|
219
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-5-4-
|
|
219
|
+
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-5-4-4-icon class="${cx("text-error absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="risk" part="invalid-icon"></sd-5-4-4-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-5-4-4-icon class="${cx("text-success absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="status-check" part="valid-icon"></sd-5-4-4-icon>` : ""}</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 ? "false" : "true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
@@ -330,7 +330,7 @@ __decorateClass([
|
|
|
330
330
|
watch("value", { waitUntilFirstUpdate: true })
|
|
331
331
|
], SdTextarea.prototype, "handleValueChange", 1);
|
|
332
332
|
SdTextarea = __decorateClass([
|
|
333
|
-
customElement("sd-5-4-
|
|
333
|
+
customElement("sd-5-4-4-textarea")
|
|
334
334
|
], SdTextarea);
|
|
335
335
|
|
|
336
336
|
export {
|
|
@@ -32,7 +32,7 @@ var SdDivider = class extends SolidElement {
|
|
|
32
32
|
*/
|
|
33
33
|
SdDivider.styles = [
|
|
34
34
|
...SolidElement.styles,
|
|
35
|
-
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-5-4-
|
|
35
|
+
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-5-4-4-divider[orientation=horizontal]){display:block}:host(sd-5-4-4-divider[orientation=vertical]){display:inline-block}`
|
|
36
36
|
];
|
|
37
37
|
__decorateClass([
|
|
38
38
|
property({ type: String, reflect: true })
|
|
@@ -41,7 +41,7 @@ __decorateClass([
|
|
|
41
41
|
property({ type: Boolean, reflect: true })
|
|
42
42
|
], SdDivider.prototype, "inverted", 2);
|
|
43
43
|
SdDivider = __decorateClass([
|
|
44
|
-
customElement("sd-5-4-
|
|
44
|
+
customElement("sd-5-4-4-divider")
|
|
45
45
|
], SdDivider);
|
|
46
46
|
|
|
47
47
|
export {
|
|
@@ -74,10 +74,10 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
74
74
|
this.formControlController.updateValidity();
|
|
75
75
|
}
|
|
76
76
|
getAllRadios() {
|
|
77
|
-
return [...this.querySelectorAll("sd-5-4-
|
|
77
|
+
return [...this.querySelectorAll("sd-5-4-4-radio, sd-5-4-4-radio-button")];
|
|
78
78
|
}
|
|
79
79
|
handleRadioClick(event) {
|
|
80
|
-
const target = event.target.closest("sd-5-4-
|
|
80
|
+
const target = event.target.closest("sd-5-4-4-radio, sd-5-4-4-radio-button");
|
|
81
81
|
const radios = this.getAllRadios();
|
|
82
82
|
const oldValue = this.value;
|
|
83
83
|
if (target.disabled) {
|
|
@@ -154,7 +154,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
154
154
|
}
|
|
155
155
|
})
|
|
156
156
|
);
|
|
157
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-5-4-
|
|
157
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-5-4-4-radio-button");
|
|
158
158
|
if (!radios.some((radio) => radio.checked)) {
|
|
159
159
|
if (this.hasButtonGroup) {
|
|
160
160
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -166,26 +166,26 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
if (this.hasButtonGroup) {
|
|
169
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-5-4-
|
|
169
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-5-4-4-button-group");
|
|
170
170
|
if (buttonGroup) {
|
|
171
171
|
buttonGroup.disableRole = true;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
syncRadios() {
|
|
176
|
-
if (customElements.get("sd-5-4-
|
|
176
|
+
if (customElements.get("sd-5-4-4-radio") && customElements.get("sd-5-4-4-radio-button")) {
|
|
177
177
|
this.syncRadioElements();
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
if (customElements.get("sd-5-4-
|
|
180
|
+
if (customElements.get("sd-5-4-4-radio")) {
|
|
181
181
|
this.syncRadioElements();
|
|
182
182
|
} else {
|
|
183
|
-
customElements.whenDefined("sd-5-4-
|
|
183
|
+
customElements.whenDefined("sd-5-4-4-radio").then(() => this.syncRadios());
|
|
184
184
|
}
|
|
185
|
-
if (customElements.get("sd-5-4-
|
|
185
|
+
if (customElements.get("sd-5-4-4-radio-button")) {
|
|
186
186
|
this.syncRadioElements();
|
|
187
187
|
} else {
|
|
188
|
-
customElements.whenDefined("sd-5-4-
|
|
188
|
+
customElements.whenDefined("sd-5-4-4-radio-button").then(() => this.syncRadios());
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
updateCheckedRadio() {
|
|
@@ -264,7 +264,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
264
264
|
vertical: "flex-col",
|
|
265
265
|
horizontal: "flex-row"
|
|
266
266
|
}[this.orientation]
|
|
267
|
-
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-5-4-
|
|
267
|
+
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-5-4-4-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-5-4-4-button-group>` : defaultSlot}</div></fieldset><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>${this.formControlController.renderInvalidMessage()}`;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
/**
|
|
@@ -272,7 +272,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
272
272
|
*/
|
|
273
273
|
SdRadioGroup.styles = [
|
|
274
274
|
...SolidElement.styles,
|
|
275
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-4-
|
|
275
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-4-4-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-4-4-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-4-4-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-4-4-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-4-4-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-4-4-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`
|
|
276
276
|
];
|
|
277
277
|
__decorateClass([
|
|
278
278
|
query("slot:not([name])")
|
|
@@ -329,7 +329,7 @@ __decorateClass([
|
|
|
329
329
|
watch("value")
|
|
330
330
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
331
331
|
SdRadioGroup = __decorateClass([
|
|
332
|
-
customElement("sd-5-4-
|
|
332
|
+
customElement("sd-5-4-4-radio-group")
|
|
333
333
|
], SdRadioGroup);
|
|
334
334
|
|
|
335
335
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdAudio
|
|
3
3
|
} from "../../chunks/chunk.DVE7LUSU.js";
|
|
4
|
-
import "../../chunks/chunk.
|
|
4
|
+
import "../../chunks/chunk.X3F32DMB.js";
|
|
5
5
|
import "../../chunks/chunk.UFBRSKVR.js";
|
|
6
6
|
import "../../chunks/chunk.XHCTCU2Q.js";
|
|
7
7
|
import "../../chunks/chunk.WDWV53JP.js";
|