@solid-design-system/components 7.0.3 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn/components/datepicker/datepicker.d.ts +4 -0
- package/cdn/components/datepicker/datepicker.js +1 -1
- package/cdn/custom-elements.json +33 -1
- package/cdn/solid-components.bundle.js +2 -2
- package/cdn/solid-components.iife.js +2 -2
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +6 -1
- package/cdn/web-types.json +24 -2
- package/cdn-versioned/chunks/chunk.2C3UQTSS.js +2 -2
- package/cdn-versioned/chunks/chunk.2O3FM7UB.js +2 -2
- package/cdn-versioned/chunks/chunk.35XPUMS2.js +1 -1
- package/cdn-versioned/chunks/chunk.37JCS2XH.js +5 -5
- package/cdn-versioned/chunks/chunk.3IZUMERL.js +2 -2
- package/cdn-versioned/chunks/chunk.3RIAU3TH.js +3 -3
- package/cdn-versioned/chunks/chunk.4GA43M6X.js +2 -2
- package/cdn-versioned/chunks/chunk.4QTJXGRR.js +2 -2
- package/cdn-versioned/chunks/chunk.ADVB3FPU.js +2 -2
- package/cdn-versioned/chunks/chunk.AJGTKHU5.js +2 -2
- package/cdn-versioned/chunks/chunk.C37LGAL3.js +2 -2
- package/cdn-versioned/chunks/chunk.CGMKBGJU.js +2 -2
- package/cdn-versioned/chunks/chunk.CQNFI34K.js +2 -2
- package/cdn-versioned/chunks/chunk.DCAJAXUP.js +2 -2
- package/cdn-versioned/chunks/chunk.DS2MKMMN.js +3 -3
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.GA3PWYR4.js +2 -2
- package/cdn-versioned/chunks/chunk.HNBY226D.js +1 -1
- package/cdn-versioned/chunks/chunk.HY624TPC.js +2 -2
- package/cdn-versioned/chunks/chunk.I7OVY27Y.js +10 -10
- package/cdn-versioned/chunks/chunk.IFLRUJCI.js +2 -2
- package/cdn-versioned/chunks/chunk.IQBZ7GRB.js +2 -2
- package/cdn-versioned/chunks/chunk.J45556RK.js +1 -1
- package/cdn-versioned/chunks/chunk.JMX6KLDZ.js +2 -2
- package/cdn-versioned/chunks/chunk.JQV2BZ2E.js +2 -2
- package/cdn-versioned/chunks/chunk.KE2YEQDL.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MR54F6CV.js +2 -2
- package/cdn-versioned/chunks/chunk.MYPRMCUO.js +1 -1
- package/cdn-versioned/chunks/chunk.N4L76IWF.js +1 -1
- package/cdn-versioned/chunks/chunk.NGU7NO3O.js +5 -5
- package/cdn-versioned/chunks/chunk.NJKSWXOS.js +2 -2
- package/cdn-versioned/chunks/chunk.NOP4DTP2.js +2 -2
- package/cdn-versioned/chunks/chunk.OOIX4OAP.js +2 -2
- package/cdn-versioned/chunks/chunk.P7GMFHO5.js +1 -1
- package/cdn-versioned/chunks/chunk.PCXVXYU2.js +2 -2
- package/cdn-versioned/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn-versioned/chunks/chunk.PFPUD5HR.js +2 -2
- package/cdn-versioned/chunks/chunk.PKCNX4R2.js +2 -2
- package/cdn-versioned/chunks/chunk.PQW77KHE.js +2 -2
- package/cdn-versioned/chunks/chunk.PURR56D5.js +2 -2
- package/cdn-versioned/chunks/chunk.Q63S2Z2M.js +2 -2
- package/cdn-versioned/chunks/chunk.QK3WCIP5.js +2 -2
- package/cdn-versioned/chunks/chunk.RHC6WZ6V.js +2 -2
- package/cdn-versioned/chunks/chunk.RRJCCIDH.js +1 -1
- package/cdn-versioned/chunks/chunk.SPL6VR5S.js +2 -2
- package/cdn-versioned/chunks/chunk.SSE7T5OF.js +2 -2
- package/cdn-versioned/chunks/chunk.SZNU4NHI.js +1 -1
- package/cdn-versioned/chunks/chunk.T7I5MFNS.js +2 -2
- package/cdn-versioned/chunks/chunk.TIMZJKMF.js +2 -2
- package/cdn-versioned/chunks/chunk.TX5WPWH2.js +2 -2
- package/cdn-versioned/chunks/chunk.UI3ZVKSU.js +2 -2
- package/cdn-versioned/chunks/chunk.V6IM4GAA.js +2 -2
- package/cdn-versioned/chunks/chunk.VPBXFCBA.js +2 -2
- package/cdn-versioned/chunks/chunk.VSX5LY2D.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WL6NNNG5.js +2 -2
- package/cdn-versioned/chunks/chunk.WQZWYMH3.js +1 -1
- package/cdn-versioned/chunks/chunk.WUXX2P2S.js +2 -2
- package/cdn-versioned/chunks/chunk.XGVG7F7T.js +2 -2
- package/cdn-versioned/chunks/chunk.XHYIXZF4.js +2 -2
- package/cdn-versioned/chunks/chunk.XZ5JTM6K.js +2 -2
- package/cdn-versioned/chunks/chunk.Y4ZS3BWH.js +2 -2
- package/cdn-versioned/chunks/chunk.YUDSN6HJ.js +3 -3
- package/cdn-versioned/chunks/chunk.Z2M7BQV5.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 +5 -1
- package/cdn-versioned/components/datepicker/datepicker.js +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/file-selector/file-selector.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-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/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 +298 -266
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +3 -3
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +120 -115
- package/cdn-versioned/web-types.json +195 -173
- package/dist/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +37 -2
- package/dist/components/datepicker/datepicker.d.ts +4 -0
- package/dist/components/datepicker/datepicker.js +1 -1
- package/dist/custom-elements.json +33 -1
- package/dist/solid-components.js +4 -4
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +24 -2
- package/dist-versioned/chunks/chunk.2EXNVXP2.js +2 -2
- package/dist-versioned/chunks/chunk.2M6Y3YHU.js +4 -4
- package/dist-versioned/chunks/chunk.2NXJZVSN.js +11 -11
- package/dist-versioned/chunks/chunk.2OT7JZJP.js +10 -10
- package/dist-versioned/chunks/chunk.2Y2MTVGF.js +3 -3
- package/dist-versioned/chunks/chunk.3PHACHZ2.js +7 -7
- package/dist-versioned/chunks/chunk.42XKKRQ2.js +6 -6
- package/dist-versioned/chunks/chunk.4FXMBMSY.js +3 -3
- package/dist-versioned/chunks/chunk.4JC6XNQW.js +4 -4
- package/dist-versioned/chunks/chunk.4VWOZ477.js +4 -4
- package/dist-versioned/chunks/chunk.5JPFIM5W.js +3 -3
- package/dist-versioned/chunks/chunk.5TU4CAN7.js +6 -6
- package/dist-versioned/chunks/chunk.65FELEDA.js +3 -3
- package/dist-versioned/chunks/chunk.67LY7Y75.js +4 -4
- package/dist-versioned/chunks/chunk.6F52A4JB.js +3 -3
- package/dist-versioned/chunks/chunk.72LCNWVE.js +3 -3
- package/dist-versioned/chunks/chunk.7DQB3MN6.js +7 -7
- package/dist-versioned/chunks/chunk.7EXDALNL.js +5 -5
- package/dist-versioned/chunks/chunk.AHIYNPL4.js +1 -1
- package/dist-versioned/chunks/chunk.ALJ34SPY.js +4 -4
- package/dist-versioned/chunks/chunk.B5BWUIZC.js +2 -2
- package/dist-versioned/chunks/chunk.BW5BXFWA.js +5 -5
- package/dist-versioned/chunks/chunk.C3L34J75.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.C4HDZU75.js +2 -2
- package/dist-versioned/chunks/chunk.CB7PF3MZ.js +6 -6
- package/dist-versioned/chunks/chunk.CXFXIMXV.js +13 -13
- package/dist-versioned/chunks/chunk.DF2LZ65H.js +2 -2
- package/dist-versioned/chunks/chunk.DGLSKBZE.js +3 -3
- package/dist-versioned/chunks/chunk.DZED227Y.js +1 -1
- package/dist-versioned/chunks/chunk.EQIZ7J5Z.js +25 -25
- package/dist-versioned/chunks/chunk.ES5DW7MC.js +2 -2
- package/dist-versioned/chunks/chunk.HFRDUE6W.js +11 -11
- package/dist-versioned/chunks/chunk.I3DVEGNB.js +11 -11
- package/dist-versioned/chunks/chunk.JKJXDDJU.js +3 -3
- package/dist-versioned/chunks/chunk.JPGYEMXS.js +2 -2
- package/dist-versioned/chunks/chunk.JXDY64LH.js +10 -10
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KSU44YSO.js +7 -7
- package/dist-versioned/chunks/chunk.KXUT6UJL.js +2 -2
- package/dist-versioned/chunks/chunk.MPHRXV2B.js +1 -1
- package/dist-versioned/chunks/chunk.N5RQE7OC.js +1 -1
- package/dist-versioned/chunks/chunk.PAXRRXRW.js +4 -4
- package/dist-versioned/chunks/chunk.PGECK7YI.js +1 -1
- package/dist-versioned/chunks/chunk.QGCJ4WUV.js +5 -5
- package/dist-versioned/chunks/chunk.QIYLIH7P.js +5 -5
- package/dist-versioned/chunks/chunk.QNHUD2SQ.js +42 -42
- package/dist-versioned/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +46 -11
- package/dist-versioned/chunks/chunk.S2ZVBJYN.js +5 -5
- package/dist-versioned/chunks/chunk.SEWHXNAY.js +5 -5
- package/dist-versioned/chunks/chunk.SG7H3CVK.js +12 -12
- package/dist-versioned/chunks/chunk.SMRP2JEM.js +1 -1
- package/dist-versioned/chunks/chunk.TFAIMBF7.js +11 -11
- package/dist-versioned/chunks/chunk.TLAI6IVF.js +2 -2
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UORTR6WB.js +5 -5
- package/dist-versioned/chunks/chunk.VX7JXCCH.js +2 -2
- package/dist-versioned/chunks/chunk.XAU2YS2A.js +5 -5
- package/dist-versioned/chunks/chunk.XQMBT64Z.js +8 -8
- package/dist-versioned/chunks/chunk.YJ46MX3X.js +6 -6
- package/dist-versioned/chunks/chunk.YKGIJFJM.js +23 -23
- package/dist-versioned/chunks/chunk.YRKHHYV5.js +2 -2
- package/dist-versioned/chunks/chunk.Z4IULIBO.js +10 -10
- package/dist-versioned/chunks/chunk.ZLPWCNY6.js +14 -14
- package/dist-versioned/chunks/chunk.ZQ6CXL6H.js +5 -5
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +5 -1
- package/dist-versioned/components/datepicker/datepicker.js +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/file-selector/file-selector.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-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/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 +298 -266
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +3 -3
- package/dist-versioned/solid-components.js +4 -4
- package/dist-versioned/vscode.html-custom-data.json +120 -115
- package/dist-versioned/web-types.json +195 -173
- package/package.json +3 -3
- package/cdn/chunks/chunk.7OG7ICBB.js +0 -2
- package/cdn-versioned/chunks/chunk.7OG7ICBB.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y,b as k}from"./chunk.I2H6CZK5.js";import{a as $}from"./chunk.LHSR56PH.js";import{a as c,c as d}from"./chunk.B2NUKX6G.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as H}from"./chunk.MEDJPDBB.js";import{a as o}from"./chunk.4ZZFYCXX.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as T,b as s,d as p,h as w}from"./chunk.J45556RK.js";import{b as v,e as u}from"./chunk.OBAEIKIV.js";import{b as n,e as l,f as b}from"./chunk.W4QBFD6E.js";import{e}from"./chunk.6EV4YU6C.js";var m={"top-right":null,"bottom-center":null},E=()=>{Object.entries(m).forEach(([a])=>{let h=document.querySelector(`#sd-toast-stack--${a}`);if(h){h.setAttribute("role","region"),m[a]=h;return}m[a]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${a}`,className:`sd-toast-stack sd-toast-stack--${a}`})})};E();var t=class extends w{constructor(){super(...arguments);this.localize=new H(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return m[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(i){this.closable&&i.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([l(this.base),l(this.wrapper)]),this.wrapper.hidden=!1;let i=d(this,"notification.show",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.show${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([l(this.base),l(this.wrapper)]);let i=d(this,"notification.hide",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.hide${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}async toast(){return new Promise(i=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),i()},{once:!0})})}render(){return u`<div part="base" class="${o("w-full flex items-stretch focus-visible:focus-outline")}" id="notification" tabindex="${$(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${o("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${o("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-7-0-
|
|
2
|
-
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([p('[part~="base"]')],t.prototype,"base",2),e([p('[part~="wrapper"]')],t.prototype,"wrapper",2),e([p('[part~="close-button"]')],t.prototype,"close",2),e([s({type:String,reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number,reflect:!0})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-7-0-
|
|
1
|
+
import{a as y,b as k}from"./chunk.I2H6CZK5.js";import{a as $}from"./chunk.LHSR56PH.js";import{a as c,c as d}from"./chunk.B2NUKX6G.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as H}from"./chunk.MEDJPDBB.js";import{a as o}from"./chunk.4ZZFYCXX.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as T,b as s,d as p,h as w}from"./chunk.J45556RK.js";import{b as v,e as u}from"./chunk.OBAEIKIV.js";import{b as n,e as l,f as b}from"./chunk.W4QBFD6E.js";import{e}from"./chunk.6EV4YU6C.js";var m={"top-right":null,"bottom-center":null},E=()=>{Object.entries(m).forEach(([a])=>{let h=document.querySelector(`#sd-toast-stack--${a}`);if(h){h.setAttribute("role","region"),m[a]=h;return}m[a]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${a}`,className:`sd-toast-stack sd-toast-stack--${a}`})})};E();var t=class extends w{constructor(){super(...arguments);this.localize=new H(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return m[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(i){this.closable&&i.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([l(this.base),l(this.wrapper)]),this.wrapper.hidden=!1;let i=d(this,"notification.show",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.show${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([l(this.base),l(this.wrapper)]);let i=d(this,"notification.hide",{dir:this.localize.dir()}),r=d(this,`notification.wrapper.hide${y(k(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,r.keyframes,r.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}async toast(){return new Promise(i=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),i()},{once:!0})})}render(){return u`<div part="base" class="${o("w-full flex items-stretch focus-visible:focus-outline")}" id="notification" tabindex="${$(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${o("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${o("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-7-1-0-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"risk"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-7-1-0-icon></slot><div part="content" class="${o("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 sd-7-1-0-notification-color-border",{info:"sd-7-1-0-notification--info-color-background",success:"sd-7-1-0-notification--success-color-background",warning:"sd-7-1-0-notification--warning-color-background",error:"sd-7-1-0-notification--error-color-background"}[this.variant])}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-7-1-0-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-7-1-0-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-7-1-0-icon></sd-7-1-0-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${o("absolute w-0 h-[2px] bottom-0 sd-7-1-0-notification__duration-indicator-color-background z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};t.styles=[...w.styles,v`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([p('[part~="base"]')],t.prototype,"base",2),e([p('[part~="wrapper"]')],t.prototype,"wrapper",2),e([p('[part~="close-button"]')],t.prototype,"close",2),e([s({type:String,reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number,reflect:!0})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-7-1-0-notification")],t);c("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});c("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});c("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});c("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk.WWGARXPI.js";import{a as z,b as U,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as K}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.MEDJPDBB.js";import{a as S}from"./chunk.4ZZFYCXX.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b,c as C,d as Y,h as A}from"./chunk.J45556RK.js";import{b as q,e as k,i as R}from"./chunk.OBAEIKIV.js";import{e as h}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new K(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.clearable=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=i.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.clearing=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleCalendarIconClick=t=>{if(t.preventDefault(),t.stopPropagation(),!(this.disabled||this.visuallyDisabled||this.readonly)){if(this.open){this.hide(),this.emit("sd-datepicker-close");return}this.show(),this.updateComplete.then(()=>{var e;return(e=this.input)==null?void 0:e.focus({preventScroll:!0})})}};this.handleInput=t=>{var l,o,d,v,m;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(o=t.stopPropagation)==null||o.call(t);return}let e=t.target,a=e.value,n=(d=e.selectionStart)!=null?d:a.length,s=(v=t.inputType)==null?void 0:v.startsWith("delete");if(this.range){let c=a.replace(/\D/g,""),f=c.slice(0,8),p=c.slice(8,16),u=this.buildDmyFromDigits(f),D=this.buildDmyFromDigits(p),g;f.length===0?g="":f.length<8?g=u:p.length>0?g=`${u} - ${D}`:g=s?u:`${u} -`;let x=this.countDigitsBeforeCaret(a,n),w;if(x<=8){let y=this.digitIndexToDmyCaretPos(Math.min(x,8));w=Math.min(y,u.length)}else{let y=f.length<8?u.length:u.length+3,M=Math.min(x-8,8),I=this.digitIndexToDmyCaretPos(M);w=y+Math.min(I,D.length)}this.inputValue=g;let O=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(u)){let y=this.dmyToIso(u),M=y?i.parseLocalISO(y):null;M&&!this.isDisabled(M)&&this.inMinMax(M)&&this.rangeStart!==y&&(this.rangeStart=y,this.previewEnd=null,this.viewMonth=new Date(M.getFullYear(),M.getMonth(),1),this.focusedDate=i.startOfDayLocal(M),O=!0)}else this.rangeStart&&(this.rangeStart=null,O=!0),this.rangeEnd&&(this.rangeEnd=null,O=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(D)&&this.rangeStart){let y=i.parseLocalISO(this.rangeStart),M=this.dmyToIso(D),I=M?i.parseLocalISO(M):null;if(!!I&&!this.isDisabled(I)&&this.inMinMax(I)){let[$,V]=i.compareDates(y,I)<=0?[y,I]:[I,y],P=i.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=i.toLocalISODate(i.startOfDayLocal($)),F=i.toLocalISODate(i.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==F)&&(this.rangeStart=T,this.rangeEnd=F,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=i.startOfDayLocal(V),O=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,O=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),O&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var M;let y=(M=this.input)!=null?M:e;y&&(y.value=this.inputValue,y.setSelectionRange(w,w))})})}else{let c=e,f=c.value,p=(m=c.selectionStart)!=null?m:f.length,u=f.replace(/\D/g,"").slice(0,8),D=u.slice(0,2),g=u.slice(2,4),x=u.slice(4,8),w="";D.length>0&&(w+=D,D.length===2&&(w+=".")),g.length>0&&D.length===2&&(w+=g,g.length===2&&(w+=".")),x.length>0&&D.length===2&&g.length===2&&(w+=x),w=w.replace(/\.\.+/g,".");let O=this.inputValue||"";this.inputValue=w;let y=p,M=L=>{let T=[];for(let F=0;F<L.length;F++)L[F]==="."&&T.push(F);return T},I=M(O),E=M(w),$=I.filter(L=>L<p).length,P=E.filter(L=>L<p).length-$;if(P>0?y+=P:!I.includes(p)&&E.includes(p)&&(y+=1),y=Math.min(Math.max(0,y),w.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:c;L&&(L.value=this.inputValue,L.setSelectionRange(y,y))}),/^\d{2}\.\d{2}\.\d{4}$/.test(w)){let L=this.parseInputText(w);this.applyParsedInput(L)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?i.parseLocalISO(this.rangeStart):null,f=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;c&&!f?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&f&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(f)}`)}else if(this.value){let c=i.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(c)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,a,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Escape"&&this.open){t.preventDefault(),t.stopPropagation(),this.hide(),this.emit("sd-datepicker-close");return}if(t.key==="Tab"&&!t.shiftKey){n&&(this.hide(),this.emit("sd-datepicker-close"));return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(a):this.setYear(a))}};this.onKeyDown=t=>{var s,l,o,d;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),(l=(s=this.shadowRoot)==null?void 0:s.querySelector('button[part="prev-year-button"]'))==null||l.focus({preventScroll:!0});return}let e=t.key,a=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:a=!1}if(a){t.preventDefault();let v=(o=this.viewMonth)!=null?o:this.ensureViewMonth();if(n.getMonth()!==v.getMonth()||n.getFullYear()!==v.getFullYear()){let p=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=p;let u=this.formatMonthYear(p);this.setNavStatus(u)}let c=i.startOfDayLocal(n);c.getTime()!==((d=this.focusedDate)==null?void 0:d.getTime())&&(this.focusedDate=c);let f=c.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(f),this.requestUpdate(),requestAnimationFrame(()=>{let p=this.shadowRoot,u=p==null?void 0:p.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey&&this.open){t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=i.clampDateToMonth(n,s),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var a;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&i.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&i.parseLocalISO(this.rangeStart)||this.value&&i.parseLocalISO(this.value)||this.today;if(!t)return;let e=i.clampDateToMonth(t,this.viewMonth);e.getTime()!==((a=this.focusedDate)==null?void 0:a.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?i.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=i.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var a;let e=this.input;if(e){e.value=(a=this.inputValue)!=null?a:"";let n=e.value.length;e.setSelectionRange(n,n)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?i.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null,a=t!=null?t:e;a&&(this.viewMonth=new Date(a.getFullYear(),a.getMonth(),1),this.focusedDate=i.startOfDayLocal(a)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return i.parseLocalISO(t)}inMinMax(t){let e=s=>{if(s==null)return null;if(s instanceof Date)return i.startOfDayLocal(s);if(typeof s=="number")return i.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?i.startOfDayLocal(l):null}return null},a=e(this.min),n=e(this.max);return!(a&&t<a||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${a}-${n}`;return this.disabledDatesSet.has(s)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let a="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+a},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),a=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${a} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],a=t%100,n=e[(a-20)%10]||e[a]||e[0];return t+n}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let a=JSON.parse(e);Array.isArray(a)&&(t=a)}catch(a){t=[]}else e.length>0&&(t=e.split(",").map(a=>a.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let a=i.compareDates(t,e)<=0?i.startOfDayLocal(t):i.startOfDayLocal(e),n=i.compareDates(t,e)<=0?i.startOfDayLocal(e):i.startOfDayLocal(t),s=new Date(a);for(;i.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=i.parseLocalISO(t);if(e||(e=i.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let a=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${a}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let a=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,a);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==a)return null;let o=i.startOfDayLocal(l);return i.toLocalISODate(o)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let o=l[0];if(!o)return{start:null,end:null,valid:!0};let d=this.dmyToIso(o);return d?{start:d,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let o=(n=l[0])!=null?n:"",d=(s=l[1])!=null?s:"",v=o?this.dmyToIso(o):null,m=d?this.dmyToIso(d):null;return o&&!v?{start:null,end:null,valid:!1}:d&&!m?{start:null,end:null,valid:!1}:{start:v,end:m,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let a=this.dmyToIso(e);return a?{single:a,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var o,d,v,m;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let f=i.parseLocalISO(c);return!(!this.inMinMax(f)||this.isDisabled(f))},a=!1;if(this.range){let c=(o=t.start)!=null?o:null,f=(d=t.end)!=null?d:null;if(!e(c)||f&&!e(f))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?i.parseLocalISO(c):null,u=f?i.parseLocalISO(f):null;if(p&&u){if(i.compareDates(p,u)>0){let x=p;p=u,u=x}if(!this.allowSameDayRange&&i.isSameDay(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let D=p?i.toLocalISODate(i.startOfDayLocal(p)):null,g=u?i.toLocalISODate(i.startOfDayLocal(u)):null;if(this.rangeStart!==D||this.rangeEnd!==g){this.rangeStart=D,this.rangeEnd=g,this.previewEnd=null,a=!0;let x=(v=p!=null?p:u)!=null?v:this.today;this.viewMonth=new Date(x.getFullYear(),x.getMonth(),1),this.focusedDate=i.startOfDayLocal(x),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let n=(m=t.single)!=null?m:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?i.parseLocalISO(n):null,l=s?i.toLocalISODate(i.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,a=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=i.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),a}buildDmyFromDigits(t){let e=t.slice(0,8),a=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=a;return n.length&&(l+="."+n),s.length&&(l+="."+s),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var a,n;((n=(a=t.composedPath)==null?void 0:a.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleClearClick(t){t.stopPropagation(),this.inputValue&&(this.value=null,this.rangeStart=null,this.rangeEnd=null,this.previewEnd=null,this.inputValue="",this.showInvalidStyle=!1,this.showValidStyle=!1,this.input.setCustomValidity(""),this.clearing=!0,this.input.focus({preventScroll:!0}),this.clearing=!1,this.updateComplete.then(()=>{this.input.value="",this.formControlController.updateValidity(),this.emit("sd-clear")}))}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.clearing&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear(),e.getMonth()+t,1);if(a.getMonth()===e.getMonth()&&a.getFullYear()===e.getFullYear())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:a}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear()+t,e.getMonth(),1);if(a.getFullYear()===e.getFullYear()&&a.getMonth()===e.getMonth())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:a}})}focusInitialGridDay(){var n;let t=null;if(!this.range&&this.value){let s=i.parseLocalISO(this.value);s&&(t=i.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?i.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;s?t=i.startOfDayLocal(s):l&&(t=i.startOfDayLocal(l))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(o=>o.getMonth()===e.getMonth()&&i.isSameDay(o,this.today)&&!this.isDisabled(o));if(l)t=i.startOfDayLocal(l);else{let o=s.flat().find(d=>d.getMonth()===e.getMonth()&&!this.isDisabled(d));t=o?i.startOfDayLocal(o):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=i.startOfDayLocal(t),a=i.toLocalISODate(e);if(this.value===a)return;this.value=a;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=s.value.length;s.setSelectionRange(o,o)})}))})}selectRangeDate(t){if(this.readonly)return;let e=i.startOfDayLocal(t),a=this.rangeStart?i.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(!a&&!n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let l=this.input;l&&(l.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let d=l.value.length;l.setSelectionRange(d,d)})}))});return}if(a&&!n){if(this.isDisabled(e))return;if(i.isSameDay(a,e)){if(!this.allowSameDayRange){this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var p;let f=this.input;f&&(f.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=f.value.length;f.setSelectionRange(u,u)})}))});return}this.rangeStart=i.toLocalISODate(e),this.rangeEnd=i.toLocalISODate(e),this.previewEnd=null;let m=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${m}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var f;let c=this.input;c&&(c.value=(f=this.inputValue)!=null?f:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let s=i.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,o]=i.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=i.toLocalISODate(l),this.rangeEnd=i.toLocalISODate(o),this.previewEnd=null;let d=this.formatSelectionLabel(l),v=this.formatSelectionLabel(o);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.announceSelect(`${this.termEndSelected()}: ${v}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let m=this.input;m&&(m.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=m.value.length;m.setSelectionRange(f,f)})}))});return}if(a&&n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let l=this.input;l&&(l.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let d=l.value.length;l.setSelectionRange(d,d)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var v;let e=(v=this.firstDayOfWeek)!=null?v:1,a=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(a),s=(a.getDay()-e+7)%7;n.setDate(a.getDate()-s);let l=[],o=n;for(let m=0;m<6;m++){let c=[];for(let f=0;f<7;f++)c.push(new Date(o)),o.setDate(o.getDate()+1);l.push(c)}let d=m=>m.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&d(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),a=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{a.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(o){a.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return a}getTabTargetDayForCurrentView(t){var o;let e=(o=this.viewMonth)!=null?o:this.ensureViewMonth(),a=null;if(!this.range&&this.value){let d=i.parseLocalISO(this.value);d&&(a=i.startOfDayLocal(d))}if(this.range){let d=this.rangeStart?i.parseLocalISO(this.rangeStart):null,v=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;d?a=i.startOfDayLocal(d):v&&(a=i.startOfDayLocal(v))}if((d=>d?d.getFullYear()===e.getFullYear()&&d.getMonth()===e.getMonth()&&!this.isDisabled(d):!1)(a))return a;let s=t.flat().find(d=>d.getMonth()===e.getMonth()&&i.isSameDay(d,this.today)&&!this.isDisabled(d));if(s)return i.startOfDayLocal(s);let l=t.flat().find(d=>d.getMonth()===e.getMonth()&&!this.isDisabled(d));return l?i.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(e&&!a){let n=i.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var f,p;let t=(f=this.viewMonth)!=null?f:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),a=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,o=this.rangeEnd?this.parseISO(this.rangeEnd):null,d=this.previewEnd,v=u=>!this.range||!l||o||!d?!1:i.isBetweenInclusive(u,l,d),m=this.getTabTargetDayForCurrentView(e),c=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return k`<div part="datepicker" id="calendar" role="dialog" aria-label="${this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")}" class="${S("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(p=this.currentPlacement)!=null&&p.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-7-1-0-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-7-1-0-icon></button> <button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-1-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-1-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${a}</div><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-1-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-1-0-icon></button> <button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-7-1-0-icon library="_internal" name="chevrons-small-right" class="h-6 w-6"></sd-7-1-0-icon></button></div></div><sd-7-1-0-divider></sd-7-1-0-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${a}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((u,D)=>k`<div role="columnheader" aria-colindex="${D+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${u}" title="${u}" id="${"col-"+(D+1)}">${u}</div>`)}</div>${e.map((u,D)=>k`<div class="grid-row grid grid-cols-7 ${D===0?"mt-2":""}" role="row" aria-rowindex="${D+2}">${u.map((g,x)=>{let w=g.getMonth()===t.getMonth(),O=this.isDisabled(g)||!this.inMinMax(g),y=i.isSameDay(g,this.focusedDate),M=i.isSameDay(g,this.today),I=!this.range&&s?i.isSameDay(g,s):!1,E=this.range&&l?i.isSameDay(g,l):!1,$=this.range&&o?i.isSameDay(g,o):!1,V=this.range&&l&&o?i.isBetweenInclusive(g,l,o):!1,P=v(g)&&!O,L=-1,T=m&&i.isSameDay(g,m);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&y)&&(L=0);let F=this.isWeekend(g),j=g.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=E?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return k`<button type="button" part="day" class="${S("cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",this.size==="sm"?"text-sm h-6":"text-base h-8",E||$?"sd-7-1-0-datepicker__date-item--selected-color-background sd-7-1-0-datepicker__date-item--selected-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text":"hover:sd-7-1-0-datepicker__date-item--hover--default-color-text",!E&&!$&&!V&&"hover:sd-7-1-0-datepicker__date-item--hover--default-color-background",I?"selected border-primary sd-7-1-0-datepicker__date-item--selected-color-background sd-7-1-0-datepicker__date-item--selected-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background":(E||$)&&!w?"out-month":w?this.isInDisabledDates(g)||!this.inMinMax(g)?"out-month text-neutral-500":this.disabledWeekends&&F?"weekend-day text-neutral-500":"in-month sd-7-1-0-datepicker__date-item--default-color-text":this.disabledWeekends&&F?"out-month weekend-day text-neutral-500":F?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-7-1-0-datepicker__date-item--hover--prev-next-color-text hover:sd-7-1-0-datepicker__date-item--hover--prev-next-color-background",E?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!E&&!$?"in-range selected sd-7-1-0-datepicker__date-item--range-color-background rounded-none hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!E&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",M&&!I&&!E&&!$&&y?"today border-[1px] border-primary focus-visible:border-transparent sd-7-1-0-datepicker__date-item--current-font-weight":"",O?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",y?"focused":"")}" role="gridcell" aria-colindex="${x+1}" aria-labelledby="${"col-"+(x+1)}" .tabIndex="${L}" ?disabled="${this.disabled||this.readonly}" aria-disabled="${O||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${I||V||E||$?"true":"false"}" aria-current="${M?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=i.startOfDayLocal(g)}" @mouseenter="${()=>this.onDayMouseEnter(g)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=i.startOfDayLocal(g),this.selectDate(g)}}">${g.getDate()}</button>`})}</div>`)}</div></div>`}render(){var u,D;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,a=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.clearable&&!this.readonly&&!this.disabled&&!this.visuallyDisabled,o=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,d=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",v={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],c=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle&&!this.open?"activeInvalid":this.hasFocus&&!this.open&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",f={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",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"}[c],p=this.size==="sm"?"text-sm":"text-base";return k`<div part="form-control" class="${S("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?k`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${S(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",p)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?k`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${S("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?k`<label id="label" part="form-control-floating-label" class="${S("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",o?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",o&&"mt-1")}" for="input"><span class="${S("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",o&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${S("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",f,this.open&&((u=this.currentPlacement)!=null&&u.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-7-1-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${S("inline-flex relative w-full",(D=this.currentPlacement)!=null&&D.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${S("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",c==="disabled"||c==="visuallyDisabled"?"text-neutral-500":"text-black",c==="invalid"&&"form-control--invalid-color-background",c==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar" aria-describedby="${a?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${S("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],p,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||o?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${l?k`<button part="clear-button" class="${S("flex justify-center",v,this.inputValue.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}"><slot name="clear-icon"><sd-7-1-0-icon class="${S("text-neutral-700",m)}" library="_internal" name="close-circle"></sd-7-1-0-icon></slot></button>`:""} ${this.showInvalidStyle?k`<sd-7-1-0-icon part="invalid-icon" class="${S("text-error",v,m)}" library="_internal" name="risk"></sd-7-1-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?k`<sd-7-1-0-icon class="${S("text-success shrink-0",v,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-1-0-icon>`:""}<sd-7-1-0-icon class="${S(d,v,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.handleCalendarIconClick}"></sd-7-1-0-icon></div>${this.renderCalendar()}</sd-7-1-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${S("text-sm mt-1",a?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!a}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,70 109 175))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,0 53 142))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],h([b({type:String,reflect:!0})],r.prototype,"locale",2),h([b({type:String,converter:z,reflect:!0})],r.prototype,"value",2),h([b({type:Boolean,reflect:!0})],r.prototype,"range",2),h([b({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),h([b({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),h([b({type:Boolean})],r.prototype,"allowSameDayRange",2),h([b({type:String,converter:z,reflect:!0})],r.prototype,"min",2),h([b({type:String,converter:z,reflect:!0})],r.prototype,"max",2),h([b({attribute:"view-month",converter:U})],r.prototype,"viewMonth",2),h([b({type:Number})],r.prototype,"firstDayOfWeek",2),h([b({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),h([b({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),h([b({attribute:!1})],r.prototype,"isDateDisabled",2),h([b({type:String,reflect:!0})],r.prototype,"size",2),h([b({type:String})],r.prototype,"alignment",2),h([b({type:String,reflect:!0})],r.prototype,"label",2),h([b({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),h([b({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),h([b({type:Boolean,reflect:!0})],r.prototype,"disabled",2),h([b({type:Boolean,reflect:!0})],r.prototype,"required",2),h([b({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),h([b({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),h([b({type:Boolean,reflect:!0})],r.prototype,"readonly",2),h([b({type:Boolean,reflect:!0})],r.prototype,"clearable",2),h([b({type:String,reflect:!0})],r.prototype,"placement",2),h([b({type:String,reflect:!0})],r.prototype,"placeholder",2),h([b({reflect:!0})],r.prototype,"name",2),h([b({type:String,reflect:!0})],r.prototype,"form",2),h([C()],r.prototype,"open",2),h([C()],r.prototype,"focusedDate",2),h([C()],r.prototype,"today",2),h([C()],r.prototype,"disabledDatesSet",2),h([C()],r.prototype,"previewEnd",2),h([C()],r.prototype,"statusNavText",2),h([C()],r.prototype,"statusSelectText",2),h([C()],r.prototype,"hasFocus",2),h([C()],r.prototype,"showValidStyle",2),h([C()],r.prototype,"showInvalidStyle",2),h([C()],r.prototype,"currentPlacement",2),h([C()],r.prototype,"inputValue",2),h([Y("sd-7-1-0-popup")],r.prototype,"popup",2),h([Y("#invalid-message")],r.prototype,"invalidMessage",2),h([Y("#input")],r.prototype,"input",2),h([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),h([_("locale")],r.prototype,"handleLocaleChange",1),h([_("viewMonth")],r.prototype,"handleViewMonthChange",1),h([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),h([_("value")],r.prototype,"handleValueChange",1),h([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),h([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),h([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=h([H("sd-7-1-0-datepicker")],r);export{r as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as s,b as i,d,h as n}from"./chunk.J45556RK.js";import{b as l,e}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var t=class extends n{constructor(){super(...arguments);this.variant="white";this.open=!1;this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}onToggleClick(){this.open=!this.open}render(){let o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return e`<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/60 to-white/0",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/60 to-primary-800/0")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0 pointer-events-none",{white:"sd-7-0-
|
|
1
|
+
import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as s,b as i,d,h as n}from"./chunk.J45556RK.js";import{b as l,e}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var t=class extends n{constructor(){super(...arguments);this.variant="white";this.open=!1;this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}onToggleClick(){this.open=!this.open}render(){let o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return e`<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/60 to-white/0",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/60 to-primary-800/0")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0 pointer-events-none",{white:"sd-7-1-0-teaser-media--white-color-background group-hover:sd-7-1-0-teaser-media--white--hover-color-background ","neutral-100":"sd-7-1-0-teaser-media--neutral-100-color-background group-hover:sd-7-1-0-teaser-media--neutral-100--hover-color-background",primary:"bg-primary/80 text-white group-hover:bg-primary/90","primary-100":"sd-7-1-0-teaser-media--primary-100-color-background group-hover:sd-7-1-0-teaser-media--primary-100--hover-color-background","gradient-light":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.variant])}"></div><div class="relative flex 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</slot></div><div part="meta" class="${r("gap-2 mb-2 order-1",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}"><slot></slot></div><div class="${r("mt-3 transition-opacity duration-300",!this.open&&"hidden",this.open?"opacity-100":"opacity-0")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div>${o["teaser-has-expandable"]?e`<button part="toggle" class="${r("mt-2",["primary","gradient-dark"].includes(this.variant)?"text-white":"sd-7-1-0-teaser-media-color-icon-fill")}" @click="${this.onToggleClick}" aria-expanded="${this.open}" aria-label="${this.open?"Collapse content":"Expand content"}"><div class="h-full justify-start flex items-start"><sd-7-1-0-icon class="${r("w-6 h-6 transition-transform",this.open&&"rotate-180")}" library="_internal" name="chevron-bottom"></sd-7-1-0-icon></div></button>`:null}</div></div></div><div class="${r("mb-4 -z-10",!o["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};t.styles=[...n.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
2
|
:host{display:block}::slotted(*){margin:0}:host([variant=white]) .background:focus-within{background-color:rgba(var(--sd-color-background-white,255 255 255))}@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,255 255 255)) var(--sd-opacity-90,90%),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-neutral-100,246 246 246))}@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,246 246 246)) var(--sd-opacity-90,90%),transparent)}}:host([variant=primary]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary,0 53 142))}@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,0 53 142)) var(--sd-opacity-90,90%),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary-100,236 240 249))}@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,236 240 249)) var(--sd-opacity-90,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
|
-
)}[part=toggle]{width:-moz-fit-content;width:fit-content;outline-color:transparent}:host([variant=gradient-dark]) [part=toggle]:focus-visible,:host([variant=primary]) [part=toggle]:focus-visible{outline-color:rgba(var(--sd-color-text-white))}`],a([i({type:String,reflect:!0})],t.prototype,"variant",2),a([i({type:Boolean,reflect:!0})],t.prototype,"open",2),a([d('[part="base"]')],t.prototype,"teaserMedia",2),t=a([s("sd-7-0-
|
|
5
|
+
)}[part=toggle]{width:-moz-fit-content;width:fit-content;outline-color:transparent}:host([variant=gradient-dark]) [part=toggle]:focus-visible,:host([variant=primary]) [part=toggle]:focus-visible{outline-color:rgba(var(--sd-color-text-white))}`],a([i({type:String,reflect:!0})],t.prototype,"variant",2),a([i({type:Boolean,reflect:!0})],t.prototype,"open",2),a([d('[part="base"]')],t.prototype,"teaserMedia",2),t=a([s("sd-7-1-0-teaser-media")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk.4ZZFYCXX.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.J45556RK.js";import{b as s,e as r}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-7-0-
|
|
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-7-0-
|
|
1
|
+
import{a as c}from"./chunk.4ZZFYCXX.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.J45556RK.js";import{b as s,e as r}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-7-1-0-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.3.2 | 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-7-1-0-tab-panel")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk.LHSR56PH.js";import{a as S}from"./chunk.MEDJPDBB.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as T,b as h,c as f,d as u,h as y}from"./chunk.J45556RK.js";import{b as k,e as c}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var n=class extends y{constructor(){super(...arguments);this.localize=new S(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,l=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,i={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&l,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},m=a.left&&!i.left,v=a.up&&!i.up,E=a.right&&!i.right,b=a.down&&!i.down;(m||v)&&this.dispatchEvent(new CustomEvent("start")),(E||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=i}handleScroll(t,l){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",i=!["mouse","touch"].includes((z=l==null?void 0:l.pointerType)!=null?z:""),m=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[m]:e});let v=`button-${t}`;this.dispatchEvent(new CustomEvent(v,{bubbles:!0,composed:!0}));let b=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&b<=0,H=a==="end"&&b>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-7-0-
|
|
2
|
-
:host{--gradient-color:transparent;--gradient:var(--gradient-color) 0%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 80%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,transparent 50%,rgba(24,24,24,.4) 100%)}.sd-7-0-
|
|
1
|
+
import{a as s}from"./chunk.LHSR56PH.js";import{a as S}from"./chunk.MEDJPDBB.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as T,b as h,c as f,d as u,h as y}from"./chunk.J45556RK.js";import{b as k,e as c}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var n=class extends y{constructor(){super(...arguments);this.localize=new S(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,l=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,i={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&l,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},m=a.left&&!i.left,v=a.up&&!i.up,E=a.right&&!i.right,b=a.down&&!i.down;(m||v)&&this.dispatchEvent(new CustomEvent("start")),(E||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=i}handleScroll(t,l){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",i=!["mouse","touch"].includes((z=l==null?void 0:l.pointerType)!=null?z:""),m=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[m]:e});let v=`button-${t}`;this.dispatchEvent(new CustomEvent(v,{bubbles:!0,composed:!0}));let b=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&b<=0,H=a==="end"&&b>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-7-1-0-icon"))==null||B.setAttribute("label",L),i?p==null||p.focus():g==null||g.blur()}handleButtonBlur(t,l){var i;let d=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(i=l.target.querySelector("sd-7-1-0-icon"))==null||i.setAttribute("label",d)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",l="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return c`<div part="base" class="${r("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?c`${this.isScrollHorizontalEnabled?c`<div part="button-left" class="${r("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${r(t)}" aria-hidden="${s(!this.canScroll.left||void 0)}" tabindex="${s(this.canScroll.left?void 0:-1)}" @click="${e=>this.handleScroll("left",e)}" @blur="${e=>this.handleButtonBlur("left",e)}"><slot name="icon-start"><sd-7-1-0-icon library="_internal" name="chevron-top" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-7-1-0-icon></slot></button></div><div part="button-right" class="${r("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${r(t)}" aria-hidden="${s(!this.canScroll.right||void 0)}" tabindex="${s(this.canScroll.right?void 0:-1)}" @click="${e=>this.handleScroll("right",e)}" @blur="${e=>this.handleButtonBlur("right",e)}"><slot name="icon-end"><sd-7-1-0-icon library="_internal" name="chevron-bottom" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-7-1-0-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="button-top" class="${r("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${r(t)}" aria-hidden="${s(!this.canScroll.up||void 0)}" tabindex="${s(this.canScroll.up?void 0:-1)}" @click="${e=>this.handleScroll("up",e)}" @blur="${e=>this.handleButtonBlur("up",e)}"><slot name="icon-start"><sd-7-1-0-icon library="_internal" name="chevron-top" label="${this.localize.term("scrollToStart")}"></sd-7-1-0-icon></slot></button></div><div part="button-bottom" class="${r("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${r(t)}" aria-hidden="${s(!this.canScroll.down||void 0)}" tabindex="${s(this.canScroll.down?void 0:-1)}" @click="${e=>this.handleScroll("down",e)}" @blur="${e=>this.handleButtonBlur("down",e)}"><slot name="icon-end"><sd-7-1-0-icon library="_internal" name="chevron-bottom" label="${this.localize.term("scrollToEnd")}"></sd-7-1-0-icon></slot></button></div>`:null}`:null} ${this.shadows?c`${this.isScrollHorizontalEnabled?c`<div part="shadow-left" class="${r("left top-0 left-0 w-[6px] h-full",l,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${r("right top-0 right-0 w-[6px] h-full",l,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="shadow-top" class="${r("top top-0 left-0 w-full h-[6px]",l,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${r("bottom bottom-0 left-0 w-full h-[6px]",l,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};n.styles=[...y.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--gradient-color:transparent;--gradient:var(--gradient-color) 0%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 80%,rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))) 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,transparent 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,transparent 50%,rgba(24,24,24,.4) 100%)}.sd-7-1-0-icon--top{align-self:flex-start}.sd-7-1-0-icon--down{align-self:flex-end}`],o([u('[part="button-right"] button')],n.prototype,"rightButton",2),o([u('[part="button-left"] button')],n.prototype,"leftButton",2),o([u('[part="button-bottom"] button')],n.prototype,"downButton",2),o([u('[part="button-top"] button')],n.prototype,"upButton",2),o([u(".scroll-container")],n.prototype,"container",2),o([u("#announcement-container")],n.prototype,"announcementContainer",2),o([h({type:String,reflect:!0})],n.prototype,"orientation",2),o([h({type:Boolean,reflect:!0})],n.prototype,"scrollbars",2),o([h({type:Boolean,reflect:!0})],n.prototype,"buttons",2),o([h({type:Boolean,reflect:!0})],n.prototype,"shadows",2),o([h({type:Boolean,reflect:!0})],n.prototype,"inset",2),o([h({type:Number,reflect:!0})],n.prototype,"step",2),o([f()],n.prototype,"canScroll",2),o([f()],n.prototype,"isScrollHorizontalEnabled",2),o([f()],n.prototype,"isScrollVerticalEnabled",2),n=o([T("sd-7-1-0-scrollable")],n);export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk.MEDJPDBB.js";import{a as p,d as f,h as m}from"./chunk.J45556RK.js";import{b as u,e as h}from"./chunk.OBAEIKIV.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-7-0-
|
|
2
|
-
:host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md,.375rem);padding-inline:var(--sd-spacing-2,.5rem);padding-block:var(--sd-spacing-3,.75rem);--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75))!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-7-0-
|
|
1
|
+
import{a as w}from"./chunk.MEDJPDBB.js";import{a as p,d as f,h as m}from"./chunk.J45556RK.js";import{b as u,e as h}from"./chunk.OBAEIKIV.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-7-1-0-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};a.styles=[...m.styles,u`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md,.375rem);padding-inline:var(--sd-spacing-2,.5rem);padding-block:var(--sd-spacing-3,.75rem);--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75))!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-7-1-0-divider){padding-block:var(--sd-spacing-3,.75rem)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],c([f("slot")],a.prototype,"defaultSlot",2),a=c([p("sd-7-1-0-menu")],a);export{a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk.DSKB3SEU.js";import{a as h,b as u}from"./chunk.CGQ2BPPZ.js";import{a as l}from"./chunk.4ZZFYCXX.js";import{a}from"./chunk.NYKJXI3Q.js";import{a as d,b as i,d as r,h as n}from"./chunk.J45556RK.js";import{b as c,e as o}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new h(this,"submenu");this.submenuController=new b(this,this.hasSlotController);this.handleHostClick=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())};this.handleMouseOver=s=>{this.focus(),s.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let s=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=s;return}s!==this.cachedTextLabel&&(this.cachedTextLabel=s,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return u(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let s=this.submenuController.isExpanded(),p={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return o`<div id="anchor" part="base" class="${l("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap !navigable-border-radius",this.disabled?"outline-none cursor-not-allowed sd-7-0-
|
|
2
|
-
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-7-0-
|
|
1
|
+
import{a as b}from"./chunk.DSKB3SEU.js";import{a as h,b as u}from"./chunk.CGQ2BPPZ.js";import{a as l}from"./chunk.4ZZFYCXX.js";import{a}from"./chunk.NYKJXI3Q.js";import{a as d,b as i,d as r,h as n}from"./chunk.J45556RK.js";import{b as c,e as o}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new h(this,"submenu");this.submenuController=new b(this,this.hasSlotController);this.handleHostClick=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())};this.handleMouseOver=s=>{this.focus(),s.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let s=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=s;return}s!==this.cachedTextLabel&&(this.cachedTextLabel=s,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return u(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let s=this.submenuController.isExpanded(),p={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return o`<div id="anchor" part="base" class="${l("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap !navigable-border-radius",this.disabled?"outline-none cursor-not-allowed sd-7-1-0-menu-item--disabled-color-text hover:bg-transparent":"cursor-pointer sd-7-1-0-menu-item-color-text hover:bg-neutral-200",this.isSubmenu()&&s&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!s}">${this.type==="checkbox"?o`<span part="checked-icon" class="${l("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-7-1-0-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-7-1-0-icon></span>`:""} ${p.iconIndent?o`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?o`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-7-1-0-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-7-1-0-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};e.styles=[...n.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-7-1-0-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded::after{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200,233 233 233));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}:host [part=checked-icon],:host [part=icon-indent],:host [part=submenu-icon]{color:rgba(var(--sd-menu-item-color-icon-fill))}:host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu-item--disabled-color-icon-fill))}sd-7-1-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white,255 255 255));margin-left:var(--submenu-offset)}::slotted(sd-7-1-0-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}.sd-7-1-0-menu-item-color-text{color:rgba(var(--sd-menu-item-color-text))}.sd-7-1-0-menu-item--disabled-color-text{color:rgba(var(--sd-menu-item--disabled-color-text))}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],t([r("slot:not([name])")],e.prototype,"defaultSlot",2),t([r('part="base"')],e.prototype,"menuItem",2),t([i()],e.prototype,"type",2),t([i({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i()],e.prototype,"value",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled")],e.prototype,"handleDisabledChange",1),t([a("type")],e.prototype,"handleTypeChange",1),e=t([d("sd-7-1-0-menu-item")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p,b,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.ERP45OHF.js";import{b as D}from"./chunk.LZRL7OLU.js";import{a as d}from"./chunk.LHSR56PH.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as w}from"./chunk.MEDJPDBB.js";import{a as c}from"./chunk.4ZZFYCXX.js";import{a as C,b as h,d as f,e as I,h as T}from"./chunk.J45556RK.js";import{b as E,e as v}from"./chunk.OBAEIKIV.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 w(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._dragStyleElement=null;this._preventSelectStart=t=>t.preventDefault();this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(p):t||[],b(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}disconnectedCallback(){super.disconnectedCallback(),this._restoreTextSelection()}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async t=>{var i,a;let e=t.parentElement;await e.updateComplete,(a=(i=e.shadowRoot)==null?void 0:i.querySelector("sd-7-0-3-popup"))==null||a.setAttribute("distance","14")})}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(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,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let i=+e.dataset.rangeId;this._rangeValues.has(i)&&(this.moveThumb(e,this._rangeValues.get(i)),this.tooltip==="always-visible"&&(e.parentElement.closeTrigger="manual",e.parentElement.show()))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let i=this._rangeValues.get(e),a=t.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",n=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${s}, ${n}%)`,t.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${n}%))`;return}let e=this._value.slice().sort(p),i=100*(e[0]-this.min)/(this.max-this.min),a=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${i}%`,t.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let i=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(t),n=i[s-1]||this.min,r=i[s+1]||this.max,u=e<n||e>r;return{finalValue:Math.max(n,Math.min(r,e)),isRestricted:u,nextValue:r,prevValue:n}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=t,a=Array.from(this.thumbs),s=_(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 k=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),V=Math.abs(k-r),$=Math.abs(L-r);return V===$?k<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",t);e&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(t){this.onClickTrack(t,!1)}_preventTextSelection(){if(!this._dragStyleElement){let t=document.createElement("style");t.setAttribute("data-sd-7-0-3-range-drag",""),t.textContent="*, *::before, *::after { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(t),this._dragStyleElement=t}document.addEventListener("selectstart",this._preventSelectStart)}_restoreTextSelection(){this._dragStyleElement&&(this._dragStyleElement.remove(),this._dragStyleElement=null),document.removeEventListener("selectstart",this._preventSelectStart)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;if(this.updateTooltip(e),e.dataset.pointerId)try{e.releasePointerCapture(+e.dataset.pointerId)}catch(i){}e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),this._preventTextSelection(),e.classList.add("grabbed"),this.tooltip==="on-interaction"&&await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,i=+e.dataset.rangeId;if(!this._rangeValues.has(i)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let s=_(this.inputWrapper,t.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:e,value:r}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,r);m.isRestricted?(r=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(e,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),this._restoreTextSelection(),delete e.dataset.pointerId,b(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await e.parentElement.hide())}onKeyPress(t){let e=t.target,i=+e.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(t.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:e,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(e,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(e,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(i=e==null?void 0:e.dataset)!=null&&i.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=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 e?(u=t?`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=t?"label aria-label-hidden":"",v`<sd-7-0-3-tooltip 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}" @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-7-0-3-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),i=!!(this.helpText||t.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${c("w-full text-start",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${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(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,E`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
[part='base']{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select: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-background-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-background-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([I('[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-7-0-
|
|
1
|
+
import{a as p,b,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.ERP45OHF.js";import{b as D}from"./chunk.LZRL7OLU.js";import{a as d}from"./chunk.LHSR56PH.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as w}from"./chunk.MEDJPDBB.js";import{a as c}from"./chunk.4ZZFYCXX.js";import{a as C,b as h,d as f,e as I,h as T}from"./chunk.J45556RK.js";import{b as E,e as v}from"./chunk.OBAEIKIV.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 w(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._dragStyleElement=null;this._preventSelectStart=t=>t.preventDefault();this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(p):t||[],b(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}disconnectedCallback(){super.disconnectedCallback(),this._restoreTextSelection()}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async t=>{var i,a;let e=t.parentElement;await e.updateComplete,(a=(i=e.shadowRoot)==null?void 0:i.querySelector("sd-7-1-0-popup"))==null||a.setAttribute("distance","14")})}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(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,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let i=+e.dataset.rangeId;this._rangeValues.has(i)&&(this.moveThumb(e,this._rangeValues.get(i)),this.tooltip==="always-visible"&&(e.parentElement.closeTrigger="manual",e.parentElement.show()))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let i=this._rangeValues.get(e),a=t.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",n=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${s}, ${n}%)`,t.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${n}%))`;return}let e=this._value.slice().sort(p),i=100*(e[0]-this.min)/(this.max-this.min),a=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${i}%`,t.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let i=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(t),n=i[s-1]||this.min,r=i[s+1]||this.max,u=e<n||e>r;return{finalValue:Math.max(n,Math.min(r,e)),isRestricted:u,nextValue:r,prevValue:n}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=t,a=Array.from(this.thumbs),s=_(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 k=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),V=Math.abs(k-r),$=Math.abs(L-r);return V===$?k<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",t);e&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(t){this.onClickTrack(t,!1)}_preventTextSelection(){if(!this._dragStyleElement){let t=document.createElement("style");t.setAttribute("data-sd-7-1-0-range-drag",""),t.textContent="*, *::before, *::after { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(t),this._dragStyleElement=t}document.addEventListener("selectstart",this._preventSelectStart)}_restoreTextSelection(){this._dragStyleElement&&(this._dragStyleElement.remove(),this._dragStyleElement=null),document.removeEventListener("selectstart",this._preventSelectStart)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;if(this.updateTooltip(e),e.dataset.pointerId)try{e.releasePointerCapture(+e.dataset.pointerId)}catch(i){}e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),this._preventTextSelection(),e.classList.add("grabbed"),this.tooltip==="on-interaction"&&await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,i=+e.dataset.rangeId;if(!this._rangeValues.has(i)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let s=_(this.inputWrapper,t.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:e,value:r}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,r);m.isRestricted?(r=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(e,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),this._restoreTextSelection(),delete e.dataset.pointerId,b(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await e.parentElement.hide())}onKeyPress(t){let e=t.target,i=+e.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(t.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:e,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(e,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(e,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(i=e==null?void 0:e.dataset)!=null&&i.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=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 e?(u=t?`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=t?"label aria-label-hidden":"",v`<sd-7-1-0-tooltip 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}" @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-7-1-0-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),i=!!(this.helpText||t.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${c("w-full text-start",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${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(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,E`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
[part='base']{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select: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-background-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-background-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([I('[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-7-1-0-range")],l);export{l as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk.LHSR56PH.js";import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as u}from"./chunk.MEDJPDBB.js";import{a as t}from"./chunk.4ZZFYCXX.js";import{a as h,b as i,h as d}from"./chunk.J45556RK.js";import{b as c,e as r,i as n}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var e=class extends d{constructor(){super();this.hasSlotController=new p(this,"label");this.value=null;this.max=100;this.label="";this.valuePosition=null;this.inverted=!1;this.showLabel=!1;this.localize=new u(this);this.valueFormatter=this.localize.number.bind(this.localize)}get safeMax(){return this.max>0?this.max:100}get clampedValue(){var o;return Math.min(Math.max((o=this.value)!=null?o:0,0),this.safeMax)}get percentage(){return this.clampedValue/this.safeMax*100}get isLoading(){return this.value===void 0||this.value===null||isNaN(this.value)}get showValue(){return!this.isLoading&&(this.valuePosition==="right"||this.valuePosition==="bottom")}render(){let o={label:this.hasSlotController.test("label")},l=this.label?!0:!!o.label;return r`<div part="base" class="text-start" aria-hidden="${!l}">${l?r`<label part="label" id="label" class="${t("text-base",!this.showLabel&&"sr-only",this.inverted?"text-white":"text-black")}" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label>`:n}<div class="${t(this.valuePosition==="right"?"flex flex-row items-center gap-2 -mt-1":this.valuePosition==="bottom"?"flex flex-col gap-1 mt-1":"mt-1")}"><div part="bar" id="bar" class="${t("w-full h-[var(--height,0.125rem)]",this.isLoading?"relative ":"flex")}" role="progressbar" aria-valuemin="0" aria-valuemax="${this.safeMax}" aria-valuenow="${s(this.isLoading?void 0:this.valueFormatter(this.clampedValue))}" aria-valuetext="${s(this.isLoading?this.localize.term("loading"):this.valueFormatter(this.clampedValue))}" aria-label="${s(l?void 0:this.label||this.localize.term("progress"))}" aria-labelledby="${s(l?"label":this.label)}" style="${`--percentage: ${this.percentage}%;`}">${this.isLoading?r`<div part="track" class="${t("absolute top-0 left-0 h-full progress-bar__track--loading-left",this.inverted?"sd-7-0-
|
|
2
|
-
:host{display:block;width:100%}.progress-bar__indicator--loading{width:25%;animation:progress-loading-indicator 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-left{animation:progress-loading-track-left 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-right{animation:progress-loading-track-right 1.25s ease-in-out infinite alternate}@keyframes progress-loading-indicator{0%{left:0}100%{left:75%}}@keyframes progress-loading-track-left{0%{width:0}100%{width:calc(75% - .25rem)}}@keyframes progress-loading-track-right{0%{width:calc(75% - .25rem)}100%{width:0}}`],a([i({type:Number,reflect:!0})],e.prototype,"value",2),a([i({type:Number,reflect:!0})],e.prototype,"max",2),a([i({type:String,reflect:!0})],e.prototype,"label",2),a([i({type:String,reflect:!0,attribute:"value-position"})],e.prototype,"valuePosition",2),a([i({type:Boolean,reflect:!0})],e.prototype,"inverted",2),a([i({type:Boolean,reflect:!0,attribute:"show-label"})],e.prototype,"showLabel",2),a([i({attribute:!1})],e.prototype,"valueFormatter",2),e=a([h("sd-7-0-
|
|
1
|
+
import{a as s}from"./chunk.LHSR56PH.js";import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as u}from"./chunk.MEDJPDBB.js";import{a as t}from"./chunk.4ZZFYCXX.js";import{a as h,b as i,h as d}from"./chunk.J45556RK.js";import{b as c,e as r,i as n}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var e=class extends d{constructor(){super();this.hasSlotController=new p(this,"label");this.value=null;this.max=100;this.label="";this.valuePosition=null;this.inverted=!1;this.showLabel=!1;this.localize=new u(this);this.valueFormatter=this.localize.number.bind(this.localize)}get safeMax(){return this.max>0?this.max:100}get clampedValue(){var o;return Math.min(Math.max((o=this.value)!=null?o:0,0),this.safeMax)}get percentage(){return this.clampedValue/this.safeMax*100}get isLoading(){return this.value===void 0||this.value===null||isNaN(this.value)}get showValue(){return!this.isLoading&&(this.valuePosition==="right"||this.valuePosition==="bottom")}render(){let o={label:this.hasSlotController.test("label")},l=this.label?!0:!!o.label;return r`<div part="base" class="text-start" aria-hidden="${!l}">${l?r`<label part="label" id="label" class="${t("text-base",!this.showLabel&&"sr-only",this.inverted?"text-white":"text-black")}" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label>`:n}<div class="${t(this.valuePosition==="right"?"flex flex-row items-center gap-2 -mt-1":this.valuePosition==="bottom"?"flex flex-col gap-1 mt-1":"mt-1")}"><div part="bar" id="bar" class="${t("w-full h-[var(--height,0.125rem)]",this.isLoading?"relative ":"flex")}" role="progressbar" aria-valuemin="0" aria-valuemax="${this.safeMax}" aria-valuenow="${s(this.isLoading?void 0:this.valueFormatter(this.clampedValue))}" aria-valuetext="${s(this.isLoading?this.localize.term("loading"):this.valueFormatter(this.clampedValue))}" aria-label="${s(l?void 0:this.label||this.localize.term("progress"))}" aria-labelledby="${s(l?"label":this.label)}" style="${`--percentage: ${this.percentage}%;`}">${this.isLoading?r`<div part="track" class="${t("absolute top-0 left-0 h-full progress-bar__track--loading-left",this.inverted?"sd-7-1-0-progress-bar__slide-bar--inverted-color-background":"sd-7-1-0-progress-bar__slide-bar-color-background")}"></div><div part="track" class="${t("absolute top-0 right-0 h-full progress-bar__track--loading-right",this.inverted?"sd-7-1-0-progress-bar__slide-bar--inverted-color-background":"sd-7-1-0-progress-bar__slide-bar-color-background")}"></div><div part="indicator" class="${t("absolute top-0 h-full progress-bar__indicator--loading",this.inverted?"sd-7-1-0-progress-bar--active--inverted-color-background":"bg-accent")}"></div>`:r`<div part="indicator" class="${t("w-[var(--percentage)]",this.inverted?"sd-7-1-0-progress-bar--active--inverted-color-background":"bg-accent")}"></div>${this.value&&this.value>0&&this.value<this.safeMax?r`<div class="w-0.5 shrink-0"></div>`:n}<div part="track" class="${t("flex-1",this.inverted?"sd-7-1-0-progress-bar__slide-bar--inverted-color-background":"sd-7-1-0-progress-bar__slide-bar-color-background")}"></div>`}</div>${this.showValue?r`<span class="${t("text-neutral-700 text-xs w-shrink-0",this.inverted?"text-white":"text-neutral-700",this.valuePosition==="bottom"?"text-start":"text-center",this.valuePosition==="right"&&"whitespace-nowrap")}" part="value-${this.valuePosition}">${this.valueFormatter(this.clampedValue)}</span>`:n}</div></div>`}};e.styles=[...d.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block;width:100%}.progress-bar__indicator--loading{width:25%;animation:progress-loading-indicator 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-left{animation:progress-loading-track-left 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-right{animation:progress-loading-track-right 1.25s ease-in-out infinite alternate}@keyframes progress-loading-indicator{0%{left:0}100%{left:75%}}@keyframes progress-loading-track-left{0%{width:0}100%{width:calc(75% - .25rem)}}@keyframes progress-loading-track-right{0%{width:calc(75% - .25rem)}100%{width:0}}`],a([i({type:Number,reflect:!0})],e.prototype,"value",2),a([i({type:Number,reflect:!0})],e.prototype,"max",2),a([i({type:String,reflect:!0})],e.prototype,"label",2),a([i({type:String,reflect:!0,attribute:"value-position"})],e.prototype,"valuePosition",2),a([i({type:Boolean,reflect:!0})],e.prototype,"inverted",2),a([i({type:Boolean,reflect:!0,attribute:"show-label"})],e.prototype,"showLabel",2),a([i({attribute:!1})],e.prototype,"valueFormatter",2),e=a([h("sd-7-1-0-progress-bar")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as n}from"./chunk.MEDJPDBB.js";import{a as e}from"./chunk.4ZZFYCXX.js";import{a,b as c,h as i}from"./chunk.J45556RK.js";import{b as l,e as o}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var r=class extends i{constructor(){super(...arguments);this.color="currentColor";this.localize=new n(this)}render(){return o`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" role="progressbar" aria-label="${this.localize.term("loading")}"><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="20" cy="12" r="2" fill="currentColor"/><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="12" cy="12" r="2" fill="currentColor"/><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="4" cy="12" r="2" fill="currentColor"/></svg>`}};r.styles=[...i.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:inline-block;width:1em;height:1em}.dot:nth-child(2){animation-delay:.1s}.dot:nth-child(1){animation-delay:.2s}`],t([c({type:String,reflect:!0})],r.prototype,"color",2),r=t([a("sd-7-0-
|
|
2
|
+
:host{display:inline-block;width:1em;height:1em}.dot:nth-child(2){animation-delay:.1s}.dot:nth-child(1){animation-delay:.2s}`],t([c({type:String,reflect:!0})],r.prototype,"color",2),r=t([a("sd-7-1-0-loader")],r);export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.MEDJPDBB.js";import{a}from"./chunk.4ZZFYCXX.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as c,b as i,d as s,h as l}from"./chunk.J45556RK.js";import{b as d,e as o}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var v=0,t=class extends l{constructor(){super(...arguments);this.attrId=++v;this.componentId=`sd-7-0-
|
|
2
|
-
:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){border-bottom-color:rgba(var(--sd-color-border-neutral-400,195 195 195))}.tab-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-content:'';content:var(--tw-content)}.tab--active-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--sd-color-border-neutral-400,195 195 195));transition-property:border;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-content:'';content:var(--tw-content);border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0,0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100,100%);transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`],e([s("[part=base]")],t.prototype,"tab",2),e([s("[part=active-tab-indicator]")],t.prototype,"currentIndicator",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:String,reflect:!0})],t.prototype,"panel",2),e([n("active")],t.prototype,"handleActiveChange",1),e([n(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([c("sd-7-0-
|
|
1
|
+
import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.MEDJPDBB.js";import{a}from"./chunk.4ZZFYCXX.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as c,b as i,d as s,h as l}from"./chunk.J45556RK.js";import{b as d,e as o}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var v=0,t=class extends l{constructor(){super(...arguments);this.attrId=++v;this.componentId=`sd-7-1-0-tab-${this.attrId}`;this.hasSlotController=new u(this,"left");this.localize=new b(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let r=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",r?"true":"false")}focus(r){this.tab.focus(r)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let r={left:this.hasSlotController.test("left")};return o`<div part="base" class="${a("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative choice-control-font-weight","outline-hidden focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"?"tab-container-border bg-white rounded-[4px_4px_0_0]":"navigable-border-radius",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:sd-7-1-0-tab--hover-color-background",this.active&&"z-20 sd-7-1-0-tab--active-color-text")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${a("flex h-full items-center justify-center whitespace-nowrap")}"><slot name="left" class="${a(r.left&&"block pr-2",this.disabled||this.visuallyDisabled?"sd-7-1-0-tab--disabled-color-text":this.active?"sd-7-1-0-tab--active-color-text":"sd-7-1-0-tab-color-text")}"></slot><slot class="${a(this.disabled||this.visuallyDisabled?"sd-7-1-0-tab--disabled-color-text":this.active?"sd-7-1-0-tab--active-color-text":"sd-7-1-0-tab-color-text")}"></slot>${this.variant==="container"?o`<div part="active-tab-indicator" class="${a("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-[calc(100%-2px)] navigable__current-indicator-height navigable__current-indicator-border-radius")}"></div>`:""}<div part="hover-bottom-border" class="${a(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b sd-7-1-0-tab-color-border")}"></div></div></div>`}};t.styles=[...l.styles,d`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){border-bottom-color:rgba(var(--sd-color-border-neutral-400,195 195 195))}.tab-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-content:'';content:var(--tw-content)}.tab--active-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--sd-color-border-neutral-400,195 195 195));transition-property:border;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-content:'';content:var(--tw-content);border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0,0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100,100%);transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`],e([s("[part=base]")],t.prototype,"tab",2),e([s("[part=active-tab-indicator]")],t.prototype,"currentIndicator",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:String,reflect:!0})],t.prototype,"panel",2),e([n("active")],t.prototype,"handleActiveChange",1),e([n(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([c("sd-7-1-0-tab")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as o}from"./chunk.J45556RK.js";import{b as i,e as l}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return l`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"sd-7-0-
|
|
2
|
-
:host{margin:0}:host(sd-7-0-
|
|
1
|
+
import{a as n}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as o}from"./chunk.J45556RK.js";import{b as i,e as l}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return l`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"sd-7-1-0-divider--inverted-color-border":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,i`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{margin:0}:host(sd-7-1-0-divider[orientation=horizontal]){display:block}:host(sd-7-1-0-divider[orientation=vertical]){display:inline-block}`],e([r({type:String,reflect:!0})],t.prototype,"orientation",2),e([r({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=e([a("sd-7-1-0-divider")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as s}from"./chunk.LHSR56PH.js";import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as h,b as l,d as c,h as a}from"./chunk.J45556RK.js";import{b as o,e as n}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(i){this.visuallyDisabled&&(i.preventDefault(),i.stopPropagation())}focus(i){this.button.focus(i)}blur(){this.button.blur()}render(){let i={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r(this.standalone?"flex items-start":"inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":"interactive--default-color-text hover:text-primary-500 active:interactive--active-color-text focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"])}" href="${s(this.href||void 0)}" target="${s(this.target||void 0)}" download="${s(this.download)}" rel="${s(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",i["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",i["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...a.styles,o`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
::slotted(sd-7-0-
|
|
2
|
+
::slotted(sd-7-1-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-7-1-0-icon){font-size:var(--sd-text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-7-1-0-icon){font-size:var(--sd-text-xl,1.5rem);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],t([c("a")],e.prototype,"button",2),t([l({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([l({type:String,reflect:!0})],e.prototype,"size",2),t([l({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([l({type:String,reflect:!0})],e.prototype,"href",2),t([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([l({type:String,reflect:!0})],e.prototype,"target",2),t([l({reflect:!0})],e.prototype,"download",2),e=t([h("sd-7-1-0-link")],e);export{e as a};
|
|
@@ -7,5 +7,5 @@ import{a as s}from"./chunk.LHSR56PH.js";import{a as n,b as o}from"./chunk.NL7YFV
|
|
|
7
7
|
</svg> `,place:`
|
|
8
8
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
9
9
|
<path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
|
|
10
|
-
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,h=d(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return o`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-7-0-
|
|
11
|
-
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2,.5rem) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker--cluster--hover-color-background))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow, 0px 1px 3px rgba(81, 81, 81, 0.75)));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow, 0px 1px 3px rgba(81, 81, 81, 0.75)));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}#marker-circle{background-color:rgba(var(--sd-color-icon-fill-white,rgba(var(--sd-color-white))))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([v("sd-7-0-
|
|
10
|
+
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,h=d(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return o`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-7-1-0-map-marker--cluster-color-text",main:"sd-color-fill-accent",place:"sd-7-1-0-map-marker--pin-color-text"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="${r("absolute inset-0 overflow-hidden pointer-events-none",{cluster:"sd-7-1-0-map-marker--cluster--default-color-background group-hover:sd-7-1-0-map-marker--cluster--hover-color-background",main:"sd-7-1-0-map-marker--main-color-background",place:"sd-7-1-0-map-marker--pin--default-color-background"}[this.variant])}" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":this.state==="hover"?"bg-accent-550":"group-hover:bg-accent-550 group-active:bg-accent-700",place:this.state==="active"||this.state==="hover"?"sd-7-1-0-map-marker--pin--hover-color-background":"group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?o`<div id="marker-circle" class="absolute rounded-full"></div>`:""}</div>${h} ${this.variant==="cluster"?o`<div id="cluster-border" class="${r("absolute inset-0 sd-7-1-0-map-marker--cluster--default-color-background rounded-full opacity-30 hover:sd-7-1-0-map-marker--cluster--hover-color-background",this.state==="hover"&&"sd-7-1-0-map-marker--cluster--hover-color-background")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold sd-7-1-0-map-marker--cluster-color-text",this.variant==="place"&&"font-bold sd-7-1-0-map-marker--pin-color-text")}"><slot></slot></div></${c}>`}};t.styles=[...l.styles,m`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
11
|
+
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2,.5rem) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker--cluster--hover-color-background))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow, 0px 1px 3px rgba(81, 81, 81, 0.75)));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow, 0px 1px 3px rgba(81, 81, 81, 0.75)));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}#marker-circle{background-color:rgba(var(--sd-color-icon-fill-white,rgba(var(--sd-color-white))))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([v("sd-7-1-0-map-marker")],t);export{t as a};
|