@solid-design-system/components 6.24.0 → 6.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.VC7IHCIX.js → chunk.4PBTCGFX.js} +1 -1
- package/cdn/chunks/{chunk.CT2WXLLO.js → chunk.IXCKRXZP.js} +1 -1
- package/cdn/chunks/chunk.KQBMEX4Q.js +2 -0
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2FRV4JI3.js +1 -1
- package/cdn-versioned/chunks/chunk.2TCDQYYC.js +2 -2
- package/cdn-versioned/chunks/chunk.32WSNOK5.js +2 -2
- package/cdn-versioned/chunks/chunk.36LY3DX3.js +2 -2
- package/cdn-versioned/chunks/chunk.3FXWTJNG.js +2 -2
- package/cdn-versioned/chunks/chunk.3HJR4W7S.js +2 -2
- package/cdn-versioned/chunks/chunk.3NV5EFHF.js +9 -9
- package/cdn-versioned/chunks/{chunk.VC7IHCIX.js → chunk.4PBTCGFX.js} +2 -2
- package/cdn-versioned/chunks/chunk.4TEHVEJ5.js +2 -2
- package/cdn-versioned/chunks/chunk.5B4C742P.js +2 -2
- package/cdn-versioned/chunks/chunk.5D2QLOPO.js +2 -2
- package/cdn-versioned/chunks/chunk.5LQXIFL5.js +1 -1
- package/cdn-versioned/chunks/chunk.6ZVU7R22.js +2 -2
- package/cdn-versioned/chunks/chunk.7EYPTWOC.js +2 -2
- package/cdn-versioned/chunks/chunk.7R76DQCY.js +2 -2
- package/cdn-versioned/chunks/chunk.A3QRJ5ME.js +2 -2
- package/cdn-versioned/chunks/chunk.AX6E7G7K.js +5 -5
- package/cdn-versioned/chunks/chunk.BJGMSYKC.js +1 -1
- package/cdn-versioned/chunks/chunk.BMOWDQOV.js +2 -2
- package/cdn-versioned/chunks/chunk.BS3GML7W.js +3 -3
- package/cdn-versioned/chunks/chunk.CIRCXXWS.js +2 -2
- package/cdn-versioned/chunks/chunk.CPEHJK3R.js +1 -1
- package/cdn-versioned/chunks/chunk.D4KX4Q6E.js +2 -2
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.E3RBLJOD.js +2 -2
- package/cdn-versioned/chunks/chunk.EDVI5WKO.js +3 -3
- package/cdn-versioned/chunks/chunk.FK2QE2LJ.js +2 -2
- package/cdn-versioned/chunks/chunk.GCCUJ5RI.js +3 -3
- package/cdn-versioned/chunks/chunk.GICLEIQR.js +1 -1
- package/cdn-versioned/chunks/chunk.GWINLIF6.js +2 -2
- package/cdn-versioned/chunks/chunk.HA4FSESN.js +2 -2
- package/cdn-versioned/chunks/chunk.ISEX6JDK.js +2 -2
- package/cdn-versioned/chunks/{chunk.CT2WXLLO.js → chunk.IXCKRXZP.js} +2 -2
- package/cdn-versioned/chunks/chunk.KJ4O2AAU.js +2 -2
- package/cdn-versioned/chunks/chunk.KQBMEX4Q.js +2 -0
- package/cdn-versioned/chunks/chunk.L7DV2MLH.js +1 -1
- package/cdn-versioned/chunks/chunk.LVX7YSFZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LWNOAXVZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.NXUXZCC5.js +1 -1
- package/cdn-versioned/chunks/chunk.OFQAFMQN.js +2 -2
- package/cdn-versioned/chunks/chunk.OJN4DDNN.js +2 -2
- package/cdn-versioned/chunks/chunk.OW556SXG.js +2 -2
- package/cdn-versioned/chunks/chunk.P4GZNPGK.js +1 -1
- package/cdn-versioned/chunks/chunk.PQIUYCLY.js +2 -2
- package/cdn-versioned/chunks/chunk.PZSKPF3M.js +2 -2
- package/cdn-versioned/chunks/chunk.R3CFPFL7.js +2 -2
- package/cdn-versioned/chunks/chunk.RJ7RNCAD.js +2 -2
- package/cdn-versioned/chunks/chunk.SK3BEBJX.js +2 -2
- package/cdn-versioned/chunks/chunk.SW3IDYJO.js +1 -1
- package/cdn-versioned/chunks/chunk.TNHTS2QZ.js +2 -2
- package/cdn-versioned/chunks/chunk.TQXBNN2G.js +2 -2
- package/cdn-versioned/chunks/chunk.TTYJJ4T5.js +2 -2
- package/cdn-versioned/chunks/chunk.TYVGKCJX.js +2 -2
- package/cdn-versioned/chunks/chunk.U2Q5EORY.js +2 -2
- package/cdn-versioned/chunks/chunk.VMZSSKC5.js +1 -1
- package/cdn-versioned/chunks/chunk.VSRBSS6K.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WB2ATZAO.js +5 -5
- package/cdn-versioned/chunks/chunk.XND4CVBN.js +2 -2
- package/cdn-versioned/chunks/chunk.XQ2AM7JO.js +2 -2
- package/cdn-versioned/chunks/chunk.YDZ7FOAV.js +2 -2
- package/cdn-versioned/chunks/chunk.YGYXL3BZ.js +2 -2
- package/cdn-versioned/chunks/chunk.ZC3U3HHB.js +2 -2
- package/cdn-versioned/chunks/chunk.ZFTFC2P4.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.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/checkbox.js +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/datepicker/datepicker.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/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/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.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/progress-bar/progress-bar.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/radio.js +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/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.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/skeleton/skeleton.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/theme-listener/theme-listener.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 +253 -253
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +109 -109
- package/cdn-versioned/web-types.json +165 -165
- package/dist/chunks/{chunk.5OP2MB2L.js → chunk.D6W4R7CF.js} +1 -1
- package/dist/chunks/{chunk.JB2XZ4FY.js → chunk.G5PJCSSV.js} +2 -2
- package/dist/chunks/{chunk.XH6YS5HC.js → chunk.GAQZ5NES.js} +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +7 -7
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.2KU6UVWZ.js +2 -2
- package/dist-versioned/chunks/chunk.2N4PQ34O.js +11 -11
- package/dist-versioned/chunks/chunk.4F4N3QQ6.js +4 -4
- package/dist-versioned/chunks/chunk.4QZT4Y6W.js +3 -3
- package/dist-versioned/chunks/chunk.4SNDWIKF.js +2 -2
- package/dist-versioned/chunks/chunk.5XP6OIKT.js +3 -3
- package/dist-versioned/chunks/chunk.6DDIBH76.js +14 -14
- package/dist-versioned/chunks/chunk.6MMNEOUE.js +2 -2
- package/dist-versioned/chunks/chunk.6V7SKGRY.js +4 -4
- package/dist-versioned/chunks/chunk.AIG5N2FZ.js +1 -1
- package/dist-versioned/chunks/chunk.AXZSMHWW.js +4 -4
- package/dist-versioned/chunks/chunk.BCZIRWVM.js +3 -3
- package/dist-versioned/chunks/chunk.BIYQLL42.js +11 -11
- package/dist-versioned/chunks/chunk.BVWAKEFC.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.CTVKYPFB.js +5 -5
- package/dist-versioned/chunks/chunk.D3CLWL6Z.js +13 -13
- package/dist-versioned/chunks/{chunk.5OP2MB2L.js → chunk.D6W4R7CF.js} +13 -13
- package/dist-versioned/chunks/chunk.DDBIUIIK.js +6 -6
- package/dist-versioned/chunks/chunk.DGV5QTN6.js +5 -5
- package/dist-versioned/chunks/chunk.EAJ3CM6N.js +4 -4
- package/dist-versioned/chunks/chunk.EHIUARAT.js +2 -2
- package/dist-versioned/chunks/chunk.EIHPDMVS.js +5 -5
- package/dist-versioned/chunks/chunk.EYTDOBZ4.js +6 -6
- package/dist-versioned/chunks/chunk.FMLTJI4Z.js +7 -7
- package/dist-versioned/chunks/chunk.FWMPHWGG.js +10 -10
- package/dist-versioned/chunks/{chunk.JB2XZ4FY.js → chunk.G5PJCSSV.js} +8 -8
- package/dist-versioned/chunks/{chunk.XH6YS5HC.js → chunk.GAQZ5NES.js} +5 -5
- package/dist-versioned/chunks/chunk.GQ4ENMDG.js +10 -10
- package/dist-versioned/chunks/chunk.GUTW4VQD.js +5 -5
- package/dist-versioned/chunks/chunk.JHGRQU5N.js +6 -6
- package/dist-versioned/chunks/chunk.JYUKVPUJ.js +1 -1
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KEUBCTKM.js +8 -8
- package/dist-versioned/chunks/chunk.KGQHJROJ.js +3 -3
- package/dist-versioned/chunks/chunk.KTT6XPZB.js +10 -10
- package/dist-versioned/chunks/chunk.LKDQ3TXG.js +2 -2
- package/dist-versioned/chunks/chunk.LMXGFI7F.js +11 -11
- package/dist-versioned/chunks/chunk.M52SSKFL.js +10 -10
- package/dist-versioned/chunks/chunk.MUOLK3RU.js +33 -33
- package/dist-versioned/chunks/chunk.N7WMSLKA.js +1 -1
- package/dist-versioned/chunks/chunk.NIKLDQ35.js +2 -2
- package/dist-versioned/chunks/chunk.NNMBBWIU.js +2 -2
- package/dist-versioned/chunks/chunk.OXCSSHRT.js +10 -10
- package/dist-versioned/chunks/chunk.P7RNSWL3.js +1 -1
- package/dist-versioned/chunks/chunk.QWPXBE3R.js +3 -3
- package/dist-versioned/chunks/chunk.R3ZRRK4P.js +4 -4
- package/dist-versioned/chunks/chunk.R6M52RPI.js +5 -5
- package/dist-versioned/chunks/chunk.RQN4WSFL.js +5 -5
- package/dist-versioned/chunks/chunk.RWGWOZ23.js +1 -1
- package/dist-versioned/chunks/chunk.SLLHUOTL.js +2 -2
- package/dist-versioned/chunks/chunk.SUQL6D3H.js +5 -5
- package/dist-versioned/chunks/chunk.TEHKQWUZ.js +6 -6
- package/dist-versioned/chunks/chunk.TEHS57B5.js +2 -2
- package/dist-versioned/chunks/chunk.TRG462TJ.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.WASJNAOH.js +25 -25
- package/dist-versioned/chunks/chunk.X4BIP2Y2.js +25 -25
- package/dist-versioned/chunks/chunk.XFU4IJSC.js +5 -5
- package/dist-versioned/chunks/chunk.XRYVTNMS.js +3 -3
- package/dist-versioned/chunks/chunk.YEO5QKA7.js +2 -2
- package/dist-versioned/chunks/chunk.YNVPCLKL.js +5 -5
- package/dist-versioned/chunks/chunk.YSZ7WBON.js +1 -1
- package/dist-versioned/chunks/chunk.ZCOV36IT.js +2 -2
- package/dist-versioned/chunks/chunk.ZF4JCUFV.js +6 -6
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.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/checkbox.js +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/datepicker/datepicker.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/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/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.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/progress-bar/progress-bar.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/radio.js +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/radio-group/radio-group.js +2 -2
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.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/skeleton/skeleton.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/theme-listener/theme-listener.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 +253 -253
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +7 -7
- package/dist-versioned/vscode.html-custom-data.json +109 -109
- package/dist-versioned/web-types.json +165 -165
- package/package.json +1 -1
- package/cdn/chunks/chunk.K6MRTZ5F.js +0 -2
- package/cdn-versioned/chunks/chunk.K6MRTZ5F.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk.
|
|
1
|
+
import{a as E}from"./chunk.KQBMEX4Q.js";import{b,c as C,d as x,e as w}from"./chunk.LZRL7OLU.js";import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as c}from"./chunk.UFTAQNZB.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as y,b as r,c as u,d as m,h as f}from"./chunk.VMZSSKC5.js";import{b as v,e as d}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var s=class extends f{constructor(){super(...arguments);this.formControlController=new b(this);this.hasSlotController=new k(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?w:t?x:C}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}updated(t){super.updated(t),this.syncAriaDescription()}syncAriaDescription(){var a;let t=(a=this.shadowRoot)==null?void 0:a.querySelector("fieldset"),e=this.showInvalidStyle?this.validationMessage:"";e?t==null||t.setAttribute("aria-description",e):t==null||t.removeAttribute("aria-description")}getAllRadios(){let t=[...this.querySelectorAll("sd-radio, sd-radio-button")];return t.length===0&&console.warn("No radios found in the radio group."),t}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),a=this.value,i=this.getAllRadios();i.length!==0&&(e.disabled||(this.value=e.value,i.forEach(n=>n.checked=n===e),this.value!==a&&(this.emit("sd-change"),this.emit("sd-input"))))}handleKeyDown(t){var g;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(h=>!h.disabled);if(e.length===0)return;let a=(g=e.find(h=>h.checked))!=null?g:e[0],i=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(a)+i;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(h=>{h.checked=!1,this.hasButtonGroup||(h.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios();if(t.length===0)return;let a=t.find(i=>i.checked)||t[0];a&&a.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,a;let t=this.getAllRadios();if(t.length===0){this.hasButtonGroup=!1;return}if(await Promise.all(t.map(async i=>{await i.updateComplete,i.checked=i.value===this.value,i.size=this.size,i instanceof E&&(i.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(i=>i.tagName.toLowerCase()==="sd-radio-button"),!t.some(i=>i.checked))if(this.hasButtonGroup){let i=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");i&&(i.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let i=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){let t=this.getAllRadios();t.length!==0&&(t.forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid))}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,a=this.hasSlotController.test("help-text"),i=this.helpText?!0:!!a,n=this.hasSlotController.test("tooltip"),l=d`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return d`<fieldset part="form-control" class="${c("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?d`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black text-left",e?"inline-block":"hidden")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?d`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><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?d`<sd-button-group class="border border-primary sd-radio-button-group-border-radius sd-radio-button-group-border-width sd-radio-button-group-padding" part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot><div part="invalid-icon-message" class="flex items-center gap-2 mt-2">${this.showInvalidStyle?d`<sd-icon part="invalid-icon" class="${c("text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div>`}};s.styles=[...f.styles,v`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
2
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([required]) #label::after{content:' *'}:host:has(sd-button-group){display:inline-flex}`],o([m("slot:not([name])")],s.prototype,"defaultSlot",2),o([m("#validation-input")],s.prototype,"validationInput",2),o([m("#invalid-message")],s.prototype,"invalidMessage",2),o([u()],s.prototype,"hasButtonGroup",2),o([u()],s.prototype,"defaultValue",2),o([u()],s.prototype,"showInvalidStyle",2),o([r({type:String,reflect:!0})],s.prototype,"size",2),o([r({type:Boolean,reflect:!0})],s.prototype,"required",2),o([r({type:String,reflect:!0})],s.prototype,"orientation",2),o([r({type:String,reflect:!0})],s.prototype,"label",2),o([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),o([r({type:String,reflect:!0})],s.prototype,"name",2),o([r()],s.prototype,"value",2),o([r({type:String,reflect:!0})],s.prototype,"form",2),o([p("size",{waitUntilFirstUpdate:!0})],s.prototype,"handleSizeChange",1),o([p("showInvalidStyle",{waitUntilFirstUpdate:!0})],s.prototype,"handleInvalidChange",1),o([p("value")],s.prototype,"handleValueChange",1),s=o([y("sd-radio-group")],s);export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk.SAEYIL5V.js";import{a as b}from"./chunk.ERP45OHF.js";import{b as m}from"./chunk.LZRL7OLU.js";import{a as p}from"./chunk.LHSR56PH.js";import{a as l}from"./chunk.UFTAQNZB.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as u,b as r,c as h,d as a,h as o}from"./chunk.VMZSSKC5.js";import{b as c,e as s}from"./chunk.OBAEIKIV.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,v)=>e.checked=v});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(e){if(this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false"),this.formControlController.setValidity(e)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return s`<div class="flex flex-col"><label part="base" class="${l("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${l("relative flex
|
|
1
|
+
import{a as d}from"./chunk.SAEYIL5V.js";import{a as b}from"./chunk.ERP45OHF.js";import{b as m}from"./chunk.LZRL7OLU.js";import{a as p}from"./chunk.LHSR56PH.js";import{a as l}from"./chunk.UFTAQNZB.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as u,b as r,c as h,d as a,h as o}from"./chunk.VMZSSKC5.js";import{b as c,e as s}from"./chunk.OBAEIKIV.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,v)=>e.checked=v});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(e){if(this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false"),this.formControlController.setValidity(e)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return s`<div class="flex flex-col"><label part="base" class="${l("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${l("relative flex shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400 group-hover:border-error-400",invalid:"border-error group-hover:border-error-400 group-hover:bg-transparent",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[e])}"><div part="checkbox" class="${l("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${l("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[e])}"></div></div>${this.checked?s`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?s`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${l("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${l("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?s`<sd-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};t.styles=[...o.styles,c`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
2
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],i([a('input[type="checkbox"]')],t.prototype,"input",2),i([a("#invalid-message")],t.prototype,"invalidMessage",2),i([r({type:String,reflect:!0})],t.prototype,"title",2),i([r({type:String,reflect:!0})],t.prototype,"name",2),i([r()],t.prototype,"value",2),i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([r({type:Boolean,reflect:!0})],t.prototype,"checked",2),i([r({type:Boolean,reflect:!0})],t.prototype,"indeterminate",2),i([b("checked")],t.prototype,"defaultChecked",2),i([r({type:String,reflect:!0})],t.prototype,"form",2),i([r({type:Boolean,reflect:!0})],t.prototype,"required",2),i([h()],t.prototype,"showInvalidStyle",2),i([n(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([n(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],t.prototype,"handleStateChange",1),t=i([u("sd-checkbox")],t);export{t as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk.UFTAQNZB.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as d,b as s,c as i,h as o}from"./chunk.VMZSSKC5.js";import{b as a,e as c}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends o{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return c`<span part="base" class="${r("sd-radio group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?r("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-radio--checked--invalid--default-color-background":"sd-radio--default--invalid-color-background"):this.checked?"sd-radio--checked--default-color-background hover:sd-radio--checked--hover-color-background group-hover:sd-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${r("rounded-full inline-flex text-white sd-radio__checked-height sd-radio__checked-width transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"sd-radio--checked--disabled__icon-color-background":this.visuallyDisabled?"bg-white":this.invalid?"sd-radio--checked--invalid--default__icon-color-background hover:sd-radio--checked--invalid--hover__icon-color-background group-hover:sd-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-radio--checked--default__icon-color-background hover:sd-radio--checked--hover__icon-color-background group-hover:sd-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"></slot></span>`}};e.styles=[...o.styles,a`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}[part=control--checked],[part=control--unchecked]{outline-color:transparent}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:rgba(var(--sd-color-border-primary,var(--sd-color-primary)))}[part=control--checked],[part=control--unchecked]{margin-top:.23em}:host([size=sm]) [part=control--checked],:host([size=sm]) [part=control--unchecked]{margin-top:.15em}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],t([i()],e.prototype,"checked",2),t([i()],e.prototype,"hasFocus",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],e.prototype,"visuallyDisabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([l("checked")],e.prototype,"handleCheckedChange",1),t([l(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([d("sd-radio")],e);export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.IXCKRXZP.js";import"../../chunks/chunk.SAEYIL5V.js";import"../../chunks/chunk.IF6Y3ILD.js";import"../../chunks/chunk.ERP45OHF.js";import"../../chunks/chunk.LZRL7OLU.js";import"../../chunks/chunk.LHSR56PH.js";import"../../chunks/chunk.YGYXL3BZ.js";import"../../chunks/chunk.W5O4FM6B.js";import"../../chunks/chunk.QQD62QOV.js";import"../../chunks/chunk.HFID7R26.js";import"../../chunks/chunk.TRGIF57L.js";import"../../chunks/chunk.MB7SWCJ2.js";import"../../chunks/chunk.LGQNGLG3.js";import"../../chunks/chunk.PYHYYOBE.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.UFTAQNZB.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.VMZSSKC5.js";import"../../chunks/chunk.OBAEIKIV.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.KQBMEX4Q.js";import"../../chunks/chunk.UFTAQNZB.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.VMZSSKC5.js";import"../../chunks/chunk.OBAEIKIV.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.4PBTCGFX.js";import"../../chunks/chunk.KQBMEX4Q.js";import"../../chunks/chunk.3HJR4W7S.js";import"../../chunks/chunk.LZRL7OLU.js";import"../../chunks/chunk.CGQ2BPPZ.js";import"../../chunks/chunk.UFTAQNZB.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.VMZSSKC5.js";import"../../chunks/chunk.OBAEIKIV.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
package/cdn/custom-elements.json
CHANGED
|
@@ -23669,7 +23669,7 @@
|
|
|
23669
23669
|
"package": {
|
|
23670
23670
|
"name": "@solid-design-system/components",
|
|
23671
23671
|
"description": "Solid Design System: Components",
|
|
23672
|
-
"version": "6.24.
|
|
23672
|
+
"version": "6.24.1",
|
|
23673
23673
|
"author": "Union Investment",
|
|
23674
23674
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
23675
23675
|
"license": "MIT"
|
|
@@ -194,7 +194,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
194
194
|
::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-text-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],a([v("a")],Vt.prototype,"button",2),a([d({type:Boolean,reflect:!0})],Vt.prototype,"standalone",2),a([d({type:String,reflect:!0})],Vt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Vt.prototype,"inverted",2),a([d({type:String,reflect:!0})],Vt.prototype,"href",2),a([d({type:Boolean,attribute:"visually-disabled",reflect:!0})],Vt.prototype,"visuallyDisabled",2),a([d({type:String,reflect:!0})],Vt.prototype,"target",2),a([d({reflect:!0})],Vt.prototype,"download",2),Vt=a([k("sd-link")],Vt);var Jt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return p`<sd-link part="base" href="${E(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Jt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
195
195
|
:host{display:inline-flex;align-items:center}sd-link::part(base){align-items:center}sd-link::part(icon-left){margin-right:calc(var(--sd-spacing-1) * 0);display:inline-flex}:host([current]) sd-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,rgba(var(--sd-color-neutral-700))))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([v('[part="base"]')],Jt.prototype,"base",2),a([d({type:String,reflect:!0})],Jt.prototype,"href",2),a([d({type:String,reflect:!0})],Jt.prototype,"target",2),a([d({type:Boolean,reflect:!0})],Jt.prototype,"current",2),a([C("current")],Jt.prototype,"handleCurrentChange",1),Jt=a([k("sd-breadcrumb-item")],Jt);var Pi=class{constructor(r,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};r.addController(this),this.host=r,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(r){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},r)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function po(s,r,t){let e=i=>Object.is(i,-0)?0:i;return s<r?e(r):s>t?e(t):e(s)}var Hi=class{constructor(r){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=r}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(r){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,i)=>{i===r?this.show(e):this.hide(e)})}show(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),r.removeAttribute("inert"),r.setAttribute("aria-hidden","false")}hide(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),r.toggleAttribute("inert",!0),r.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let r=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(r.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=r.map(i=>{let o=i,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let i=r.map(n=>n.getBoundingClientRect().height),o=Math.max(...i);r.forEach((n,l)=>{let h=n,u=e[l];h.className=u.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=u[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*mo(s,r){if(s!==void 0){let t=0;for(let e of s)yield r(e,t++)}}function*fo(s,r,t=1){let e=r===void 0?0:s;r!=null||(r=s);for(let i=e;t>0?i<r:r<i;i+=t)yield i}var bo=Symbol(),Tr=s=>(r,t,e)=>{let i=e.value;e.value=function(...o){clearTimeout(this[bo]),this[bo]=window.setTimeout(()=>{i.apply(this,o)},s)}};var Gr=class{constructor(r){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=r=>{if(r.pointerType==="touch")return;this.pointers.add(r.pointerId),this.mouseDragging&&!this.dragging&&r.button===0&&(r.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=r=>{let t=this.host.scrollContainer,e=!!r.movementX||!!r.movementY;!this.dragging&&e?(t.setPointerCapture(r.pointerId),this.handleDragStart()):t.hasPointerCapture(r.pointerId)&&this.handleDrag(r)};this.handlePointerUp=r=>{this.pointers.delete(r.pointerId),this.host.scrollContainer.releasePointerCapture(r.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=r=>{for(let t of r.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=r=>{for(let t of r.touches)this.pointers.add(t.identifier)};this.host=r,r.addController(this)}async hostConnected(){let r=this.host;await r.updateComplete;let t=r.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let r=this.host;this.dragging=!0,r.scrollContainer.style.setProperty("scroll-snap-type","unset"),r.requestUpdate()}handleDrag(r){this.host.scrollContainer.scrollBy({left:-r.movementX,top:-r.movementY})}async handleDragEnd(){let r=this.host,t=r.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,i=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:i,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:Nr()?"auto":"smooth"}),this.scrolling&&await Q(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),r.requestUpdate()}};a([Tr(100)],Gr.prototype,"handleScrollEnd",1);var Te=class extends f{static isCarouselItem(r){return r instanceof Element&&r.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return p`<slot></slot>`}};Te.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
196
196
|
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],Te=a([k("sd-carousel-item")],Te);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Pi(this,()=>{this.isFocused||this.next()});this.scrollController=new Gr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Hi(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(o=>Te.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let o=i.target;o.toggleAttribute("inert",!i.isIntersecting),o.classList.toggle("--in-view",i.isIntersecting),o.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,o){return Math.ceil((t-i)/o)-Math.ceil((t-i-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let o=Number(i.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),o=i.nextNode();for(;o;){if(o.nodeType===Node.TEXT_NODE){let l=(n=o.textContent)==null?void 0:n.trim();l&&e.push(l)}else o instanceof HTMLImageElement&&o.alt&&e.push(o.alt);o=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,o)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,o=t.slice(-i),n=t.slice(0,i);o.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let o=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=o?`${o} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,o)=>{Math.abs(o-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:o,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=po(t+(o?i:0),0,u.length+1),w=u[b],g=n.getBoundingClientRect(),y=w.getBoundingClientRect();if(n.scrollTo({left:y.left-g.left+n.scrollLeft,top:y.top-g.top+n.scrollTop,behavior:Nr()?"auto":e}),this.userInteracted&&!this.loop){let T=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,z=this.activeSlide===0;T?this.previousButton.focus({preventScroll:!0}):z&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,l=this.loop||o<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${mo(fo(i),u=>{let m=u+1===o;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
|
-
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],a([v('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),a([yi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),a([d({type:String,reflect:!0})],X.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),a([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),a([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),a([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),a([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),a([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),a([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),a([v("slot:not([name])")],X.prototype,"defaultSlot",2),a([v(".carousel__slides")],X.prototype,"scrollContainer",2),a([v(".carousel__pagination")],X.prototype,"paginationContainer",2),a([v(".carousel__announcement")],X.prototype,"announcementRegion",2),a([L()],X.prototype,"activeSlide",2),a([L()],X.prototype,"currentPage",2),a([L()],X.prototype,"pausedAutoplay",2),a([L()],X.prototype,"isFocused",2),a([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),a([C("activeSlide")],X.prototype,"handleSlideChange",1),a([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],X.prototype,"handleAutoplayChange",1),a([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=a([k("sd-carousel")],X);var Bt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(o===u){let b=h.converter||Oe,g=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Oe.fromAttribute)(l,h.type);this[s]!==g&&(this[t]=g)}i.call(this,o,n,l)}};var{I:F0}=aa;var Vi=s=>s.strings===void 0;var zd={},go=(s,r=zd)=>s._$AH=r;var Le=ee(class extends Pe{constructor(s){if(super(s),s.type!==Wt.PROPERTY&&s.type!==Wt.ATTRIBUTE&&s.type!==Wt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Vi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===Mt||r===N)return r;let t=s.element,e=s.name;if(s.type===Wt.PROPERTY){if(r===t[e])return Mt}else if(s.type===Wt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return Mt}else if(s.type===Wt.ATTRIBUTE&&t.getAttribute(e)===r+"")return Mt;return go(s),r}});var ot=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${E(this.value)}" .indeterminate="${Le(this.indeterminate)}" .checked="${Le(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex
|
|
197
|
+
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],a([v('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),a([yi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),a([d({type:String,reflect:!0})],X.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),a([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),a([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),a([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),a([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),a([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),a([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),a([v("slot:not([name])")],X.prototype,"defaultSlot",2),a([v(".carousel__slides")],X.prototype,"scrollContainer",2),a([v(".carousel__pagination")],X.prototype,"paginationContainer",2),a([v(".carousel__announcement")],X.prototype,"announcementRegion",2),a([L()],X.prototype,"activeSlide",2),a([L()],X.prototype,"currentPage",2),a([L()],X.prototype,"pausedAutoplay",2),a([L()],X.prototype,"isFocused",2),a([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),a([C("activeSlide")],X.prototype,"handleSlideChange",1),a([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],X.prototype,"handleAutoplayChange",1),a([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=a([k("sd-carousel")],X);var Bt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(o===u){let b=h.converter||Oe,g=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Oe.fromAttribute)(l,h.type);this[s]!==g&&(this[t]=g)}i.call(this,o,n,l)}};var{I:F0}=aa;var Vi=s=>s.strings===void 0;var zd={},go=(s,r=zd)=>s._$AH=r;var Le=ee(class extends Pe{constructor(s){if(super(s),s.type!==Wt.PROPERTY&&s.type!==Wt.ATTRIBUTE&&s.type!==Wt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Vi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===Mt||r===N)return r;let t=s.element,e=s.name;if(s.type===Wt.PROPERTY){if(r===t[e])return Mt}else if(s.type===Wt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return Mt}else if(s.type===Wt.ATTRIBUTE&&t.getAttribute(e)===r+"")return Mt;return go(s),r}});var ot=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${E(this.value)}" .indeterminate="${Le(this.indeterminate)}" .checked="${Le(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400 group-hover:border-error-400",invalid:"border-error group-hover:border-error-400 group-hover:bg-transparent",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div part="checkbox" class="${c("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?p`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${c("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?p`<sd-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};ot.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
198
198
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([v('input[type="checkbox"]')],ot.prototype,"input",2),a([v("#invalid-message")],ot.prototype,"invalidMessage",2),a([d({type:String,reflect:!0})],ot.prototype,"title",2),a([d({type:String,reflect:!0})],ot.prototype,"name",2),a([d()],ot.prototype,"value",2),a([d({type:String,reflect:!0})],ot.prototype,"size",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ot.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"indeterminate",2),a([Bt("checked")],ot.prototype,"defaultChecked",2),a([d({type:String,reflect:!0})],ot.prototype,"form",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"required",2),a([L()],ot.prototype,"showInvalidStyle",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),a([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=a([k("sd-checkbox")],ot);var Yt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),o=this.helpText?!0:i,n=p`<slot @slotchange="${this.syncCheckboxes}"></slot>`,l=this.hasSlotController.test("tooltip");return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||l?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Yt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
199
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}`],a([d({type:String,reflect:!0})],Yt.prototype,"size",2),a([d({type:String,reflect:!0})],Yt.prototype,"orientation",2),a([d({type:String,reflect:!0})],Yt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],Yt.prototype,"helpText",2),a([C("size",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleSizeChange",1),a([C("invalid",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleInvalid",1),Yt=a([k("sd-checkbox-group")],Yt);var _t=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=this.removable&&!this.selected&&!this.toggleable,i=t?et`a`:e?et`div`:et`button`;return j`<${i} part="base" type="${E(t?void 0:"button")}" href="${E(t?this.href:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" ?disabled="${E(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${E(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||e?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("flex border box-border sd-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 sd-tag-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 sd-tag-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:e?"pl-4 pr-3 py-2":"px-4 py-2",sm:e?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.disabled?c(!t&&"cursor-not-allowed",this.selected&&"bg-neutral-500 text-white","sd-tag--disabled-color-border sd-tag--disabled-color-text"):this.selected?"sd-tag--selected-border-width sd-tag--selected--default-color-background sd-tag--selected--default-color-border sd-tag--selected--default-color-text hover:sd-tag--selected--hover-color-background hover:sd-tag--selected--hover-color-border hover:sd-tag--selected--hover-color-text":c("sd-tag--default-color-border sd-tag--default-color-text",e?"sd-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-tag--default--hover-color-background"))}"><slot name="icon-left" class="${c("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${e&&!t?j`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}" ?disabled="${E(t?void 0:this.disabled)}"><slot part="removable-indicator" name="removable-indicator" class="${c(this.disabled&&"sd-tag--disabled-color-text")}"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${i}>`}};_t.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
200
200
|
:host{display:inline-block;transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1))}:host([size=lg])::part(removable-indicator){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=sm])::part(removable-indicator){font-size:.75rem}.sd-tag--disabled-color-border{border-color:rgb(var(--sd-tag--disabled-color-border))}.sd-tag-font-weight{font-weight:var(--sd-tag-font-weight)}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],a([v("a, button, div")],_t.prototype,"tag",2),a([d({type:String,reflect:!0})],_t.prototype,"size",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"selected",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"toggleable",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"removable",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"disabled",2),a([d({type:String,reflect:!0})],_t.prototype,"href",2),a([d({type:String,reflect:!0})],_t.prototype,"target",2),a([d({reflect:!0})],_t.prototype,"download",2),_t=a([k("sd-tag")],_t);var vo=s=>s;var $s=s=>Array.from(s.assignedElements({flatten:!0})),Sd=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Md=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",yo=s=>s.map(Sd),wo=s=>s.filter(Md),Fi=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var M=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new D(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.floatingLabel=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=vo;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=Fi(t.value),o=Fi(t.getTextLabel()),n=Fi(e);return i.includes(n)||o.includes(n)};this.getTag=t=>p`<sd-tag class="min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
@@ -241,8 +241,8 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
241
241
|
:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],ne.prototype,"defaultSlot",2),a([d({reflect:!0,type:Boolean})],ne.prototype,"disabled",2),a([d({type:String,reflect:!0})],ne.prototype,"label",2),a([C("disabled",{waitUntilFirstUpdate:!0})],ne.prototype,"handleDisabledChange",1),ne=a([k("sd-optgroup")],ne);var kt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return p`<div part="base" style="word-break:break-word" class="${c("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-base py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?p`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"sd-option--disabled-color-border":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?p`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?p`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};kt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
242
242
|
:host{position:relative;display:block;width:100%;--tw-outline-style:none!important;outline-style:none!important}.focus-outline-offset{outline-offset:-2px}.sd-option--disabled-color-border{border-color:rgb(var(--sd-option--disabled-color-border))}`],a([v('[part="base"]')],kt.prototype,"defaultSlot",2),a([L()],kt.prototype,"current",2),a([L()],kt.prototype,"selected",2),a([L()],kt.prototype,"hasHover",2),a([L()],kt.prototype,"isKeyboardFocus",2),a([d({type:String,reflect:!0})],kt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"checkbox",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([d({type:String,reflect:!0})],kt.prototype,"value",2),a([C("disabled")],kt.prototype,"handleDisabledChange",1),a([C("selected")],kt.prototype,"handleSelectedChange",1),a([C("value")],kt.prototype,"handleValueChange",1),kt=a([k("sd-option")],kt);var Kt=class extends f{constructor(){super();this.hasSlotController=new P(this,"label");this.value=null;this.max=100;this.label="";this.valuePosition=null;this.inverted=!1;this.showLabel=!1;this.localize=new D(this);this.valueFormatter=this.localize.number.bind(this.localize)}get safeMax(){return this.max>0?this.max:100}get clampedValue(){var t;return Math.min(Math.max((t=this.value)!=null?t:0,0),this.safeMax)}get percentage(){return this.clampedValue/this.safeMax*100}get isLoading(){return this.value===void 0||this.value===null||isNaN(this.value)}get showValue(){return!this.isLoading&&(this.valuePosition==="right"||this.valuePosition==="bottom")}render(){let t={label:this.hasSlotController.test("label")},e=this.label?!0:!!t.label;return p`<div part="base" class="text-start" aria-hidden="${!e}">${e?p`<label part="label" id="label" class="${c("text-base",!this.showLabel&&"sr-only",this.inverted?"text-white":"text-black")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label>`:N}<div class="${c(this.valuePosition==="right"?"flex flex-row items-center gap-2 -mt-1":this.valuePosition==="bottom"?"flex flex-col gap-1 mt-1":"mt-1")}"><div part="bar" id="bar" class="${c("w-full h-[var(--height,0.125rem)]",this.isLoading?"relative ":"flex")}" role="progressbar" aria-valuemin="0" aria-valuemax="${this.safeMax}" aria-valuenow="${E(this.isLoading?void 0:this.valueFormatter(this.clampedValue))}" aria-valuetext="${E(this.isLoading?this.localize.term("loading"):this.valueFormatter(this.clampedValue))}" aria-label="${E(e?void 0:this.label||this.localize.term("progress"))}" aria-labelledby="${E(e?"label":this.label)}" style="${`--percentage: ${this.percentage}%;`}">${this.isLoading?p`<div part="track" class="${c("absolute top-0 left-0 h-full progress-bar__track--loading-left",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div><div part="track" class="${c("absolute top-0 right-0 h-full progress-bar__track--loading-right",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div><div part="indicator" class="${c("absolute top-0 h-full progress-bar__indicator--loading",this.inverted?"sd-progress-bar--active--inverted-color-background":"bg-accent")}"></div>`:p`<div part="indicator" class="${c("w-[var(--percentage)]",this.inverted?"sd-progress-bar--active--inverted-color-background":"bg-accent")}"></div>${this.value&&this.value>0&&this.value<this.safeMax?p`<div class="w-0.5 shrink-0"></div>`:N}<div part="track" class="${c("flex-1",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div>`}</div>${this.showValue?p`<span class="${c("text-neutral-700 text-xs w-shrink-0",this.inverted?"text-white":"text-neutral-700",this.valuePosition==="bottom"?"text-start":"text-center",this.valuePosition==="right"&&"whitespace-nowrap")}" part="value-${this.valuePosition}">${this.valueFormatter(this.clampedValue)}</span>`:N}</div></div>`}};Kt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
243
243
|
:host{display:block;width:100%}.progress-bar__indicator--loading{width:25%;animation:progress-loading-indicator 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-left{animation:progress-loading-track-left 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-right{animation:progress-loading-track-right 1.25s ease-in-out infinite alternate}@keyframes progress-loading-indicator{0%{left:0}100%{left:75%}}@keyframes progress-loading-track-left{0%{width:0}100%{width:calc(75% - .25rem)}}@keyframes progress-loading-track-right{0%{width:calc(75% - .25rem)}100%{width:0}}`],a([d({type:Number,reflect:!0})],Kt.prototype,"value",2),a([d({type:Number,reflect:!0})],Kt.prototype,"max",2),a([d({type:String,reflect:!0})],Kt.prototype,"label",2),a([d({type:String,reflect:!0,attribute:"value-position"})],Kt.prototype,"valuePosition",2),a([d({type:Boolean,reflect:!0})],Kt.prototype,"inverted",2),a([d({type:Boolean,reflect:!0,attribute:"show-label"})],Kt.prototype,"showLabel",2),a([d({attribute:!1})],Kt.prototype,"valueFormatter",2),Kt=a([k("sd-progress-bar")],Kt);var Re=class extends Pt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?et`details`:et`div`,e=this.expandable?et`summary`:et`div`;return j`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${c("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${E(this.expandable?"button":void 0)}" aria-expanded="${E(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${E(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${c("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"sd-quickfact--expandable-color-text":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${c("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};Re.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
244
|
-
:host{display:block}[part=header]::-webkit-details-marker{display:none}[part=summary-icon]{color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=icon]{font-size:var(--sd-spacing-12,3rem);color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([d({type:Boolean,reflect:!0})],Re.prototype,"expandable",2),Re=a([k("sd-quickfact")],Re);R("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});R("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var $t=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return p`<span part="base" class="${c("sd-radio group flex items-
|
|
245
|
-
:host{display:block
|
|
244
|
+
:host{display:block}[part=header]::-webkit-details-marker{display:none}[part=summary-icon]{color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=icon]{font-size:var(--sd-spacing-12,3rem);color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([d({type:Boolean,reflect:!0})],Re.prototype,"expandable",2),Re=a([k("sd-quickfact")],Re);R("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});R("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var $t=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return p`<span part="base" class="${c("sd-radio group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${c("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?c("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-radio--checked--invalid--default-color-background":"sd-radio--default--invalid-color-background"):this.checked?"sd-radio--checked--default-color-background hover:sd-radio--checked--hover-color-background group-hover:sd-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${c("rounded-full inline-flex text-white sd-radio__checked-height sd-radio__checked-width transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"sd-radio--checked--disabled__icon-color-background":this.visuallyDisabled?"bg-white":this.invalid?"sd-radio--checked--invalid--default__icon-color-background hover:sd-radio--checked--invalid--hover__icon-color-background group-hover:sd-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-radio--checked--default__icon-color-background hover:sd-radio--checked--hover__icon-color-background group-hover:sd-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${c("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"></slot></span>`}};$t.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
245
|
+
:host{display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}[part=control--checked],[part=control--unchecked]{outline-color:transparent}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:rgba(var(--sd-color-border-primary,var(--sd-color-primary)))}[part=control--checked],[part=control--unchecked]{margin-top:.23em}:host([size=sm]) [part=control--checked],:host([size=sm]) [part=control--unchecked]{margin-top:.15em}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([L()],$t.prototype,"checked",2),a([L()],$t.prototype,"hasFocus",2),a([d({type:String,reflect:!0})],$t.prototype,"size",2),a([d({type:Boolean,reflect:!0})],$t.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],$t.prototype,"visuallyDisabled",2),a([d()],$t.prototype,"value",2),a([d({type:Boolean,reflect:!0})],$t.prototype,"invalid",2),a([C("checked")],$t.prototype,"handleCheckedChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],$t.prototype,"handleDisabledChange",1),$t=a([k("sd-radio")],$t);var Dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return p`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${c("relative text-center sd-radio-button-border-radius transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline choice-control-font-weight",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"sd-button--primary--default-color-background sd-button--primary--default-color-text hover:sd-button--primary--hover-color-background hover:text-primary-100":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent sd-radio-button-color-text border-primary cursor-pointer hover:sd-radio-button--hover-color-background hover:sd-radio-button--hover-color-text",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${E(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${c(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?p`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};Dt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
246
246
|
:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:calc(var(--sd-spacing-1) * 0);z-index:calc(10 * -1);opacity:var(--sd-opacity-0);outline-style:var(--tw-outline-style);outline-width:1px;outline-color:rgba(var(--sd-color-border-error,var(--sd-color-error)));--tw-outline-style:dotted;outline-style:dotted}.lg-label{height:46px}.lg-no-label{height:46px;padding-inline:calc(var(--sd-spacing-1) * 5)}.md-label{height:38px}.md-no-label{height:38px;padding-inline:var(--sd-spacing-4)}.sm-label{height:30px}.sm-no-label{height:30px;padding-inline:var(--sd-spacing-3)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3) * -1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2) * -1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1) * -1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus){z-index:30}:host(.sd-button-group__button[checked]){z-index:40}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([v(".button")],Dt.prototype,"input",2),a([v(".hidden-input")],Dt.prototype,"hiddenInput",2),a([L()],Dt.prototype,"hasFocus",2),a([d({type:String,reflect:!0})],Dt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Dt.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Dt.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],Dt.prototype,"checked",2),a([d()],Dt.prototype,"value",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],Dt.prototype,"handleDisabledChange",1),Dt=a([k("sd-radio-button")],Dt);var Se=class extends f{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=ti(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=ti(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=ti(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=ti(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let i=t.indexOf(e),o=ti(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",i===0),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return p`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};Se.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
247
247
|
:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([v("slot")],Se.prototype,"defaultSlot",2),a([L()],Se.prototype,"disableRole",2),a([d({type:String,reflect:!0})],Se.prototype,"label",2),Se=a([k("sd-button-group")],Se);function ti(s){var t;let r="sd-button, sd-radio-button";return(t=s.closest(r))!=null?t:s.querySelector(r)}var rt=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this);this.hasSlotController=new P(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?za:t?La:xr}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}updated(t){super.updated(t),this.syncAriaDescription()}syncAriaDescription(){var i;let t=(i=this.shadowRoot)==null?void 0:i.querySelector("fieldset"),e=this.showInvalidStyle?this.validationMessage:"";e?t==null||t.setAttribute("aria-description",e):t==null||t.removeAttribute("aria-description")}getAllRadios(){let t=[...this.querySelectorAll("sd-radio, sd-radio-button")];return t.length===0&&console.warn("No radios found in the radio group."),t}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),i=this.value,o=this.getAllRadios();o.length!==0&&(e.disabled||(this.value=e.value,o.forEach(n=>n.checked=n===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input"))))}handleKeyDown(t){var h;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(u=>!u.disabled);if(e.length===0)return;let i=(h=e.find(u=>u.checked))!=null?h:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(i)+o;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(u=>{u.checked=!1,this.hasButtonGroup||(u.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios();if(t.length===0)return;let i=t.find(o=>o.checked)||t[0];i&&i.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,i;let t=this.getAllRadios();if(t.length===0){this.hasButtonGroup=!1;return}if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof $t&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(i=this.shadowRoot)==null?void 0:i.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){let t=this.getAllRadios();t.length!==0&&(t.forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid))}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!i,n=this.hasSlotController.test("tooltip"),l=p`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?p`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black text-left",e?"inline-block":"hidden")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><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?p`<sd-button-group class="border border-primary sd-radio-button-group-border-radius sd-radio-button-group-border-width sd-radio-button-group-padding" part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot><div part="invalid-icon-message" class="flex items-center gap-2 mt-2">${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c("text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div>`}};rt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
248
248
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([required]) #label::after{content:' *'}:host:has(sd-button-group){display:inline-flex}`],a([v("slot:not([name])")],rt.prototype,"defaultSlot",2),a([v("#validation-input")],rt.prototype,"validationInput",2),a([v("#invalid-message")],rt.prototype,"invalidMessage",2),a([L()],rt.prototype,"hasButtonGroup",2),a([L()],rt.prototype,"defaultValue",2),a([L()],rt.prototype,"showInvalidStyle",2),a([d({type:String,reflect:!0})],rt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],rt.prototype,"required",2),a([d({type:String,reflect:!0})],rt.prototype,"orientation",2),a([d({type:String,reflect:!0})],rt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],rt.prototype,"helpText",2),a([d({type:String,reflect:!0})],rt.prototype,"name",2),a([d()],rt.prototype,"value",2),a([d({type:String,reflect:!0})],rt.prototype,"form",2),a([C("size",{waitUntilFirstUpdate:!0})],rt.prototype,"handleSizeChange",1),a([C("showInvalidStyle",{waitUntilFirstUpdate:!0})],rt.prototype,"handleInvalidChange",1),a([C("value")],rt.prototype,"handleValueChange",1),rt=a([k("sd-radio-group")],rt);var vt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.hasSlotController=new P(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.closeTrigger="click focus escape";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("click",this.handleDocumentClick),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction),document.removeEventListener("click",this.handleDocumentClick)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(i=>{var o,n;i.nodeType===Node.TEXT_NODE&&!((o=i==null?void 0:i.textContent)!=null&&o.trim())&&((n=i==null?void 0:i.parentNode)==null||n.removeChild(i))})}handleBlur(){this.hasCloseTrigger("focus")&&this.hide()}handleClick(){this.open&&this.hasCloseTrigger("click")?this.hide():this.hasTrigger("click")&&this.show()}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&this.hasCloseTrigger("escape")&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=yr(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasCloseTrigger("hover")){let t=yr(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}handleDocumentClick(t){if(!this.open||this.interactionType==="keyboard")return;let e=t.composedPath();this.hasCloseTrigger("focus")&&!e.includes(this)&&!e.includes(this.popup)&&this.hide()}hasTrigger(t){return this.trigger.split(" ").includes(t)}hasCloseTrigger(t){return this.closeTrigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await Z(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=W(this,"tooltip.show",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await Z(this.body);let{keyframes:t,options:e}=W(this,"tooltip.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),Q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return p`<sd-popup part="base" exportparts="
|