@solid-design-system/components 6.1.0 → 6.2.0
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.IIGXKYVW.js → chunk.3CJKJUTD.js} +3 -3
- package/cdn/chunks/{chunk.IGJNISFF.js → chunk.HYUIC2O6.js} +1 -1
- package/cdn/chunks/{chunk.73OYFFQV.js → chunk.S7VIPIYX.js} +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +5 -5
- package/cdn/solid-components.iife.js +5 -5
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2DPSCPM4.js +2 -2
- package/cdn-versioned/chunks/chunk.2HJLVWCE.js +2 -2
- package/cdn-versioned/chunks/chunk.2KV3QDYA.js +2 -2
- package/cdn-versioned/chunks/{chunk.IIGXKYVW.js → chunk.3CJKJUTD.js} +5 -5
- package/cdn-versioned/chunks/chunk.3ETEQAPR.js +2 -2
- package/cdn-versioned/chunks/chunk.47H4SDKN.js +2 -2
- package/cdn-versioned/chunks/chunk.4LGCXG7D.js +2 -2
- package/cdn-versioned/chunks/chunk.4P5PT6MV.js +2 -2
- package/cdn-versioned/chunks/chunk.5M2K2EXR.js +2 -2
- package/cdn-versioned/chunks/chunk.5OE2GCRH.js +2 -2
- package/cdn-versioned/chunks/chunk.6GU6NFBF.js +1 -1
- package/cdn-versioned/chunks/chunk.745GDIND.js +2 -2
- package/cdn-versioned/chunks/chunk.ALCKOGA7.js +1 -1
- package/cdn-versioned/chunks/chunk.BZ3VHECJ.js +3 -3
- package/cdn-versioned/chunks/chunk.C44GZOLG.js +9 -9
- package/cdn-versioned/chunks/chunk.C4QT4K6T.js +2 -2
- package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
- package/cdn-versioned/chunks/chunk.CJ34NUTS.js +1 -1
- package/cdn-versioned/chunks/chunk.CMY3VPYA.js +2 -2
- package/cdn-versioned/chunks/chunk.D5FVDNYV.js +2 -2
- package/cdn-versioned/chunks/chunk.DC6UQXYF.js +2 -2
- package/cdn-versioned/chunks/chunk.DEEJ4ON7.js +2 -2
- package/cdn-versioned/chunks/chunk.DXGVZ3KG.js +1 -1
- package/cdn-versioned/chunks/chunk.E64WXH47.js +1 -1
- package/cdn-versioned/chunks/chunk.EASLRW3B.js +2 -2
- package/cdn-versioned/chunks/chunk.G42N3VHE.js +2 -2
- package/cdn-versioned/chunks/chunk.GP2QVZP5.js +1 -1
- package/cdn-versioned/chunks/chunk.H77CNSMK.js +2 -2
- package/cdn-versioned/chunks/chunk.H7S7D4YV.js +2 -2
- package/cdn-versioned/chunks/chunk.HHASCDC2.js +5 -5
- package/cdn-versioned/chunks/{chunk.IGJNISFF.js → chunk.HYUIC2O6.js} +2 -2
- package/cdn-versioned/chunks/chunk.I234MSSB.js +2 -2
- package/cdn-versioned/chunks/chunk.I3TTTGLW.js +1 -1
- package/cdn-versioned/chunks/chunk.IAEOXYGB.js +1 -1
- package/cdn-versioned/chunks/chunk.JRSX44R6.js +2 -2
- package/cdn-versioned/chunks/chunk.KKKGNXIR.js +2 -2
- package/cdn-versioned/chunks/chunk.KM5W4EDY.js +2 -2
- package/cdn-versioned/chunks/chunk.L6PAHLSN.js +2 -2
- package/cdn-versioned/chunks/chunk.MWO5B7BA.js +2 -2
- package/cdn-versioned/chunks/chunk.OAVVKKBJ.js +2 -2
- package/cdn-versioned/chunks/chunk.OG2BQH6T.js +2 -2
- package/cdn-versioned/chunks/chunk.PPIS2HQ5.js +1 -1
- package/cdn-versioned/chunks/chunk.PRGLNPUF.js +1 -1
- package/cdn-versioned/chunks/chunk.PT6G5HKE.js +1 -1
- package/cdn-versioned/chunks/chunk.QJ2LWN24.js +2 -2
- package/cdn-versioned/chunks/chunk.QMKNC76J.js +2 -2
- package/cdn-versioned/chunks/chunk.QUGI3FMS.js +2 -2
- package/cdn-versioned/chunks/chunk.RBVWPWFK.js +2 -2
- package/cdn-versioned/chunks/chunk.RKKB23ZF.js +3 -3
- package/cdn-versioned/chunks/chunk.S4II2NTI.js +2 -2
- package/cdn-versioned/chunks/{chunk.73OYFFQV.js → chunk.S7VIPIYX.js} +2 -2
- package/cdn-versioned/chunks/chunk.TWTQHJPN.js +2 -2
- package/cdn-versioned/chunks/chunk.U44PXBV2.js +2 -2
- package/cdn-versioned/chunks/chunk.U5N7L5RI.js +2 -2
- package/cdn-versioned/chunks/chunk.UVRZTPOZ.js +2 -2
- package/cdn-versioned/chunks/chunk.VAUP57XZ.js +2 -2
- package/cdn-versioned/chunks/chunk.VMUNNUNV.js +1 -1
- package/cdn-versioned/chunks/chunk.VTDQOKJM.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.XAPH6XNH.js +2 -2
- package/cdn-versioned/chunks/chunk.XTRMRKZ6.js +2 -2
- package/cdn-versioned/chunks/chunk.Z6TAAGCD.js +2 -2
- package/cdn-versioned/chunks/chunk.ZTELVJ34.js +1 -1
- package/cdn-versioned/chunks/chunk.ZVHLKL7F.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/option/option.js +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/select/select.js +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/tag/tag.js +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 +244 -244
- package/cdn-versioned/internal/form.js +3 -3
- 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 +94 -94
- package/cdn-versioned/web-types.json +157 -157
- package/dist/chunks/{chunk.BTZPMBVC.js → chunk.NW7LJJS2.js} +1 -1
- package/dist/chunks/{chunk.4CS6FZHE.js → chunk.UWQPJU3Q.js} +7 -2
- package/dist/chunks/{chunk.CBKLWEL2.js → chunk.XC7QKBQE.js} +7 -7
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/option/option.js +1 -1
- package/dist/components/select/select.js +2 -2
- package/dist/components/tag/tag.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +3 -3
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.22PWID5B.js +2 -2
- package/dist-versioned/chunks/chunk.2EWH2DC2.js +1 -1
- package/dist-versioned/chunks/chunk.2HTII44Q.js +4 -4
- package/dist-versioned/chunks/chunk.2VPWVTT6.js +4 -4
- package/dist-versioned/chunks/chunk.3EJL5IKL.js +1 -1
- package/dist-versioned/chunks/chunk.3PTRIEGP.js +2 -2
- package/dist-versioned/chunks/chunk.4UT3FCHQ.js +2 -2
- package/dist-versioned/chunks/chunk.5XWO3USG.js +3 -3
- package/dist-versioned/chunks/chunk.75WDCMIC.js +24 -24
- package/dist-versioned/chunks/chunk.ASEJW6QN.js +5 -5
- package/dist-versioned/chunks/chunk.AUSBWPVD.js +7 -7
- package/dist-versioned/chunks/chunk.AZPOFDJP.js +4 -4
- package/dist-versioned/chunks/chunk.BBLAIT57.js +2 -2
- package/dist-versioned/chunks/chunk.BSP6J6R2.js +2 -2
- package/dist-versioned/chunks/chunk.BTNS6ZNO.js +4 -4
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +3 -3
- package/dist-versioned/chunks/chunk.D7CJJHHA.js +1 -1
- package/dist-versioned/chunks/chunk.DCHRUIDY.js +1 -1
- package/dist-versioned/chunks/chunk.DCOB6WLB.js +3 -3
- package/dist-versioned/chunks/chunk.DFHY67LW.js +5 -5
- package/dist-versioned/chunks/chunk.DTTVI7KT.js +11 -11
- package/dist-versioned/chunks/chunk.DXDDB6AB.js +1 -1
- package/dist-versioned/chunks/chunk.DZEAXPRA.js +4 -4
- package/dist-versioned/chunks/chunk.FKFGVTXH.js +3 -3
- package/dist-versioned/chunks/chunk.FSUOT4WC.js +12 -12
- package/dist-versioned/chunks/chunk.IJIPMNT2.js +3 -3
- package/dist-versioned/chunks/chunk.IYXPHPNO.js +1 -1
- package/dist-versioned/chunks/chunk.JGRI4R23.js +1 -1
- package/dist-versioned/chunks/chunk.K66JHYHC.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.L3OEOSPQ.js +1 -1
- package/dist-versioned/chunks/chunk.L6ZE3RXX.js +14 -14
- package/dist-versioned/chunks/chunk.LBDV5GNR.js +4 -4
- package/dist-versioned/chunks/chunk.M2D3WWF3.js +8 -8
- package/dist-versioned/chunks/chunk.MH7JHBWP.js +2 -2
- package/dist-versioned/chunks/chunk.MLRNCOWA.js +3 -3
- package/dist-versioned/chunks/chunk.N3I674PE.js +12 -12
- package/dist-versioned/chunks/chunk.NEUULRS7.js +5 -5
- package/dist-versioned/chunks/{chunk.BTZPMBVC.js → chunk.NW7LJJS2.js} +8 -8
- package/dist-versioned/chunks/chunk.OJXVBFUH.js +5 -5
- package/dist-versioned/chunks/chunk.P5FGSFP3.js +1 -1
- package/dist-versioned/chunks/chunk.PBXAIJQ4.js +5 -5
- package/dist-versioned/chunks/chunk.Q7ZMX7IB.js +3 -3
- package/dist-versioned/chunks/chunk.QM4E25CD.js +5 -5
- package/dist-versioned/chunks/chunk.R56JDQAF.js +2 -2
- package/dist-versioned/chunks/chunk.RFDAZXJG.js +3 -3
- package/dist-versioned/chunks/chunk.SCWR4Q4K.js +10 -10
- package/dist-versioned/chunks/chunk.SQYISG5I.js +4 -4
- package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
- package/dist-versioned/chunks/chunk.TKDFONFB.js +3 -3
- package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
- package/dist-versioned/chunks/chunk.TVWV4PUH.js +2 -2
- package/dist-versioned/chunks/chunk.U2BN2DBY.js +4 -4
- package/dist-versioned/chunks/chunk.UDPSGKZL.js +4 -4
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UPCVQSXM.js +3 -3
- package/dist-versioned/chunks/{chunk.4CS6FZHE.js → chunk.UWQPJU3Q.js} +10 -5
- package/dist-versioned/chunks/chunk.XALPLS2Y.js +6 -6
- package/dist-versioned/chunks/{chunk.CBKLWEL2.js → chunk.XC7QKBQE.js} +31 -31
- package/dist-versioned/chunks/chunk.XV2UO6TF.js +2 -2
- package/dist-versioned/chunks/chunk.YATRFNET.js +28 -28
- package/dist-versioned/chunks/chunk.YFRD2UEO.js +8 -8
- package/dist-versioned/chunks/chunk.YNBR5ZDU.js +4 -4
- package/dist-versioned/chunks/chunk.ZMEUQIVY.js +9 -9
- 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/option/option.js +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/select/select.js +2 -2
- 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/tag/tag.js +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 +244 -244
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +3 -3
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +157 -157
- package/package.json +1 -1
|
@@ -196,7 +196,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
196
196
|
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],Ce=a([k("sd-carousel-item")],Ce);var J=class extends g{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new Ir(this,()=>this.next());this.scrollController=new Xi(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new O(this);this.userInteracted=!1;this.fadeController=new Pr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>Ce.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let f=no(t+(o?r:0),0,u.length+1),y=u[f],b=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-b.left+n.scrollLeft,top:w.top-b.top+n.scrollTop,behavior:Fi()?"auto":e}),this.userInteracted&&!this.loop){let T=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,z=this.activeSlide===0;T?this.previousButton.focus({preventScroll:!0}):z&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,l=this.loop||o<r,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${lo(co(r),u=>{let m=u+1===o;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,r)}" @click="${f=>{this.goToSlide(u*e),this.unblockAutoplay(f,this.paginationItems[u])}}" @keydown="${this.handleKeyDown}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${c("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};J.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
197
|
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}#carousel__navigation-button--next,#carousel__navigation-button--previous{color:rgba(var(--sd-color-icon-fill-primary))}#carousel__navigation-button--next:disabled,#carousel__navigation-button--previous:disabled{color:rgba(var(--sd-color-icon-fill-neutral-500))}:host([inverted]) #carousel__navigation-button--next,:host([inverted]) #carousel__navigation-button--previous{color:rgba(var(--sd-color-icon-fill-white))}:host([inverted]) #carousel__navigation-button--next:disabled,:host([inverted]) #carousel__navigation-button--previous:disabled{color:rgba(var(--sd-color-icon-fill-neutral-600))}`],a([v('[part~="autoplay-controls"]')],J.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],J.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],J.prototype,"nextButton",2),a([br('[part~="pagination-item"]')],J.prototype,"paginationItems",2),a([d({type:String,reflect:!0})],J.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],J.prototype,"inverted",2),a([d({type:Boolean,reflect:!0})],J.prototype,"loop",2),a([d({type:Boolean,reflect:!0})],J.prototype,"autoplay",2),a([d({type:Boolean,reflect:!0})],J.prototype,"fade",2),a([d({type:Number,attribute:"slides-per-page",reflect:!0})],J.prototype,"slidesPerPage",2),a([d({type:Number,attribute:"slides-per-move",reflect:!0})],J.prototype,"slidesPerMove",2),a([v("slot:not([name])")],J.prototype,"defaultSlot",2),a([v(".carousel__slides")],J.prototype,"scrollContainer",2),a([v(".carousel__pagination")],J.prototype,"paginationContainer",2),a([L()],J.prototype,"activeSlide",2),a([L()],J.prototype,"currentPage",2),a([L()],J.prototype,"pausedAutoplay",2),a([E("pausedAutoplay")],J.prototype,"handlePausedAutoplay",1),a([E("fade",{waitUntilFirstUpdate:!0})],J.prototype,"handleFadeChange",1),a([E("loop",{waitUntilFirstUpdate:!0}),E("slidesPerPage",{waitUntilFirstUpdate:!0})],J.prototype,"initializeSlides",1),a([E("activeSlide")],J.prototype,"handleSlideChange",1),a([E("slidesPerMove")],J.prototype,"handleSlidesPerMoveChange",1),a([E("autoplay")],J.prototype,"handleAutoplayChange",1),J=a([k("sd-carousel")],J);var Rt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(o===u){let f=h.converter||Oe,b=(typeof f=="function"?f:(m=f==null?void 0:f.fromAttribute)!=null?m:Oe.fromAttribute)(l,h.type);this[s]!==b&&(this[t]=b)}r.call(this,o,n,l)}};var{I:I0}=ia;var Hr=s=>s.strings===void 0;var $d={},uo=(s,i=$d)=>s._$AH=i;var $e=te(class extends Ie{constructor(s){if(super(s),s.type!==Kt.PROPERTY&&s.type!==Kt.ATTRIBUTE&&s.type!==Kt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Hr(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===zt||i===W)return i;let t=s.element,e=s.name;if(s.type===Kt.PROPERTY){if(i===t[e])return zt}else if(s.type===Kt.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return zt}else if(s.type===Kt.ATTRIBUTE&&t.getAttribute(e)===i+"")return zt;return uo(s),i}});var ot=class extends g{constructor(){super(...arguments);this.formControlController=new dt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${C(this.value)}" .indeterminate="${$e(this.indeterminate)}" .checked="${$e(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex flex-shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div part="checkbox" class="${c("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?p`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${c("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?p`<sd-icon id="invalid-icon" part="invalid-icon" class="${c("text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};ot.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
198
198
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([v('input[type="checkbox"]')],ot.prototype,"input",2),a([v("#invalid-message")],ot.prototype,"invalidMessage",2),a([d({type:String,reflect:!0})],ot.prototype,"title",2),a([d({type:String,reflect:!0})],ot.prototype,"name",2),a([d()],ot.prototype,"value",2),a([d({type:String,reflect:!0})],ot.prototype,"size",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ot.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"indeterminate",2),a([Rt("checked")],ot.prototype,"defaultChecked",2),a([d({type:String,reflect:!0})],ot.prototype,"form",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"required",2),a([L()],ot.prototype,"showInvalidStyle",2),a([E(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),a([E(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=a([k("sd-checkbox")],ot);var jt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=p`<slot @slotchange="${this.syncCheckboxes}"></slot>`,l=this.hasSlotController.test("tooltip");return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||l?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};jt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}`],a([d({type:String,reflect:!0})],jt.prototype,"size",2),a([d({type:String,reflect:!0})],jt.prototype,"orientation",2),a([d({type:String,reflect:!0})],jt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],jt.prototype,"helpText",2),a([E("size",{waitUntilFirstUpdate:!0})],jt.prototype,"handleSizeChange",1),a([E("invalid",{waitUntilFirstUpdate:!0})],jt.prototype,"handleInvalid",1),jt=a([k("sd-checkbox-group")],jt);var Mt=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?et`a`:this.removable?et`div`:et`button`;return U`<${e} part="base" type="${C(t?void 0:"button")}" href="${C(t?this.href:void 0)}" rel="${C(t&&this.target?"noreferrer noopener":void 0)}" target="${C(t?this.target:void 0)}" download="${C(t?this.download:void 0)}" ?disabled="${C(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${C(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("
|
|
199
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}`],a([d({type:String,reflect:!0})],jt.prototype,"size",2),a([d({type:String,reflect:!0})],jt.prototype,"orientation",2),a([d({type:String,reflect:!0})],jt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],jt.prototype,"helpText",2),a([E("size",{waitUntilFirstUpdate:!0})],jt.prototype,"handleSizeChange",1),a([E("invalid",{waitUntilFirstUpdate:!0})],jt.prototype,"handleInvalid",1),jt=a([k("sd-checkbox-group")],jt);var Mt=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?et`a`:this.removable?et`div`:et`button`;return U`<${e} part="base" type="${C(t?void 0:"button")}" href="${C(t?this.href:void 0)}" rel="${C(t&&this.target?"noreferrer noopener":void 0)}" target="${C(t?this.target:void 0)}" download="${C(t?this.download:void 0)}" ?disabled="${C(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${C(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("flex border box-border sd-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 sd-tag-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 sd-tag-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"sd-tag--selected-border-width sd-tag--selected--default-color-background sd-tag--selected--default-color-border sd-tag--selected--default-color-text hover:sd-tag--selected--hover-color-background hover:sd-tag--selected--hover-color-border hover:sd-tag--selected--hover-color-text disabled:bg-neutral-500 disabled:sd-tag--disabled-color-border":c("sd-tag--default-color-border sd-tag--default-color-text disabled:sd-tag--disabled-color-border disabled:text-neutral-500",this.removable?"sd-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-tag--default--hover-color-background"),this.disabled&&!t&&"cursor-not-allowed")}"><slot name="icon-left" class="${c("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${this.removable&&!t?U`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};Mt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
200
200
|
:host{display:inline-block;transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1))}:host([size=lg])::part(removable-indicator){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=sm])::part(removable-indicator){font-size:.75rem}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],a([v("a, button, div")],Mt.prototype,"tag",2),a([d({type:String,reflect:!0})],Mt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Mt.prototype,"selected",2),a([d({type:Boolean,reflect:!0})],Mt.prototype,"toggleable",2),a([d({type:Boolean,reflect:!0})],Mt.prototype,"removable",2),a([d({type:Boolean,reflect:!0})],Mt.prototype,"disabled",2),a([d({type:String,reflect:!0})],Mt.prototype,"href",2),a([d({type:String,reflect:!0})],Mt.prototype,"target",2),a([d({reflect:!0})],Mt.prototype,"download",2),Mt=a([k("sd-tag")],Mt);var po=s=>s;var Es=s=>Array.from(s.assignedElements({flatten:!0})),Td=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Ld=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",mo=s=>s.map(Td),fo=s=>s.filter(Ld),Vr=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var S=class extends g{constructor(){super(...arguments);this.formControlController=new dt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new O(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.floatingLabel=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=po;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=Vr(t.value),o=Vr(t.getTextLabel()),n=Vr(e);return r.includes(n)||o.includes(n)};this.getTag=t=>p`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
201
201
|
base:tag__base,
|
|
202
202
|
content:tag__content,
|
|
@@ -239,7 +239,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
239
239
|
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:rgba(var(--outline-color-primary));outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}:host [part=checked-icon],:host [part=icon-indent],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon))}:host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],a([v("slot:not([name])")],Tt.prototype,"defaultSlot",2),a([v('part="base"')],Tt.prototype,"menuItem",2),a([d()],Tt.prototype,"type",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"disabled",2),a([d()],Tt.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"chevron",2),a([E("checked")],Tt.prototype,"handleCheckedChange",1),a([E("disabled")],Tt.prototype,"handleDisabledChange",1),a([E("type")],Tt.prototype,"handleTypeChange",1),Tt=a([k("sd-menu-item")],Tt);var ut=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new O(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var r;return e.nodeType===Node.TEXT_NODE?!((r=e.textContent)!=null&&r.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?et`div`:this.isAccordion&&!this.isLink?et`summary`:this.isLink?et`a`:et`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,r=this.isButton,o=this.isAccordion,n=this.isIconOnly,l={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":"py-2",u=U`<${t} part="base" class="${c("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px] navigable-border-radius",{md:"navigable-font-size",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"sd-navigation-item-color-text",this.current&&"font-bold sd-navigation-item--current-color-text",!o&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",n?"justify-center aspect-square p-3":"px-4")}" aria-current="${C(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${C(r?this.disabled:void 0)}" href="${C(e?this.href:void 0)}" target="${C(e?this.target:void 0)}" download="${C(e?this.download:void 0)}" rel="${C(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent left-0 pointer-events-none navigable__current-indicator-border-radius",this.vertical?"navigable__current-indicator-width h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"navigable__current-indicator-height w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0 transition-all",this.disabled&&"bg-neutral-500")}"></div><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${c("relative inline-flex justify-between items-center",o?"grow":"w-full",l.description&&"pt-3",!l.description&&!this.separated&&h,this.calculatePaddingX)}">${this.divider&&this.vertical?U`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||l.children&&this.vertical&&!this.separated?U`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${l.description&&this.vertical?U`<slot id="description" name="description" part="description" class="${c("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?U`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${u} ${l.children&&this.vertical?U`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?U`<slot name="children"></slot>`:""}</div>`:o?U`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${u}<slot name="children"></slot></details>`:U`${u}`}};ut.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
240
240
|
:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}`],a([v('[part="base"]')],ut.prototype,"button",2),a([v("slot:not([name])")],ut.prototype,"defaultSlot",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"vertical",2),a([d({type:String,reflect:!0})],ut.prototype,"size",2),a([d({reflect:!0})],ut.prototype,"href",2),a([d({type:String,reflect:!0})],ut.prototype,"target",2),a([d({reflect:!0})],ut.prototype,"download",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"current",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"chevron",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"relaxed",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"divider",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"indented",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"open",2),a([d({type:Boolean,reflect:!0})],ut.prototype,"separated",2),ut=a([k("sd-navigation-item")],ut);var Br={"top-right":null,"bottom-center":null},_d=()=>{Object.entries(Br).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),Br[s]=i;return}Br[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};_d();var kt=class extends g{constructor(){super(...arguments);this.localize=new O(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 Br[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(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([Y(this.base),Y(this.wrapper)]),this.wrapper.hidden=!1;let t=q(this,"notification.show",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.show${wi(bs(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,we(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([Y(this.base),Y(this.wrapper)]);let t=q(this,"notification.hide",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.hide${wi(bs(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,we(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,Z(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,Z(this,"sd-after-hide")}async toast(){return new Promise(t=>{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),t()},{once:!0})})}render(){return p`<div part="base" class="${c("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="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="${c("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${c("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-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-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 sd-notification-color-border",{info:"sd-notification--info-color-background",success:"sd-notification--success-color-background",warning:"sd-notification--warning-color-background",error:"sd-notification--error-color-background"}[this.variant])}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?p`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?p`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("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-notification-color-border"></div>`:""}</div></div>`}};kt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
241
241
|
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([v('[part~="base"]')],kt.prototype,"base",2),a([v('[part~="wrapper"]')],kt.prototype,"wrapper",2),a([v('[part~="close-button"]')],kt.prototype,"close",2),a([d({type:String,reflect:!0})],kt.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"open",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"closable",2),a([d({type:Number,reflect:!0})],kt.prototype,"duration",2),a([d({type:Boolean,reflect:!0,attribute:"duration-indicator"})],kt.prototype,"durationIndicator",2),a([d({type:String,reflect:!0,attribute:"toast-stack"})],kt.prototype,"toastStack",2),a([E("open",{waitUntilFirstUpdate:!0})],kt.prototype,"handleOpenChange",1),a([E("duration")],kt.prototype,"handleDurationChange",1),kt=a([k("sd-notification")],kt);R("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});R("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var ne=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return U`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};ne.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
242
|
-
:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],ne.prototype,"defaultSlot",2),a([d({reflect:!0,type:Boolean})],ne.prototype,"disabled",2),a([d({type:String,reflect:!0})],ne.prototype,"label",2),a([E("disabled",{waitUntilFirstUpdate:!0})],ne.prototype,"handleDisabledChange",1),ne=a([k("sd-optgroup")],ne);var yt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return p`<div part="base" class="${c("px-4 flex items-
|
|
242
|
+
:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],ne.prototype,"defaultSlot",2),a([d({reflect:!0,type:Boolean})],ne.prototype,"disabled",2),a([d({type:String,reflect:!0})],ne.prototype,"label",2),a([E("disabled",{waitUntilFirstUpdate:!0})],ne.prototype,"handleDisabledChange",1),ne=a([k("sd-optgroup")],ne);var yt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return p`<div part="base" style="word-break:break-word" class="${c("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?p`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"sd-option--disabled-color-border":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?p`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?p`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};yt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
243
243
|
:host{position:relative;display:block;width:100%;--tw-outline-style:none!important;outline-style:none!important}.focus-outline-offset{outline-offset:-2px}`],a([v('[part="base"]')],yt.prototype,"defaultSlot",2),a([L()],yt.prototype,"current",2),a([L()],yt.prototype,"selected",2),a([L()],yt.prototype,"hasHover",2),a([L()],yt.prototype,"isKeyboardFocus",2),a([d({type:String,reflect:!0})],yt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],yt.prototype,"checkbox",2),a([d({type:Boolean,reflect:!0})],yt.prototype,"disabled",2),a([d({type:String,reflect:!0})],yt.prototype,"value",2),a([E("disabled")],yt.prototype,"handleDisabledChange",1),a([E("selected")],yt.prototype,"handleSelectedChange",1),a([E("value")],yt.prototype,"handleValueChange",1),yt=a([k("sd-option")],yt);var Fe=class extends It{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?et`details`:et`div`,e=this.expandable?et`summary`:et`div`;return U`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${c("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${C(this.expandable?"button":void 0)}" aria-expanded="${C(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${C(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${c("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"sd-quickfact--expandable-color-text":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${c("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};Fe.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
244
244
|
:host{display:block}[part=header]::-webkit-details-marker{display:none}[part=summary-icon]{color:var(--sd-accordion__chevron-color-text)}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([d({type:Boolean,reflect:!0})],Fe.prototype,"expandable",2),Fe=a([k("sd-quickfact")],Fe);R("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});R("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var Et=class extends g{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return p`<span part="base" class="${c("sd-radio group flex items-center text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${c("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?c("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-radio--checked--invalid--default-color-background":"sd-radio--default--invalid-color-background"):this.checked?"sd-radio--checked--default-color-background hover:sd-radio--checked--hover-color-background group-hover:sd-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${c("rounded-full inline-flex text-white sd-radio--checked--default__icon-color-background h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"sd-radio--checked--invalid--default__icon-color-background hover:sd-radio--checked--invalid--hover__icon-color-background group-hover:sd-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-radio--checked--default__icon-color-background hover:sd-radio--checked--hover__icon-color-background group-hover:sd-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${c("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};Et.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
245
245
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){--tw-outline-style:none;outline-style:none}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:var(--sd-color-border-primary,var(--sd-color-primary))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([L()],Et.prototype,"checked",2),a([L()],Et.prototype,"hasFocus",2),a([d({type:String,reflect:!0})],Et.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Et.prototype,"visuallyDisabled",2),a([d()],Et.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"invalid",2),a([E("checked")],Et.prototype,"handleCheckedChange",1),a([E(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],Et.prototype,"handleDisabledChange",1),Et=a([k("sd-radio")],Et);var St=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),r=`${this.size}-${t?"label":"no-label"}`;return p`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${c("relative text-center sd-radio-button-border-radius transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"sd-button--primary--default-color-background sd-button--primary--default-color-text hover:sd-button--primary--hover-color-background":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent sd-radio-button-color-text border-primary hover:text-primary-500 cursor-pointer",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",r)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${C(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${c(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?p`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};St.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
@@ -248,17 +248,17 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
248
248
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([required]) #label::after{content:' *'}:host:has(sd-button-group){display:inline-flex}`],a([v("slot:not([name])")],rt.prototype,"defaultSlot",2),a([v("#validation-input")],rt.prototype,"validationInput",2),a([v("#invalid-message")],rt.prototype,"invalidMessage",2),a([L()],rt.prototype,"hasButtonGroup",2),a([L()],rt.prototype,"defaultValue",2),a([L()],rt.prototype,"showInvalidStyle",2),a([d({type:String,reflect:!0})],rt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],rt.prototype,"required",2),a([d({type:String,reflect:!0})],rt.prototype,"orientation",2),a([d({type:String,reflect:!0})],rt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],rt.prototype,"helpText",2),a([d({type:String,reflect:!0})],rt.prototype,"name",2),a([d()],rt.prototype,"value",2),a([d({type:String,reflect:!0})],rt.prototype,"form",2),a([E("size",{waitUntilFirstUpdate:!0})],rt.prototype,"handleSizeChange",1),a([E("showInvalidStyle",{waitUntilFirstUpdate:!0})],rt.prototype,"handleInvalidChange",1),a([E("value")],rt.prototype,"handleValueChange",1),rt=a([k("sd-radio-group")],rt);var Re=(s,i)=>s-i,Ti=(s,i)=>{if(s.length!==i.length)return!0;let t=s.slice().sort(Re),e=i.slice().sort(Re);for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!0;return!1},zs=(s,i)=>{let t=s.getBoundingClientRect(),e=t.width;if(e<=0)return 0;let r=i;return r-=t.left,r<=0?0:r>=e?1:(r/=e,r)};var st=class extends g{constructor(){super();this.formControlController=new dt(this);this.hasSlotController=new P(this,"label","help-text");this.localize=new O(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.tooltip="on-interaction";this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(Re):[]}get value(){return this._value.slice().sort(Re).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(Re):t||[],Ti(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(Re)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async t=>{var r,o;let e=t.parentElement;await e.updateComplete,(o=(r=e.shadowRoot)==null?void 0:r.querySelector("sd-popup"))==null||o.setAttribute("distance","14")})}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(r=>{if(r<=this.min)return this.min;if(r>=this.max)return this.max;let o=this.min+this.step*Math.round((r-this.min)/this.step);return o>this.max?this.max:o});Ti(this._value,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let r=+e.dataset.rangeId;this._rangeValues.has(r)&&(this.moveThumb(e,this._rangeValues.get(r)),this.tooltip==="always-visible"&&e.parentElement.show())}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let r=this._rangeValues.get(e),o=t.parentElement;o.content=this.tooltipFormatter(r)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let n=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",l=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${n}, ${l}%)`,t.style.insetInlineEnd=`min(calc(100% - ${n}), calc(100% - ${l}%))`;return}let e=this._value.slice().sort(Re),r=100*(e[0]-this.min)/(this.max-this.min),o=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${r}%`,t.style.insetInlineEnd=`calc(100% - ${o}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let r=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*r}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let r=this.valueAsArray,n=Array.from(this.thumbs).indexOf(t),l=r[n-1]||this.min,h=r[n+1]||this.max,u=e<l||e>h;return{finalValue:Math.max(l,Math.min(h,e)),isRestricted:u,nextValue:h,prevValue:l}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:r}=t,o=Array.from(this.thumbs),n=zs(this.inputWrapper,r),l=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/l),u=o.reduce((b,w)=>{let T=this._rangeValues.get(+w.dataset.rangeId),z=this._rangeValues.get(+b.dataset.rangeId),M=Math.abs(T-h),_=Math.abs(z-h);return M===_?T<h?w:b:M<_?w:b}),m=+u.dataset.rangeId;if(!m)return;this._rangeValues.set(m,h),this.moveThumb(u,h);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),Ti(f,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let y=new PointerEvent("pointerdown",t);e&&u.dispatchEvent(y)&&this.updateTooltip(u)}onClickTrackItem(t){this.onClickTrack(t,!1)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;this.updateTooltip(e),e.dataset.pointerId&&e.releasePointerCapture(+e.dataset.pointerId),e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),e.classList.add("grabbed"),this.tooltip==="on-interaction"&&await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,r=+e.dataset.rangeId;if(!this._rangeValues.has(r)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let n=zs(this.inputWrapper,t.clientX),l=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/l);if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:h}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,h);m.isRestricted?(h=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(r,h),this.moveThumb(e,h);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),Ti(f,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),delete e.dataset.pointerId,Ti(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await e.parentElement.hide())}onKeyPress(t){let e=t.target,r=+e.dataset.rangeId,o=this._rangeValues.get(r);if(o===void 0)return;let n=o;switch(t.key){case"ArrowUp":case"Up":n=Math.min(o+this.step,this.max);break;case"ArrowDown":case"Down":n=Math.max(o-this.step,this.min);break;case"ArrowLeft":case"Left":n=this.rtl?Math.min(o+this.step,this.max):Math.max(o-this.step,this.min);break;case"ArrowRight":case"Right":n=this.rtl?Math.max(o-this.step,this.min):Math.min(o+this.step,this.max);break;case"PageUp":n=Math.min(o+(this.max-this.min)/5,this.max);break;case"PageDown":n=Math.max(o-(this.max-this.min)/5,this.min);break;case"Home":n=this.min;break;case"End":n=this.max;break;default:return}if(n!==o){if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:n}}).defaultPrevented)return;let h=this.movementBoundariesForThumb(e,n);h.isRestricted&&(n=h.finalValue),this.moveThumb(e,n),this._rangeValues.set(r,n),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var r;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(r=e==null?void 0:e.dataset)!=null&&r.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=this._value.length>1;return this._rangeValues.clear(),this._value.map((r,o)=>{let n=o+1;this._rangeValues.set(n,r);let l=`thumb-${n}`,h="",u="";return e?(u=t?`label aria-label-hidden ${l}`:`aria-label-hidden ${l}`,o===0?h=`${this.localize.term("minimum")} (${this.tooltipFormatter(r)})`:o===this._value.length-1?h=`${this.localize.term("maximum")} (${this.tooltipFormatter(r)})`:h=this.tooltipFormatter(r)):u=t?"label aria-label-hidden":"",p`<sd-tooltip hoist trigger="${this.tooltip==="on-interaction"?"focus":"manual"}" disabled="${C(this.disabled||this.visuallyDisabled||this.tooltip==="hidden"?!0:void 0)}"><div id="${l}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${C(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${h}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${r}" aria-valuetext="${this.tooltipFormatter(r)}" data-range-id="${n}" data-disabled="${C(this.disabled||this.visuallyDisabled||void 0)}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${c("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"outline-none":"cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),r=!!(this.helpText||t.helpText);return p`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?p`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${c("w-full text-start",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${C(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" data-disabled="${C(this.disabled||this.visuallyDisabled||void 0)}" class="${c("h-1 my-[6px]")}"></div><div part="active-track" hidden="${C(this.noTrackBar?!0:void 0)}" data-disabled="${C(this.disabled||this.visuallyDisabled||void 0)}" class="${c("absolute top-0 h-1")}"></div></div>${this.renderThumbs(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>`}};st.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
249
249
|
[part='base']{touch-action:none;-webkit-touch-callout:none}[part=thumb]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=thumb]:hover{background-color:rgba(var(--sd-color-icon-fill-primary-500,rgba(var(--sd-color-primary-500))))}[part=thumb].grabbed{background-color:rgba(var(--sd-color-icon-fill-primary-800,rgba(var(--sd-color-primary-800))))}[part=thumb][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=track]{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}[part=track][data-disabled]{background-color:rgba(var(--sd-color-background-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=active-track]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=active-track][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}`],a([v("#input")],st.prototype,"input",2),a([v('[part="active-track"]')],st.prototype,"activeTrack",2),a([v('[part="input-wrapper"]')],st.prototype,"inputWrapper",2),a([br('[part="thumb"]')],st.prototype,"thumbs",2),a([d({attribute:!1})],st.prototype,"tooltipFormatter",2),a([d({type:String,reflect:!0})],st.prototype,"name",2),a([d({type:String,reflect:!0})],st.prototype,"label",2),a([d({attribute:"help-text",reflect:!0})],st.prototype,"helpText",2),a([d({type:Number,reflect:!0})],st.prototype,"min",2),a([d({type:Number,reflect:!0})],st.prototype,"max",2),a([d({type:Number,reflect:!0})],st.prototype,"step",2),a([d({type:Boolean,reflect:!0})],st.prototype,"disabled",2),a([d({attribute:"visually-disabled",type:Boolean,reflect:!0})],st.prototype,"visuallyDisabled",2),a([d({attribute:"no-track-bar",type:Boolean,reflect:!0})],st.prototype,"noTrackBar",2),a([d({attribute:"tooltip",type:String,reflect:!0})],st.prototype,"tooltip",2),a([Rt()],st.prototype,"defaultValue",2),a([d({type:String})],st.prototype,"value",1),st=a([k("sd-range")],st);var Be=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.subtick=!1}render(){return p`<div part="base" class="${c(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${c(this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm sd-range-scale-ticks-color-text"><slot></slot></div></div>`}};Be.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
250
250
|
[part='line']{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}`],a([d({type:Boolean,reflect:!0})],Be.prototype,"subtick",2),Be=a([k("sd-range-tick")],Be);var pt=class extends g{constructor(){super(...arguments);this.localize=new O(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,e=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,r=this.container.scrollTop>0,o=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,n=this.canScroll,l={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&e,up:this.isScrollVerticalEnabled&&r,down:this.isScrollVerticalEnabled&&o},h=n.left&&!l.left,u=n.up&&!l.up,m=n.right&&!l.right,f=n.down&&!l.down;(h||u)&&this.dispatchEvent(new CustomEvent("start")),(m||f)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=l}handleScroll(t,e){var _,A,F;let r=["left","up"].includes(t)?-this.step:this.step,o=["left","right"].includes(t)?"horizontal":"vertical",n=["left","up"].includes(t)?"start":"end",l=!["mouse","touch"].includes((_=e==null?void 0:e.pointerType)!=null?_:""),h=o==="horizontal"?"left":"top";(A=this.container)==null||A.scrollBy({behavior:"smooth",[h]:r});let u=`button-${t}`;this.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0}));let f=(o==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+r,y=o==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,b=n==="start"&&f<=0,w=n==="end"&&f>=y-1;if(!(b||w)){let D=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===D?`${D}\u200B`:D;return}let T=this.scrollButtons[t],z={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],M=b?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(F=z==null?void 0:z.querySelector("sd-icon"))==null||F.setAttribute("label",M),l?z==null||z.focus():T==null||T.blur()}handleButtonBlur(t,e){var l;let o=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(l=e.target.querySelector("sd-icon"))==null||l.setAttribute("label",o)}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",e="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return p`<div part="base" class="${c("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?p`${this.isScrollHorizontalEnabled?p`<div part="button-left" class="${c("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="${c(t)}" aria-hidden="${C(!this.canScroll.left||void 0)}" tabindex="${C(this.canScroll.left?void 0:-1)}" @click="${r=>this.handleScroll("left",r)}" @blur="${r=>this.handleButtonBlur("left",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-right" class="${c("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="${c(t)}" aria-hidden="${C(!this.canScroll.right||void 0)}" tabindex="${C(this.canScroll.right?void 0:-1)}" @click="${r=>this.handleScroll("right",r)}" @blur="${r=>this.handleButtonBlur("right",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?p`<div part="button-top" class="${c("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="${c(t)}" aria-hidden="${C(!this.canScroll.up||void 0)}" tabindex="${C(this.canScroll.up?void 0:-1)}" @click="${r=>this.handleScroll("up",r)}" @blur="${r=>this.handleButtonBlur("up",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-bottom" class="${c("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="${c(t)}" aria-hidden="${C(!this.canScroll.down||void 0)}" tabindex="${C(this.canScroll.down?void 0:-1)}" @click="${r=>this.handleScroll("down",r)}" @blur="${r=>this.handleButtonBlur("down",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null}`:null} ${this.shadows?p`${this.isScrollHorizontalEnabled?p`<div part="shadow-left" class="${c("left top-0 left-0 w-[6px] h-full",e,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${c("right top-0 right-0 w-[6px] h-full",e,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?p`<div part="shadow-top" class="${c("top top-0 left-0 w-full h-[6px]",e,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${c("bottom bottom-0 left-0 w-full h-[6px]",e,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};pt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
251
|
-
: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-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([v('[part="button-right"] button')],pt.prototype,"rightButton",2),a([v('[part="button-left"] button')],pt.prototype,"leftButton",2),a([v('[part="button-bottom"] button')],pt.prototype,"downButton",2),a([v('[part="button-top"] button')],pt.prototype,"upButton",2),a([v(".scroll-container")],pt.prototype,"container",2),a([v("#announcement-container")],pt.prototype,"announcementContainer",2),a([d({type:String,reflect:!0})],pt.prototype,"orientation",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"scrollbars",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"buttons",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"shadows",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"inset",2),a([d({type:Number,reflect:!0})],pt.prototype,"step",2),a([L()],pt.prototype,"canScroll",2),a([L()],pt.prototype,"isScrollHorizontalEnabled",2),a([L()],pt.prototype,"isScrollVerticalEnabled",2),pt=a([k("sd-scrollable")],pt);var V=class extends g{constructor(){super(...arguments);this.formControlController=new dt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new O(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
251
|
+
: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-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([v('[part="button-right"] button')],pt.prototype,"rightButton",2),a([v('[part="button-left"] button')],pt.prototype,"leftButton",2),a([v('[part="button-bottom"] button')],pt.prototype,"downButton",2),a([v('[part="button-top"] button')],pt.prototype,"upButton",2),a([v(".scroll-container")],pt.prototype,"container",2),a([v("#announcement-container")],pt.prototype,"announcementContainer",2),a([d({type:String,reflect:!0})],pt.prototype,"orientation",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"scrollbars",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"buttons",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"shadows",2),a([d({type:Boolean,reflect:!0})],pt.prototype,"inset",2),a([d({type:Number,reflect:!0})],pt.prototype,"step",2),a([L()],pt.prototype,"canScroll",2),a([L()],pt.prototype,"isScrollHorizontalEnabled",2),a([L()],pt.prototype,"isScrollVerticalEnabled",2),pt=a([k("sd-scrollable")],pt);var V=class extends g{constructor(){super(...arguments);this.formControlController=new dt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new O(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-tag class="relative z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
252
252
|
base:tag__base,
|
|
253
253
|
content:tag__content,
|
|
254
254
|
removable-indicator:tag__removable-indicator,
|
|
255
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,r=e.closest(".select__clear")!==null,o=e.closest("sd-icon-button")!==null;if(!(r||o)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.getAllOptions(),l=n.indexOf(this.currentOption),h=Math.max(0,l);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(h=l+1,h>n.length-1&&(h=0)):t.key==="ArrowUp"?(h=l-1,h<0&&(h=n.length-1)):t.key==="Home"?h=0:t.key==="End"&&(h=n.length-1),this.setCurrentOption(n[h],t)}if(t.key.length===1||t.key==="Backspace"){let n=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let l of n)if(l.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(l);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var r,o,n;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let l=(r=t.currentTarget)==null?void 0:r.parentElement,h=(o=l==null?void 0:l.previousElementSibling)==null?void 0:o.querySelector("sd-tag"),u=(n=l==null?void 0:l.nextElementSibling)==null?void 0:n.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{u?u.focus():h?h.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var r;let e=(r=this.shadowRoot)==null?void 0:r.querySelectorAll("sd-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let r=t.composedPath().some(o=>o instanceof HTMLSlotElement&&o.name==="removable-indicator");this.disabled||r||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?this.toggleOptionSelection(r):this.setSelectedOptions(r),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==o&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],r=[];customElements.get("sd-option")?(t.forEach(o=>{this.multiple&&(o.checkbox=!0),r.push(o.value)}),this.setSelectedOptions(t.filter(o=>e.includes(o.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t,e){this.getAllOptions().forEach(o=>{o.current=!1,o.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(o.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),r=Array.isArray(t)?t:[t];e.forEach(o=>o.selected=!1),r.length&&r.forEach(o=>o.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,r;t&&this.multiple?this.selectedOptions.find(o=>o.value===t.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?this.value=this.selectedOptions.map(o=>o.value):this.value=(r=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?r:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let r=this.getTag(t,e);return p`<div @sd-remove="${o=>this.handleTagRemove(o,t)}">${typeof r=="string"?Hi(r):r}</div>`}return[p``]}):[p`<sd-tag class="z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
255
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,r=e.closest(".select__clear")!==null,o=e.closest("sd-icon-button")!==null;if(!(r||o)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.getAllOptions(),l=n.indexOf(this.currentOption),h=Math.max(0,l);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(h=l+1,h>n.length-1&&(h=0)):t.key==="ArrowUp"?(h=l-1,h<0&&(h=n.length-1)):t.key==="Home"?h=0:t.key==="End"&&(h=n.length-1),this.setCurrentOption(n[h],t)}if(t.key.length===1||t.key==="Backspace"){let n=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let l of n)if(l.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(l);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var r,o,n;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let l=(r=t.currentTarget)==null?void 0:r.parentElement,h=(o=l==null?void 0:l.previousElementSibling)==null?void 0:o.querySelector("sd-tag"),u=(n=l==null?void 0:l.nextElementSibling)==null?void 0:n.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{u?u.focus():h?h.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var r;let e=(r=this.shadowRoot)==null?void 0:r.querySelectorAll("sd-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let r=t.composedPath().some(o=>o instanceof HTMLSlotElement&&o.name==="removable-indicator");this.disabled||r||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?this.toggleOptionSelection(r):this.setSelectedOptions(r),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==o&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],r=[];customElements.get("sd-option")?(t.forEach(o=>{this.multiple&&(o.checkbox=!0),r.push(o.value)}),this.setSelectedOptions(t.filter(o=>e.includes(o.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t,e){this.getAllOptions().forEach(o=>{o.current=!1,o.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(o.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),r=Array.isArray(t)?t:[t];e.forEach(o=>o.selected=!1),r.length&&r.forEach(o=>o.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,r;t&&this.multiple?this.selectedOptions.find(o=>o.value===t.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?this.value=this.selectedOptions.map(o=>o.value):this.value=(r=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?r:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let r=this.getTag(t,e);return p`<div @sd-remove="${o=>this.handleTagRemove(o,t)}" class="max-w-full">${typeof r=="string"?Hi(r):r}</div>`}return[p``]}):[p`<sd-tag class="z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
256
256
|
base:tag__base,
|
|
257
257
|
content:tag__content,
|
|
258
258
|
removable-indicator:tag__removable-indicator,
|
|
259
259
|
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await Y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=q(this,"select.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.currentOption&&ee(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await Y(this);let{keyframes:t,options:e}=q(this,"select.hide",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(r=>e.includes(r.value)))}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Z(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,Z(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=this.clearable&&!this.disabled,n=!!t.tooltip,l=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&e&&(this.hasFocus&&!this.visuallyDisabled||this.open||l)&&!(this.disabled&&!l),u=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",m=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],b=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1";return p`<div part="form-control" class="${c("relative text-left",m,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e&&!this.floatingLabel||n?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block form-control-color-text"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full bg-white",u==="disabled"?"text-neutral-500":"form-control-color-text")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200",h?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 text-base",h&&"mt-1")}" for="input"><span class="${c("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="${c("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 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],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
260
260
|
popup:popup__content,
|
|
261
|
-
"><div class="${c("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${c("input-container items-center w-full h-full px-4 flex",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],b)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${c("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700",m,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||h?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags?p`<div part="tags" class="${c("flex-grow flex flex-wrap items-center gap-1",this.floatingLabel&&"pt-6")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(w=>w==null?void 0:w.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",m)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?p`<button part="clear-button" class="${c("select__clear flex justify-center",f,this.value.length>0?"visible":"
|
|
261
|
+
"><div class="${c("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${c("input-container items-center w-full h-full px-4 flex min-w-0",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],b)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${c("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700 min-w-0",m,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||h?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${c("flex-grow flex flex-wrap items-center gap-1 min-w-0",this.floatingLabel&&"pt-6")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(w=>w==null?void 0:w.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",m)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?p`<button part="clear-button" class="${c("select__clear flex justify-center",f,this.value.length>0?"visible":"hidden")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700 z-10",y)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(f,y,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",f,y)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${c("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",m,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${r?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`}};V.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
262
262
|
:host{position:relative;display:block;width:auto}:host([required]) #label::after{content:' *'}: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))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}`],a([gi({selector:"sd-option"})],V.prototype,"_optionsInDefaultSlot",2),a([v("sd-popup")],V.prototype,"popup",2),a([v('[part="combobox"]')],V.prototype,"combobox",2),a([v('[part="display-input"]')],V.prototype,"displayInput",2),a([v(".value-input")],V.prototype,"valueInput",2),a([v('[part="listbox"]')],V.prototype,"listbox",2),a([v("#invalid-message")],V.prototype,"invalidMessage",2),a([L()],V.prototype,"deletedTagLabel",2),a([L()],V.prototype,"hasFocus",2),a([L()],V.prototype,"currentOption",2),a([L()],V.prototype,"selectedOptions",2),a([L()],V.prototype,"showValidStyle",2),a([L()],V.prototype,"showInvalidStyle",2),a([Rt()],V.prototype,"defaultValue",2),a([d({type:Boolean,reflect:!0})],V.prototype,"open",2),a([d({type:String,reflect:!0})],V.prototype,"size",2),a([d({type:String,reflect:!0})],V.prototype,"placement",2),a([d({type:String,reflect:!0})],V.prototype,"label",2),a([d({type:String,reflect:!0})],V.prototype,"placeholder",2),a([d({type:String,attribute:"max-options-tag-label",reflect:!0})],V.prototype,"maxOptionsTagLabel",2),a([d({type:Boolean,reflect:!0})],V.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],V.prototype,"visuallyDisabled",2),a([d({type:String,attribute:"help-text",reflect:!0})],V.prototype,"helpText",2),a([L()],V.prototype,"currentPlacement",2),a([d({type:Boolean,reflect:!0})],V.prototype,"clearable",2),a([d({type:Boolean,reflect:!0})],V.prototype,"multiple",2),a([d({type:Boolean,reflect:!0})],V.prototype,"useTags",2),a([d({attribute:"max-options-visible",type:Number,reflect:!0})],V.prototype,"maxOptionsVisible",2),a([d({reflect:!0})],V.prototype,"form",2),a([d({reflect:!0})],V.prototype,"name",2),a([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],V.prototype,"value",2),a([d({type:Boolean,reflect:!0})],V.prototype,"required",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],V.prototype,"floatingLabel",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],V.prototype,"styleOnValid",2),a([d({type:Boolean,reflect:!0})],V.prototype,"hoist",2),a([d()],V.prototype,"getTag",2),a([E("useTags",{waitUntilFirstUpdate:!0})],V.prototype,"handleUseTagsChange",1),a([E(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],V.prototype,"handleDisabledChange",1),a([E("open",{waitUntilFirstUpdate:!0})],V.prototype,"handleOpenChange",1),a([E("size",{waitUntilFirstUpdate:!0})],V.prototype,"applySizeToOptions",1),a([E("value",{waitUntilFirstUpdate:!0})],V.prototype,"handleValueChange",1),V=a([k("sd-select")],V);R("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Ne=class extends g{constructor(){super(...arguments);this.variant="rectangular"}render(){return p`<div part="base" aria-hidden="true" class="${c("bg-neutral-200 w-full h-full animate-pulse",{rectangular:"rounded-sm",circular:"rounded-full inline-block"}[this.variant])}"><slot></slot></div>`}};Ne.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
263
263
|
:host{display:block}::slotted(*){visibility:hidden}`],a([d({type:String,reflect:!0})],Ne.prototype,"variant",2),Ne=a([k("sd-skeleton")],Ne);var Ue=class extends g{constructor(){super(...arguments);this.color="currentColor";this.localize=new O(this)}render(){return p`<svg role="progressbar" viewBox="0 0 24 24" class="${c("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>`}};Ue.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
264
264
|
:host{display:inline-block;width:1em;height:1em}`],a([d({type:String,reflect:!0})],Ue.prototype,"color",2),Ue=a([k("sd-spinner")],Ue);var nt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let t=this.isLink(),e=this.notInteractive||this.waiting?et`div`:t?et`a`:et`button`,r=this.hasSlotController.test("label"),o=this.label?!0:r,n=this.hasSlotController.test("[default]"),l=this.description?!0:n,h=this.horizontalInline&&this.orientation==="horizontal",u=c("flex shrink-0 gap-2",this.noTail&&!h&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",h&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),m=c("border sd-step__circle-border-width rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return U`<div role="listitem" part="base" class="${c("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${u}"><${e} part="circle" href="${C(t?this.href:void 0)}" aria-disabled="${C(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${C(this.notInteractive||this.waiting||!o?void 0:"label")}" aria-describedby="${C(this.notInteractive||this.waiting||!l?void 0:"description")}" class="${m}"><slot name="circle-content" class="${c("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?U`<sd-icon name="status-check" library="_internal" class="${c(this.size==="sm"&&"text-sm")}"></sd-icon>`:U`${this.index}`}</slot></${e}>${h?U`<div class="${c(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${c("flex w-full",o&&"gap-2",this.size==="sm"&&!l?"mt-1":"mt-3")}">${o&&U`<div part="label" id="label" class="${c("font-bold whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":U`<div part="tail" class="${c("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${l?U`<div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm break-words",l?"flex-1":"w-0 h-0 overflow-hidden",l&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||U`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":U`<div part="tail" class="${c(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${h?"":U`<div part="text-container" class="${c("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${c("font-bold",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||U`<slot></slot>`}</div></div>`}</div>`}};nt.styles=[...g.styles,x`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|