@solid-design-system/components 6.4.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/custom-elements.json +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.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.HHASCDC2.js +5 -5
- 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.PDHMAKVQ.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.Q6GEIXGA.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.S4II2NTI.js +2 -2
- package/cdn-versioned/chunks/chunk.S7VIPIYX.js +2 -2
- package/cdn-versioned/chunks/chunk.TWNEU4H4.js +3 -3
- 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.WOZKICWV.js +5 -5
- package/cdn-versioned/chunks/chunk.XAPH6XNH.js +2 -2
- package/cdn-versioned/chunks/chunk.XQWDDXL2.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/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +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/vscode.html-custom-data.json +94 -94
- package/cdn-versioned/web-types.json +157 -157
- package/dist/custom-elements.json +1 -1
- 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.D4UC3BVQ.js +12 -12
- 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.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.L2RS3IA6.js +8 -8
- 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.LZVVDTSP.js +26 -26
- 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.NEUULRS7.js +5 -5
- 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.SVYFJMYF.js +3 -3
- package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
- package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
- package/dist-versioned/chunks/chunk.TUMONDN4.js +4 -4
- 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.UWQPJU3Q.js +3 -3
- package/dist-versioned/chunks/chunk.XALPLS2Y.js +6 -6
- 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/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +244 -244
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +157 -157
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as Dt}from"./chunk.YFQFOIEM.js";import{a as kt,b as E,d as Rt,h as Ct}from"./chunk.ALCKOGA7.js";import{b as Mt,e as Et}from"./chunk.763RLJEK.js";import{a as C,b as V,c as dt,e as v}from"./chunk.6EV4YU6C.js";var _=Math.min,S=Math.max,ct=Math.round,ft=Math.floor,F=t=>({x:t,y:t}),me={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function pt(t,e,n){return S(t,_(e,n))}function Z(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}var ge=new Set(["top","bottom"]);function j(t){return ge.has(Y(t))?"y":"x"}function wt(t){return St(j(t))}function $t(t,e,n){n===void 0&&(n=!1);let i=tt(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function Nt(t){let e=at(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>pe[e])}var Bt=["left","right"],Ft=["right","left"],we=["top","bottom"],ye=["bottom","top"];function xe(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:Bt:e?Bt:Ft;case"left":case"right":return e?we:ye;default:return[]}}function Ht(t,e,n,i){let o=tt(t),s=xe(Y(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function at(t){return t.replace(/left|right|bottom|top/g,e=>me[e])}function be(t){return C({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?be(t):{top:t,right:t,bottom:t,left:t}}function et(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Wt(t,e,n){let{reference:i,floating:o}=t,s=j(e),r=wt(e),l=gt(r),f=Y(e),a=s==="y",c=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,u;switch(f){case"top":u={x:c,y:i.y-o.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-o.width,y:h};break;default:u={x:i.x,y:i.y}}switch(tt(e)){case"start":u[r]-=m*(n&&a?-1:1);break;case"end":u[r]+=m*(n&&a?-1:1);break}return u}var Vt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e)),a=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:h}=Wt(a,i,f),m=i,u={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:b,data:A,reset:O}=await g({x:c,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:u,rects:a,platform:r,elements:{reference:t,floating:e}});c=y!=null?y:c,h=b!=null?b:h,u=V(C({},u),{[w]:C(C({},u[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:c,y:h}=Wt(a,m,f)),p=-1)}return{x:c,y:h,placement:m,strategy:o,middlewareData:u}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Z(e,t),d=Tt(u),w=l[m?h==="floating"?"reference":"floating":h],g=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:c,strategy:f})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},O=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:f}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:f}=e,{element:a,padding:c=0}=Z(t,e)||{};if(a==null)return{};let h=Tt(c),m={x:n,y:i},u=wt(o),d=gt(u),p=await r.getDimensions(a),w=u==="y",g=w?"top":"left",y=w?"bottom":"right",b=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[u]-m[u]-s.floating[d],O=m[u]-s.reference[u],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a)),R=k?k[b]:0;(!R||!await(r.isElement==null?void 0:r.isElement(k)))&&(R=l.floating[b]||s.floating[d]);let I=A/2-O/2,H=R/2-p[d]/2-1,P=_(h[g],H),U=_(h[y],H),W=P,K=R-p[d]-U,L=R/2-p[d]/2+I,D=pt(W,L,K),J=!f.arrow&&tt(o)!=null&&L!==D&&s.reference[d]/2-(L<W?P:U)-p[d]/2<0,X=J?L<W?L-W:L-K:0;return{[u]:m[u]+X,data:C({[u]:D,centerOffset:L-D-X},J&&{alignmentOffset:X}),reset:J}}});var jt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:f,elements:a}=e,L=Z(t,e),{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=L,w=dt(L,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=Y(o),y=j(l),b=Y(l)===l,A=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=m||(b||!p?[at(l)]:Nt(l)),k=d!=="none";!m&&k&&O.push(...Ht(l,p,d,A));let R=[l,...O],I=await yt(e,w),H=[],P=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&H.push(I[g]),h){let D=$t(o,r,A);H.push(I[D[0]],I[D[1]])}if(P=[...P,{placement:o,overflows:H}],!H.every(D=>D<=0)){var U,W;let D=(((U=s.flip)==null?void 0:U.index)||0)+1,J=R[D];if(J&&(!(h==="alignment"?y!==j(J):!1)||P.every(B=>j(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:D,overflows:P},reset:{placement:J}};let X=(W=P.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:W.placement;if(!X)switch(u){case"bestFit":{var K;let Q=(K=P.filter(B=>{if(k){let G=j(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,de)=>G+de,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:K[0];Q&&(X=Q);break}case"initialPlacement":X=l;break}if(o!==X)return{reset:{placement:X}}}return{}}}};var ve=new Set(["left","top"]);async function Ae(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Y(n),l=tt(n),f=j(n)==="y",a=ve.has(r)?-1:1,c=s&&f?-1:1,h=Z(e,t),{mainAxis:m,crossAxis:u,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof d=="number"&&(u=l==="end"?d*-1:d),f?{x:u*c,y:m*a}:{x:m*a,y:u*c}}var It=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,f=await Ae(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:V(C({},f),{placement:r})}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=Z(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}}}=w,f=dt(w,["mainAxis","crossAxis","limiter"]),a={x:n,y:i},c=await yt(e,f),h=j(Y(o)),m=St(h),u=a[m],d=a[h];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",b=u+c[g],A=u-c[y];u=pt(b,u,A)}if(r){let g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+c[g],A=d-c[y];d=pt(b,d,A)}let p=l.fn(V(C({},e),{[m]:u,[h]:d}));return V(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[h]:r}}})}}};var Yt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,P=Z(t,e),{apply:f=()=>{}}=P,a=dt(P,["apply"]),c=await yt(e,a),h=Y(o),m=tt(o),u=j(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-c.top-c.bottom,b=d-c.left-c.right,A=_(p-c[w],y),O=_(d-c[g],b),k=!e.middlewareData.shift,R=A,I=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=y),k&&!m){let U=S(c.left,0),W=S(c.right,0),K=S(c.top,0),L=S(c.bottom,0);u?I=d-2*(U!==0||W!==0?U+W:S(c.left,c.right)):R=p-2*(K!==0||L!==0?K+L:S(c.top,c.bottom))}await f(V(C({},e),{availableWidth:I,availableHeight:R}));let H=await r.getDimensions(l.floating);return d!==H.width||p!==H.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function nt(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function N(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function qt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}var Oe=new Set(["inline","contents"]);function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!Oe.has(o)}var Ee=new Set(["table","td","th"]);function Kt(t){return Ee.has(nt(t))}var Re=[":popover-open",":modal"];function ut(t){return Re.some(e=>{try{return t.matches(e)}catch(n){return!1}})}var Ce=["transform","translate","scale","rotate","perspective"],Se=["transform","translate","scale","rotate","perspective","filter"],Te=["paint","layout","strict","content"];function bt(t){let e=vt(),n=z(t)?M(t):t;return Ce.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Se.some(i=>(n.willChange||"").includes(i))||Te.some(i=>(n.contain||"").includes(i))}function Gt(t){let e=q(t);for(;N(e)&&!it(e);){if(bt(e))return e;if(ut(e))return null;e=q(e)}return null}function vt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Le=new Set(["html","body","#document"]);function it(t){return Le.has(nt(t))}function M(t){return T(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||$(t);return qt(e)?e.host:e}function Jt(t){let e=q(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:N(e)&&st(e)?e:Jt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Jt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=T(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=M(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=N(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=ct(n)!==s||ct(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Pt(t){return z(t)?t:t.contextElement}function lt(t){let e=Pt(t);if(!N(e))return F(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=ee(e),r=(s?ct(n.width):n.width)/i,l=(s?ct(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var Pe=F(0);function ne(t){let e=T(t);return!vt()||!e.visualViewport?Pe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ze(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function ot(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Pt(t),r=F(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ze(s,n,i)?ne(s):F(0),f=(o.left+l.x)/r.x,a=(o.top+l.y)/r.y,c=o.width/r.x,h=o.height/r.y;if(s){let m=T(s),u=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&u!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=M(p),b=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x,a*=w.y,c*=w.x,h*=w.y,f+=b,a+=A,d=T(p),p=At(d)}}return et({width:c,height:h,x:f,y:a})}function Ot(t,e){let n=ht(t).scrollLeft;return e?e.left+n:ot($(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Ot(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Me(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let f={scrollLeft:0,scrollTop:0},a=F(1),c=F(0),h=N(i);if((h||!h&&!s)&&((nt(i)!=="body"||st(r))&&(f=ht(i)),N(i))){let u=ot(i);a=lt(i),c.x=u.x+i.clientLeft,c.y=u.y+i.clientTop}let m=r&&!h&&!s?ie(r,f):F(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+c.x+m.x,y:n.y*a.y-f.scrollTop*a.y+c.y+m.y}}function ke(t){return Array.from(t.getClientRects())}function De(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=S(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=S(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+Ot(t),l=-n.scrollTop;return M(i).direction==="rtl"&&(r+=S(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}var Qt=25;function Be(t,e){let n=T(t),i=$(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,f=0;if(o){s=o.width,r=o.height;let c=vt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,f=o.offsetTop)}let a=Ot(i);if(a<=0){let c=i.ownerDocument,h=c.body,m=getComputedStyle(h),u=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,d=Math.abs(i.clientWidth-h.clientWidth-u);d<=Qt&&(s-=d)}else a<=Qt&&(s+=a);return{width:s,height:r,x:l,y:f}}var Fe=new Set(["absolute","fixed"]);function $e(t,e){let n=ot(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=N(t)?lt(t):F(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,f=o*s.x,a=i*s.y;return{width:r,height:l,x:f,y:a}}function Zt(t,e,n){let i;if(e==="viewport")i=Be(t,n);else if(e==="document")i=De($(t));else if(z(e))i=$e(e,n);else{let o=ne(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return et(i)}function oe(t,e){let n=q(t);return n===e||!z(n)||it(n)?!1:M(n).position==="fixed"||oe(n,e)}function Ne(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&nt(l)!=="body"),o=null,s=M(t).position==="fixed",r=s?q(t):t;for(;z(r)&&!it(r);){let l=M(r),f=bt(r);!f&&l.position==="fixed"&&(o=null),(s?!f&&!o:!f&&l.position==="static"&&!!o&&Fe.has(o.position)||st(r)&&!f&&oe(t,r))?i=i.filter(c=>c!==r):o=l,r=q(r)}return e.set(t,i),i}function He(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ne(e,this._c):[].concat(n),i],l=r[0],f=r.reduce((a,c)=>{let h=Zt(e,c,o);return a.top=S(h.top,a.top),a.right=_(h.right,a.right),a.bottom=_(h.bottom,a.bottom),a.left=S(h.left,a.left),a},Zt(e,l,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function We(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Ve(t,e,n){let i=N(e),o=$(e),s=n==="fixed",r=ot(t,!0,s,e),l={scrollLeft:0,scrollTop:0},f=F(0);function a(){f.x=Ot(o)}if(i||!i&&!s)if((nt(e)!=="body"||st(o))&&(l=ht(e)),i){let u=ot(e,!0,s,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else o&&a();s&&!i&&o&&a();let c=o&&!i&&!s?ie(o,l):F(0),h=r.left+l.scrollLeft-f.x-c.x,m=r.top+l.scrollTop-f.y-c.y;return{x:h,y:m,width:r.width,height:r.height}}function Lt(t){return M(t).position==="static"}function te(t,e){if(!N(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=T(t);if(ut(t))return n;if(!N(t)){let o=q(t);for(;o&&!it(o);){if(z(o)&&!Lt(o))return o;o=q(o)}return n}let i=te(t,e);for(;i&&Kt(i)&&Lt(i);)i=te(i,e);return i&&it(i)&&Lt(i)&&!bt(i)?n:i||Gt(t)||n}var _e=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,i=await n(t.floating);return{reference:Ve(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function je(t){return M(t).direction==="rtl"}var Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Me,getDocumentElement:$,getClippingRect:He,getOffsetParent:re,getElementRects:_e,getClientRects:ke,getDimensions:We,getScale:lt,isElement:z,isRTL:je};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Xe(t,e){let n=null,i,o=$(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),s();let a=t.getBoundingClientRect(),{left:c,top:h,width:m,height:u}=a;if(l||e(),!m||!u)return;let d=ft(h),p=ft(o.clientWidth-(c+m)),w=ft(o.clientHeight-(h+u)),g=ft(c),b={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:S(0,_(1,f))||1},A=!0;function O(k){let R=k[0].intersectionRatio;if(R!==f){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!se(a,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,V(C({},b),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(O,b)}n.observe(t)}return r(!0),s}function le(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,a=Pt(t),c=o||s?[...a?rt(a):[],...rt(e)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=a&&l?Xe(a,n):null,m=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(e)})),n()}),a&&!f&&u.observe(a),u.observe(e));let d,p=f?ot(t):null;f&&w();function w(){let g=ot(t);p&&!se(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=u)==null||g.disconnect(),u=null,f&&cancelAnimationFrame(d)}}var ae=It;var ce=Xt,fe=jt,zt=Yt;var ue=_t;var he=(t,e,n)=>{let i=new Map,o=C({platform:Ie},n),s=V(C({},o.platform),{_c:i});return Vt(t,e,V(C({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=le(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[ae({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(zt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(fe({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(ce({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(zt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ue({element:this.arrowEl,padding:this.arrowPadding})),he(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",f={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let a=s.arrow.x,c=s.arrow.y,h="",m="",u="",d="";if(this.arrowPlacement==="start"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof a=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof a=="number"?`${a}px`:"",h=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:u,left:d,[f]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Et`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Et`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,Mt`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],v([Rt('[part="popup"]')],x.prototype,"popup",2),v([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),v([E({reflect:!0})],x.prototype,"anchor",2),v([E({type:Boolean,reflect:!0})],x.prototype,"active",2),v([E({type:String,reflect:!0})],x.prototype,"placement",2),v([E({type:String,reflect:!0})],x.prototype,"strategy",2),v([E({type:Number,reflect:!0})],x.prototype,"distance",2),v([E({type:Number,reflect:!0})],x.prototype,"skidding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),v([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),v([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),v([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),v([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),v([E({type:Object})],x.prototype,"flipBoundary",2),v([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),v([E({type:Boolean})],x.prototype,"shift",2),v([E({type:Object})],x.prototype,"shiftBoundary",2),v([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),v([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),v([E()],x.prototype,"sync",2),v([E({type:Object})],x.prototype,"autoSizeBoundary",2),v([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=v([kt("sd-6-4-
|
|
2
|
+
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],v([Rt('[part="popup"]')],x.prototype,"popup",2),v([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),v([E({reflect:!0})],x.prototype,"anchor",2),v([E({type:Boolean,reflect:!0})],x.prototype,"active",2),v([E({type:String,reflect:!0})],x.prototype,"placement",2),v([E({type:String,reflect:!0})],x.prototype,"strategy",2),v([E({type:Number,reflect:!0})],x.prototype,"distance",2),v([E({type:Number,reflect:!0})],x.prototype,"skidding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),v([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),v([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),v([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),v([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),v([E({type:Object})],x.prototype,"flipBoundary",2),v([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),v([E({type:Boolean})],x.prototype,"shift",2),v([E({type:Object})],x.prototype,"shiftBoundary",2),v([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),v([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),v([E()],x.prototype,"sync",2),v([E({type:Object})],x.prototype,"autoSizeBoundary",2),v([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=v([kt("sd-6-4-1-popup")],x);export{x as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p,b,c as k}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.N3WG3NAL.js";import{b as D}from"./chunk.CJ34NUTS.js";import{a as d}from"./chunk.PV6UYBMY.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as E}from"./chunk.IQPMMUES.js";import{a as c}from"./chunk.YFQFOIEM.js";import{a as C,b as h,d as f,e as w,h as T}from"./chunk.ALCKOGA7.js";import{b as I,e as v}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var l=class extends T{constructor(){super();this.formControlController=new D(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new E(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(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],b(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async e=>{var i,a;let t=e.parentElement;await t.updateComplete,(a=(i=t.shadowRoot)==null?void 0:i.querySelector("sd-6-4-0-popup"))==null||a.setAttribute("distance","14")})}willUpdate(e){super.willUpdate(e),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 t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});b(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&(this.moveThumb(t,this._rangeValues.get(i)),this.tooltip==="always-visible"&&t.parentElement.show())}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",n=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${n}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${n}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),n=i[s-1]||this.min,r=i[s+1]||this.max,u=t<n||t>r;return{finalValue:Math.max(n,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:n}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=k(this.inputWrapper,i),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n),u=a.reduce((g,x)=>{let _=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(_-r),V=Math.abs(L-r);return $===V?_<r?x:g:$<V?x:g}),m=+u.dataset.rangeId;if(!m)return;this._rangeValues.set(m,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),this.tooltip==="on-interaction"&&await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=k(this.inputWrapper,e.clientX),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(t,r);m.isRestricted?(r=m.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,b(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let n=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${n}`:`aria-label-hidden ${n}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-6-4-0-tooltip hoist trigger="${this.tooltip==="on-interaction"?"focus":"manual"}" disabled="${d(this.disabled||this.visuallyDisabled||this.tooltip==="hidden"?!0:void 0)}"><div id="${n}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${d(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" data-disabled="${d(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-6-4-0-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${c("w-full text-start",t?"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="${d(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="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("h-1 my-[6px]")}"></div><div part="active-track" hidden="${d(this.noTrackBar?!0:void 0)}" data-disabled="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("absolute top-0 h-1")}"></div></div>${this.renderThumbs(t)}<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",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
[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))))}`],o([f("#input")],l.prototype,"input",2),o([f('[part="active-track"]')],l.prototype,"activeTrack",2),o([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),o([w('[part="thumb"]')],l.prototype,"thumbs",2),o([h({attribute:!1})],l.prototype,"tooltipFormatter",2),o([h({type:String,reflect:!0})],l.prototype,"name",2),o([h({type:String,reflect:!0})],l.prototype,"label",2),o([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),o([h({type:Number,reflect:!0})],l.prototype,"min",2),o([h({type:Number,reflect:!0})],l.prototype,"max",2),o([h({type:Number,reflect:!0})],l.prototype,"step",2),o([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),o([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),o([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),o([h({attribute:"tooltip",type:String,reflect:!0})],l.prototype,"tooltip",2),o([A()],l.prototype,"defaultValue",2),o([h({type:String})],l.prototype,"value",1),l=o([C("sd-6-4-
|
|
1
|
+
import{a as p,b,c as k}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.N3WG3NAL.js";import{b as D}from"./chunk.CJ34NUTS.js";import{a as d}from"./chunk.PV6UYBMY.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as E}from"./chunk.IQPMMUES.js";import{a as c}from"./chunk.YFQFOIEM.js";import{a as C,b as h,d as f,e as w,h as T}from"./chunk.ALCKOGA7.js";import{b as I,e as v}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var l=class extends T{constructor(){super();this.formControlController=new D(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new E(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(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],b(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async e=>{var i,a;let t=e.parentElement;await t.updateComplete,(a=(i=t.shadowRoot)==null?void 0:i.querySelector("sd-6-4-1-popup"))==null||a.setAttribute("distance","14")})}willUpdate(e){super.willUpdate(e),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 t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});b(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&(this.moveThumb(t,this._rangeValues.get(i)),this.tooltip==="always-visible"&&t.parentElement.show())}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",n=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${n}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${n}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),n=i[s-1]||this.min,r=i[s+1]||this.max,u=t<n||t>r;return{finalValue:Math.max(n,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:n}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=k(this.inputWrapper,i),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n),u=a.reduce((g,x)=>{let _=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(_-r),V=Math.abs(L-r);return $===V?_<r?x:g:$<V?x:g}),m=+u.dataset.rangeId;if(!m)return;this._rangeValues.set(m,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),this.tooltip==="on-interaction"&&await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=k(this.inputWrapper,e.clientX),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(t,r);m.isRestricted?(r=m.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,b(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let n=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${n}`:`aria-label-hidden ${n}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-6-4-1-tooltip hoist trigger="${this.tooltip==="on-interaction"?"focus":"manual"}" disabled="${d(this.disabled||this.visuallyDisabled||this.tooltip==="hidden"?!0:void 0)}"><div id="${n}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${d(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" data-disabled="${d(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-6-4-1-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${c("w-full text-start",t?"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="${d(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="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("h-1 my-[6px]")}"></div><div part="active-track" hidden="${d(this.noTrackBar?!0:void 0)}" data-disabled="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("absolute top-0 h-1")}"></div></div>${this.renderThumbs(t)}<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",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
[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))))}`],o([f("#input")],l.prototype,"input",2),o([f('[part="active-track"]')],l.prototype,"activeTrack",2),o([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),o([w('[part="thumb"]')],l.prototype,"thumbs",2),o([h({attribute:!1})],l.prototype,"tooltipFormatter",2),o([h({type:String,reflect:!0})],l.prototype,"name",2),o([h({type:String,reflect:!0})],l.prototype,"label",2),o([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),o([h({type:Number,reflect:!0})],l.prototype,"min",2),o([h({type:Number,reflect:!0})],l.prototype,"max",2),o([h({type:Number,reflect:!0})],l.prototype,"step",2),o([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),o([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),o([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),o([h({attribute:"tooltip",type:String,reflect:!0})],l.prototype,"tooltip",2),o([A()],l.prototype,"defaultValue",2),o([h({type:String})],l.prototype,"value",1),l=o([C("sd-6-4-1-range")],l);export{l as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as s}from"./chunk.PV6UYBMY.js";import{a as t}from"./chunk.YFQFOIEM.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.ALCKOGA7.js";import{b as l,e as d}from"./chunk.763RLJEK.js";import{e as a}from"./chunk.6EV4YU6C.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return d`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex relative",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant])}"><div class="${t("absolute inset-0",{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"></div><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-6-4-
|
|
1
|
+
import{a as s}from"./chunk.PV6UYBMY.js";import{a as t}from"./chunk.YFQFOIEM.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.ALCKOGA7.js";import{b as l,e as d}from"./chunk.763RLJEK.js";import{e as a}from"./chunk.6EV4YU6C.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return d`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex relative",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant])}"><div class="${t("absolute inset-0",{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"></div><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-6-4-1-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-6-4-1-icon library="_internal" name="reload" label="Flip to Back"></sd-6-4-1-icon></sd-6-4-1-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${s(this.activeSide==="front"||void 0)}" class="${t("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${t("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-6-4-1-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-6-4-1-icon library="_internal" name="reload" label="Flip to Front"></sd-6-4-1-icon></sd-6-4-1-button></div></div>`}};r.styles=[...n.styles,l`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
2
|
:host{display:block;aspect-ratio:var(--sd-aspect-3\\/4);--name:'';--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}:host([front-variant=gradient-light]) [part=front-secondary-gradient],:host([front-variant=gradient-light]) [part=front-slot-container] .bg-gradient-to-b{--sd-color-background-white:rgba(
|
|
3
3
|
var(--sd-informational-gradient--white-color-background, rgba(var(--sd-color-white)))
|
|
4
4
|
)}:host([front-variant=gradient-dark]) [part=front-secondary-gradient],:host([front-variant=gradient-dark]) [part=front-slot-container] .bg-gradient-to-b{--sd-color-background-primary-800:rgba(
|
|
5
5
|
var(--sd-informational-gradient--primary-800-color-background, rgba(var(--sd-color-primary-800)))
|
|
6
|
-
)}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),a([m()],r.prototype,"activeSide",2),r=a([c("sd-6-4-
|
|
6
|
+
)}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),a([m()],r.prototype,"activeSide",2),r=a([c("sd-6-4-1-flipcard")],r);export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as c,h as e}from"./chunk.ALCKOGA7.js";import{b as l,e as o}from"./chunk.763RLJEK.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends e{static isCarouselItem(s){return s instanceof Element&&s.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return o`<slot></slot>`}};t.styles=[...e.styles,l`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
: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}`],t=i([c("sd-6-4-
|
|
2
|
+
: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}`],t=i([c("sd-6-4-1-carousel-item")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk.YFQFOIEM.js";import{a,b as r,h as s}from"./chunk.ALCKOGA7.js";import{b as n,e as d}from"./chunk.763RLJEK.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-6-4-
|
|
2
|
-
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4);min-width:var(--sd-spacing-4);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1) * 5);min-width:calc(var(--sd-spacing-1) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2);min-width:var(--sd-spacing-2)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-6-4-
|
|
1
|
+
import{a as i}from"./chunk.YFQFOIEM.js";import{a,b as r,h as s}from"./chunk.ALCKOGA7.js";import{b as n,e as d}from"./chunk.763RLJEK.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-6-4-1-badge--blue--inverted-color-text sd-6-4-1-badge--blue--inverted-color-background sd-6-4-1-badge--inverted-color-border":"text-white bg-primary-500 border-white",green:this.inverted?"sd-6-4-1-badge--green-color--inverted-text sd-6-4-1-badge--green-color--inverted-background sd-6-4-1-badge--inverted-color-border":"text-white sd-6-4-1-badge--green-color-background border-white",red:this.inverted?"sd-6-4-1-badge--red--inverted-text sd-6-4-1-badge--red--inverted-background sd-6-4-1-badge--inverted-color-border":"text-white sd-6-4-1-badge--red-color-background border-white"}[this.variant])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4);min-width:var(--sd-spacing-4);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1) * 5);min-width:calc(var(--sd-spacing-1) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2);min-width:var(--sd-spacing-2)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-6-4-1-badge")],e);export{e as a};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{a as B}from"./chunk.N3WG3NAL.js";import{a as K}from"./chunk.X2GM34WQ.js";import{a as k,d as _,e as U,f as $}from"./chunk.W7A3TU2Z.js";import{c as R}from"./chunk.3L472FD4.js";import{b as A}from"./chunk.CJ34NUTS.js";import{a as H}from"./chunk.PV6UYBMY.js";import{a as P}from"./chunk.CGQ2BPPZ.js";import{a as C,c as D}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as I}from"./chunk.MP6XEXRW.js";import{a as M}from"./chunk.IQPMMUES.js";import{a as d}from"./chunk.YFQFOIEM.js";import{a as g}from"./chunk.NYKJXI3Q.js";import{a as F,b as r,c as u,d as m,h as E}from"./chunk.ALCKOGA7.js";import{b as V,e as p}from"./chunk.763RLJEK.js";import{b as S,e as T}from"./chunk.W4QBFD6E.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends E{constructor(){super(...arguments);this.formControlController=new A(this,{assumeInteractionOn:["sd-blur","sd-6-4-
|
|
1
|
+
import{a as B}from"./chunk.N3WG3NAL.js";import{a as K}from"./chunk.X2GM34WQ.js";import{a as k,d as _,e as U,f as $}from"./chunk.W7A3TU2Z.js";import{c as R}from"./chunk.3L472FD4.js";import{b as A}from"./chunk.CJ34NUTS.js";import{a as H}from"./chunk.PV6UYBMY.js";import{a as P}from"./chunk.CGQ2BPPZ.js";import{a as C,c as D}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as I}from"./chunk.MP6XEXRW.js";import{a as M}from"./chunk.IQPMMUES.js";import{a as d}from"./chunk.YFQFOIEM.js";import{a as g}from"./chunk.NYKJXI3Q.js";import{a as F,b as r,c as u,d as m,h as E}from"./chunk.ALCKOGA7.js";import{b as V,e as p}from"./chunk.763RLJEK.js";import{b as S,e as T}from"./chunk.W4QBFD6E.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends E{constructor(){super(...arguments);this.formControlController=new A(this,{assumeInteractionOn:["sd-blur","sd-6-4-1-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new M(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=K;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=$(t.value),a=$(t.getTextLabel()),n=$(e);return i.includes(n)||a.includes(n)};this.getTag=t=>p`<sd-6-4-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
2
2
|
base:tag__base,
|
|
3
3
|
content:tag__content,
|
|
4
4
|
removable-indicator:tag__removable-indicator,
|
|
5
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-4-
|
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-4-1-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let i=t.composedPath().some(o=>o instanceof HTMLButtonElement&&o.classList.contains("combobox-button"));if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}if(!(i||t.target.closest(".combobox__clear")!==null)){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let o=this.getCurrentOption(),f=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!f){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||o!=null&&o.disabled)return;if(o&&!o.disabled){let c=this.value;this.multiple?(this.toggleOptionSelection(o),this.lastOption=o,this.setOrderedSelectedOptions(o),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(o),this.setSelectedOptions(o)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==c&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return e.tabIndex=0,p`${typeof a=="string"?I(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-6-4-1-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-6-4-1-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return p`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?I(i):i}</div>`}return[p``]}):[p`<sd-6-4-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
6
6
|
base:tag__base,
|
|
7
7
|
content:tag__content,
|
|
8
8
|
removable-indicator:tag__removable-indicator,
|
|
9
|
-
" 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-6-4-0-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-6-4-0-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),R(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-6-4-0-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var O,v,x;let a=i.cloneNode(!0);if(a.current=a.value===((O=this.lastOption)==null?void 0:O.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((v=i.parentElement)==null?void 0:v.tagName.toLowerCase())==="sd-6-4-0-optgroup"))return a;let o=i.parentElement,f=(x=o.querySelector('[slot="label"]'))==null?void 0:x.cloneNode(!0),c=e.find(b=>b.id===o.id);if(c){c==null||c.appendChild(a),f&&(c==null||c.appendChild(f));return}let h=o.cloneNode();return h.appendChild(a),f&&h.appendChild(f),e.push(h),h}).filter(Boolean)}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)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-6-4-0-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=D(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await T(this);let{keyframes:t,options:e}=D(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([w(this,"sd-after-show"),w(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,w(this,"sd-after-hide")}checkValidity(){return this.valueInput.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.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return _(k(this.defaultSlot)).flat()}getSlottedOptGroups(){return U(k(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-6-4-0-option")){customElements.whenDefined("sd-6-4-0-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-6-4-0-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-6-4-0-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=t.left,c=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&a&&(this.hasFocus||c),O=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",v=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",x=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],z={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],N=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${d("relative text-left",v,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${a&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${a&&"inline-block form-control-color-text"}" aria-hidden="${a?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${a&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${d("absolute left-4 z-20 pointer-events-none transition-all duration-200",f?q:"left-4",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="${d("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="${d("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"}[O],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-4-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
9
|
+
" 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-6-4-1-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-6-4-1-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),R(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-6-4-1-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var O,v,x;let a=i.cloneNode(!0);if(a.current=a.value===((O=this.lastOption)==null?void 0:O.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((v=i.parentElement)==null?void 0:v.tagName.toLowerCase())==="sd-6-4-1-optgroup"))return a;let o=i.parentElement,f=(x=o.querySelector('[slot="label"]'))==null?void 0:x.cloneNode(!0),c=e.find(b=>b.id===o.id);if(c){c==null||c.appendChild(a),f&&(c==null||c.appendChild(f));return}let h=o.cloneNode();return h.appendChild(a),f&&h.appendChild(f),e.push(h),h}).filter(Boolean)}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)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-6-4-1-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=D(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await T(this);let{keyframes:t,options:e}=D(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([w(this,"sd-after-show"),w(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,w(this,"sd-after-hide")}checkValidity(){return this.valueInput.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.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return _(k(this.defaultSlot)).flat()}getSlottedOptGroups(){return U(k(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-6-4-1-option")){customElements.whenDefined("sd-6-4-1-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-6-4-1-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-6-4-1-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=t.left,c=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&a&&(this.hasFocus||c),O=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",v=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",x=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],z={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],N=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${d("relative text-left",v,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${a&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${a&&"inline-block form-control-color-text"}" aria-hidden="${a?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${a&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${d("absolute left-4 z-20 pointer-events-none transition-all duration-200",f?q:"left-4",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="${d("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="${d("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"}[O],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-4-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
10
10
|
popup:popup__content,
|
|
11
|
-
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(O)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],N)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",z,x,y)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",z,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",v,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||h?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(L=>L==null?void 0:L.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",v)}" 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="${d("flex justify-center",b,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-4-
|
|
12
|
-
:host{position:relative;display:block;width:100%}: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))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-4-
|
|
11
|
+
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(O)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],N)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",z,x,y)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",z,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",v,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||h?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(L=>L==null?void 0:L.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",v)}" 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="${d("flex justify-center",b,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-4-1-icon class="${d("text-neutral-700",y)}" name="closing-round" library="_internal"></sd-6-4-1-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-6-4-1-icon part="invalid-icon" class="${d(b,y,"text-error")}" library="_internal" name="risk"></sd-6-4-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-6-4-1-icon part="valid-icon" class="${d("flex-shrink-0 text-success",b,y)}" library="_internal" name="confirm-circle"></sd-6-4-1-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y)}">${this.type!=="search"?p`<sd-6-4-1-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-4-1-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",b)}" type="button"><sd-6-4-1-icon class="${d(x,y)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-4-1-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${H(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("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" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-6-4-1-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${d("text-sm text-neutral-700 mt-1",n?"block":"hidden")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};s.styles=[...E.styles,V`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
12
|
+
:host{position:relative;display:block;width:100%}: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))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-4-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-4-1-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-4-1-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-4-1-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-4-1-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-6-4-1-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],l([m("sd-6-4-1-popup")],s.prototype,"popup",2),l([m('[part="combobox"]')],s.prototype,"combobox",2),l([m('[part="display-input"]')],s.prototype,"displayInput",2),l([m(".value-input")],s.prototype,"valueInput",2),l([m('[part="listbox"]')],s.prototype,"listbox",2),l([m('[part="tags"]')],s.prototype,"tagWrapper",2),l([m('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([m("slot:not([name])")],s.prototype,"defaultSlot",2),l([m("#invalid-message")],s.prototype,"invalidMessage",2),l([u()],s.prototype,"hasFocus",2),l([u()],s.prototype,"displayInputValue",2),l([u()],s.prototype,"selectedTextLabel",2),l([u()],s.prototype,"selectedOptions",2),l([u()],s.prototype,"filteredOptions",2),l([u()],s.prototype,"allOptions",2),l([u()],s.prototype,"lastOption",2),l([u()],s.prototype,"showValidStyle",2),l([u()],s.prototype,"showInvalidStyle",2),l([u()],s.prototype,"deletedTagLabel",2),l([r({reflect:!0})],s.prototype,"name",2),l([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([B()],s.prototype,"defaultValue",2),l([r({type:String,reflect:!0})],s.prototype,"size",2),l([r({type:String,reflect:!0})],s.prototype,"placeholder",2),l([r({type:String,attribute:"max-options-tag-label",reflect:!0})],s.prototype,"maxOptionsTagLabel",2),l([r({type:Boolean,reflect:!0})],s.prototype,"disabled",2),l([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],s.prototype,"visuallyDisabled",2),l([r({type:Boolean,reflect:!0})],s.prototype,"clearable",2),l([r({type:Boolean,reflect:!0})],s.prototype,"open",2),l([r({type:Boolean,reflect:!0})],s.prototype,"hoist",2),l([r({type:String,reflect:!0})],s.prototype,"label",2),l([r({type:String,reflect:!0})],s.prototype,"placement",2),l([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),l([r({type:String,reflect:!0})],s.prototype,"form",2),l([r({type:Boolean,reflect:!0})],s.prototype,"required",2),l([r({attribute:"floating-label",type:Boolean,reflect:!0})],s.prototype,"floatingLabel",2),l([r({type:String,reflect:!0})],s.prototype,"type",2),l([u()],s.prototype,"currentPlacement",2),l([r()],s.prototype,"getOption",2),l([r({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([r({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([r({type:Number,reflect:!0,attribute:"max-options-visible"})],s.prototype,"maxOptionsVisible",2),l([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([r()],s.prototype,"filter",2),l([r()],s.prototype,"getTag",2),l([g("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([g("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([g("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([g(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([g("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([g("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([g("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([F("sd-6-4-1-combobox")],s);C("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk.I2H6CZK5.js";import{a as z}from"./chunk.2AQOPKKH.js";import{a as L}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as C}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.YFQFOIEM.js";import{a as v}from"./chunk.NYKJXI3Q.js";import{a as x,b as r,d as c,h as b}from"./chunk.ALCKOGA7.js";import{b as k,e as u}from"./chunk.763RLJEK.js";import{b as n,e as h}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new z(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=L(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 overlay-color-background pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[var(--width)] h-full",start:"top-0 end-auto bottom-auto start-0 w-[var(--width)] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-6-4-
|
|
2
|
-
:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}:host [part=panel]{outline:1px solid var(--sd-panel-color-border,transparent)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-6-4-
|
|
1
|
+
import{a as g}from"./chunk.I2H6CZK5.js";import{a as z}from"./chunk.2AQOPKKH.js";import{a as L}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as C}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.YFQFOIEM.js";import{a as v}from"./chunk.NYKJXI3Q.js";import{a as x,b as r,d as c,h as b}from"./chunk.ALCKOGA7.js";import{b as k,e as u}from"./chunk.763RLJEK.js";import{b as n,e as h}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new z(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=L(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 overlay-color-background pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[var(--width)] h-full",start:"top-0 end-auto bottom-auto start-0 w-[var(--width)] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-6-4-1-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-6-4-1-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-6-4-1-icon></sd-6-4-1-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-6-4-1-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-6-4-1-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-6-4-1-icon></sd-6-4-1-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${p(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};t.styles=[...b.styles,k`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}:host [part=panel]{outline:1px solid var(--sd-panel-color-border,transparent)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-6-4-1-drawer")],t);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -10,4 +10,4 @@ import{a as M,h as V}from"./chunk.ALCKOGA7.js";import{b as j}from"./chunk.763RLJ
|
|
|
10
10
|
color: transparent;
|
|
11
11
|
}
|
|
12
12
|
`),i.shadowRoot.adoptedStyleSheets.push(e);let s=e.cssRules[0].style;s.setProperty("--style-observer-adopted-style-sheet-bug","1");let r=getComputedStyle(i),t=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");s.removeProperty("--style-observer-adopted-style-sheet-bug"),r=getComputedStyle(i);let n=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");return i.remove(),t===n}});var E=class extends WeakMap{has(e,s){if(arguments.length===1)return super.has(e);let r=super.get(e);return(r==null?void 0:r.has(s))||!1}add(e,s){var t;let r=(t=super.get(e))!=null?t:new Set;r.add(s),super.set(e,r)}delete(e,...s){let r=super.get(e);if(r){for(let t of s)r.delete(t);r.size===0&&super.delete(e)}}};function f(i){return i==null?[]:Array.isArray(i)?i:typeof i!="string"&&typeof i[Symbol.iterator]=="function"?Array.from(i):[i]}function H(i){return i?new Promise(e=>setTimeout(e,i)):new Promise(e=>requestAnimationFrame(e))}var N;function Q(i){N!=null||(N=document.createElement("div"));let e=N.style;e[i]="inherit";let s=[...e];return s.length===0&&(s=[i]),e.cssText="",s}function X(i){let e=i.matchAll(/(?:^|\s)([+-]?(?:\d+|\d*\.\d+))\s*(ms|s)?(?=\s|$)/g),s=[];for(let r of e){let[,t,n]=r;t=parseFloat(t),n==="s"&&(t*=1e3),s.push(t)}return s}function W(i,e){e=Z(e);let s;if(i==="all")s=/\b\w+\b/g;else{let m=[...new Set([...Q(i),i,"all"])];s=RegExp(`(?:^|\\s)(${m.join("|")})\\b`)}let r=e.findLast(m=>s.test(m)),t=r?X(r):[0,0];t.length===0?t=[0,0]:t.length===1&&t.push(0);let[n,o]=t;return{duration:n,delay:o}}function Z(i){let e=[],s=0,r=[];for(let t of i.matchAll(/[,()]/g)){let n=t[0];if(n===","){if(r.length===0){let o=i.slice(s,t.index);e.push(o.trim()),s=t.index+1}}else n==="("?r.push("("):n===")"&&r.pop()}if(s<i.length){let t=i.slice(s);e.push(t.trim())}return e}var y,T,P=class{constructor(e){d(this,y,new Set);d(this,T,new WeakMap);this.callback=e}observe(e){if(l(this,y).has(e))return;let s=e.ownerDocument,r=l(this,T).get(s);r||(r=new IntersectionObserver(t=>{this.callback(t.map(({target:n})=>({target:n})))},{root:s.documentElement}),l(this,T).set(s,r)),l(this,y).add(e),r.observe(e)}unobserve(e){if(!e){for(let t of l(this,y))this.unobserve(t);return}let s=e.ownerDocument,r=l(this,T).get(s);r==null||r.unobserve(e),l(this,y).delete(e)}};y=new WeakMap,T=new WeakMap;var R,q,ee=(q=(R=globalThis.CSS)==null?void 0:R.supports)!=null&&q.call(R,"transition-behavior","allow-discrete")?" allow-discrete":"";globalThis.document&&(S("--style-observer-transition",{inherits:!1}),a.detectAll());var x,_,G,O,c=class{constructor(e,s,r={}){d(this,_);h(this,"properties");h(this,"target");h(this,"callback");h(this,"options");d(this,x,!1);d(this,O);h(this,"_shadowSheet");h(this,"_styles",{});this.constructor.all.add(e,this),this.properties=new Map,this.target=e,this.callback=s,this.options=I({properties:[]},r);let t=f(r.properties);this.renderedObserver=new P(n=>{this.propertyNames.length>0&&this.handleEvent()}),t.length>0&&this.observe(t)}get propertyNames(){return[...this.properties.keys()]}resolveOptions(e){return Object.assign(k(e),this.options)}async handleEvent(e){if(e&&!this.properties.has(e.propertyName))return;if(a.TRANSITIONRUN_EVENT_LOOP&&(e==null?void 0:e.type)==="transitionrun"||this.options.throttle>0){let t=a.TRANSITIONRUN_EVENT_LOOP?"transitionrun":"transitionstart",n=Math.max(this.options.throttle,50);if(a.TRANSITIONRUN_EVENT_LOOP){let o=W(e.propertyName,getComputedStyle(this.target).transition);n=Math.max(n,o.duration+o.delay+16)}this.target.removeEventListener(t,this),await H(n),this.target.addEventListener(t,this)}let s=getComputedStyle(this.target),r=[];for(let t of this.propertyNames){let n=s.getPropertyValue(t),o=this.properties.get(t);n!==o&&(r.push({target:this.target,property:t,value:n,oldValue:o}),this.properties.set(t,n))}r.length>0&&this.callback(r)}observe(e){var r;if(e=f(e),e=e.filter(t=>!this.properties.has(t)),e.length===0)return;$(this,_,G).call(this);let s=getComputedStyle(this.target);for(let t of e){a.UNREGISTERED_TRANSITION&&!this.constructor.properties.has(t)&&(S(t,void 0,this.target.ownerDocument),this.constructor.properties.add(t));let n=s.getPropertyValue(t);this.properties.set(t,n)}a.TRANSITIONRUN_EVENT_LOOP&&(this.target.addEventListener("transitionrun",this),(r=a.all.TRANSITIONRUN_EVENT_LOOP.valuePending)==null||r.then(t=>{t||this.target.removeEventListener("transitionrun",this)})),this.target.addEventListener("transitionstart",this),this.target.addEventListener("transitionend",this),this.updateTransitionProperties(),this.renderedObserver.observe(this.target)}updateTransitionProperties(){this.setProperty("--style-observer-transition","");let e=new Set(getComputedStyle(this.target).transitionProperty.split(", ")),s=[];for(let t of this.constructor.all.get(this.target))s.push(...t.propertyNames);s=[...new Set(s)];let r=s.filter(t=>!e.has(t)).map(t=>`${t} 1ms step-start${ee}`).join(", ");this.setProperty("--style-observer-transition",r)}updateTransition({firstTime:e}={}){let s="var(--style-observer-transition, --style-observer-noop)",r=this.getProperty("transition"),t;(e?r:!r.includes(s))&&(t=g(this,O,r)),t===void 0&&(e||!l(this,O))&&(r.includes(s)&&this.setProperty("transition",""),t=getComputedStyle(this.target).transition),t==="all"?t="":t=t.replace(/^none\b/,"");let n=t?t+", ":"";this.setProperty("transition",n+s),this.updateTransitionProperties()}get _isHost(){return this.target.shadowRoot&&!a.ADOPTED_STYLE_SHEET&&!Object.isFrozen(this.target.shadowRoot.adoptedStyleSheets)}setProperty(e,s,r){let t=this.target.style,n=t;if(this._isHost){if(!this._shadowSheet&&(this._shadowSheet=new CSSStyleSheet,this._shadowSheet.insertRule(":host { }"),this.target.shadowRoot.adoptedStyleSheets.push(this._shadowSheet),Object.keys(this._styles).length>0))for(let o in this._styles){let m=this._styles[o];this.setProperty(o,m),t.getPropertyValue(o)===m&&t.removeProperty(o)}n=this._shadowSheet.cssRules[0].style}n.setProperty(e,s,r),this._styles[e]=this.getProperty(e)}getProperty(e){var r,t,n;return((n=(t=(r=this._shadowSheet)==null?void 0:r.cssRules[0])==null?void 0:t.style)!=null?n:this.target.style).getPropertyValue(e)}unobserve(e){e=f(e),e=e.filter(s=>this.properties.has(s));for(let s of e)this.properties.delete(s);this.properties.size===0&&(this.target.removeEventListener("transitionrun",this),this.target.removeEventListener("transitionstart",this),this.target.removeEventListener("transitionend",this),this.renderedObserver.unobserve(this.target)),this.updateTransitionProperties()}};x=new WeakMap,_=new WeakSet,G=function(){if(l(this,x))return;let e=this.constructor.all.get(this.target).size===1;this.updateTransition({firstTime:e}),g(this,x,!0)},O=new WeakMap,h(c,"properties",new Set),h(c,"all",new E);function k(i){return i?(typeof i=="string"||Array.isArray(i)?i={properties:f(i)}:typeof i=="object"&&(i=I({properties:[]},i)),i):{}}var b=class{constructor(e,s){h(this,"elementObservers",new WeakMap);var r;this.callback=e,s=k(s),(r=s.targets)!=null||(s.targets=[]),s.target&&s.targets.push(s.target),this.options=s,this.options.targets.length>0&&this.options.properties.length>0&&this.observe(this.options.targets,this.options.properties)}changed(e){this.callback(e)}observe(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0)for(let t of s){let n=this.elementObservers.get(t);n||(n=new c(t,o=>this.changed(o),this.options),this.elementObservers.set(t,n)),n.observe(r)}}unobserve(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0){r.length===0&&(r=this.options.properties);for(let t of s){let n=this.elementObservers.get(t);n&&n.unobserve(r)}}}updateTransition(e){for(let s of f(e)){let r=this.elementObservers.get(s);r&&r.updateTransition()}}};function Y(i,e){let s=[...f(i),...f(e)];i=[],e=[];for(let r of s)(typeof r=="string"||r instanceof String?e:i).push(r);return{targets:i,properties:e}}var A=class{constructor(e,s){this.host=e,this.callback=s}connect(){this.observer=new b(e=>{var r,t;let s=(t=(r=e==null?void 0:e[0])==null?void 0:r.value)==null?void 0:t.replaceAll("'","");s&&this.callback(s)}),this.observer.observe(this.host,"--sd-theme")}disconnect(){var e;(e=this.observer)==null||e.unobserve(this.host)}};var w=class extends V{handleThemeChange(e){this.emit("sd-theme-change",{detail:{theme:e},bubbles:!0})}connectedCallback(){super.connectedCallback(),this.themeObserver=new A(this,this.handleThemeChange.bind(this)),this.themeObserver.connect()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.themeObserver)==null||e.disconnect()}};w.styles=[...V.styles,j`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
13
|
-
:host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-6-4-
|
|
13
|
+
:host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-6-4-1-theme-listener")],w);export{w as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as l,b as i,g as c,h as o}from"./chunk.ALCKOGA7.js";import{b as a,e as n}from"./chunk.763RLJEK.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends o{constructor(){super(...arguments);this.closeOthers=!1;this.handleAccordionShow=r=>{this.closeOthers&&this._accordionsInDefaultSlot.forEach(s=>{s!==r.target&&s.parentNode===r.target.parentNode&&s.removeAttribute("open")})}}connectedCallback(){super.connectedCallback(),this.addEventListener("sd-show",this.handleAccordionShow)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sd-show",this.handleAccordionShow)}render(){return n`<div part="base"><slot></slot></div>`}};e.styles=[...o.styles,a`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:block}::slotted(sd-6-4-
|
|
2
|
+
:host{display:block}::slotted(sd-6-4-1-accordion:not(:first-of-type)){margin-top:calc(-1 * var(--sd-accordion-border-width))!important}`],t([c({selector:"sd-6-4-1-accordion"})],e.prototype,"_accordionsInDefaultSlot",2),t([i({attribute:"close-others",type:Boolean,reflect:!0})],e.prototype,"closeOthers",2),e=t([l("sd-6-4-1-accordion-group")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk.IQPMMUES.js";import{a as s}from"./chunk.YFQFOIEM.js";import{a as i,b as a,h as r}from"./chunk.ALCKOGA7.js";import{b as l,e as o}from"./chunk.763RLJEK.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends r{constructor(){super(...arguments);this.localize=new c(this);this.subtick=!1}render(){return o`<div part="base" class="${s(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${s(this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm sd-6-4-
|
|
2
|
-
[part='line']{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}`],e([a({type:Boolean,reflect:!0})],t.prototype,"subtick",2),t=e([i("sd-6-4-
|
|
1
|
+
import{a as c}from"./chunk.IQPMMUES.js";import{a as s}from"./chunk.YFQFOIEM.js";import{a as i,b as a,h as r}from"./chunk.ALCKOGA7.js";import{b as l,e as o}from"./chunk.763RLJEK.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends r{constructor(){super(...arguments);this.localize=new c(this);this.subtick=!1}render(){return o`<div part="base" class="${s(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${s(this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm sd-6-4-1-range-scale-ticks-color-text"><slot></slot></div></div>`}};t.styles=[...r.styles,l`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
[part='line']{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}`],e([a({type:Boolean,reflect:!0})],t.prototype,"subtick",2),t=e([i("sd-6-4-1-range-tick")],t);export{t as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.YFQFOIEM.js";import{a as s,b as n,d,h as e}from"./chunk.ALCKOGA7.js";import{b as i,e as l}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var a=class extends e{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return l`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${r("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0",{white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"sd-6-4-
|
|
1
|
+
import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.YFQFOIEM.js";import{a as s,b as n,d,h as e}from"./chunk.ALCKOGA7.js";import{b as i,e as l}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var a=class extends e{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return l`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${r("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0",{white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"sd-6-4-1-teaser-media--neutral-100-color-background group-hover:sd-6-4-1-teaser-media--neutral-100--hover-color-background",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"sd-6-4-1-teaser-media--primary-100-color-background group-hover:sd-6-4-1-teaser-media--primary-100--hover-color-background","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${r("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${r(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${r("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};a.styles=[...e.styles,i`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
2
|
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}:host([variant=white]) .background:focus-within{background-color:rgba(var(--sd-color-background-white))}@supports (color:color-mix(in lab,red,red)){:host([variant=white]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-white)) var(--sd-opacity-90),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-neutral-100))}@supports (color:color-mix(in lab,red,red)){:host([variant=neutral-100]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-neutral-100)) var(--sd-opacity-90),transparent)}}:host([variant=primary]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary))}@supports (color:color-mix(in lab,red,red)){:host([variant=primary]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-primary)) var(--sd-opacity-90),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary-100))}@supports (color:color-mix(in lab,red,red)){:host([variant=primary-100]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-primary-100)) var(--sd-opacity-90),transparent)}}:host([variant=gradient-light]) .bg-gradient-to-t{--sd-color-background-white:var(--sd-informational-gradient--white-color-background, var(--sd-color-white))}:host([variant=gradient-dark]) .bg-gradient-to-t{--sd-color-background-primary-800:var(
|
|
3
3
|
--sd-informational-gradient--primary-800-color-background,
|
|
4
4
|
var(--sd-color-primary-800)
|
|
5
|
-
)}`],o([n({type:String,reflect:!0})],a.prototype,"variant",2),o([d('[part="base"]')],a.prototype,"teaserMedia",2),a=o([s("sd-6-4-
|
|
5
|
+
)}`],o([n({type:String,reflect:!0})],a.prototype,"variant",2),o([d('[part="base"]')],a.prototype,"teaserMedia",2),a=o([s("sd-6-4-1-teaser-media")],a);export{a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk.YFQFOIEM.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.ALCKOGA7.js";import{b as s,e as r}from"./chunk.763RLJEK.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-6-4-
|
|
2
|
-
:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-6-4-
|
|
1
|
+
import{a as c}from"./chunk.YFQFOIEM.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.ALCKOGA7.js";import{b as s,e as r}from"./chunk.763RLJEK.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-6-4-1-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return r`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...a.styles,s`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-6-4-1-tab-panel")],t);export{t as a};
|