@solid-design-system/components 6.12.0 → 6.12.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.NOXJ72G5.js → chunk.DSVAD7WA.js} +2 -2
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +1 -1
- package/cdn/solid-components.iife.js +1 -1
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2OSCB6XW.js +2 -2
- package/cdn-versioned/chunks/chunk.2XY2M6QX.js +2 -2
- package/cdn-versioned/chunks/chunk.3RO5EKVU.js +1 -1
- package/cdn-versioned/chunks/chunk.4275NGRN.js +2 -2
- package/cdn-versioned/chunks/chunk.4RPUAIQK.js +2 -2
- package/cdn-versioned/chunks/chunk.5DNOSYG7.js +1 -1
- package/cdn-versioned/chunks/chunk.5FYGQOXL.js +2 -2
- package/cdn-versioned/chunks/chunk.5X4GK4PS.js +1 -1
- package/cdn-versioned/chunks/chunk.5YHGT34K.js +2 -2
- package/cdn-versioned/chunks/chunk.6AEASXXL.js +2 -2
- package/cdn-versioned/chunks/chunk.AMWHBFTM.js +2 -2
- package/cdn-versioned/chunks/chunk.B46EHYIM.js +3 -3
- package/cdn-versioned/chunks/chunk.BAY7BKUC.js +1 -1
- package/cdn-versioned/chunks/chunk.BOVFUPAB.js +2 -2
- package/cdn-versioned/chunks/chunk.C7XYQGPF.js +2 -2
- package/cdn-versioned/chunks/chunk.DS2YD552.js +2 -2
- package/cdn-versioned/chunks/{chunk.NOXJ72G5.js → chunk.DSVAD7WA.js} +5 -5
- package/cdn-versioned/chunks/chunk.EMB5EOVL.js +2 -2
- package/cdn-versioned/chunks/chunk.ENQH3ZMT.js +2 -2
- package/cdn-versioned/chunks/chunk.ETAZT232.js +2 -2
- package/cdn-versioned/chunks/chunk.F6Z7C6GC.js +2 -2
- package/cdn-versioned/chunks/chunk.FC5OZ6LQ.js +2 -2
- package/cdn-versioned/chunks/chunk.FIUQMO6Q.js +2 -2
- package/cdn-versioned/chunks/chunk.FJ4YRN4X.js +2 -2
- package/cdn-versioned/chunks/chunk.FTCO66N2.js +2 -2
- package/cdn-versioned/chunks/chunk.G5PT3ZUT.js +2 -2
- package/cdn-versioned/chunks/chunk.H76VWBAF.js +1 -1
- package/cdn-versioned/chunks/chunk.HL52A333.js +2 -2
- package/cdn-versioned/chunks/chunk.HR5FZLRC.js +2 -2
- package/cdn-versioned/chunks/chunk.HUYURJ76.js +2 -2
- package/cdn-versioned/chunks/chunk.HWUUJJP3.js +1 -1
- package/cdn-versioned/chunks/chunk.INALKJVG.js +5 -5
- package/cdn-versioned/chunks/chunk.IXPIV7FA.js +2 -2
- package/cdn-versioned/chunks/chunk.JMZGGLJF.js +1 -1
- package/cdn-versioned/chunks/chunk.JZVRJWMV.js +2 -2
- package/cdn-versioned/chunks/chunk.KS4OSR2A.js +3 -3
- package/cdn-versioned/chunks/chunk.R3BQNXHR.js +2 -2
- package/cdn-versioned/chunks/chunk.RAP66B6O.js +1 -1
- package/cdn-versioned/chunks/chunk.REOCLYOU.js +2 -2
- package/cdn-versioned/chunks/chunk.SIVZ2S6B.js +1 -1
- package/cdn-versioned/chunks/chunk.TPSMY4DZ.js +1 -1
- package/cdn-versioned/chunks/chunk.TWQLXQ5K.js +2 -2
- package/cdn-versioned/chunks/chunk.TYKWEXBI.js +1 -1
- package/cdn-versioned/chunks/chunk.UYDZYQM5.js +2 -2
- package/cdn-versioned/chunks/chunk.V3TGYVID.js +2 -2
- package/cdn-versioned/chunks/chunk.V4BUIKPF.js +2 -2
- package/cdn-versioned/chunks/chunk.VNKXLA5X.js +2 -2
- package/cdn-versioned/chunks/chunk.VR5GAI7K.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WBIJL62F.js +2 -2
- package/cdn-versioned/chunks/chunk.WNJTMU6J.js +1 -1
- package/cdn-versioned/chunks/chunk.WTZQJFYM.js +2 -2
- package/cdn-versioned/chunks/chunk.WZAWV2ED.js +2 -2
- package/cdn-versioned/chunks/chunk.XG7G63I4.js +2 -2
- package/cdn-versioned/chunks/chunk.XKUWNSWT.js +2 -2
- package/cdn-versioned/chunks/chunk.Y3LTN4CF.js +2 -2
- package/cdn-versioned/chunks/chunk.Y4QI2OPY.js +2 -2
- package/cdn-versioned/chunks/chunk.YF6TETRU.js +2 -2
- package/cdn-versioned/chunks/chunk.YPTZDABK.js +1 -1
- package/cdn-versioned/chunks/chunk.YQOLB2PJ.js +9 -9
- package/cdn-versioned/chunks/chunk.YWOD5MYX.js +2 -2
- package/cdn-versioned/chunks/chunk.ZIVWE443.js +1 -1
- package/cdn-versioned/chunks/chunk.ZRNSYCFR.js +2 -2
- package/cdn-versioned/chunks/chunk.ZSAXC4EQ.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-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +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/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/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 +246 -246
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +80 -80
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +80 -80
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +107 -107
- package/cdn-versioned/web-types.json +157 -157
- package/dist/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +2 -0
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +1 -1
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.2CU6QOL7.js +4 -4
- package/dist-versioned/chunks/chunk.35EQJ5SV.js +8 -8
- package/dist-versioned/chunks/chunk.4C33XKR5.js +4 -4
- package/dist-versioned/chunks/chunk.4GXGCVAT.js +4 -4
- package/dist-versioned/chunks/chunk.4TOOTTT7.js +3 -3
- package/dist-versioned/chunks/chunk.5IGIZXCC.js +12 -12
- package/dist-versioned/chunks/chunk.5V4ZLM46.js +2 -2
- package/dist-versioned/chunks/chunk.6ZTH3QOK.js +5 -5
- package/dist-versioned/chunks/chunk.77QMG2JK.js +1 -1
- package/dist-versioned/chunks/chunk.7NPVZGYG.js +10 -10
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.CGHNKRSG.js +2 -2
- package/dist-versioned/chunks/chunk.CPEBS32D.js +1 -1
- package/dist-versioned/chunks/chunk.CQPHP72G.js +5 -5
- package/dist-versioned/chunks/chunk.DVHTNKCQ.js +3 -3
- package/dist-versioned/chunks/chunk.DXOZDLN3.js +5 -5
- package/dist-versioned/chunks/chunk.EORDFUN5.js +8 -8
- package/dist-versioned/chunks/chunk.F733OTL5.js +2 -2
- package/dist-versioned/chunks/chunk.FN3QPQKW.js +6 -6
- package/dist-versioned/chunks/chunk.GUPU7Y4R.js +2 -2
- package/dist-versioned/chunks/chunk.HDB5VQ6T.js +3 -3
- package/dist-versioned/chunks/chunk.HMYRJJSA.js +1 -1
- package/dist-versioned/chunks/chunk.HSLR5EL7.js +2 -2
- package/dist-versioned/chunks/chunk.HWSQMDBV.js +2 -2
- package/dist-versioned/chunks/chunk.IYIDHG44.js +2 -2
- package/dist-versioned/chunks/chunk.J7P25XPS.js +1 -1
- package/dist-versioned/chunks/chunk.JBLVT4GJ.js +4 -4
- package/dist-versioned/chunks/chunk.JSHWJIQJ.js +5 -5
- package/dist-versioned/chunks/chunk.JVFY4KAV.js +4 -4
- package/dist-versioned/chunks/chunk.JZ4LAYZZ.js +1 -1
- package/dist-versioned/chunks/chunk.K33P42FK.js +1 -1
- package/dist-versioned/chunks/chunk.K5MFIQWD.js +12 -12
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KH2LWYO6.js +1 -1
- package/dist-versioned/chunks/chunk.KMMZFIBW.js +3 -3
- package/dist-versioned/chunks/chunk.KNFZPKTF.js +3 -3
- package/dist-versioned/chunks/chunk.LRKBZ2PI.js +5 -5
- package/dist-versioned/chunks/chunk.MAECKDRE.js +9 -9
- package/dist-versioned/chunks/chunk.MJU6BUDN.js +4 -4
- package/dist-versioned/chunks/chunk.NDY2F6JA.js +14 -14
- package/dist-versioned/chunks/chunk.OA6QSAEX.js +28 -28
- package/dist-versioned/chunks/chunk.OYSZH2PZ.js +25 -25
- package/dist-versioned/chunks/chunk.P4H32F7J.js +8 -8
- package/dist-versioned/chunks/chunk.PU6VCTT2.js +3 -3
- package/dist-versioned/chunks/chunk.PZZI7LIX.js +3 -3
- package/dist-versioned/chunks/chunk.Q2YJAMQO.js +6 -6
- package/dist-versioned/chunks/chunk.QMQD2SCQ.js +7 -7
- package/dist-versioned/chunks/chunk.REYEB3D7.js +11 -11
- package/dist-versioned/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +25 -23
- package/dist-versioned/chunks/chunk.SQKCQFZY.js +2 -2
- package/dist-versioned/chunks/chunk.TAR64H3A.js +4 -4
- package/dist-versioned/chunks/chunk.TEHZN5K4.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.URTSQLC4.js +3 -3
- package/dist-versioned/chunks/chunk.UZPDIPPZ.js +2 -2
- package/dist-versioned/chunks/chunk.V5VJQQ73.js +2 -2
- package/dist-versioned/chunks/chunk.VFLTCSUA.js +5 -5
- package/dist-versioned/chunks/chunk.VJNVCYUG.js +4 -4
- package/dist-versioned/chunks/chunk.WIXKV24T.js +1 -1
- package/dist-versioned/chunks/chunk.XVLJVMWL.js +5 -5
- package/dist-versioned/chunks/chunk.Y3THGL6Z.js +3 -3
- package/dist-versioned/chunks/chunk.Z5DZQTVN.js +1 -1
- package/dist-versioned/chunks/chunk.ZRHUI65H.js +5 -5
- package/dist-versioned/chunks/chunk.ZXKZDONO.js +5 -5
- 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-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +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/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/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 +246 -246
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +107 -107
- package/dist-versioned/web-types.json +157 -157
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.3XPSGHFS.js";import{a as r}from"./chunk.NYKJXI3Q.js";import{a as d,b as o,h as n}from"./chunk.JMZGGLJF.js";import{b as m,e as s}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends n{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-6-12-
|
|
2
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-12-
|
|
1
|
+
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.3XPSGHFS.js";import{a as r}from"./chunk.NYKJXI3Q.js";import{a as d,b as o,h as n}from"./chunk.JMZGGLJF.js";import{b as m,e as s}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends n{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-6-12-1-checkbox")]}async syncCheckboxElements(){let i=this.getAllCheckboxes();await Promise.all(i.map(async l=>{await l.updateComplete,l.size=this.size}))}syncCheckboxes(){customElements.get("sd-6-12-1-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-6-12-1-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let i=this.hasSlotController.test("label"),l=this.label?!0:i,b=this.hasSlotController.test("help-text"),c=this.helpText?!0:b,x=s`<slot @slotchange="${this.syncCheckboxes}"></slot>`,h=this.hasSlotController.test("tooltip");return s`<fieldset part="form-control" class="${a("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${l||h?s`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a("p-0 font-bold leading-normal text-black",l?"flex":"hidden")}" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${h?s`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${x}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-2",c?"block":"hidden")}" aria-hidden="${!c}">${this.helpText}</slot>`}};t.styles=[...n.styles,m`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-12-1-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-6-12-1-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-6-12-1-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-6-12-1-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-12-1-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-12-1-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}`],e([o({type:String,reflect:!0})],t.prototype,"size",2),e([o({type:String,reflect:!0})],t.prototype,"orientation",2),e([o({type:String,reflect:!0})],t.prototype,"label",2),e([o({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([r("size",{waitUntilFirstUpdate:!0})],t.prototype,"handleSizeChange",1),e([r("invalid",{waitUntilFirstUpdate:!0})],t.prototype,"handleInvalid",1),t=e([d("sd-6-12-1-checkbox-group")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as Bt}from"./chunk.3XPSGHFS.js";import{a as kt,b as O,d as Et,h as Ct}from"./chunk.JMZGGLJF.js";import{b as Dt,e as Rt}from"./chunk.UOAG5PNU.js";import{a as S,b as W,c as mt,e as A}from"./chunk.6EV4YU6C.js";var V=Math.min,T=Math.max,ft=Math.round,ut=Math.floor,$=t=>({x:t,y:t}),ge={left:"right",right:"left",bottom:"top",top:"bottom"};function gt(t,e,n){return T(t,V(e,n))}function Z(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}function _(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function yt(t){return St(_(t))}function Nt(t,e,n){n===void 0&&(n=!1);let i=tt(t),o=yt(t),s=wt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function Ht(t){let e=at(t);return[pt(t),e,pt(e)]}function pt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var $t=["left","right"],Ft=["right","left"],we=["top","bottom"],ye=["bottom","top"];function xe(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:$t:e?$t:Ft;case"left":case"right":return e?we:ye;default:return[]}}function Wt(t,e,n,i){let o=tt(t),s=xe(Y(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(pt)))),s}function at(t){let e=Y(t);return ge[e]+t.slice(e.length)}function ve(t){return S({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?ve(t):{top:t,right:t,bottom:t,left:t}}function et(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Vt(t,e,n){let{reference:i,floating:o}=t,s=_(e),r=yt(e),c=wt(r),f=Y(e),u=s==="y",l=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[c]/2-o[c]/2,a;switch(f){case"top":a={x:l,y:i.y-o.height};break;case"bottom":a={x:l,y:i.y+i.height};break;case"right":a={x:i.x+i.width,y:h};break;case"left":a={x:i.x-o.width,y:h};break;default:a={x:i.x,y:i.y}}switch(tt(e)){case"start":a[r]-=m*(n&&u?-1:1);break;case"end":a[r]+=m*(n&&u?-1:1);break}return a}async function _t(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:h="floating",altBoundary:m=!1,padding:a=0}=Z(e,t),d=Tt(a),w=c[m?h==="floating"?"reference":"floating":h],g=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:l,strategy:f})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},R=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:v,strategy:f}):y);return{top:(g.top-R.top+d.top)/b.y,bottom:(R.bottom-g.bottom+d.bottom)/b.y,left:(g.left-R.left+d.left)/b.x,right:(R.right-g.right+d.right)/b.x}}var be=50,jt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:W(S({},r),{detectOverflow:_t}),f=await(r.isRTL==null?void 0:r.isRTL(e)),u=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:l,y:h}=Vt(u,i,f),m=i,a=0,d={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:g,fn:y}=w,{x:v,y:b,data:R,reset:E}=await y({x:l,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:d,rects:u,platform:c,elements:{reference:t,floating:e}});l=v!=null?v:l,h=b!=null?b:h,d[g]=S(S({},d[g]),R),E&&a<be&&(a++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:l,y:h}=Vt(u,m,f)),p=-1)}return{x:l,y:h,placement:m,strategy:o,middlewareData:d}},It=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:u,padding:l=0}=Z(t,e)||{};if(u==null)return{};let h=Tt(l),m={x:n,y:i},a=yt(o),d=wt(a),p=await r.getDimensions(u),w=a==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",b=s.reference[d]+s.reference[a]-m[a]-s.floating[d],R=m[a]-s.reference[a],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u)),C=E?E[v]:0;(!C||!await(r.isElement==null?void 0:r.isElement(E)))&&(C=c.floating[v]||s.floating[d]);let I=b/2-R/2,N=C/2-p[d]/2-1,z=V(h[g],N),U=V(h[y],N),H=z,K=C-p[d]-U,P=C/2-p[d]/2+I,k=gt(H,P,K),J=!f.arrow&&tt(o)!=null&&P!==k&&s.reference[d]/2-(P<H?z:U)-p[d]/2<0,X=J?P<H?P-H:P-K:0;return{[a]:m[a]+X,data:S({[a]:k,centerOffset:P-k-X},J&&{alignmentOffset:X}),reset:J}}});var Xt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:u}=e,P=Z(t,e),{mainAxis:l=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=mt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=Y(o),y=_(c),v=Y(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(u.floating)),R=m||(v||!p?[at(c)]:Ht(c)),E=d!=="none";!m&&E&&R.push(...Wt(c,p,d,b));let C=[c,...R],I=await f.detectOverflow(e,w),N=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(l&&N.push(I[g]),h){let k=Nt(o,r,b);N.push(I[k[0]],I[k[1]])}if(z=[...z,{placement:o,overflows:N}],!N.every(k=>k<=0)){var U,H;let k=(((U=s.flip)==null?void 0:U.index)||0)+1,J=C[k];if(J&&(!(h==="alignment"?y!==_(J):!1)||z.every(B=>_(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:k,overflows:z},reset:{placement:J}};let X=(H=z.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!X)switch(a){case"bestFit":{var K;let Q=(K=z.filter(B=>{if(E){let G=_(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,pe)=>G+pe,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:K[0];Q&&(X=Q);break}case"initialPlacement":X=c;break}if(o!==X)return{reset:{placement:X}}}return{}}}};var Ae=new Set(["left","top"]);async function Oe(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Y(n),c=tt(n),f=_(n)==="y",u=Ae.has(r)?-1:1,l=s&&f?-1:1,h=Z(e,t),{mainAxis:m,crossAxis:a,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof d=="number"&&(a=c==="end"?d*-1:d),f?{x:a*l,y:m*u}:{x:m*u,y:a*l}}var Yt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:c}=e,f=await Oe(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:W(S({},f),{placement:r})}}}},qt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o,platform:s}=e,g=Z(t,e),{mainAxis:r=!0,crossAxis:c=!1,limiter:f={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}}}=g,u=mt(g,["mainAxis","crossAxis","limiter"]),l={x:n,y:i},h=await s.detectOverflow(e,u),m=_(Y(o)),a=St(m),d=l[a],p=l[m];if(r){let y=a==="y"?"top":"left",v=a==="y"?"bottom":"right",b=d+h[y],R=d-h[v];d=gt(b,d,R)}if(c){let y=m==="y"?"top":"left",v=m==="y"?"bottom":"right",b=p+h[y],R=p-h[v];p=gt(b,p,R)}let w=f.fn(W(S({},e),{[a]:d,[m]:p}));return W(S({},w),{data:{x:w.x-n,y:w.y-i,enabled:{[a]:r,[m]:c}}})}}};var Ut=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:c}=e,z=Z(t,e),{apply:f=()=>{}}=z,u=mt(z,["apply"]),l=await r.detectOverflow(e,u),h=Y(o),m=tt(o),a=_(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-l.top-l.bottom,v=d-l.left-l.right,b=V(p-l[w],y),R=V(d-l[g],v),E=!e.middlewareData.shift,C=b,I=R;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(C=y),E&&!m){let U=T(l.left,0),H=T(l.right,0),K=T(l.top,0),P=T(l.bottom,0);a?I=d-2*(U!==0||H!==0?U+H:T(l.left,l.right)):C=p-2*(K!==0||P!==0?K+P:T(l.top,l.bottom))}await f(W(S({},e),{availableWidth:I,availableHeight:C}));let N=await r.getDimensions(c.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function it(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return xt()?t instanceof Node||t instanceof L(t).Node:!1}function M(t){return xt()?t instanceof Element||t instanceof L(t).Element:!1}function j(t){return xt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function Kt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=D(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function Jt(t){return/^(table|td|th)$/.test(it(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}var Re=/transform|translate|scale|rotate|perspective|filter/,Ee=/paint|layout|strict|content/,nt=t=>!!t&&t!=="none",Lt;function vt(t){let e=M(t)?D(t):t;return nt(e.transform)||nt(e.translate)||nt(e.scale)||nt(e.rotate)||nt(e.perspective)||!bt()&&(nt(e.backdropFilter)||nt(e.filter))||Re.test(e.willChange||"")||Ee.test(e.contain||"")}function Qt(t){let e=q(t);for(;j(e)&&!ot(e);){if(vt(e))return e;if(ht(e))return null;e=q(e)}return null}function bt(){return Lt==null&&(Lt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lt}function ot(t){return/^(html|body|#document)$/.test(it(t))}function D(t){return L(t).getComputedStyle(t)}function dt(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(it(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||F(t);return Kt(e)?e.host:e}function Zt(t){let e=q(t);return ot(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&ct(e)?e:Zt(e)}function st(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Zt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=L(o);if(s){let c=At(r);return e.concat(r,r.visualViewport||[],ct(o)?o:[],c&&n?st(c):[])}else return e.concat(o,st(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ie(t){let e=D(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=j(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,c=ft(n)!==s||ft(i)!==r;return c&&(n=s,i=r),{width:n,height:i,$:c}}function zt(t){return M(t)?t:t.contextElement}function lt(t){let e=zt(t);if(!j(e))return $(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=ie(e),r=(s?ft(n.width):n.width)/i,c=(s?ft(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ce=$(0);function oe(t){let e=L(t);return!bt()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Se(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function rt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=zt(t),r=$(1);e&&(i?M(i)&&(r=lt(i)):r=lt(t));let c=Se(s,n,i)?oe(s):$(0),f=(o.left+c.x)/r.x,u=(o.top+c.y)/r.y,l=o.width/r.x,h=o.height/r.y;if(s){let m=L(s),a=i&&M(i)?L(i):i,d=m,p=At(d);for(;p&&i&&a!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=D(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,b=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x,u*=w.y,l*=w.x,h*=w.y,f+=v,u+=b,d=L(p),p=At(d)}}return et({width:l,height:h,x:f,y:u})}function Ot(t,e){let n=dt(t).scrollLeft;return e?e.left+n:rt(F(t)).left+n}function re(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Ot(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Te(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),c=e?ht(e.floating):!1;if(i===r||c&&s)return n;let f={scrollLeft:0,scrollTop:0},u=$(1),l=$(0),h=j(i);if((h||!h&&!s)&&((it(i)!=="body"||ct(r))&&(f=dt(i)),h)){let a=rt(i);u=lt(i),l.x=a.x+i.clientLeft,l.y=a.y+i.clientTop}let m=r&&!h&&!s?re(r,f):$(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+l.x+m.x,y:n.y*u.y-f.scrollTop*u.y+l.y+m.y}}function Le(t){return Array.from(t.getClientRects())}function Pe(t){let e=F(t),n=dt(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+Ot(t),c=-n.scrollTop;return D(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:c}}var te=25;function ze(t,e){let n=L(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,c=0,f=0;if(o){s=o.width,r=o.height;let l=bt();(!l||l&&e==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}let u=Ot(i);if(u<=0){let l=i.ownerDocument,h=l.body,m=getComputedStyle(h),a=l.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,d=Math.abs(i.clientWidth-h.clientWidth-a);d<=te&&(s-=d)}else u<=te&&(s+=u);return{width:s,height:r,x:c,y:f}}function Me(t,e){let n=rt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=j(t)?lt(t):$(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=o*s.x,u=i*s.y;return{width:r,height:c,x:f,y:u}}function ee(t,e,n){let i;if(e==="viewport")i=ze(t,n);else if(e==="document")i=Pe(F(t));else if(M(e))i=Me(e,n);else{let o=oe(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return et(i)}function se(t,e){let n=q(t);return n===e||!M(n)||ot(n)?!1:D(n).position==="fixed"||se(n,e)}function De(t,e){let n=e.get(t);if(n)return n;let i=st(t,[],!1).filter(c=>M(c)&&it(c)!=="body"),o=null,s=D(t).position==="fixed",r=s?q(t):t;for(;M(r)&&!ot(r);){let c=D(r),f=vt(r);!f&&c.position==="fixed"&&(o=null),(s?!f&&!o:!f&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ct(r)&&!f&&se(t,r))?i=i.filter(l=>l!==r):o=c,r=q(r)}return e.set(t,i),i}function ke(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ht(e)?[]:De(e,this._c):[].concat(n),i],c=ee(e,r[0],o),f=c.top,u=c.right,l=c.bottom,h=c.left;for(let m=1;m<r.length;m++){let a=ee(e,r[m],o);f=T(a.top,f),u=V(a.right,u),l=V(a.bottom,l),h=T(a.left,h)}return{width:u-h,height:l-f,x:h,y:f}}function Be(t){let{width:e,height:n}=ie(t);return{width:e,height:n}}function $e(t,e,n){let i=j(e),o=F(e),s=n==="fixed",r=rt(t,!0,s,e),c={scrollLeft:0,scrollTop:0},f=$(0);function u(){f.x=Ot(o)}if(i||!i&&!s)if((it(e)!=="body"||ct(o))&&(c=dt(e)),i){let a=rt(e,!0,s,e);f.x=a.x+e.clientLeft,f.y=a.y+e.clientTop}else o&&u();s&&!i&&o&&u();let l=o&&!i&&!s?re(o,c):$(0),h=r.left+c.scrollLeft-f.x-l.x,m=r.top+c.scrollTop-f.y-l.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return D(t).position==="static"}function ne(t,e){if(!j(t)||D(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ce(t,e){let n=L(t);if(ht(t))return n;if(!j(t)){let o=q(t);for(;o&&!ot(o);){if(M(o)&&!Pt(o))return o;o=q(o)}return n}let i=ne(t,e);for(;i&&Jt(i)&&Pt(i);)i=ne(i,e);return i&&ot(i)&&Pt(i)&&!vt(i)?n:i||Qt(t)||n}var Fe=async function(t){let e=this.getOffsetParent||ce,n=this.getDimensions,i=await n(t.floating);return{reference:$e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ne(t){return D(t).direction==="rtl"}var He={convertOffsetParentRelativeRectToViewportRelativeRect:Te,getDocumentElement:F,getClippingRect:ke,getOffsetParent:ce,getElementRects:Fe,getClientRects:Le,getDimensions:Be,getScale:lt,isElement:M,isRTL:Ne};function le(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,i,o=F(t);function s(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function r(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),s();let u=t.getBoundingClientRect(),{left:l,top:h,width:m,height:a}=u;if(c||e(),!m||!a)return;let d=ut(h),p=ut(o.clientWidth-(l+m)),w=ut(o.clientHeight-(h+a)),g=ut(l),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,V(1,f))||1},b=!0;function R(E){let C=E[0].intersectionRatio;if(C!==f){if(!b)return r();C?r(!1,C):i=setTimeout(()=>{r(!1,1e-7)},1e3)}C===1&&!le(u,t.getBoundingClientRect())&&r(),b=!1}try{n=new IntersectionObserver(R,W(S({},v),{root:o.ownerDocument}))}catch(E){n=new IntersectionObserver(R,v)}n.observe(t)}return r(!0),s}function ae(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,u=zt(t),l=o||s?[...u?st(u):[],...e?st(e):[]]:[];l.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=u&&c?We(u,n):null,m=-1,a=null;r&&(a=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&a&&e&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=a)==null||v.observe(e)})),n()}),u&&!f&&a.observe(u),e&&a.observe(e));let d,p=f?rt(t):null;f&&w();function w(){let g=rt(t);p&&!le(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;l.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=a)==null||g.disconnect(),a=null,f&&cancelAnimationFrame(d)}}var fe=Yt;var ue=qt,he=Xt,Mt=Ut;var de=It;var me=(t,e,n)=>{let i=new Map,o=S({platform:He},n),s=W(S({},o.platform),{_c:i});return jt(t,e,W(S({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=ae(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[fe({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(Mt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(he({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(ue({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(Mt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(de({element:this.arrowEl,padding:this.arrowPadding})),me(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let c=getComputedStyle(this).direction==="rtl",f={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let u=s.arrow.x,l=s.arrow.y,h="",m="",a="",d="";if(this.arrowPlacement==="start"){let p=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=c?p:"",d=c?"":p}else if(this.arrowPlacement==="end"){let p=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=c?"":p,d=c?p:"",a=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof u=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof u=="number"?`${u}px`:"",h=typeof l=="number"?`${l}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:a,left:d,[f]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Rt`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Bt("isolate z-20",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Rt`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,Dt`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],A([Et('[part="popup"]')],x.prototype,"popup",2),A([Et('[part="arrow"]')],x.prototype,"arrowEl",2),A([O({reflect:!0})],x.prototype,"anchor",2),A([O({type:Boolean,reflect:!0})],x.prototype,"active",2),A([O({type:String,reflect:!0})],x.prototype,"placement",2),A([O({type:String,reflect:!0})],x.prototype,"strategy",2),A([O({type:Number,reflect:!0})],x.prototype,"distance",2),A([O({type:Number,reflect:!0})],x.prototype,"skidding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"arrow",2),A([O({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),A([O({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"flip",2),A([O({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),A([O({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),A([O({type:Object})],x.prototype,"flipBoundary",2),A([O({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),A([O({type:Boolean})],x.prototype,"shift",2),A([O({type:Object})],x.prototype,"shiftBoundary",2),A([O({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),A([O({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),A([O()],x.prototype,"sync",2),A([O({type:Object})],x.prototype,"autoSizeBoundary",2),A([O({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=A([kt("sd-6-12-
|
|
2
|
+
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],A([Et('[part="popup"]')],x.prototype,"popup",2),A([Et('[part="arrow"]')],x.prototype,"arrowEl",2),A([O({reflect:!0})],x.prototype,"anchor",2),A([O({type:Boolean,reflect:!0})],x.prototype,"active",2),A([O({type:String,reflect:!0})],x.prototype,"placement",2),A([O({type:String,reflect:!0})],x.prototype,"strategy",2),A([O({type:Number,reflect:!0})],x.prototype,"distance",2),A([O({type:Number,reflect:!0})],x.prototype,"skidding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"arrow",2),A([O({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),A([O({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"flip",2),A([O({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),A([O({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),A([O({type:Object})],x.prototype,"flipBoundary",2),A([O({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),A([O({type:Boolean})],x.prototype,"shift",2),A([O({type:Object})],x.prototype,"shiftBoundary",2),A([O({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),A([O({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),A([O()],x.prototype,"sync",2),A([O({type:Object})],x.prototype,"autoSizeBoundary",2),A([O({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=A([kt("sd-6-12-1-popup")],x);export{x as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as l}from"./chunk.D4E5ZIRW.js";import{a as s}from"./chunk.NYKJXI3Q.js";import{a as y,b as a,f,h as r}from"./chunk.JMZGGLJF.js";import{b as c,e as d}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends r{constructor(){super(...arguments);this.hasStarted=!1;this.name="none";this.play=!1;this.delay=0;this.direction="normal";this.duration=1e3;this.easing="linear";this.endDelay=0;this.fill="auto";this.iterations=1/0;this.iterationStart=0;this.playbackRate=1}get currentTime(){var i,n;return(n=(i=this.animation)==null?void 0:i.currentTime)!=null?n:0}set currentTime(i){this.animation&&(this.animation.currentTime=i)}connectedCallback(){super.connectedCallback(),this.createAnimation(),this.handleAnimationCancel=this.handleAnimationCancel.bind(this),this.handleAnimationFinish=this.handleAnimationFinish.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}handleAnimationFinish(){this.play=!1,this.hasStarted=!1,this.emit("sd-finish")}handleAnimationCancel(){this.play=!1,this.hasStarted=!1,this.emit("sd-cancel")}handleSlotChange(){this.destroyAnimation(),this.createAnimation()}async createAnimation(){var o,m;let i=(o=l.easings[this.easing])!=null?o:this.easing,n=(m=this.keyframes)!=null?m:l[this.name],h=(await this.defaultSlot).assignedElements()[0];return!h||!n?!1:(this.destroyAnimation(),this.animation=h.animate(n,{delay:this.delay,direction:this.direction,duration:this.duration,easing:i,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.emit("sd-start")):this.animation.pause(),!0)}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.hasUpdated&&this.createAnimation()}handlePlayChange(){return this.animation?(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.emit("sd-start")),this.play?this.animation.play():this.animation.pause(),!0):!1}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}cancel(){var i;(i=this.animation)==null||i.cancel()}finish(){var i;(i=this.animation)==null||i.finish()}render(){return d`<slot @slotchange="${this.handleSlotChange}"></slot>`}};t.styles=[...r.styles,c`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:contents}`],e([f("slot")],t.prototype,"defaultSlot",2),e([a()],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"play",2),e([a({type:Number})],t.prototype,"delay",2),e([a()],t.prototype,"direction",2),e([a({type:Number})],t.prototype,"duration",2),e([a()],t.prototype,"easing",2),e([a({attribute:"end-delay",type:Number})],t.prototype,"endDelay",2),e([a()],t.prototype,"fill",2),e([a({type:Number})],t.prototype,"iterations",2),e([a({attribute:"iteration-start",type:Number})],t.prototype,"iterationStart",2),e([a({attribute:!1})],t.prototype,"keyframes",2),e([a({attribute:"playback-rate",type:Number})],t.prototype,"playbackRate",2),e([s(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],t.prototype,"handleAnimationChange",1),e([s("play")],t.prototype,"handlePlayChange",1),e([s("playbackRate")],t.prototype,"handlePlaybackRateChange",1),t=e([y("sd-6-12-
|
|
2
|
+
:host{display:contents}`],e([f("slot")],t.prototype,"defaultSlot",2),e([a()],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"play",2),e([a({type:Number})],t.prototype,"delay",2),e([a()],t.prototype,"direction",2),e([a({type:Number})],t.prototype,"duration",2),e([a()],t.prototype,"easing",2),e([a({attribute:"end-delay",type:Number})],t.prototype,"endDelay",2),e([a()],t.prototype,"fill",2),e([a({type:Number})],t.prototype,"iterations",2),e([a({attribute:"iteration-start",type:Number})],t.prototype,"iterationStart",2),e([a({attribute:!1})],t.prototype,"keyframes",2),e([a({attribute:"playback-rate",type:Number})],t.prototype,"playbackRate",2),e([s(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],t.prototype,"handleAnimationChange",1),e([s("play")],t.prototype,"handlePlayChange",1),e([s("playbackRate")],t.prototype,"handlePlaybackRateChange",1),t=e([y("sd-6-12-1-animation")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk.SLXPE3UU.js";import{a as S}from"./chunk.IQPMMUES.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as T,b as h,c as f,d as u,h as y}from"./chunk.JMZGGLJF.js";import{b as k,e as c}from"./chunk.UOAG5PNU.js";import{e as o}from"./chunk.6EV4YU6C.js";var n=class extends y{constructor(){super(...arguments);this.localize=new S(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,l=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,i={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&l,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},v=a.left&&!i.left,m=a.up&&!i.up,E=a.right&&!i.right,b=a.down&&!i.down;(v||m)&&this.dispatchEvent(new CustomEvent("start")),(E||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=i}handleScroll(t,l){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",i=!["mouse","touch"].includes((z=l==null?void 0:l.pointerType)!=null?z:""),v=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[v]:e});let m=`button-${t}`;this.dispatchEvent(new CustomEvent(m,{bubbles:!0,composed:!0}));let b=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&b<=0,H=a==="end"&&b>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-6-12-
|
|
2
|
-
:host{--gradient-color:transparent;--gradient:var(--gradient-color) 0%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 80%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-radius-sm)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1);width:var(--sd-spacing-1)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,transparent 50%,rgba(24,24,24,.4) 100%)}.sd-6-12-
|
|
1
|
+
import{a as s}from"./chunk.SLXPE3UU.js";import{a as S}from"./chunk.IQPMMUES.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as T,b as h,c as f,d as u,h as y}from"./chunk.JMZGGLJF.js";import{b as k,e as c}from"./chunk.UOAG5PNU.js";import{e as o}from"./chunk.6EV4YU6C.js";var n=class extends y{constructor(){super(...arguments);this.localize=new S(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,l=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,i={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&l,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},v=a.left&&!i.left,m=a.up&&!i.up,E=a.right&&!i.right,b=a.down&&!i.down;(v||m)&&this.dispatchEvent(new CustomEvent("start")),(E||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=i}handleScroll(t,l){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",i=!["mouse","touch"].includes((z=l==null?void 0:l.pointerType)!=null?z:""),v=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[v]:e});let m=`button-${t}`;this.dispatchEvent(new CustomEvent(m,{bubbles:!0,composed:!0}));let b=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&b<=0,H=a==="end"&&b>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-6-12-1-icon"))==null||B.setAttribute("label",L),i?p==null||p.focus():g==null||g.blur()}handleButtonBlur(t,l){var i;let d=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(i=l.target.querySelector("sd-6-12-1-icon"))==null||i.setAttribute("label",d)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",l="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return c`<div part="base" class="${r("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?c`${this.isScrollHorizontalEnabled?c`<div part="button-left" class="${r("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${r(t)}" aria-hidden="${s(!this.canScroll.left||void 0)}" tabindex="${s(this.canScroll.left?void 0:-1)}" @click="${e=>this.handleScroll("left",e)}" @blur="${e=>this.handleButtonBlur("left",e)}"><slot name="icon-start"><sd-6-12-1-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-6-12-1-icon></slot></button></div><div part="button-right" class="${r("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${r(t)}" aria-hidden="${s(!this.canScroll.right||void 0)}" tabindex="${s(this.canScroll.right?void 0:-1)}" @click="${e=>this.handleScroll("right",e)}" @blur="${e=>this.handleButtonBlur("right",e)}"><slot name="icon-end"><sd-6-12-1-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-6-12-1-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="button-top" class="${r("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${r(t)}" aria-hidden="${s(!this.canScroll.up||void 0)}" tabindex="${s(this.canScroll.up?void 0:-1)}" @click="${e=>this.handleScroll("up",e)}" @blur="${e=>this.handleButtonBlur("up",e)}"><slot name="icon-start"><sd-6-12-1-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-6-12-1-icon></slot></button></div><div part="button-bottom" class="${r("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${r(t)}" aria-hidden="${s(!this.canScroll.down||void 0)}" tabindex="${s(this.canScroll.down?void 0:-1)}" @click="${e=>this.handleScroll("down",e)}" @blur="${e=>this.handleButtonBlur("down",e)}"><slot name="icon-end"><sd-6-12-1-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-6-12-1-icon></slot></button></div>`:null}`:null} ${this.shadows?c`${this.isScrollHorizontalEnabled?c`<div part="shadow-left" class="${r("left top-0 left-0 w-[6px] h-full",l,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${r("right top-0 right-0 w-[6px] h-full",l,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="shadow-top" class="${r("top top-0 left-0 w-full h-[6px]",l,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${r("bottom bottom-0 left-0 w-full h-[6px]",l,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};n.styles=[...y.styles,k`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--gradient-color:transparent;--gradient:var(--gradient-color) 0%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 80%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-radius-sm)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1);width:var(--sd-spacing-1)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,transparent 50%,rgba(24,24,24,.4) 100%)}.sd-6-12-1-icon--top{align-self:flex-start}.sd-6-12-1-icon--down{align-self:flex-end}`],o([u('[part="button-right"] button')],n.prototype,"rightButton",2),o([u('[part="button-left"] button')],n.prototype,"leftButton",2),o([u('[part="button-bottom"] button')],n.prototype,"downButton",2),o([u('[part="button-top"] button')],n.prototype,"upButton",2),o([u(".scroll-container")],n.prototype,"container",2),o([u("#announcement-container")],n.prototype,"announcementContainer",2),o([h({type:String,reflect:!0})],n.prototype,"orientation",2),o([h({type:Boolean,reflect:!0})],n.prototype,"scrollbars",2),o([h({type:Boolean,reflect:!0})],n.prototype,"buttons",2),o([h({type:Boolean,reflect:!0})],n.prototype,"shadows",2),o([h({type:Boolean,reflect:!0})],n.prototype,"inset",2),o([h({type:Number,reflect:!0})],n.prototype,"step",2),o([f()],n.prototype,"canScroll",2),o([f()],n.prototype,"isScrollHorizontalEnabled",2),o([f()],n.prototype,"isScrollVerticalEnabled",2),n=o([T("sd-6-12-1-scrollable")],n);export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a}from"./chunk.IQPMMUES.js";import{a as m}from"./chunk.3XPSGHFS.js";import{a as i,b as s,h as t}from"./chunk.JMZGGLJF.js";import{b as l,e as o}from"./chunk.UOAG5PNU.js";import{e as r}from"./chunk.6EV4YU6C.js";var e=class extends t{constructor(){super(...arguments);this.color="currentColor";this.localize=new a(this)}render(){return o`<svg role="progressbar" viewBox="0 0 24 24" class="${m("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};e.styles=[...t.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:inline-block;width:1em;height:1em}`],r([s({type:String,reflect:!0})],e.prototype,"color",2),e=r([i("sd-6-12-
|
|
2
|
+
:host{display:inline-block;width:1em;height:1em}`],r([s({type:String,reflect:!0})],e.prototype,"color",2),e=r([i("sd-6-12-1-spinner")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk.I2H6CZK5.js";import{a as z}from"./chunk.2AQOPKKH.js";import{a as L}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as C}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.3XPSGHFS.js";import{a as v}from"./chunk.NYKJXI3Q.js";import{a as x,b as r,d as c,h as b}from"./chunk.JMZGGLJF.js";import{b as k,e as u}from"./chunk.UOAG5PNU.js";import{b as n,e as h}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new z(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=L(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 overlay-color-background pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[var(--width)] h-full",start:"top-0 end-auto bottom-auto start-0 w-[var(--width)] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-6-12-
|
|
2
|
-
:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}:host [part=panel]{outline:1px solid var(--sd-panel-color-border,transparent)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-6-12-
|
|
1
|
+
import{a as g}from"./chunk.I2H6CZK5.js";import{a as z}from"./chunk.2AQOPKKH.js";import{a as L}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as C}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.3XPSGHFS.js";import{a as v}from"./chunk.NYKJXI3Q.js";import{a as x,b as r,d as c,h as b}from"./chunk.JMZGGLJF.js";import{b as k,e as u}from"./chunk.UOAG5PNU.js";import{b as n,e as h}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new z(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=L(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 overlay-color-background pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[var(--width)] h-full",start:"top-0 end-auto bottom-auto start-0 w-[var(--width)] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-6-12-1-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-6-12-1-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-6-12-1-icon></sd-6-12-1-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-6-12-1-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-6-12-1-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-6-12-1-icon></sd-6-12-1-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${p(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};t.styles=[...b.styles,k`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}:host [part=panel]{outline:1px solid var(--sd-panel-color-border,transparent)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-6-12-1-drawer")],t);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y,b as k}from"./chunk.I2H6CZK5.js";import{a as $}from"./chunk.SLXPE3UU.js";import{a as c,c as d}from"./chunk.B2NUKX6G.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as H}from"./chunk.IQPMMUES.js";import{a as o}from"./chunk.3XPSGHFS.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as T,b as s,d as p,h as w}from"./chunk.JMZGGLJF.js";import{b as v,e as u}from"./chunk.UOAG5PNU.js";import{b as n,e as l,f as b}from"./chunk.W4QBFD6E.js";import{e}from"./chunk.6EV4YU6C.js";var m={"top-right":null,"bottom-center":null},E=()=>{Object.entries(m).forEach(([a])=>{let h=document.querySelector(`#sd-toast-stack--${a}`);if(h){h.setAttribute("role","region"),m[a]=h;return}m[a]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${a}`,className:`sd-toast-stack sd-toast-stack--${a}`})})};E();var t=class extends w{constructor(){super(...arguments);this.localize=new H(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return m[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(i){this.closable&&i.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([l(this.base),l(this.wrapper)]),this.wrapper.hidden=!1;let i=d(this,"notification.show",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.show${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([l(this.base),l(this.wrapper)]);let i=d(this,"notification.hide",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.hide${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}async toast(){return new Promise(i=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),i()},{once:!0})})}render(){return u`<div part="base" class="${o("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="${$(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${o("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${o("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-6-12-
|
|
2
|
-
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([p('[part~="base"]')],t.prototype,"base",2),e([p('[part~="wrapper"]')],t.prototype,"wrapper",2),e([p('[part~="close-button"]')],t.prototype,"close",2),e([s({type:String,reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number,reflect:!0})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-6-12-
|
|
1
|
+
import{a as y,b as k}from"./chunk.I2H6CZK5.js";import{a as $}from"./chunk.SLXPE3UU.js";import{a as c,c as d}from"./chunk.B2NUKX6G.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as H}from"./chunk.IQPMMUES.js";import{a as o}from"./chunk.3XPSGHFS.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as T,b as s,d as p,h as w}from"./chunk.JMZGGLJF.js";import{b as v,e as u}from"./chunk.UOAG5PNU.js";import{b as n,e as l,f as b}from"./chunk.W4QBFD6E.js";import{e}from"./chunk.6EV4YU6C.js";var m={"top-right":null,"bottom-center":null},E=()=>{Object.entries(m).forEach(([a])=>{let h=document.querySelector(`#sd-toast-stack--${a}`);if(h){h.setAttribute("role","region"),m[a]=h;return}m[a]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${a}`,className:`sd-toast-stack sd-toast-stack--${a}`})})};E();var t=class extends w{constructor(){super(...arguments);this.localize=new H(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return m[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(i){this.closable&&i.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([l(this.base),l(this.wrapper)]),this.wrapper.hidden=!1;let i=d(this,"notification.show",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.show${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([l(this.base),l(this.wrapper)]);let i=d(this,"notification.hide",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.hide${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}async toast(){return new Promise(i=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),i()},{once:!0})})}render(){return u`<div part="base" class="${o("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="${$(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${o("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${o("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-6-12-1-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-6-12-1-icon></slot><div part="content" class="${o("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 sd-6-12-1-notification-color-border",{info:"sd-6-12-1-notification--info-color-background",success:"sd-6-12-1-notification--success-color-background",warning:"sd-6-12-1-notification--warning-color-background",error:"sd-6-12-1-notification--error-color-background"}[this.variant])}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-6-12-1-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-6-12-1-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-6-12-1-icon></sd-6-12-1-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${o("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border sd-6-12-1-notification-color-border"></div>`:""}</div></div>`}};t.styles=[...w.styles,v`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([p('[part~="base"]')],t.prototype,"base",2),e([p('[part~="wrapper"]')],t.prototype,"wrapper",2),e([p('[part~="close-button"]')],t.prototype,"close",2),e([s({type:String,reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number,reflect:!0})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-6-12-1-notification")],t);c("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});c("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});c("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});c("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk.3XPSGHFS.js";import{a as l,b as r,h as o}from"./chunk.JMZGGLJF.js";import{b as i,e as a}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return a`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"sd-6-12-
|
|
2
|
-
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-6-12-
|
|
1
|
+
import{a as n}from"./chunk.3XPSGHFS.js";import{a as l,b as r,h as o}from"./chunk.JMZGGLJF.js";import{b as i,e as a}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return a`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"sd-6-12-1-divider--inverted-color-border":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,i`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-6-12-1-divider[orientation=horizontal]){display:block}:host(sd-6-12-1-divider[orientation=vertical]){display:inline-block}`],e([r({type:String,reflect:!0})],t.prototype,"orientation",2),e([r({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=e([l("sd-6-12-1-divider")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function h(d,{setValueOnSelection:l,scrollSelectionIntoView:p}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=d?typeof d=="string"?document.querySelector(d):d:document.querySelector("#autoComplete"),n=r.shadowRoot.querySelector("input"),c=e=>e[0];return n.addEventListener("init",()=>{var a,s;let e=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");e==null||e.setAttribute("part","listbox");let t=document.createElement("sd-6-12-
|
|
2
|
-
sd-6-12-
|
|
1
|
+
function h(d,{setValueOnSelection:l,scrollSelectionIntoView:p}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=d?typeof d=="string"?document.querySelector(d):d:document.querySelector("#autoComplete"),n=r.shadowRoot.querySelector("input"),c=e=>e[0];return n.addEventListener("init",()=>{var a,s;let e=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");e==null||e.setAttribute("part","listbox");let t=document.createElement("sd-6-12-1-popup");t.appendChild(e),(s=r.shadowRoot)==null||s.appendChild(t),t==null||t.setAttribute("exportparts","popup__content"),t&&(t.active=!1,t.autoSize="vertical",t.autoSizePadding=16,t.placement="bottom-start",t.anchor=r,t.sync="width");let i=c`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
sd-6-12-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll;border-bottom-right-radius:var(--sd-radius);border-bottom-left-radius:var(--sd-radius);border-style:var(--tw-border-style);border-width:var(--sd-border-width-2);border-top-style:var(--tw-border-style);border-top-width:0;border-color:rgba(var(--sd-color-border-primary));background-color:rgba(var(--sd-color-background-white));padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-6-12-1-popup li{transition-property:all;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))}sd-6-12-1-popup li:hover:not([disabled]){background-color:rgba(var(--sd-color-background-neutral-100))}sd-6-12-1-popup li{list-style-type:''}sd-6-12-1-popup li mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}sd-6-12-1-popup li:not(:has(sd-6-12-1-option)){cursor:pointer;padding-inline:var(--sd-spacing-4);padding-block:var(--sd-spacing-3);font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)));color:rgba(var(--sd-color-text-black))}sd-6-12-1-popup li:not(:has(sd-6-12-1-option)):hover{background-color:rgba(var(--sd-color-background-neutral-200))}sd-6-12-1-popup li[aria-selected=true]{background-color:rgba(var(--sd-color-background-neutral-200))}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:"*";inherits:false}`,o=new CSSStyleSheet;o.replaceSync(i),r.shadowRoot.adoptedStyleSheets=[...r.shadowRoot.adoptedStyleSheets,o]}),l&&n.addEventListener("selection",e=>{var t;r.value=(t=e==null?void 0:e.detail)==null?void 0:t.selection.value}),n.addEventListener("open",()=>{var e,t,i,o,a,s;(t=(e=r.shadowRoot)==null?void 0:e.querySelector("sd-6-12-1-popup"))==null||t.setAttribute("active","true"),(o=(i=r.shadowRoot)==null?void 0:i.querySelector('[part="border"]'))==null||o.classList.add("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.add("z-50")}),n.addEventListener("close",()=>{var e,t,i,o,a,s;(t=(e=r.shadowRoot)==null?void 0:e.querySelector("sd-6-12-1-popup"))==null||t.removeAttribute("active"),(o=(i=r.shadowRoot)==null?void 0:i.querySelector('[part="border"]'))==null||o.classList.remove("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.remove("z-50")}),p&&n.addEventListener("navigate",()=>{let e=r.shadowRoot.querySelector('[aria-selected="true"]');e==null||e.scrollIntoView({block:"nearest"})}),{config:{selector:()=>n,resultsList:{tag:"ul"},wrapper:!1}}}export{h as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as h,b as a,c as d,d as c,h as s}from"./chunk.JMZGGLJF.js";import{b as l,e as n}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new p(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex",{white:"bg-white","white border-neutral-400":"bg-white border sd-6-12-
|
|
2
|
-
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([c('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-6-12-
|
|
1
|
+
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as h,b as a,c as d,d as c,h as s}from"./chunk.JMZGGLJF.js";import{b as l,e as n}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new p(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex",{white:"bg-white","white border-neutral-400":"bg-white border sd-6-12-1-teaser--neutral-400-color-border","neutral-100":"sd-6-12-1-teaser--neutral-100-color-background",primary:"bg-primary text-white","primary-100":"sd-6-12-1-teaser--primary-100-color-background"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&i&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${i?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${r("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&i&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${r("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${r("order-1",!i&&this._orientation==="vertical"&&"mb-4",!o["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};t.styles=[...s.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([c('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-6-12-1-teaser")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=t=>Array.from(t.assignedElements({flatten:!0})),o=t=>t.tagName.toLocaleLowerCase()==="sd-6-12-
|
|
1
|
+
var p=t=>Array.from(t.assignedElements({flatten:!0})),o=t=>t.tagName.toLocaleLowerCase()==="sd-6-12-1-option"?t:Array.from(t.querySelectorAll(":scope > sd-6-12-1-option")),e=t=>t.tagName.toLocaleLowerCase()==="sd-6-12-1-optgroup",r=t=>t.map(o),n=t=>t.filter(e),s=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();export{p as a,o as b,e as c,r as d,n as e,s as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk.SLXPE3UU.js";import{a,b as d}from"./chunk.SV6DES3E.js";import{a as b}from"./chunk.IQPMMUES.js";import{a as l}from"./chunk.3XPSGHFS.js";import{a as h,b as i,d as f,h as n}from"./chunk.JMZGGLJF.js";import{b as u}from"./chunk.UOAG5PNU.js";import{e as r}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.localize=new b(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(),o=this.removable&&!this.selected&&!this.toggleable,c=t?a`a`:o?a`div`:a`button`;return d`<${c} part="base" type="${s(t?void 0:"button")}" href="${s(t?this.href:void 0)}" rel="${s(t&&this.target?"noreferrer noopener":void 0)}" target="${s(t?this.target:void 0)}" download="${s(t?this.download:void 0)}" ?disabled="${s(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${s(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||o?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${l("flex border box-border sd-6-12-
|
|
2
|
-
: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}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],r([f("a, button, div")],e.prototype,"tag",2),r([i({type:String,reflect:!0})],e.prototype,"size",2),r([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),r([i({type:Boolean,reflect:!0})],e.prototype,"toggleable",2),r([i({type:Boolean,reflect:!0})],e.prototype,"removable",2),r([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([i({type:String,reflect:!0})],e.prototype,"href",2),r([i({type:String,reflect:!0})],e.prototype,"target",2),r([i({reflect:!0})],e.prototype,"download",2),e=r([h("sd-6-12-
|
|
1
|
+
import{a as s}from"./chunk.SLXPE3UU.js";import{a,b as d}from"./chunk.SV6DES3E.js";import{a as b}from"./chunk.IQPMMUES.js";import{a as l}from"./chunk.3XPSGHFS.js";import{a as h,b as i,d as f,h as n}from"./chunk.JMZGGLJF.js";import{b as u}from"./chunk.UOAG5PNU.js";import{e as r}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.localize=new b(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(),o=this.removable&&!this.selected&&!this.toggleable,c=t?a`a`:o?a`div`:a`button`;return d`<${c} part="base" type="${s(t?void 0:"button")}" href="${s(t?this.href:void 0)}" rel="${s(t&&this.target?"noreferrer noopener":void 0)}" target="${s(t?this.target:void 0)}" download="${s(t?this.download:void 0)}" ?disabled="${s(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${s(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||o?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${l("flex border box-border sd-6-12-1-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 sd-6-12-1-tag-font-weight sd-6-12-1-tag--size-lg-font-size gap-2",sm:"h-6 sd-6-12-1-tag-font-weight sd-6-12-1-tag--size-sm-font-size gap-1"}[this.size],{lg:o?"pl-4 pr-3 py-2":"px-4 py-2",sm:o?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"sd-6-12-1-tag--selected-border-width sd-6-12-1-tag--selected--default-color-background sd-6-12-1-tag--selected--default-color-border sd-6-12-1-tag--selected--default-color-text hover:sd-6-12-1-tag--selected--hover-color-background hover:sd-6-12-1-tag--selected--hover-color-border hover:sd-6-12-1-tag--selected--hover-color-text disabled:bg-neutral-500 disabled:sd-6-12-1-tag--disabled-color-border":l("sd-6-12-1-tag--default-color-border sd-6-12-1-tag--default-color-text disabled:sd-6-12-1-tag--disabled-color-border disabled:text-neutral-500",o?"sd-6-12-1-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-6-12-1-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-6-12-1-tag--default--hover-color-background"),this.disabled&&!t&&"cursor-not-allowed")}"><slot name="icon-left" class="${l("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${o&&!t?d`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-6-12-1-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-6-12-1-icon></slot></button>`:""}</${c}>`}};e.styles=[...n.styles,u`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
: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}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],r([f("a, button, div")],e.prototype,"tag",2),r([i({type:String,reflect:!0})],e.prototype,"size",2),r([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),r([i({type:Boolean,reflect:!0})],e.prototype,"toggleable",2),r([i({type:Boolean,reflect:!0})],e.prototype,"removable",2),r([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([i({type:String,reflect:!0})],e.prototype,"href",2),r([i({type:String,reflect:!0})],e.prototype,"target",2),r([i({reflect:!0})],e.prototype,"download",2),e=r([h("sd-6-12-1-tag")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as s}from"./chunk.SLXPE3UU.js";import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as h,b as i,d as c,h as a}from"./chunk.JMZGGLJF.js";import{b as o,e as n}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(l){this.visuallyDisabled&&(l.preventDefault(),l.stopPropagation())}focus(l){this.button.focus(l)}blur(){this.button.blur()}render(){let l={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r(this.standalone?"flex items-start":"inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:interactive--active-color-text focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"])}" href="${s(this.href||void 0)}" target="${s(this.target||void 0)}" download="${s(this.download)}" rel="${s(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",l["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",l["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...a.styles,o`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
::slotted(sd-6-12-
|
|
2
|
+
::slotted(sd-6-12-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-6-12-1-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-6-12-1-icon){font-size:var(--sd-text-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],t([c("a")],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([i({type:String,reflect:!0})],e.prototype,"href",2),t([i({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([i({type:String,reflect:!0})],e.prototype,"target",2),t([i({reflect:!0})],e.prototype,"download",2),e=t([h("sd-6-12-1-link")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk.YQH4KNT6.js";import{a as $}from"./chunk.W4EADN3G.js";import{b as x}from"./chunk.RAP66B6O.js";import{a}from"./chunk.SLXPE3UU.js";import{a as C}from"./chunk.CGQ2BPPZ.js";import{a as s}from"./chunk.3XPSGHFS.js";import{a as d}from"./chunk.NYKJXI3Q.js";import{a as g,b as i,c,d as b,h as m}from"./chunk.JMZGGLJF.js";import{b as y,e as o}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new x(this);this.hasSlotController=new C(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,r,n="none"){this.textarea.setSelectionRange(l,r,n)}setRangeText(l,r,n,p){this.textarea.setRangeText(l,r,n,p),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},r=this.label?!0:!!l.label,n=this.helpText?!0:!!l.helpText,p=!!l.tooltip,V=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&r&&(this.hasFocus&&!this.visuallyDisabled||V),u=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",f=this.size==="sm"?"text-sm":"text-base",v={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return o`<div part="form-control" class="flex flex-col h-full text-left">${r&&!this.floatingLabel||p?o`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(r?"inline-block form-control-color-text":"hidden",f)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?o`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}">${r&&this.floatingLabel?o`<label id="label" part="form-control-floating-label" class="${s("absolute left-4 z-20 pointer-events-none transition-all duration-200",f,h?"top-2 text-xs":"top-2.5")}" for="input"><span class="${s("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[u])}"></div><div part="base" class="${s("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",this.floatingLabel&&"pt-6",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",u==="disabled"||u==="visuallyDisabled"?"text-neutral-500":"form-control-color-text",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-12-
|
|
2
|
-
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([b("#input")],t.prototype,"textarea",2),e([b("#invalid-message")],t.prototype,"invalidMessage",2),e([c()],t.prototype,"hasFocus",2),e([c()],t.prototype,"showValidStyle",2),e([c()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([$()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),e([d(["size","floatingLabel"])],t.prototype,"handleSizeChange",1),t=e([g("sd-6-12-
|
|
1
|
+
import{a as w}from"./chunk.YQH4KNT6.js";import{a as $}from"./chunk.W4EADN3G.js";import{b as x}from"./chunk.RAP66B6O.js";import{a}from"./chunk.SLXPE3UU.js";import{a as C}from"./chunk.CGQ2BPPZ.js";import{a as s}from"./chunk.3XPSGHFS.js";import{a as d}from"./chunk.NYKJXI3Q.js";import{a as g,b as i,c,d as b,h as m}from"./chunk.JMZGGLJF.js";import{b as y,e as o}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new x(this);this.hasSlotController=new C(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,r,n="none"){this.textarea.setSelectionRange(l,r,n)}setRangeText(l,r,n,p){this.textarea.setRangeText(l,r,n,p),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},r=this.label?!0:!!l.label,n=this.helpText?!0:!!l.helpText,p=!!l.tooltip,V=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&r&&(this.hasFocus&&!this.visuallyDisabled||V),u=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",f=this.size==="sm"?"text-sm":"text-base",v={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return o`<div part="form-control" class="flex flex-col h-full text-left">${r&&!this.floatingLabel||p?o`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(r?"inline-block form-control-color-text":"hidden",f)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?o`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}">${r&&this.floatingLabel?o`<label id="label" part="form-control-floating-label" class="${s("absolute left-4 z-20 pointer-events-none transition-all duration-200",f,h?"top-2 text-xs":"top-2.5")}" for="input"><span class="${s("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[u])}"></div><div part="base" class="${s("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",this.floatingLabel&&"pt-6",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",u==="disabled"||u==="visuallyDisabled"?"text-neutral-500":"form-control-color-text",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-12-1-icon]:pe-8",{sm:h?"pb-1":"py-2",md:h?"pb-1":"py-2",lg:h?"pb-2":"py-2"}[this.size],this.disabled&&"cursor-not-allowed",f)}" title="${this.title}" name="${a(this.name)}" .value="${w(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel||h?a(this.placeholder):""}" minlength="${a(this.minlength)}" maxlength="${a(this.maxlength)}" rows="${a(this.rows)}" autocapitalize="${a(this.autocapitalize)}" autocorrect="${a(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${a(this.spellcheck)}" enterkeyhint="${a(this.enterkeyhint)}" inputmode="${a(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?o`<sd-6-12-1-icon class="${s("text-error absolute right-4 pointer-events-none",v)}" library="_internal" name="risk" part="invalid-icon"></sd-6-12-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-6-12-1-icon class="${s("text-success absolute right-4 pointer-events-none",v)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-12-1-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${s("text-sm text-neutral-700 mt-1",n&&!this.showInvalidStyle?"block":"hidden")}" aria-hidden="${!n||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...m.styles,y`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([b("#input")],t.prototype,"textarea",2),e([b("#invalid-message")],t.prototype,"invalidMessage",2),e([c()],t.prototype,"hasFocus",2),e([c()],t.prototype,"showValidStyle",2),e([c()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([$()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),e([d(["size","floatingLabel"])],t.prototype,"handleSizeChange",1),t=e([g("sd-6-12-1-textarea")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk.CGQ2BPPZ.js";import{a as y}from"./chunk.IQPMMUES.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as g,b as d,c as o,d as u,h as p}from"./chunk.JMZGGLJF.js";import{b as v,e as a}from"./chunk.UOAG5PNU.js";import{a as h}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends p{constructor(){super();this.localize=new y(this);this.hasSlotController=new f(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=e=>this.localize.term("seconds",Number(e).toFixed(0)),this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let s=e.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=e,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let s=Math.floor(e/60).toString().padStart(2,"0"),c=Math.floor(e%60).toString().padStart(2,"0");return`${s}:${c}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var e;(e=this.audioElement)==null||e.pause()}handleThumbRelease(){var e;this.isPlaying&&((e=this.audioElement)==null||e.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let s=e.match(/\d+/g);if((s==null?void 0:s.length)===3){let c=parseInt(s[0]),m=parseInt(s[1]),n=parseInt(s[2]),l=b=>b.toString(16).padStart(2,"0");return`#${l(c)}${l(m)}${l(n)}`.toUpperCase()}return null}onThemeChange(){this.clear(),setTimeout(this.initAnimation.bind(this),this.token("--sd-duration-fast",150))}initAnimation(){var l;let e=(l=this.canvas)==null?void 0:l.getContext("2d");if(!e)return;this.context=e;let s=this.audioPlayerContainer.querySelector(".playback-speed"),m=window.getComputedStyle(s).color,n=this.inverted?"#FFFFFF33":this.rgbToHex(m)+"33";this.waveList=[new h({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=a`<div class="${r("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${r("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-6-12-
|
|
2
|
-
sd-6-12-
|
|
1
|
+
import{a as f}from"./chunk.CGQ2BPPZ.js";import{a as y}from"./chunk.IQPMMUES.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as g,b as d,c as o,d as u,h as p}from"./chunk.JMZGGLJF.js";import{b as v,e as a}from"./chunk.UOAG5PNU.js";import{a as h}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends p{constructor(){super();this.localize=new y(this);this.hasSlotController=new f(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=e=>this.localize.term("seconds",Number(e).toFixed(0)),this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let s=e.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=e,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let s=Math.floor(e/60).toString().padStart(2,"0"),c=Math.floor(e%60).toString().padStart(2,"0");return`${s}:${c}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var e;(e=this.audioElement)==null||e.pause()}handleThumbRelease(){var e;this.isPlaying&&((e=this.audioElement)==null||e.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let s=e.match(/\d+/g);if((s==null?void 0:s.length)===3){let c=parseInt(s[0]),m=parseInt(s[1]),n=parseInt(s[2]),l=b=>b.toString(16).padStart(2,"0");return`#${l(c)}${l(m)}${l(n)}`.toUpperCase()}return null}onThemeChange(){this.clear(),setTimeout(this.initAnimation.bind(this),this.token("--sd-duration-fast",150))}initAnimation(){var l;let e=(l=this.canvas)==null?void 0:l.getContext("2d");if(!e)return;this.context=e;let s=this.audioPlayerContainer.querySelector(".playback-speed"),m=window.getComputedStyle(s).color,n=this.inverted?"#FFFFFF33":this.rgbToHex(m)+"33";this.waveList=[new h({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new h({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=a`<div class="${r("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${r("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-6-12-1-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?a`<slot name="pause-icon"><sd-6-12-1-icon class="text-xl" name="pause" library="_internal"></sd-6-12-1-icon></slot>`:a`<slot name="play-icon"><sd-6-12-1-icon class="text-xl" name="start" library="_internal"></sd-6-12-1-icon></slot>`}</sd-6-12-1-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?a`<button class="${r("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-6-12-1-icon class="w-6 h-6" name="transcript" library="_internal"></sd-6-12-1-icon></button>`:null} <button class="${r("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-6-12-1-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-6-12-1-icon></button></div></div>`,s=a`<div class="${r("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${r("current-time text-sm",this.inverted?"text-primary-400":"sd-6-12-1-audio__timestamp-color-text")}">${this.currentTime}</div><div class="${r("current-time text-sm",this.inverted?"text-primary-400":"sd-6-12-1-audio__timestamp-color-text")}">${this.duration}</div></div>`;return a`<div class="${r("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?e:null}<div class="relative">${this.animated&&!this.reversedLayout?a`${e}`:null} ${this.animated?a`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?s:null}<sd-6-12-1-range part="progress-slider" tooltip="hidden" min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-6-12-1-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-6-12-1-range></div>${this.hasSlotController.test("transcript")?a`<sd-6-12-1-drawer><slot name="transcript"></slot></sd-6-12-1-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?s:null}</div><sd-6-12-1-theme-listener></sd-6-12-1-theme-listener>`}};t.styles=[...p.styles,v`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
sd-6-12-1-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-spacing-12);align-items:center;justify-content:center;border-radius:var(--sd-radius-full)}sd-6-12-1-button::part(motion-wrapper){border-radius:var(--sd-radius-full)}sd-6-12-1-button::part(label){display:flex;flex-grow:0;align-items:center}sd-6-12-1-range::part(form-control-label){display:none}:host([inverted]) sd-6-12-1-range::part(thumb){outline-color:var(--color-white,#fff);background-color:rgba(var(--sd-color-border-white,rgba(var(--sd-color-white))))}:host([animated]) sd-6-12-1-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-6-12-1-range::part(track){background-color:rgba(var(--sd-color-border-primary-400,rgba(var(--sd-color-primary-400))))}:host([inverted]:not([animated])) sd-6-12-1-range::part(active-track){background-color:rgba(var(--sd-color-border-white,rgba(var(--sd-color-white))))}`],i([d({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([d({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([d({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([d({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([d({type:Number,reflect:!0})],t.prototype,"speed",2),i([o()],t.prototype,"currentTime",2),i([o()],t.prototype,"duration",2),i([o()],t.prototype,"isPlaying",2),i([o()],t.prototype,"isMuted",2),i([o()],t.prototype,"isTranscriptOpen",2),i([o()],t.prototype,"progress",2),i([u('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([u('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([u("sd-6-12-1-drawer")],t.prototype,"drawer",2),i([u("canvas")],t.prototype,"canvas",2),t=i([g("sd-6-12-1-audio")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as l,h as a}from"./chunk.JMZGGLJF.js";import{b as r,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return d`<header class="w-full sd-6-12-
|
|
2
|
-
:host{position:relative;z-index:var(--sd-z-index-header,600);display:block}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{position:fixed;top:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);width:100%}:host([fixed]) header::after{position:absolute;top:100%;right:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);height:var(--sd-spacing-2);--tw-content:'';content:var(--tw-content);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],t([n({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([l("header")],e.prototype,"header",2),t([o(100)],e.prototype,"updateCalculatedHeight",1),e=t([s("sd-6-12-
|
|
1
|
+
import{a as o}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as l,h as a}from"./chunk.JMZGGLJF.js";import{b as r,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return d`<header class="w-full sd-6-12-1-header-color-background relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...a.styles,r`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;z-index:var(--sd-z-index-header,600);display:block}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{position:fixed;top:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);width:100%}:host([fixed]) header::after{position:absolute;top:100%;right:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);height:var(--sd-spacing-2);--tw-content:'';content:var(--tw-content);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],t([n({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([l("header")],e.prototype,"header",2),t([o(100)],e.prototype,"updateCalculatedHeight",1),e=t([s("sd-6-12-1-header")],e);export{e as a};
|