@solid-design-system/components 7.0.2 → 7.0.3
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.JQV2BZ2E.js +12 -0
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +1 -1
- package/cdn/solid-components.iife.js +1 -1
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.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.7OG7ICBB.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 +12 -0
- 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.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/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/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 +266 -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 +115 -115
- package/cdn-versioned/web-types.json +173 -173
- package/dist/chunks/{chunk.I46TZJHO.js → chunk.Z4IULIBO.js} +5 -5
- package/dist/components/carousel/carousel.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +4 -4
- package/dist/web-types.json +1 -1
- 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.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.UDTZN5OG.js +10 -10
- 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.I46TZJHO.js → chunk.Z4IULIBO.js} +15 -15
- 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/carousel.js +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/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 +266 -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 +115 -115
- package/dist-versioned/web-types.json +173 -173
- package/package.json +1 -1
- package/cdn/chunks/chunk.5SQTIWWY.js +0 -12
- package/cdn-versioned/chunks/chunk.5SQTIWWY.js +0 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{a as T}from"./chunk.BJBQEPZV.js";import{a as k}from"./chunk.EOXYPQZI.js";import{a as C}from"./chunk.N4L76IWF.js";import{a as $}from"./chunk.CBQWVOOS.js";import{a as _}from"./chunk.MEDJPDBB.js";import{a as l}from"./chunk.4ZZFYCXX.js";import{a as v}from"./chunk.NYKJXI3Q.js";import{a as P,b as p,c as y,d as g,e as A,h as w}from"./chunk.J45556RK.js";import{b as E,e as b}from"./chunk.OBAEIKIV.js";import{d as M}from"./chunk.W4QBFD6E.js";import{e as r}from"./chunk.6EV4YU6C.js";function L(u,h,e){let i=t=>Object.is(t,-0)?0:t;return u<h?i(h):u>e?i(e):i(u)}function*I(u,h){if(u!==void 0){let e=0;for(let i of u)yield h(i,e++)}}function*O(u,h,e=1){let i=h===void 0?0:u;h!=null||(h=u);for(let t=i;e>0?t<h:h<t;t+=e)yield t}var o=class extends w{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new $(this,()=>{this.isFocused||this.next()});this.scrollController=new k(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new _(this);this.userInteracted=!1;this.fadeController=new T(this);this.handleUserInteraction=e=>{this.userInteracted=e.type==="keydown"};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>C.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),["mousedown","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["mousedown","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let i=this.getSlides({excludeClones:!1});return i.length>0&&i[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let i=new IntersectionObserver(t=>{t.forEach(s=>{s.isIntersecting&&s.target.getBoundingClientRect().width>0&&(this.initializeSlides(),i.disconnect())})});i.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,n=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",c=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),c&&this.previous(),n&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let d=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');d&&d.focus()})}}handleScrollEnd(){if(this.fade)return;let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(e){var n;let i=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ALL),s=t.nextNode();for(;s;){if(s.nodeType===Node.TEXT_NODE){let c=(n=s.textContent)==null?void 0:n.trim();c&&i.push(c)}else s instanceof HTMLImageElement&&s.alt&&i.push(s.alt);s=t.nextNode()}return i.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop&&!this.fade){let t=this.slidesPerPage,s=e.slice(-t),n=e.slice(0,t);s.reverse().forEach((c,d)=>{let a=c.cloneNode(!0);a.setAttribute("data-clone",String(e.length-d-1)),this.prepend(a)}),n.forEach((c,d)=>{let a=c.cloneNode(!0);a.setAttribute("data-clone",String(d)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,n)=>{s.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}}),this.announcementRegion)){let s=this.getSlideText(e[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,e.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=s?`${s} ${n}`:n})}let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(e="smooth"){if(this.fade){let s=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(s);return}let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){if(this.fade){let i=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(i);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:n,fade:c}=this,d=this.getSlides(),a=this.getSlides({excludeClones:!1}),f=(e+d.length)%d.length;if(this.activeSlide=f,c)return;let m=L(e+(s?t:0),0,a.length+1),B=a[m],S=n.getBoundingClientRect(),x=B.getBoundingClientRect();if(n.scrollTo({left:x.left-S.left+n.scrollLeft,top:x.top-S.top+n.scrollTop,behavior:M()?"auto":i}),this.userInteracted&&!this.loop){let z=this.activeSlide===d.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,F=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):F&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||s>1,c=this.loop||s<t,d=this.localize.dir()==="ltr";return b`<div part="base" class="${l("carousel h-full w-full relative")}"><button class="${l("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${l(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${l(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${l("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(a=>!a.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${l("w-full flex items-center justify-center relative")}"><div part="navigation" class="${l("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${l("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${d?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?b`<div part="pagination-dot" role="tablist" class="${l("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${I(O(t),a=>{let f=a+1===s;return b`<button part="pagination-item ${f?"pagination-item--active":""}" class="${l("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",f?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${f?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @mousedown="${m=>m.preventDefault()}" @click="${m=>{this.goToSlide(a*i),this.unblockAutoplay(m,this.paginationItems[a])}}"><span class="${l("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",f&&"border-none",f?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:b`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${l("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${s}</span> <span part="pagination-divider" class="${l("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${l("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!c}" class="${l("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!c&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${c?"false":"true"}" @click="${c?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${d?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};o.styles=[...w.styles,E`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],r([g('[part~="autoplay-controls"]')],o.prototype,"autoplayControls",2),r([g('[part~="navigation-button--previous"]')],o.prototype,"previousButton",2),r([g('[part~="navigation-button--next"]')],o.prototype,"nextButton",2),r([A('[part~="pagination-item"]')],o.prototype,"paginationItems",2),r([p({type:String,reflect:!0})],o.prototype,"variant",2),r([p({type:Boolean,reflect:!0})],o.prototype,"inverted",2),r([p({type:Boolean,reflect:!0})],o.prototype,"loop",2),r([p({type:Boolean,reflect:!0})],o.prototype,"autoplay",2),r([p({type:Number,attribute:"autoplay-interval",reflect:!0})],o.prototype,"autoplayInterval",2),r([p({type:Boolean,reflect:!0})],o.prototype,"fade",2),r([p({type:Number,attribute:"slides-per-page",reflect:!0})],o.prototype,"slidesPerPage",2),r([p({type:Number,attribute:"slides-per-move",reflect:!0})],o.prototype,"slidesPerMove",2),r([g("slot:not([name])")],o.prototype,"defaultSlot",2),r([g(".carousel__slides")],o.prototype,"scrollContainer",2),r([g(".carousel__pagination")],o.prototype,"paginationContainer",2),r([g(".carousel__announcement")],o.prototype,"announcementRegion",2),r([y()],o.prototype,"activeSlide",2),r([y()],o.prototype,"currentPage",2),r([y()],o.prototype,"pausedAutoplay",2),r([y()],o.prototype,"isFocused",2),r([v("pausedAutoplay")],o.prototype,"handlePausedAutoplay",1),r([v("fade",{waitUntilFirstUpdate:!0})],o.prototype,"handleFadeChange",1),r([v("loop",{waitUntilFirstUpdate:!0}),v("slidesPerPage",{waitUntilFirstUpdate:!0})],o.prototype,"initializeSlides",1),r([v("activeSlide")],o.prototype,"handleSlideChange",1),r([v("slidesPerMove")],o.prototype,"handleSlidesPerMoveChange",1),r([v("autoplay")],o.prototype,"handleAutoplayChange",1),r([v("autoplayInterval")],o.prototype,"handleautoplayIntervalChange",1),o=r([P("sd-carousel")],o);export{o as a};
|
|
3
|
+
/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
lit-html/directives/map.js:
|
|
6
|
+
lit-html/directives/range.js:
|
|
7
|
+
(**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2021 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*)
|
|
12
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.JQV2BZ2E.js";import"../../chunks/chunk.BJBQEPZV.js";import"../../chunks/chunk.EOXYPQZI.js";import"../../chunks/chunk.MHWW3RZB.js";import"../../chunks/chunk.N4L76IWF.js";import"../../chunks/chunk.CBQWVOOS.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.GA3PWYR4.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.W5O4FM6B.js";import"../../chunks/chunk.QQD62QOV.js";import"../../chunks/chunk.552X4W43.js";import"../../chunks/chunk.TRGIF57L.js";import"../../chunks/chunk.LWLOMMIE.js";import"../../chunks/chunk.J4FJ2SAP.js";import"../../chunks/chunk.NJIXLFKZ.js";import"../../chunks/chunk.MEDJPDBB.js";import"../../chunks/chunk.4XZDW2BJ.js";import"../../chunks/chunk.SOLVKQIM.js";import"../../chunks/chunk.4XDRYWQQ.js";import"../../chunks/chunk.4ZZFYCXX.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.J45556RK.js";import"../../chunks/chunk.OBAEIKIV.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
package/cdn/custom-elements.json
CHANGED
|
@@ -24152,7 +24152,7 @@
|
|
|
24152
24152
|
"package": {
|
|
24153
24153
|
"name": "@solid-design-system/components",
|
|
24154
24154
|
"description": "Solid Design System: Components",
|
|
24155
|
-
"version": "7.0.
|
|
24155
|
+
"version": "7.0.3",
|
|
24156
24156
|
"author": "Union Investment",
|
|
24157
24157
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
24158
24158
|
"license": "MIT"
|
|
@@ -196,7 +196,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12,3rem);width:var(--
|
|
|
196
196
|
:host{position:relative;display:block}::slotted(sd-breadcrumb-item:not(:last-of-type))::after,sd-dropdown::after{margin-inline:var(--sd-spacing-2,.5rem);display:none;height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem);border-radius:var(--sd-radius-full,624.9375rem);background-color:rgba(var(--sd-breadcrumb__separator-color,195 195 195));--tw-content:'';content:var(--tw-content)}@media (width >= 64rem){::slotted(sd-breadcrumb-item:not(:last-of-type))::after,sd-dropdown::after{display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (width >= 64rem){::slotted(sd-breadcrumb-item:nth-last-child(2))::after{background-color:rgba(var(--sd-breadcrumb__separator--current-color,45 157 0))}}::slotted(sd-breadcrumb-item),sd-dropdown{display:none;align-items:center;font-size:var(--sd-text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@media (width >= 64rem){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],o([g('[part="base"]')],Ft.prototype,"base",2),o([g('[part="truncated"]')],Ft.prototype,"truncated",2),o([g('[part="truncated-dropdown"]')],Ft.prototype,"dropdown",2),o([g("slot")],Ft.prototype,"defaultSlot",2),o([d({type:String,reflect:!0})],Ft.prototype,"label",2),o([L()],Ft.prototype,"itemPositionsCached",2),o([L()],Ft.prototype,"isTruncated",2),Ft=o([E("sd-breadcrumb")],Ft);var Ht=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(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(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return p`<a part="base" class="${c(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="${$(this.href||void 0)}" target="${$(this.target||void 0)}" download="${$(this.download)}" rel="${$(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="${c("inline",t["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="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Ht.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
197
|
::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-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-icon){font-size:var(--sd-text-xl,1.5rem);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],o([g("a")],Ht.prototype,"button",2),o([d({type:Boolean,reflect:!0})],Ht.prototype,"standalone",2),o([d({type:String,reflect:!0})],Ht.prototype,"size",2),o([d({type:Boolean,reflect:!0})],Ht.prototype,"inverted",2),o([d({type:String,reflect:!0})],Ht.prototype,"href",2),o([d({type:Boolean,attribute:"visually-disabled",reflect:!0})],Ht.prototype,"visuallyDisabled",2),o([d({type:String,reflect:!0})],Ht.prototype,"target",2),o([d({reflect:!0})],Ht.prototype,"download",2),Ht=o([E("sd-link")],Ht);var Gt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return p`<sd-link part="base" href="${$(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Gt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
198
198
|
:host{display:inline-flex;align-items:center}sd-link::part(base){align-items:center}sd-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,104 104 104))}:host([current]) sd-link::part(label){text-decoration-line:none}`],o([g('[part="base"]')],Gt.prototype,"base",2),o([d({type:String,reflect:!0})],Gt.prototype,"href",2),o([d({type:String,reflect:!0})],Gt.prototype,"target",2),o([d({type:Boolean,reflect:!0})],Gt.prototype,"current",2),o([C("current")],Gt.prototype,"handleCurrentChange",1),Gt=o([E("sd-breadcrumb-item")],Gt);var Ai=class{constructor(r,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};r.addController(this),this.host=r,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(r){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},r)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function fa(s,r,t){let e=i=>Object.is(i,-0)?0:i;return s<r?e(r):s>t?e(t):e(s)}var Oi=class{constructor(r){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=r}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(r){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,i)=>{i===r?this.show(e):this.hide(e)})}show(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),r.removeAttribute("inert"),r.setAttribute("aria-hidden","false")}hide(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),r.toggleAttribute("inert",!0),r.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let r=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(r.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=r.map(i=>{let a=i,n={position:a.style.position,opacity:a.style.opacity,zIndex:a.style.zIndex,transform:a.style.transform,classes:a.className};return a.classList.remove(...this.getAllFadeClasses()),a.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let i=r.map(n=>n.getBoundingClientRect().height),a=Math.max(...i);r.forEach((n,l)=>{let h=n,u=e[l];h.className=u.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=u[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),a>0&&(this.carousel.style.setProperty("--carousel-height",`${a}px`),t.style.height=`${a}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*ba(s,r){if(s!==void 0){let t=0;for(let e of s)yield r(e,t++)}}function*ga(s,r,t=1){let e=r===void 0?0:s;r!=null||(r=s);for(let i=e;t>0?i<r:r<i;i+=t)yield i}var va=Symbol(),Cr=s=>(r,t,e)=>{let i=e.value;e.value=function(...a){clearTimeout(this[va]),this[va]=window.setTimeout(()=>{i.apply(this,a)},s)}};var Gr=class{constructor(r){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=r=>{if(r.pointerType==="touch")return;this.pointers.add(r.pointerId),this.mouseDragging&&!this.dragging&&r.button===0&&(r.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=r=>{let t=this.host.scrollContainer,e=!!r.movementX||!!r.movementY;!this.dragging&&e?(t.setPointerCapture(r.pointerId),this.handleDragStart()):t.hasPointerCapture(r.pointerId)&&this.handleDrag(r)};this.handlePointerUp=r=>{this.pointers.delete(r.pointerId),this.host.scrollContainer.releasePointerCapture(r.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=r=>{for(let t of r.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=r=>{for(let t of r.touches)this.pointers.add(t.identifier)};this.host=r,r.addController(this)}async hostConnected(){let r=this.host;await r.updateComplete;let t=r.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let r=this.host;this.dragging=!0,r.scrollContainer.style.setProperty("scroll-snap-type","unset"),r.requestUpdate()}handleDrag(r){this.host.scrollContainer.scrollBy({left:-r.movementX,top:-r.movementY})}async handleDragEnd(){let r=this.host,t=r.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,i=t.scrollTop;t.style.removeProperty("scroll-snap-type");let a=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:i,behavior:"auto"}),t.scrollTo({left:a,top:n,behavior:Vr()?"auto":"smooth"}),this.scrolling&&await Q(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),r.requestUpdate()}};o([Cr(100)],Gr.prototype,"handleScrollEnd",1);var Le=class extends f{static isCarouselItem(r){return r instanceof Element&&r.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return p`<slot></slot>`}};Le.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
-
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],Le=o([E("sd-carousel-item")],Le);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Ai(this,()=>{this.isFocused||this.next()});this.scrollController=new Gr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Oi(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>Le.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=fa(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Vr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ba(ga(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
+
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],Le=o([E("sd-carousel-item")],Le);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Ai(this,()=>{this.isFocused||this.next()});this.scrollController=new Gr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Oi(this);this.handleUserInteraction=t=>{this.userInteracted=t.type==="keydown"};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>Le.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["mousedown","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["mousedown","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=fa(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Vr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ba(ga(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @mousedown="${b=>b.preventDefault()}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
200
200
|
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],o([g('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),o([g('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),o([g('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),o([mi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),o([d({type:String,reflect:!0})],X.prototype,"variant",2),o([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),o([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),o([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),o([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),o([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),o([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),o([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),o([g("slot:not([name])")],X.prototype,"defaultSlot",2),o([g(".carousel__slides")],X.prototype,"scrollContainer",2),o([g(".carousel__pagination")],X.prototype,"paginationContainer",2),o([g(".carousel__announcement")],X.prototype,"announcementRegion",2),o([L()],X.prototype,"activeSlide",2),o([L()],X.prototype,"currentPage",2),o([L()],X.prototype,"pausedAutoplay",2),o([L()],X.prototype,"isFocused",2),o([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),o([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),o([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),o([C("activeSlide")],X.prototype,"handleSlideChange",1),o([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),o([C("autoplay")],X.prototype,"handleAutoplayChange",1),o([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=o([E("sd-carousel")],X);var Dt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(a,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(a===u){let b=h.converter||Ae,v=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Ae.fromAttribute)(l,h.type);this[s]!==v&&(this[t]=v)}i.call(this,a,n,l)}};var{I:$y}=Js;var Ii=s=>s.strings===void 0;var Ad={},ya=(s,r=Ad)=>s._$AH=r;var ze=te(class extends Ie{constructor(s){if(super(s),s.type!==jt.PROPERTY&&s.type!==jt.ATTRIBUTE&&s.type!==jt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ii(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===Mt||r===N)return r;let t=s.element,e=s.name;if(s.type===jt.PROPERTY){if(r===t[e])return Mt}else if(s.type===jt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return Mt}else if(s.type===jt.ATTRIBUTE&&t.getAttribute(e)===r+"")return Mt;return ya(s),r}});var ct=class extends f{constructor(){super(...arguments);this.formControlController=new at(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${$(this.value)}" .indeterminate="${ze(this.indeterminate)}" .checked="${ze(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400 group-hover:border-error-400",invalid:"border-error group-hover:border-error-400 sd-checkbox--invalid-color-background group-hover:bg-transparent",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div part="checkbox" class="${c("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"sd-checkbox--invalid-color-background",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?p`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${c("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?p`<sd-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};ct.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
201
201
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],o([g('input[type="checkbox"]')],ct.prototype,"input",2),o([g("#invalid-message")],ct.prototype,"invalidMessage",2),o([d({type:String,reflect:!0})],ct.prototype,"title",2),o([d({type:String,reflect:!0})],ct.prototype,"name",2),o([d()],ct.prototype,"value",2),o([d({type:String,reflect:!0})],ct.prototype,"size",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"disabled",2),o([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ct.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"checked",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"indeterminate",2),o([Dt("checked")],ct.prototype,"defaultChecked",2),o([d({type:String,reflect:!0})],ct.prototype,"form",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"required",2),o([L()],ct.prototype,"showInvalidStyle",2),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleDisabledChange",1),o([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleStateChange",1),ct=o([E("sd-checkbox")],ct);var Wt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),a=this.helpText?!0:i,n=p`<slot @slotchange="${this.syncCheckboxes}"></slot>`,l=this.hasSlotController.test("tooltip");return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||l?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",a?"block":"hidden")}" aria-hidden="${!a}">${this.helpText}</slot>`}};Wt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
202
202
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:0}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:0}`],o([d({type:String,reflect:!0})],Wt.prototype,"size",2),o([d({type:String,reflect:!0})],Wt.prototype,"orientation",2),o([d({type:String,reflect:!0})],Wt.prototype,"label",2),o([d({type:String,attribute:"help-text",reflect:!0})],Wt.prototype,"helpText",2),o([C("size",{waitUntilFirstUpdate:!0})],Wt.prototype,"handleSizeChange",1),o([C("invalid",{waitUntilFirstUpdate:!0})],Wt.prototype,"handleInvalid",1),Wt=o([E("sd-checkbox-group")],Wt);var _t=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=this.removable&&!this.selected&&!this.toggleable,i=t?st`a`:e?st`div`:st`button`;return q`<${i} part="base" type="${$(t?void 0:"button")}" href="${$(t?this.href:void 0)}" rel="${$(t&&this.target?"noreferrer noopener":void 0)}" target="${$(t?this.target:void 0)}" download="${$(t?this.download:void 0)}" ?disabled="${$(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${$(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||e?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("flex border box-border sd-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 choice-control-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 choice-control-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:e?"sd-tag--removable--size-lg-padding-right sd-tag--removable--size-lg-padding-left py-3":"py-2 sd-tag--size-lg-padding-inline",sm:e?"sd-tag--removable--size-sm-padding-right sd-tag--removable--size-sm-padding-left py-2":"py-1 sd-tag--size-sm-padding-inline"}[this.size],this.disabled?c(!t&&"cursor-not-allowed",this.selected&&"bg-neutral-500 text-white","border-neutral-500 sd-tag--disabled-color-text"):this.selected?"sd-tag--selected-border-width sd-tag--selected--default-color-background sd-tag--selected--default-color-border sd-tag--selected--default-color-text hover:sd-tag--selected--hover-color-background hover:sd-tag--selected--hover-color-border hover:sd-tag--selected--hover-color-text":c("sd-tag--default-color-border sd-tag--default-color-text",e?"sd-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-tag--default--hover-color-background"))}"><slot name="icon-left" class="${c("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${e&&!t?q`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}" ?disabled="${$(t?void 0:this.disabled)}"><slot part="removable-indicator" name="removable-indicator" class="${c(this.disabled&&"sd-tag--disabled-color-text")}"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${i}>`}};_t.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
@@ -196,7 +196,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12,3rem);width:var(--
|
|
|
196
196
|
:host{position:relative;display:block}::slotted(sd-breadcrumb-item:not(:last-of-type))::after,sd-dropdown::after{margin-inline:var(--sd-spacing-2,.5rem);display:none;height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem);border-radius:var(--sd-radius-full,624.9375rem);background-color:rgba(var(--sd-breadcrumb__separator-color,195 195 195));--tw-content:'';content:var(--tw-content)}@media (width >= 64rem){::slotted(sd-breadcrumb-item:not(:last-of-type))::after,sd-dropdown::after{display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (width >= 64rem){::slotted(sd-breadcrumb-item:nth-last-child(2))::after{background-color:rgba(var(--sd-breadcrumb__separator--current-color,45 157 0))}}::slotted(sd-breadcrumb-item),sd-dropdown{display:none;align-items:center;font-size:var(--sd-text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@media (width >= 64rem){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],o([g('[part="base"]')],Ft.prototype,"base",2),o([g('[part="truncated"]')],Ft.prototype,"truncated",2),o([g('[part="truncated-dropdown"]')],Ft.prototype,"dropdown",2),o([g("slot")],Ft.prototype,"defaultSlot",2),o([d({type:String,reflect:!0})],Ft.prototype,"label",2),o([L()],Ft.prototype,"itemPositionsCached",2),o([L()],Ft.prototype,"isTruncated",2),Ft=o([E("sd-breadcrumb")],Ft);var Pt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(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(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return p`<a part="base" class="${c(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="${$(this.href||void 0)}" target="${$(this.target||void 0)}" download="${$(this.download)}" rel="${$(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="${c("inline",t["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="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Pt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
197
|
::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-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-icon){font-size:var(--sd-text-xl,1.5rem);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],o([g("a")],Pt.prototype,"button",2),o([d({type:Boolean,reflect:!0})],Pt.prototype,"standalone",2),o([d({type:String,reflect:!0})],Pt.prototype,"size",2),o([d({type:Boolean,reflect:!0})],Pt.prototype,"inverted",2),o([d({type:String,reflect:!0})],Pt.prototype,"href",2),o([d({type:Boolean,attribute:"visually-disabled",reflect:!0})],Pt.prototype,"visuallyDisabled",2),o([d({type:String,reflect:!0})],Pt.prototype,"target",2),o([d({reflect:!0})],Pt.prototype,"download",2),Pt=o([E("sd-link")],Pt);var Zt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return p`<sd-link part="base" href="${$(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Zt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
198
198
|
:host{display:inline-flex;align-items:center}sd-link::part(base){align-items:center}sd-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,104 104 104))}:host([current]) sd-link::part(label){text-decoration-line:none}`],o([g('[part="base"]')],Zt.prototype,"base",2),o([d({type:String,reflect:!0})],Zt.prototype,"href",2),o([d({type:String,reflect:!0})],Zt.prototype,"target",2),o([d({type:Boolean,reflect:!0})],Zt.prototype,"current",2),o([C("current")],Zt.prototype,"handleCurrentChange",1),Zt=o([E("sd-breadcrumb-item")],Zt);var Oi=class{constructor(r,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};r.addController(this),this.host=r,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(r){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},r)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function va(s,r,t){let e=i=>Object.is(i,-0)?0:i;return s<r?e(r):s>t?e(t):e(s)}var Ii=class{constructor(r){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=r}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(r){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,i)=>{i===r?this.show(e):this.hide(e)})}show(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),r.removeAttribute("inert"),r.setAttribute("aria-hidden","false")}hide(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),r.toggleAttribute("inert",!0),r.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let r=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(r.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=r.map(i=>{let a=i,n={position:a.style.position,opacity:a.style.opacity,zIndex:a.style.zIndex,transform:a.style.transform,classes:a.className};return a.classList.remove(...this.getAllFadeClasses()),a.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let i=r.map(n=>n.getBoundingClientRect().height),a=Math.max(...i);r.forEach((n,l)=>{let h=n,u=e[l];h.className=u.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=u[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),a>0&&(this.carousel.style.setProperty("--carousel-height",`${a}px`),t.style.height=`${a}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*ya(s,r){if(s!==void 0){let t=0;for(let e of s)yield r(e,t++)}}function*wa(s,r,t=1){let e=r===void 0?0:s;r!=null||(r=s);for(let i=e;t>0?i<r:r<i;i+=t)yield i}var xa=Symbol(),Cr=s=>(r,t,e)=>{let i=e.value;e.value=function(...a){clearTimeout(this[xa]),this[xa]=window.setTimeout(()=>{i.apply(this,a)},s)}};var Qr=class{constructor(r){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=r=>{if(r.pointerType==="touch")return;this.pointers.add(r.pointerId),this.mouseDragging&&!this.dragging&&r.button===0&&(r.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=r=>{let t=this.host.scrollContainer,e=!!r.movementX||!!r.movementY;!this.dragging&&e?(t.setPointerCapture(r.pointerId),this.handleDragStart()):t.hasPointerCapture(r.pointerId)&&this.handleDrag(r)};this.handlePointerUp=r=>{this.pointers.delete(r.pointerId),this.host.scrollContainer.releasePointerCapture(r.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=r=>{for(let t of r.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=r=>{for(let t of r.touches)this.pointers.add(t.identifier)};this.host=r,r.addController(this)}async hostConnected(){let r=this.host;await r.updateComplete;let t=r.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let r=this.host;this.dragging=!0,r.scrollContainer.style.setProperty("scroll-snap-type","unset"),r.requestUpdate()}handleDrag(r){this.host.scrollContainer.scrollBy({left:-r.movementX,top:-r.movementY})}async handleDragEnd(){let r=this.host,t=r.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,i=t.scrollTop;t.style.removeProperty("scroll-snap-type");let a=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:i,behavior:"auto"}),t.scrollTo({left:a,top:n,behavior:Hr()?"auto":"smooth"}),this.scrolling&&await J(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),r.requestUpdate()}};o([Cr(100)],Qr.prototype,"handleScrollEnd",1);var xe=class extends f{static isCarouselItem(r){return r instanceof Element&&r.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return p`<slot></slot>`}};xe.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
-
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],xe=o([E("sd-carousel-item")],xe);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Oi(this,()=>{this.isFocused||this.next()});this.scrollController=new Qr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Ii(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>xe.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=va(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Hr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ya(wa(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
+
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],xe=o([E("sd-carousel-item")],xe);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Oi(this,()=>{this.isFocused||this.next()});this.scrollController=new Qr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Ii(this);this.handleUserInteraction=t=>{this.userInteracted=t.type==="keydown"};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>xe.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["mousedown","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["mousedown","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=va(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Hr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ya(wa(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @mousedown="${b=>b.preventDefault()}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
200
200
|
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],o([g('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),o([g('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),o([g('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),o([fi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),o([d({type:String,reflect:!0})],X.prototype,"variant",2),o([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),o([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),o([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),o([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),o([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),o([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),o([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),o([g("slot:not([name])")],X.prototype,"defaultSlot",2),o([g(".carousel__slides")],X.prototype,"scrollContainer",2),o([g(".carousel__pagination")],X.prototype,"paginationContainer",2),o([g(".carousel__announcement")],X.prototype,"announcementRegion",2),o([L()],X.prototype,"activeSlide",2),o([L()],X.prototype,"currentPage",2),o([L()],X.prototype,"pausedAutoplay",2),o([L()],X.prototype,"isFocused",2),o([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),o([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),o([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),o([C("activeSlide")],X.prototype,"handleSlideChange",1),o([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),o([C("autoplay")],X.prototype,"handleAutoplayChange",1),o([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=o([E("sd-carousel")],X);var Vt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(a,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(a===u){let b=h.converter||He,v=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:He.fromAttribute)(l,h.type);this[s]!==v&&(this[t]=v)}i.call(this,a,n,l)}};var{I:Sy}=ro;var Pi=s=>s.strings===void 0;var Pd={},ka=(s,r=Pd)=>s._$AH=r;var Se=se(class extends Re{constructor(s){if(super(s),s.type!==Xt.PROPERTY&&s.type!==Xt.ATTRIBUTE&&s.type!==Xt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===At||r===U)return r;let t=s.element,e=s.name;if(s.type===Xt.PROPERTY){if(r===t[e])return At}else if(s.type===Xt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return At}else if(s.type===Xt.ATTRIBUTE&&t.getAttribute(e)===r+"")return At;return ka(s),r}});var ct=class extends f{constructor(){super(...arguments);this.formControlController=new dt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${$(this.value)}" .indeterminate="${Se(this.indeterminate)}" .checked="${Se(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400 group-hover:border-error-400",invalid:"border-error group-hover:border-error-400 sd-checkbox--invalid-color-background group-hover:bg-transparent",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div part="checkbox" class="${c("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"sd-checkbox--invalid-color-background",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?p`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${c("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?p`<sd-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};ct.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
201
201
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],o([g('input[type="checkbox"]')],ct.prototype,"input",2),o([g("#invalid-message")],ct.prototype,"invalidMessage",2),o([d({type:String,reflect:!0})],ct.prototype,"title",2),o([d({type:String,reflect:!0})],ct.prototype,"name",2),o([d()],ct.prototype,"value",2),o([d({type:String,reflect:!0})],ct.prototype,"size",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"disabled",2),o([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ct.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"checked",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"indeterminate",2),o([Vt("checked")],ct.prototype,"defaultChecked",2),o([d({type:String,reflect:!0})],ct.prototype,"form",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"required",2),o([L()],ct.prototype,"showInvalidStyle",2),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleDisabledChange",1),o([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleStateChange",1),ct=o([E("sd-checkbox")],ct);var qt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),a=this.helpText?!0:i,n=p`<slot @slotchange="${this.syncCheckboxes}"></slot>`,l=this.hasSlotController.test("tooltip");return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||l?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",a?"block":"hidden")}" aria-hidden="${!a}">${this.helpText}</slot>`}};qt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
202
202
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:0}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:0}`],o([d({type:String,reflect:!0})],qt.prototype,"size",2),o([d({type:String,reflect:!0})],qt.prototype,"orientation",2),o([d({type:String,reflect:!0})],qt.prototype,"label",2),o([d({type:String,attribute:"help-text",reflect:!0})],qt.prototype,"helpText",2),o([C("size",{waitUntilFirstUpdate:!0})],qt.prototype,"handleSizeChange",1),o([C("invalid",{waitUntilFirstUpdate:!0})],qt.prototype,"handleInvalid",1),qt=o([E("sd-checkbox-group")],qt);var St=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=this.removable&&!this.selected&&!this.toggleable,i=t?st`a`:e?st`div`:st`button`;return q`<${i} part="base" type="${$(t?void 0:"button")}" href="${$(t?this.href:void 0)}" rel="${$(t&&this.target?"noreferrer noopener":void 0)}" target="${$(t?this.target:void 0)}" download="${$(t?this.download:void 0)}" ?disabled="${$(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${$(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||e?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("flex border box-border sd-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 choice-control-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 choice-control-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:e?"sd-tag--removable--size-lg-padding-right sd-tag--removable--size-lg-padding-left py-3":"py-2 sd-tag--size-lg-padding-inline",sm:e?"sd-tag--removable--size-sm-padding-right sd-tag--removable--size-sm-padding-left py-2":"py-1 sd-tag--size-sm-padding-inline"}[this.size],this.disabled?c(!t&&"cursor-not-allowed",this.selected&&"bg-neutral-500 text-white","border-neutral-500 sd-tag--disabled-color-text"):this.selected?"sd-tag--selected-border-width sd-tag--selected--default-color-background sd-tag--selected--default-color-border sd-tag--selected--default-color-text hover:sd-tag--selected--hover-color-background hover:sd-tag--selected--hover-color-border hover:sd-tag--selected--hover-color-text":c("sd-tag--default-color-border sd-tag--default-color-text",e?"sd-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-tag--default--hover-color-background"))}"><slot name="icon-left" class="${c("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${e&&!t?q`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}" ?disabled="${$(t?void 0:this.disabled)}"><slot part="removable-indicator" name="removable-indicator" class="${c(this.disabled&&"sd-tag--disabled-color-text")}"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${i}>`}};St.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
package/cdn/solid-components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunks/chunk.MR54F6CV.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.HY624TPC.js";import{a as
|
|
1
|
+
import{a as ue}from"./chunks/chunk.MR54F6CV.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.HY624TPC.js";import{a as re}from"./chunks/chunk.3IZUMERL.js";import{a as oe}from"./chunks/chunk.PFPUD5HR.js";import{a as ae}from"./chunks/chunk.JMX6KLDZ.js";import{a as K}from"./chunks/chunk.NGU7NO3O.js";import{a as U}from"./chunks/chunk.WUXX2P2S.js";import{a as W}from"./chunks/chunk.TX5WPWH2.js";import{a as X}from"./chunks/chunk.AJGTKHU5.js";import{a as Y}from"./chunks/chunk.3RIAU3TH.js";import{a as Z}from"./chunks/chunk.SPL6VR5S.js";import{a as _}from"./chunks/chunk.XGVG7F7T.js";import{a as $}from"./chunks/chunk.PKCNX4R2.js";import{a as H}from"./chunks/chunk.VSX5LY2D.js";import{a as V}from"./chunks/chunk.XHYIXZF4.js";import{a as j}from"./chunks/chunk.IFLRUJCI.js";import{a as Q}from"./chunks/chunk.V6IM4GAA.js";import{a as y}from"./chunks/chunk.QK3WCIP5.js";import{a as q}from"./chunks/chunk.DS2MKMMN.js";import"./chunks/chunk.IVHEBGOY.js";import{a as z}from"./chunks/chunk.Z2M7BQV5.js";import{a as J}from"./chunks/chunk.PQW77KHE.js";import{a as P}from"./chunks/chunk.Q63S2Z2M.js";import"./chunks/chunk.DSKB3SEU.js";import{a as v}from"./chunks/chunk.4QTJXGRR.js";import{a as F}from"./chunks/chunk.PCXVXYU2.js";import{a as N}from"./chunks/chunk.CQNFI34K.js";import{a as O}from"./chunks/chunk.C37LGAL3.js";import{a as E}from"./chunks/chunk.RHC6WZ6V.js";import{a as R}from"./chunks/chunk.35XPUMS2.js";import{a as A}from"./chunks/chunk.XZ5JTM6K.js";import"./chunks/chunk.ICEC5PGK.js";import{a as w}from"./chunks/chunk.T7I5MFNS.js";import{a as L}from"./chunks/chunk.PURR56D5.js";import{a as G}from"./chunks/chunk.IQBZ7GRB.js";import{a as M}from"./chunks/chunk.DCAJAXUP.js";import{a as h}from"./chunks/chunk.7OG7ICBB.js";import"./chunks/chunk.WWGARXPI.js";import"./chunks/chunk.23WKPZET.js";import{a as C}from"./chunks/chunk.Y4ZS3BWH.js";import{a as I}from"./chunks/chunk.SSE7T5OF.js";import{a as D}from"./chunks/chunk.UI3ZVKSU.js";import{a as te}from"./chunks/chunk.VPBXFCBA.js";import{a as T}from"./chunks/chunk.4GA43M6X.js";import"./chunks/chunk.SAEYIL5V.js";import"./chunks/chunk.IF6Y3ILD.js";import{a as g}from"./chunks/chunk.NJKSWXOS.js";import{a as B}from"./chunks/chunk.37JCS2XH.js";import"./chunks/chunk.54DO3JVH.js";import{a as k}from"./chunks/chunk.WL6NNNG5.js";import"./chunks/chunk.ERP45OHF.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as l}from"./chunks/chunk.2C3UQTSS.js";import{a as m}from"./chunks/chunk.NOP4DTP2.js";import{a as S}from"./chunks/chunk.2O3FM7UB.js";import{a as x}from"./chunks/chunk.YUDSN6HJ.js";import"./chunks/chunk.OKNJ5BPS.js";import{a as s}from"./chunks/chunk.MYPRMCUO.js";import{a as n}from"./chunks/chunk.ADVB3FPU.js";import{a as i}from"./chunks/chunk.SZNU4NHI.js";import"./chunks/chunk.CGMKBGJU.js";import{a as b}from"./chunks/chunk.JQV2BZ2E.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as c}from"./chunks/chunk.N4L76IWF.js";import"./chunks/chunk.CBQWVOOS.js";import{a as r}from"./chunks/chunk.P7GMFHO5.js";import{a as o}from"./chunks/chunk.KE2YEQDL.js";import{a}from"./chunks/chunk.WQZWYMH3.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as u}from"./chunks/chunk.TIMZJKMF.js";import{a as p}from"./chunks/chunk.OOIX4OAP.js";import"./chunks/chunk.I2H6CZK5.js";import{a as f}from"./chunks/chunk.I7OVY27Y.js";import{a as d}from"./chunks/chunk.HNBY226D.js";import{a as t}from"./chunks/chunk.RRJCCIDH.js";import"./chunks/chunk.LZRL7OLU.js";import"./chunks/chunk.LHSR56PH.js";import"./chunks/chunk.CGQ2BPPZ.js";import"./chunks/chunk.B2NUKX6G.js";import"./chunks/chunk.NL7YFV4O.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as e}from"./chunks/chunk.GA3PWYR4.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import"./chunks/chunk.W5O4FM6B.js";import"./chunks/chunk.QQD62QOV.js";import{d as de,e as fe}from"./chunks/chunk.552X4W43.js";import"./chunks/chunk.TRGIF57L.js";import"./chunks/chunk.LWLOMMIE.js";import"./chunks/chunk.J4FJ2SAP.js";import"./chunks/chunk.NJIXLFKZ.js";import{a as pe}from"./chunks/chunk.MEDJPDBB.js";import"./chunks/chunk.4XZDW2BJ.js";import"./chunks/chunk.SOLVKQIM.js";import"./chunks/chunk.4XDRYWQQ.js";import"./chunks/chunk.4ZZFYCXX.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.J45556RK.js";import"./chunks/chunk.OBAEIKIV.js";import"./chunks/chunk.W4QBFD6E.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.6EV4YU6C.js";export{pe as LocalizeController,o as SdAccordion,r as SdAccordionGroup,a as SdAnimation,u as SdAudio,l as SdBadge,m as SdBrandshape,S as SdBreadcrumb,n as SdBreadcrumbItem,f as SdButton,b as SdCarousel,c as SdCarouselItem,T as SdCheckbox,g as SdCheckboxGroup,B as SdCombobox,h as SdDatepicker,C as SdDialog,I as SdDivider,p as SdDrawer,x as SdDropdown,D as SdExpandable,te as SdFileSelector,G as SdFlipcard,M as SdHeader,e as SdIcon,R as SdInclude,A as SdInput,i as SdLink,t as SdLoader,w as SdMapMarker,L as SdMenu,P as SdMenuItem,v as SdNavigationItem,F as SdNotification,N as SdOptgroup,O as SdOption,s as SdPopup,E as SdProgressBar,H as SdQuickfact,Q as SdRadio,V as SdRadioButton,j as SdRadioGroup,y as SdRange,z as SdRangeTick,J as SdScrollable,K as SdSelect,U as SdSkeleton,W as SdStep,X as SdStepGroup,Y as SdSwitch,Z as SdTab,_ as SdTabGroup,$ as SdTabPanel,k as SdTag,ee as SdTeaser,oe as SdTeaserMedia,re as SdTextarea,d as SdThemeListener,q as SdTooltip,ae as SdVideo,de as registerIconLibrary,ue as setupAutocomplete,fe as unregisterIconLibrary};
|
package/cdn/web-types.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as s}from"./chunk.J45556RK.js";import{b as n,e as d}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-7-0-
|
|
2
|
-
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1,.25rem) * 5);min-width:calc(var(--sd-spacing-1,.25rem) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-7-0-
|
|
1
|
+
import{a as i}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as s}from"./chunk.J45556RK.js";import{b as n,e as d}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-7-0-3-badge--blue--inverted-color-text sd-7-0-3-badge--blue--inverted-color-background sd-7-0-3-badge--inverted-color-border":"text-white sd-7-0-3-badge--blue-color-background border-white",green:this.inverted?"sd-7-0-3-badge--green-color--inverted-text sd-7-0-3-badge--green-color--inverted-background sd-7-0-3-badge--inverted-color-border":"text-white sd-7-0-3-badge--green-color-background border-white",red:this.inverted?"sd-7-0-3-badge--red--inverted-text sd-7-0-3-badge--red--inverted-background sd-7-0-3-badge--inverted-color-border":"text-white sd-7-0-3-badge--red-color-background border-white"}[this.variant])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1,.25rem) * 5);min-width:calc(var(--sd-spacing-1,.25rem) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-7-0-3-badge")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk.MEDJPDBB.js";import{a as g}from"./chunk.4ZZFYCXX.js";import{a as b,b as f,c,d as o,h}from"./chunk.J45556RK.js";import{b as m,e as u}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends h{constructor(){super(...arguments);this.localize=new v(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-7-0-
|
|
2
|
-
:host{position:relative;display:block}::slotted(sd-7-0-
|
|
1
|
+
import{a as v}from"./chunk.MEDJPDBB.js";import{a as g}from"./chunk.4ZZFYCXX.js";import{a as b,b as f,c,d as o,h}from"./chunk.J45556RK.js";import{b as m,e as u}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends h{constructor(){super(...arguments);this.localize=new v(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-7-0-3-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:r}=t.getBoundingClientRect();t.dataset.size=`${r}`}),this.itemPositionsCached=!0}handleTruncation(){var a;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:r}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let n=0;for(let[p,i]of Array.from(this.items).reverse().entries()){let l=parseFloat(`${(a=i.dataset.size)!=null?a:i.getBoundingClientRect().width}`);if(i.hidden=!1,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0;continue}if(p===0||p===1){n+=l;continue}if(this.isTruncated=n+l+r>t,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0}else n+=l}}handleMobileChevron(){var r,n,a;let t=document.createElement("sd-7-0-3-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(a=(n=(r=Array.from(this.items).at(-2))==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("sd-7-0-3-link"))==null||a.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-7-0-3-dropdown part="truncated" class="${g(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-7-0-3-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};e.styles=[...h.styles,m`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:block}::slotted(sd-7-0-3-breadcrumb-item:not(:last-of-type))::after,sd-7-0-3-dropdown::after{margin-inline:var(--sd-spacing-2,.5rem);display:none;height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem);border-radius:var(--sd-radius-full,624.9375rem);background-color:rgba(var(--sd-breadcrumb__separator-color,195 195 195));--tw-content:'';content:var(--tw-content)}@media (width >= 64rem){::slotted(sd-7-0-3-breadcrumb-item:not(:last-of-type))::after,sd-7-0-3-dropdown::after{display:inline-block}}::slotted(sd-7-0-3-breadcrumb-item:nth-last-child(2)){display:flex}@media (width >= 64rem){::slotted(sd-7-0-3-breadcrumb-item:nth-last-child(2))::after{background-color:rgba(var(--sd-breadcrumb__separator--current-color,45 157 0))}}::slotted(sd-7-0-3-breadcrumb-item),sd-7-0-3-dropdown{display:none;align-items:center;font-size:var(--sd-text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@media (width >= 64rem){::slotted(sd-7-0-3-breadcrumb-item),sd-7-0-3-dropdown{display:flex}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],s([o('[part="base"]')],e.prototype,"base",2),s([o('[part="truncated"]')],e.prototype,"truncated",2),s([o('[part="truncated-dropdown"]')],e.prototype,"dropdown",2),s([o("slot")],e.prototype,"defaultSlot",2),s([f({type:String,reflect:!0})],e.prototype,"label",2),s([c()],e.prototype,"itemPositionsCached",2),s([c()],e.prototype,"isTruncated",2),e=s([b("sd-7-0-3-breadcrumb")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as m}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as n,b as o,h as a}from"./chunk.J45556RK.js";import{b as c,e as l}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await m(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return l`<slot></slot>`}};t.styles=[...a.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-0-
|
|
2
|
+
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-0-3-include")],t);export{t as a};
|