@solid-design-system/components 4.0.0-next.4 → 4.0.0-next.6
Sign up to get free protection for your applications and to get access to all the features.
- package/cdn/chunks/chunk.2IZXJHH7.js +1 -0
- package/cdn/chunks/chunk.5FM4F3Y4.js +1 -0
- package/cdn/components/flipcard/flipcard.d.ts +1 -0
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/custom-elements.json +9 -1
- package/cdn/solid-components.bundle.js +10 -10
- package/cdn/solid-components.iife.js +11 -11
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +47 -47
- package/cdn/web-types.json +144 -143
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.24SF73MY.js +1 -1
- package/cdn-versioned/chunks/chunk.2IZXJHH7.js +1 -0
- package/cdn-versioned/chunks/chunk.36Z2VDHI.js +1 -1
- package/cdn-versioned/chunks/chunk.3ATYVOO4.js +1 -1
- package/cdn-versioned/chunks/chunk.4HIKTDIM.js +3 -3
- package/cdn-versioned/chunks/chunk.4W3WLVGR.js +1 -1
- package/cdn-versioned/chunks/chunk.5FM4F3Y4.js +1 -0
- package/cdn-versioned/chunks/chunk.5ZDWEJDB.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.6JBTCFHE.js +2 -2
- package/cdn-versioned/chunks/chunk.7M7VCE7R.js +1 -1
- package/cdn-versioned/chunks/chunk.7RJ3O2FV.js +1 -1
- package/cdn-versioned/chunks/chunk.APMDRZQD.js +1 -1
- package/cdn-versioned/chunks/chunk.C2PA7CKF.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.DEX5VJGX.js +4 -4
- package/cdn-versioned/chunks/chunk.DMLGBWCL.js +1 -1
- package/cdn-versioned/chunks/chunk.DVHKKAVM.js +1 -1
- package/cdn-versioned/chunks/chunk.EWWGLHC5.js +1 -1
- package/cdn-versioned/chunks/chunk.F7J6HN76.js +1 -1
- package/cdn-versioned/chunks/chunk.FD54463O.js +1 -1
- package/cdn-versioned/chunks/chunk.FFNTXFC3.js +1 -1
- package/cdn-versioned/chunks/chunk.FX3ED655.js +1 -1
- package/cdn-versioned/chunks/chunk.GOVNZSCO.js +1 -1
- package/cdn-versioned/chunks/chunk.GQSLHWQC.js +1 -1
- package/cdn-versioned/chunks/chunk.ISEQUO4U.js +1 -1
- package/cdn-versioned/chunks/chunk.ITRQVXFY.js +1 -1
- package/cdn-versioned/chunks/chunk.IZKUI5WK.js +1 -1
- package/cdn-versioned/chunks/chunk.KMLMMBY4.js +1 -1
- package/cdn-versioned/chunks/chunk.LLXTYJXF.js +1 -1
- package/cdn-versioned/chunks/chunk.LZEFLOSA.js +1 -1
- package/cdn-versioned/chunks/chunk.MPP7HYX7.js +1 -1
- package/cdn-versioned/chunks/chunk.MX22EZXK.js +1 -1
- package/cdn-versioned/chunks/chunk.ND7BT52X.js +1 -1
- package/cdn-versioned/chunks/chunk.NUB5WHGD.js +1 -1
- package/cdn-versioned/chunks/chunk.O4UXOQEI.js +1 -1
- package/cdn-versioned/chunks/chunk.OVV7TNT2.js +1 -1
- package/cdn-versioned/chunks/chunk.PBPFKJKV.js +1 -1
- package/cdn-versioned/chunks/chunk.QFNCQQ6S.js +1 -1
- package/cdn-versioned/chunks/chunk.QNZWJACC.js +2 -2
- package/cdn-versioned/chunks/chunk.R354E6ZD.js +1 -1
- package/cdn-versioned/chunks/chunk.ROBLMI7Q.js +4 -4
- package/cdn-versioned/chunks/chunk.TA7CZCP3.js +1 -1
- package/cdn-versioned/chunks/chunk.U443X4TI.js +1 -1
- package/cdn-versioned/chunks/chunk.UBFU6D5B.js +1 -1
- package/cdn-versioned/chunks/chunk.URB2K7JQ.js +1 -1
- package/cdn-versioned/chunks/chunk.VNKUGTKM.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WENTMXB2.js +1 -1
- package/cdn-versioned/chunks/chunk.WQAPHFVM.js +1 -1
- package/cdn-versioned/chunks/chunk.YF5WEC4R.js +2 -2
- package/cdn-versioned/chunks/chunk.ZFA2VPUT.js +1 -1
- package/cdn-versioned/chunks/chunk.ZRIABVVM.js +1 -1
- 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/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +2 -1
- package/cdn-versioned/components/flipcard/flipcard.js +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/map-marker/map-marker.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 +2 -2
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +4 -4
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.js +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/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +210 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +18 -18
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +18 -18
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +125 -125
- package/cdn-versioned/web-types.json +275 -274
- package/dist/chunks/{chunk.56SNEGI4.js → chunk.BG3M5FUP.js} +4 -1
- package/dist/chunks/{chunk.WWS3CQ2Z.js → chunk.KTJRTRDJ.js} +16 -5
- package/dist/components/flipcard/flipcard.d.ts +1 -0
- package/dist/components/flipcard/flipcard.js +1 -1
- package/dist/components/tab-group/tab-group.js +1 -1
- package/dist/custom-elements.json +9 -1
- package/dist/solid-components.js +2 -2
- package/dist/vscode.html-custom-data.json +47 -47
- package/dist/web-types.json +144 -143
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.2IBVAXOX.js +1 -1
- package/dist-versioned/chunks/chunk.3IT4HBTI.js +1 -1
- package/dist-versioned/chunks/chunk.3LGDUVS4.js +2 -2
- package/dist-versioned/chunks/chunk.4JZQQD4L.js +3 -3
- package/dist-versioned/chunks/chunk.4QKRGAOL.js +4 -4
- package/dist-versioned/chunks/chunk.4RGGPCD5.js +2 -2
- package/dist-versioned/chunks/chunk.65BWRJEA.js +5 -5
- package/dist-versioned/chunks/chunk.6CUAQSFA.js +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.727ERQ4F.js +2 -2
- package/dist-versioned/chunks/chunk.743FPQRN.js +2 -2
- package/dist-versioned/chunks/chunk.76ZNNLGN.js +1 -1
- package/dist-versioned/chunks/chunk.7OHSCBBX.js +1 -1
- package/dist-versioned/chunks/{chunk.56SNEGI4.js → chunk.BG3M5FUP.js} +17 -14
- package/dist-versioned/chunks/chunk.BVC5FY4L.js +13 -13
- package/dist-versioned/chunks/chunk.BXB5WF23.js +5 -5
- package/dist-versioned/chunks/chunk.D6JZ4IKM.js +1 -1
- package/dist-versioned/chunks/chunk.DQPVSTUQ.js +3 -3
- package/dist-versioned/chunks/chunk.EFEBQQHC.js +26 -26
- package/dist-versioned/chunks/chunk.EKFRFDTB.js +5 -5
- package/dist-versioned/chunks/chunk.H655M7FD.js +1 -1
- package/dist-versioned/chunks/chunk.HPR3PWAE.js +3 -3
- package/dist-versioned/chunks/chunk.I3PY3VYP.js +29 -29
- package/dist-versioned/chunks/chunk.IN3GJ5QL.js +3 -3
- package/dist-versioned/chunks/chunk.J2XBUIBC.js +2 -2
- package/dist-versioned/chunks/chunk.J7MMF6WJ.js +2 -2
- package/dist-versioned/chunks/{chunk.WWS3CQ2Z.js → chunk.KTJRTRDJ.js} +20 -9
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.MTSAWJLV.js +2 -2
- package/dist-versioned/chunks/chunk.NM6QP6RJ.js +2 -2
- package/dist-versioned/chunks/chunk.PDRECIYA.js +1 -1
- package/dist-versioned/chunks/chunk.PGZ5AWZ2.js +9 -9
- package/dist-versioned/chunks/chunk.PIR4YJUS.js +2 -2
- package/dist-versioned/chunks/chunk.QAZYUCBK.js +6 -6
- package/dist-versioned/chunks/chunk.QCICV36Z.js +6 -6
- package/dist-versioned/chunks/chunk.QP3SM2LZ.js +3 -3
- package/dist-versioned/chunks/chunk.R4BETATX.js +1 -1
- package/dist-versioned/chunks/chunk.RNSJAVQE.js +1 -1
- package/dist-versioned/chunks/chunk.RZRTIYXA.js +1 -1
- package/dist-versioned/chunks/chunk.SPBPHTSS.js +2 -2
- package/dist-versioned/chunks/chunk.SSH6ATRK.js +2 -2
- package/dist-versioned/chunks/chunk.TWXYFPBS.js +2 -2
- package/dist-versioned/chunks/chunk.U5NFPAOX.js +2 -2
- package/dist-versioned/chunks/chunk.U6RY25TF.js +2 -2
- package/dist-versioned/chunks/chunk.UC5E3AEF.js +1 -1
- package/dist-versioned/chunks/chunk.UDZYWRPT.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.V7TQ6VJU.js +1 -1
- package/dist-versioned/chunks/chunk.VHGHICFG.js +2 -2
- package/dist-versioned/chunks/chunk.XVFJS7VS.js +5 -5
- package/dist-versioned/chunks/chunk.Z2UY62T2.js +1 -1
- package/dist-versioned/chunks/chunk.ZGPGFEVP.js +5 -5
- package/dist-versioned/chunks/chunk.ZWJI7SLE.js +11 -11
- 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/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +2 -1
- package/dist-versioned/components/flipcard/flipcard.js +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/map-marker/map-marker.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 +2 -2
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +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/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +210 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +125 -125
- package/dist-versioned/web-types.json +275 -274
- package/package.json +1 -1
- package/cdn/chunks/chunk.SNUMAAEG.js +0 -1
- package/cdn/chunks/chunk.WGNXYONB.js +0 -1
- package/cdn-versioned/chunks/chunk.SNUMAAEG.js +0 -1
- package/cdn-versioned/chunks/chunk.WGNXYONB.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
function w(n,{setValueOnSelection:p,scrollSelectionIntoView:c}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=n?typeof n=="string"?document.querySelector(n):n:document.querySelector("#autoComplete"),i=r.shadowRoot.querySelector("input"),l=o=>o[0];return i.addEventListener("init",()=>{var a,s;let o=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");o==null||o.setAttribute("part","listbox");let t=document.createElement("sd-4-0-0-next-
|
1
|
+
function w(n,{setValueOnSelection:p,scrollSelectionIntoView:c}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=n?typeof n=="string"?document.querySelector(n):n:document.querySelector("#autoComplete"),i=r.shadowRoot.querySelector("input"),l=o=>o[0];return i.addEventListener("init",()=>{var a,s;let o=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");o==null||o.setAttribute("part","listbox");let t=document.createElement("sd-4-0-0-next-6-popup");t.appendChild(o),(s=r.shadowRoot)==null||s.appendChild(t),t==null||t.setAttribute("exportparts","popup__content"),t&&(t.active=!1,t.autoSize="vertical",t.autoSizePadding=16,t.placement="bottom-start",t.anchor=r,t.sync="width");let d=l`sd-4-0-0-next-6-popup::part(popup){border-bottom-left-radius:var(--sd-border-radius-default,.25rem);border-bottom-right-radius:var(--sd-border-radius-default,.25rem);border-width:0 2px 2px;overflow-y:scroll;z-index:var(--sd-z-index-dropdown,900);--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-next-6-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-4-0-0-next-6-popup li:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--tw-bg-opacity,1))}sd-4-0-0-next-6-popup li{list-style-type:""}sd-4-0-0-next-6-popup li mark{background-color:transparent;font-weight:700}sd-4-0-0-next-6-popup li:not(:has(sd-4-0-0-next-6-option)){cursor:pointer;font-size:var(--sd-font-size-base,1rem);padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-4,1rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity,1))}sd-4-0-0-next-6-popup li:not(:has(sd-4-0-0-next-6-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-4-0-0-next-6-popup li[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}`,e=new CSSStyleSheet;e.replaceSync(d),r.shadowRoot.adoptedStyleSheets=[...r.shadowRoot.adoptedStyleSheets,e]}),p&&i.addEventListener("selection",o=>{var t;r.value=(t=o==null?void 0:o.detail)==null?void 0:t.selection.value}),i.addEventListener("open",()=>{var o,t,d,e,a,s;(t=(o=r.shadowRoot)==null?void 0:o.querySelector("sd-4-0-0-next-6-popup"))==null||t.setAttribute("active","true"),(e=(d=r.shadowRoot)==null?void 0:d.querySelector('[part="border"]'))==null||e.classList.add("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.add("z-50")}),i.addEventListener("close",()=>{var o,t,d,e,a,s;(t=(o=r.shadowRoot)==null?void 0:o.querySelector("sd-4-0-0-next-6-popup"))==null||t.removeAttribute("active"),(e=(d=r.shadowRoot)==null?void 0:d.querySelector('[part="border"]'))==null||e.classList.remove("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.remove("z-50")}),c&&i.addEventListener("navigate",()=>{let o=r.shadowRoot.querySelector('[aria-selected="true"]');o==null||o.scrollIntoView({block:"nearest"})}),{config:{selector:()=>i,resultsList:{tag:"ul"},wrapper:!1}}}export{w as a};
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import{a as F}from"./chunk.3ATYVOO4.js";import{a as z}from"./chunk.VNKUGTKM.js";import{a as M}from"./chunk.D7TMPF3D.js";import{c as A}from"./chunk.3L472FD4.js";import{b as L}from"./chunk.65NSSTJE.js";import{a as x,c as O}from"./chunk.A3DKF5BY.js";import{a as E,b as k}from"./chunk.24SF73MY.js";import{a as g,d as y}from"./chunk.RQYP7MH5.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as I}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as T,b as n,c as u,d as m,g as $,h as v}from"./chunk.APMDRZQD.js";import{b as C,e as p}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends v{constructor(){super(...arguments);this.formControlController=new L(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-
|
1
|
+
import{a as F}from"./chunk.3ATYVOO4.js";import{a as z}from"./chunk.VNKUGTKM.js";import{a as M}from"./chunk.D7TMPF3D.js";import{c as A}from"./chunk.3L472FD4.js";import{b as L}from"./chunk.65NSSTJE.js";import{a as x,c as O}from"./chunk.A3DKF5BY.js";import{a as E,b as k}from"./chunk.24SF73MY.js";import{a as g,d as y}from"./chunk.RQYP7MH5.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as I}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as T,b as n,c as u,d as m,g as $,h as v}from"./chunk.APMDRZQD.js";import{b as C,e as p}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends v{constructor(){super(...arguments);this.formControlController=new L(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-6-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new I(this);this.typeToSelectString="";this.hasHover=!1;this.displayLabel="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder=this.localize.term("selectDefaultPlaceholder");this.disabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=e=>p`<sd-4-0-0-next-6-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
2
2
|
base:tag__base,
|
3
3
|
content:tag__content,
|
4
4
|
removable-indicator:tag__removable-indicator,
|
5
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-4-0-0-next-
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-4-0-0-next-6-tag>`;this.handleDocumentFocusIn=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()};this.handleDocumentKeyDown=e=>{let t=e.target,l=t.closest(".select__clear")!==null,a=t.closest("sd-4-0-0-next-6-icon-button")!==null;if(!(l||a)){if(e.key==="Escape"&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let h=this.getAllOptions(),o=h.indexOf(this.currentOption),r=Math.max(0,o);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(r=o+1,r>h.length-1&&(r=0)):e.key==="ArrowUp"?(r=o-1,r<0&&(r=h.length-1)):e.key==="Home"?r=0:e.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r])}if(e.key.length===1||e.key==="Backspace"){let h=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(let o of h)if(o.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(o);break}}}};this.handleDocumentMouseDown=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(e,t){var l,a,h;if(e.key==="Backspace"&&this.multiple){e.stopPropagation();let o=(l=e.currentTarget)==null?void 0:l.parentElement,r=(a=o==null?void 0:o.previousElementSibling)==null?void 0:a.querySelector("sd-4-0-0-next-6-tag"),c=(h=o==null?void 0:o.nextElementSibling)==null?void 0:h.querySelector("sd-4-0-0-next-6-tag");this.handleTagRemove(new CustomEvent("sd-remove"),t),this.updateComplete.then(()=>{c?c.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(e){e.key==="Backspace"&&this.multiple&&(e.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var l;let t=(l=this.shadowRoot)==null?void 0:l.querySelectorAll("sd-4-0-0-next-6-tag");t&&t.length>0?t==null||t[(t==null?void 0:t.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){let l=e.composedPath().some(a=>a instanceof HTMLSlotElement&&a.name==="removable-indicator");this.disabled||l||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){let l=e.target.closest("sd-4-0-0-next-6-option"),a=this.value;l&&!l.disabled&&(this.multiple?this.toggleOptionSelection(l):this.setSelectedOptions(l),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],l=[];customElements.get("sd-4-0-0-next-6-option")?(e.forEach(a=>{this.multiple&&(a.checkbox=!0),l.push(a.value)}),this.setSelectedOptions(e.filter(a=>t.includes(a.value)))):customElements.whenDefined("sd-4-0-0-next-6-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(e,t){e.stopPropagation(),t||this.clearSelect(),t&&!this.disabled&&(this.toggleOptionSelection(t,!1),this.deletedTagLabel=this.localize.term("removed",t.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-4-0-0-next-6-option")]}getFirstOption(){return this.querySelector("sd-4-0-0-next-6-option")}setCurrentOption(e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){let t=this.getAllOptions(),l=Array.isArray(e)?e:[e];t.forEach(a=>a.selected=!1),l.length&&l.forEach(a=>a.selected=!0),Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}selectionChanged(e){var t,l,a,h;e&&this.multiple?this.selectedOptions.find(o=>o.value===e.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==e.value):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?(this.value=this.selectedOptions.map(o=>o.value),this.useTags||this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(l=(t=this.selectedOptions[0])==null?void 0:t.value)!=null?l:"",this.displayLabel=(h=(a=this.selectedOptions[0])==null?void 0:a.getTextLabel())!=null?h:""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){let l=this.getTag(e,t);return p`<div @sd-remove="${a=>this.handleTagRemove(a,e)}">${typeof l=="string"?E(l):l}</div>`}return[p``]}):[p`<sd-4-0-0-next-6-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
6
6
|
base:tag__base,
|
7
7
|
content:tag__content,
|
8
8
|
removable-indicator:tag__removable-indicator,
|
9
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-6-tag>`]}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(e){let t=e.detail;t&&(this.currentPlacement=t)}handleUseTagsChange(){let e=this.getAllOptions();customElements.get("sd-4-0-0-next-6-option")&&e.forEach(t=>{t.checkbox=this.multiple})}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:e,options:t}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:e,options:t}=O(this,"select.hide",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(e=>{e.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(l=>t.includes(l.value)))}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,w(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,w(this,"sd-after-hide")}checkValidity(){var e;return(e=this.valueInput)==null?void 0:e.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){let e={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text")},t=this.label?!0:!!e.label,l=this.helpText?!0:!!e.helpText,a=this.clearable&&!this.disabled&&this.value.length>0,h=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",o=this.disabled?"cursor-not-allowed":"cursor-pointer",r={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",o,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" role="alert" aria-live="assertive">${this.deletedTagLabel}</span><div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${t&&"inline-block"}" aria-hidden="${t?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="${d("relative w-full bg-white",h==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[h],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-6-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
10
10
|
popup:popup__content,
|
11
|
-
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",o,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?p`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?p`<button part="clear-button" class="${d("select__clear flex justify-center",r)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-
|
11
|
+
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",o,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?p`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?p`<button part="clear-button" class="${d("select__clear flex justify-center",r)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-6-icon class="${d("text-icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-6-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-4-0-0-next-6-icon part="invalid-icon" class="${d(r,c,"text-error")}" library="system" name="risk"></sd-4-0-0-next-6-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-4-0-0-next-6-icon part="valid-icon" class="${d("flex-shrink-0 text-success",r,c)}" library="system" name="status-check"></sd-4-0-0-next-6-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${d("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",c)}"><sd-4-0-0-next-6-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-6-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-scroll",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-0-0-next-6-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${l?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-6-icon":k,"sd-4-0-0-next-6-popup":z,"sd-4-0-0-next-6-tag":F},s.styles=[...v.styles,C`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-6-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-6-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-6-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-6-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],i([$({selector:"sd-4-0-0-next-6-option"})],s.prototype,"_optionsInDefaultSlot",2),i([m("sd-4-0-0-next-6-popup")],s.prototype,"popup",2),i([m('[part="combobox"]')],s.prototype,"combobox",2),i([m('[part="display-input"]')],s.prototype,"displayInput",2),i([m(".value-input")],s.prototype,"valueInput",2),i([m('[part="listbox"]')],s.prototype,"listbox",2),i([m("#invalid-message")],s.prototype,"invalidMessage",2),i([u()],s.prototype,"hasHover",2),i([u()],s.prototype,"displayLabel",2),i([u()],s.prototype,"deletedTagLabel",2),i([u()],s.prototype,"hasFocus",2),i([u()],s.prototype,"currentOption",2),i([u()],s.prototype,"selectedOptions",2),i([u()],s.prototype,"showValidStyle",2),i([u()],s.prototype,"showInvalidStyle",2),i([M()],s.prototype,"defaultValue",2),i([n({type:Boolean,reflect:!0})],s.prototype,"open",2),i([n({reflect:!0})],s.prototype,"size",2),i([n({reflect:!0})],s.prototype,"placement",2),i([n()],s.prototype,"label",2),i([n()],s.prototype,"placeholder",2),i([n({type:Boolean,reflect:!0})],s.prototype,"disabled",2),i([n({attribute:"help-text"})],s.prototype,"helpText",2),i([u()],s.prototype,"currentPlacement",2),i([n({type:Boolean})],s.prototype,"clearable",2),i([n({type:Boolean,reflect:!0})],s.prototype,"multiple",2),i([n({type:Boolean,reflect:!0})],s.prototype,"useTags",2),i([n({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),i([n({reflect:!0})],s.prototype,"form",2),i([n()],s.prototype,"name",2),i([n({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],s.prototype,"value",2),i([n({type:Boolean,reflect:!0})],s.prototype,"required",2),i([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),i([n({type:Boolean})],s.prototype,"hoist",2),i([n()],s.prototype,"getTag",2),i([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),i([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),i([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),i([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),i([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),s=i([T("sd-4-0-0-next-6-select")],s);x("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});x("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as i}from"./chunk.HE2LNCWW.js";import{a as l,b as m}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as a,h as c}from"./chunk.APMDRZQD.js";import{b as v,f as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.marker={cluster:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let r=this.isLink(),o=this.notInteractive?l`div`:r?l`a`:l`button`;return m`<${o} part="base" class="${n("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${i(r?this.href:void 0)}" target="${i(r?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||r?void 0:"button")}" aria-labelledby="${i(this.notInteractive?void 0:"content")}"><div part="marker" class="${n("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent *:drop-shadow-md",place:"*:drop-shadow-md"}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${n("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1))}`],e([a({reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a()],t.prototype,"href",2),e([a()],t.prototype,"target",2),t=e([h("sd-4-0-0-next-
|
1
|
+
import{a as i}from"./chunk.HE2LNCWW.js";import{a as l,b as m}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as a,h as c}from"./chunk.APMDRZQD.js";import{b as v,f as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.marker={cluster:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let r=this.isLink(),o=this.notInteractive?l`div`:r?l`a`:l`button`;return m`<${o} part="base" class="${n("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${i(r?this.href:void 0)}" target="${i(r?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||r?void 0:"button")}" aria-labelledby="${i(this.notInteractive?void 0:"content")}"><div part="marker" class="${n("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent *:drop-shadow-md",place:"*:drop-shadow-md"}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${n("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1))}`],e([a({reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a()],t.prototype,"href",2),e([a()],t.prototype,"target",2),t=e([h("sd-4-0-0-next-6-map-marker")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as o}from"./chunk.MHWW3RZB.js";import{a as d,b as l,h as r}from"./chunk.APMDRZQD.js";import{b as s,e as a}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var e;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(e){super.updated(e),e.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return a`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(e){e.target.assignedElements().length>0&&(this.refHeaderElement=e.currentTarget,this.setCalculatedHeightProperty())}};t.styles=[...r.styles,s`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],i([l({reflect:!0,type:Boolean})],t.prototype,"fixed",2),i([o(100)],t.prototype,"onResize",1),t=i([d("sd-4-0-0-next-
|
1
|
+
import{a as o}from"./chunk.MHWW3RZB.js";import{a as d,b as l,h as r}from"./chunk.APMDRZQD.js";import{b as s,e as a}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var e;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(e){super.updated(e),e.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return a`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(e){e.target.assignedElements().length>0&&(this.refHeaderElement=e.currentTarget,this.setCalculatedHeightProperty())}};t.styles=[...r.styles,s`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],i([l({reflect:!0,type:Boolean})],t.prototype,"fixed",2),i([o(100)],t.prototype,"onResize",1),t=i([d("sd-4-0-0-next-6-header")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as z}from"./chunk.64UNKF45.js";import{c as O}from"./chunk.3L472FD4.js";import{a as c,c as m}from"./chunk.A3DKF5BY.js";import{a as h,d as p}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as K}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.26YUWEYR.js";import{a as I}from"./chunk.DCOFYPWX.js";import{a as C,b as o,d as l,h as d}from"./chunk.APMDRZQD.js";import{b as M,e as A}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var n=class extends d{constructor(){super(...arguments);this.localize=new D(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let t=this.trigger.assignedElements({flatten:!0}).find(a=>z(a).start),s=null;if(t)switch(t.tagName.toLowerCase()){case"sd-4-0-0-next-
|
1
|
+
import{a as z}from"./chunk.64UNKF45.js";import{c as O}from"./chunk.3L472FD4.js";import{a as c,c as m}from"./chunk.A3DKF5BY.js";import{a as h,d as p}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as K}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.26YUWEYR.js";import{a as I}from"./chunk.DCOFYPWX.js";import{a as C,b as o,d as l,h as d}from"./chunk.APMDRZQD.js";import{b as M,e as A}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var n=class extends d{constructor(){super(...arguments);this.localize=new D(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let t=this.trigger.assignedElements({flatten:!0}).find(a=>z(a).start),s=null;if(t)switch(t.tagName.toLowerCase()){case"sd-4-0-0-next-6-button":case"sd-4-0-0-next-6-icon-button":s=t.button;break;case"sd-4-0-0-next-6-navigation-item":s=t.button;break;default:s=t}return s}updateAccessibleTrigger(){let e=this.getAccessibleTrigger();e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let e=this.getAccessibleTrigger();typeof(e==null?void 0:e.focus)=="function"&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(e=>e.tagName.toLowerCase()==="sd-menu")}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(e){var t;if(e.key==="Tab"){if(this.open&&((t=document.activeElement)==null?void 0:t.tagName.toLowerCase())==="sd-menu-item"){e.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{var a,r,g,f,y,w,b,E,v,k,T,L;let s=((y=(f=(g=(r=(a=document.activeElement)==null?void 0:a.shadowRoot)==null?void 0:r.activeElement)==null?void 0:g.shadowRoot)==null?void 0:f.activeElement)==null?void 0:y.getRootNode())instanceof ShadowRoot?(v=(E=(b=(w=document.activeElement)==null?void 0:w.shadowRoot)==null?void 0:b.activeElement)==null?void 0:E.shadowRoot)==null?void 0:v.activeElement:((k=this.containingElement)==null?void 0:k.getRootNode())instanceof ShadowRoot?(L=(T=document.activeElement)==null?void 0:T.shadowRoot)==null?void 0:L.activeElement:document.activeElement;(!this.containingElement||(s==null?void 0:s.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(e){let t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(e){let t=e.target;O(t,this.panel)}handlePanelSelect(e){let t=e.target;!this.stayOpenOnSelect&&t.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(e){if(e.key==="Escape"&&this.open){e.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(e.key)){e.preventDefault(),this.handleTriggerClick();return}let t=this.getMenu();if(t){let s=t.defaultSlot.assignedElements({flatten:!0}),a=s[0],r=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||this.show(),s.length>0&&requestAnimationFrame(()=>{(e.key==="ArrowDown"||e.key==="Home")&&(t.setCurrentItem(a),a.focus()),(e.key==="ArrowUp"||e.key==="End")&&(t.setCurrentItem(r),r.focus())}))}}handleTriggerKeyUp(e){e.key===" "&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-4-0-0-next-6-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-4-0-0-next-6-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await p(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:e,options:t}=m(this,"dropdown.show",{dir:this.localize.dir()});await h(this.popup.popup,e,t),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await p(this);let{keyframes:e,options:t}=m(this,"dropdown.hide",{dir:this.localize.dir()});await h(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return A`<sd-4-0-0-next-6-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${I("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-4-0-0-next-6-popup>`}};n.styles=[...d.styles,M`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([l("#dropdown")],n.prototype,"popup",2),i([l("[part=trigger]")],n.prototype,"trigger",2),i([l("[part=panel]")],n.prototype,"panel",2),i([o({type:Boolean,reflect:!0})],n.prototype,"open",2),i([o({type:Boolean,reflect:!0})],n.prototype,"rounded",2),i([o({reflect:!0})],n.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],n.prototype,"disabled",2),i([o({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],n.prototype,"stayOpenOnSelect",2),i([o({attribute:!1})],n.prototype,"containingElement",2),i([o({type:Number})],n.prototype,"distance",2),i([o({type:Number})],n.prototype,"skidding",2),i([o({type:Boolean,reflect:!0,attribute:"no-auto-size"})],n.prototype,"noAutoSize",2),i([o({type:Boolean,reflect:!0,attribute:"no-flip"})],n.prototype,"noFlip",2),i([o({type:Boolean})],n.prototype,"hoist",2),i([K("open",{waitUntilFirstUpdate:!0})],n.prototype,"handleOpenChange",1),n=i([C("sd-4-0-0-next-6-dropdown")],n);c("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});c("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{n as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.APMDRZQD.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-0-next-
|
1
|
+
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.APMDRZQD.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-0-next-6-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-4-0-0-next-6-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-0-0-next-6-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-6-icon></button>`:r`<sd-4-0-0-next-6-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-6-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-4-0-0-next-6-navigation-item")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.APMDRZQD.js";import{b as l,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.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 n(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 c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o()],t.prototype,"src",2),s([o()],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-4-0-0-next-
|
1
|
+
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.APMDRZQD.js";import{b as l,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.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 n(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 c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o()],t.prototype,"src",2),s([o()],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-4-0-0-next-6-include")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as g,b as m,c as b,d as h,h as i}from"./chunk.APMDRZQD.js";import{b as d,e as c}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends i{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-0-next-
|
1
|
+
import{a as g,b as m,c as b,d as h,h as i}from"./chunk.APMDRZQD.js";import{b as d,e as c}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends i{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-0-next-6-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-0-next-6-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-0-next-6-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-0-next-6-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-4-0-0-next-6-button-group__button"),o.classList.toggle("sd-4-0-0-next-6-button-group__button--first",n===0),o.classList.toggle("sd-4-0-0-next-6-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-4-0-0-next-6-button-group__button--last",n===e.length-1),o.classList.toggle("sd-4-0-0-next-6-button-group__button--radio",o.tagName.toLowerCase()==="sd-4-0-0-next-6-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...i.styles,d`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([m()],s.prototype,"label",2),s=l([g("sd-4-0-0-next-6-button-group")],s);function a(r){var e;let u="sd-4-0-0-next-6-button, sd-4-0-0-next-6-radio-button";return(e=r.closest(u))!=null?e:r.querySelector(u)}export{s as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.APMDRZQD.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-0-next-
|
1
|
+
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.APMDRZQD.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-0-next-6-button-group__button--first:not(.sd-4-0-0-next-6-button-group__button--last)) button{border-bottom-right-radius:var(--sd-border-radius-none,0);border-top-right-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-6-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-6-button-group__button--last:not(.sd-4-0-0-next-6-button-group__button--first)) button{border-bottom-left-radius:var(--sd-border-radius-none,0);border-top-left-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-6-button-group__button:not(.sd-4-0-0-next-6-button-group__button--first)){margin-inline-start:-1px}:host(.sd-4-0-0-next-6-button-group__button--hover){z-index:10}:host(.sd-4-0-0-next-6-button-group__button--focus),:host(.sd-4-0-0-next-6-button-group__button[checked]){z-index:20}`],e([a(".button")],t.prototype,"input",2),e([a(".hidden-input")],t.prototype,"hiddenInput",2),e([b()],t.prototype,"hasFocus",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s({type:Boolean,reflect:!0})],t.prototype,"checked",2),e([s()],t.prototype,"value",2),e([h("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([u("sd-4-0-0-next-6-radio-button")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as h}from"./chunk.6HO6CE4A.js";import{a as e}from"./chunk.DCOFYPWX.js";import{a as o,b as n,d,h as i}from"./chunk.APMDRZQD.js";import{b as l,e as s}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new h(this,"[default]","media","meta","headline","expandable")}render(){let a={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return s`<div class="relative flex flex-col group" part="base"><div class="${e("mb-4",!a["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${e("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${e({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div part="meta" class="${e("gap-2 mb-4",!a["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="text-lg font-bold m-0"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div class="${e("hidden",a["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${e(!a["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div></div>`}};t.styles=[...i.styles,l`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],r([n({reflect:!0})],t.prototype,"variant",2),r([d('[part="base"]')],t.prototype,"teaserMedia",2),t=r([o("sd-4-0-0-next-
|
1
|
+
import{a as h}from"./chunk.6HO6CE4A.js";import{a as e}from"./chunk.DCOFYPWX.js";import{a as o,b as n,d,h as i}from"./chunk.APMDRZQD.js";import{b as l,e as s}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new h(this,"[default]","media","meta","headline","expandable")}render(){let a={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return s`<div class="relative flex flex-col group" part="base"><div class="${e("mb-4",!a["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${e("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${e({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div part="meta" class="${e("gap-2 mb-4",!a["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="text-lg font-bold m-0"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div class="${e("hidden",a["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${e(!a["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div></div>`}};t.styles=[...i.styles,l`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],r([n({reflect:!0})],t.prototype,"variant",2),r([d('[part="base"]')],t.prototype,"teaserMedia",2),t=r([o("sd-4-0-0-next-6-teaser-media")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.APMDRZQD.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return i`<span part="base" class="${r("sd-4-0-0-next-
|
1
|
+
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.APMDRZQD.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return i`<span part="base" class="${r("sd-4-0-0-next-6-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?i`<span part="checked" class="${r("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...n.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([l()],e.prototype,"checked",2),t([l()],e.prototype,"hasFocus",2),t([s({reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-4-0-0-next-6-radio")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as h}from"./chunk.6HO6CE4A.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as c,b as a,d,h as r}from"./chunk.APMDRZQD.js";import{b as p,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends r{constructor(){super(...arguments);this.playing=!1;this.overlay=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new h(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}setVideoInert(t){var i,n;t?(i=this.video)==null||i.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.fadeoutPoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var i;(i=this.video)==null||i.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return l`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${o(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${o(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${o(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-4-0-0-next-
|
1
|
+
import{a as h}from"./chunk.6HO6CE4A.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as c,b as a,d,h as r}from"./chunk.APMDRZQD.js";import{b as p,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends r{constructor(){super(...arguments);this.playing=!1;this.overlay=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new h(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}setVideoInert(t){var i,n;t?(i=this.video)==null||i.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.fadeoutPoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var i;(i=this.video)==null||i.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return l`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${o(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${o(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${o(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-4-0-0-next-6-icon id="default-play-icon" library="system" name="start"></sd-4-0-0-next-6-icon></slot></div></button> ${this.hasSlotController.test("poster")?l`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<div part="overlay" id="overlay" role="presentation" class="${o(this.overlay&&!this.playing?"opacity-100":"opacity-0","bg-[black] bg-opacity-60 w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition")}"></div><slot></slot></div>`}};e.styles=[...r.styles,p`:host{display:inline-block;overflow:hidden;position:relative}.play-pause-transition,::slotted([slot=poster]){transition-duration:.3s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}::slotted([slot=poster]){left:var(--sd-spacing-0,0);position:absolute;top:var(--sd-spacing-0,0);width:100%;z-index:10}#default-play-icon,::slotted([slot=play-icon]){left:50%;position:absolute;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}`],s([d("[part=base]")],e.prototype,"hostEl",2),s([a({type:Boolean,reflect:!0})],e.prototype,"playing",2),s([a({type:Boolean,reflect:!0})],e.prototype,"overlay",2),s([a({type:Boolean})],e.prototype,"isBelowBreakpoint",2),e=s([c("sd-4-0-0-next-6-video")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as d,b as i,d as c,h as l}from"./chunk.APMDRZQD.js";import{b as s,e as n}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var h=0,t=class extends l{constructor(){super(...arguments);this.attrId=++h;this.componentId=`sd-4-0-0-next-
|
1
|
+
import{a}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as d,b as i,d as c,h as l}from"./chunk.APMDRZQD.js";import{b as s,e as n}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var h=0,t=class extends l{constructor(){super(...arguments);this.attrId=++h;this.componentId=`sd-4-0-0-next-6-tab-${this.attrId}`;this.hasSlotController=new b(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(o){this.tab.focus(o)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let o={left:this.hasSlotController.test("left")};return n`<div part="base" class="${r("inline-flex min-w-max h-12 px-3 leading-none items-center justify-center whitespace-nowrap select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled?"opacity-50 !cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><slot name="left" class="${r(o.left&&"block pr-2",this.disabled?"text-neutral-500":"text-primary")}"></slot><slot class="${r(this.disabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${r((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${r(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div>`}};t.styles=[...l.styles,s`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],e([c("[part=base]")],t.prototype,"tab",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({reflect:!0})],t.prototype,"panel",2),e([a("active")],t.prototype,"handleActiveChange",1),e([a("disabled")],t.prototype,"handleDisabledChange",1),t=e([d("sd-4-0-0-next-6-tab")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as w}from"./chunk.GQSLHWQC.js";import{b as C,c as E,d as V,e as k}from"./chunk.65NSSTJE.js";import{a as M}from"./chunk.FFNTXFC3.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as f}from"./chunk.DCOFYPWX.js";import{a as y,b as n,c as u,d as c,h as p}from"./chunk.APMDRZQD.js";import{b as g,e as h}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var i=class extends p{constructor(){super(...arguments);this.formControlController=new C(this);this.hasSlotController=new b(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?k:t?V:E}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-4-0-0-next-
|
1
|
+
import{a as w}from"./chunk.GQSLHWQC.js";import{b as C,c as E,d as V,e as k}from"./chunk.65NSSTJE.js";import{a as M}from"./chunk.FFNTXFC3.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as f}from"./chunk.DCOFYPWX.js";import{a as y,b as n,c as u,d as c,h as p}from"./chunk.APMDRZQD.js";import{b as g,e as h}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var i=class extends p{constructor(){super(...arguments);this.formControlController=new C(this);this.hasSlotController=new b(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?k:t?V:E}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-4-0-0-next-6-radio, sd-4-0-0-next-6-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-4-0-0-next-6-radio, sd-4-0-0-next-6-radio-button"),a=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,a.forEach(d=>d.checked=d===e),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var v;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(r=>!r.disabled),a=(v=e.find(r=>r.checked))!=null?v:e[0],s=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,d=this.value,l=e.indexOf(a)+s;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(r=>{r.checked=!1,this.hasButtonGroup||(r.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==d&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(s=>s.checked)||t[0];a&&a.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,a;let t=this.getAllRadios();if(await Promise.all(t.map(async s=>{await s.updateComplete,s.checked=s.value===this.value,s.size=this.size,s instanceof w&&(s.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(s=>s.tagName.toLowerCase()==="sd-4-0-0-next-6-radio-button"),!t.some(s=>s.checked))if(this.hasButtonGroup){let s=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");s&&(s.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let s=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-4-0-0-next-6-button-group");s&&(s.disableRole=!0)}}syncRadios(){if(customElements.get("sd-4-0-0-next-6-radio")&&customElements.get("sd-4-0-0-next-6-radio-button")){this.syncRadioElements();return}customElements.get("sd-4-0-0-next-6-radio")?this.syncRadioElements():customElements.whenDefined("sd-4-0-0-next-6-radio").then(()=>this.syncRadios()),customElements.get("sd-4-0-0-next-6-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-4-0-0-next-6-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:!!t,a=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${f("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message"><div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${f("p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend><slot name="tooltip"></slot></div><div part="form-control-input" class="${f("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-4-0-0-next-6-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${a}</sd-4-0-0-next-6-button-group>`:a}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};i.dependencies={"sd-4-0-0-next-6-button-group":M},i.styles=[...p.styles,g`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-0-0-next-6-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-0-0-next-6-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-0-0-next-6-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-0-0-next-6-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-0-next-6-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-0-next-6-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([c("slot:not([name])")],i.prototype,"defaultSlot",2),o([c("#validation-input")],i.prototype,"validationInput",2),o([c("#invalid-message")],i.prototype,"invalidMessage",2),o([u()],i.prototype,"hasButtonGroup",2),o([u()],i.prototype,"defaultValue",2),o([u()],i.prototype,"showInvalidStyle",2),o([n({reflect:!0})],i.prototype,"size",2),o([n({type:Boolean,reflect:!0})],i.prototype,"required",2),o([n({reflect:!0})],i.prototype,"orientation",2),o([n()],i.prototype,"label",2),o([n({type:Boolean,reflect:!0})],i.prototype,"boldLabel",2),o([n()],i.prototype,"name",2),o([n({reflect:!0})],i.prototype,"value",2),o([n({reflect:!0})],i.prototype,"form",2),o([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"handleSizeChange",1),o([m("showInvalidStyle",{waitUntilFirstUpdate:!0})],i.prototype,"handleInvalidChange",1),o([m("value")],i.prototype,"handleValueChange",1),i=o([y("sd-4-0-0-next-6-radio-group")],i);export{i as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as o}from"./chunk.E2DRD2OX.js";import{a as u}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.DCOFYPWX.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.APMDRZQD.js";import{b as c,e as s}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.hasSlotController=new u(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let l=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=l;return}l!==this.cachedTextLabel&&(this.cachedTextLabel=l,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var l;return((l=this.textContent)!=null?l:"").trim()}render(){let l={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return s`<div part="base" class="${i("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${i("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?s`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${i("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?s`<sd-4-0-0-next-
|
1
|
+
import{a as o}from"./chunk.E2DRD2OX.js";import{a as u}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.DCOFYPWX.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.APMDRZQD.js";import{b as c,e as s}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.hasSlotController=new u(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let l=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=l;return}l!==this.cachedTextLabel&&(this.cachedTextLabel=l,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var l;return((l=this.textContent)!=null?l:"").trim()}render(){let l={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return s`<div part="base" class="${i("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${i("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?s`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${i("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?s`<sd-4-0-0-next-6-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-4-0-0-next-6-icon>`:""}</span>`:""} ${l.left?s`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${l.right?s`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};e.styles=[...n.styles,c`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}`],t([d('[part="base"]')],e.prototype,"defaultSlot",2),t([r()],e.prototype,"current",2),t([r()],e.prototype,"selected",2),t([r()],e.prototype,"hasHover",2),t([a({reflect:!0})],e.prototype,"size",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checkbox",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a({reflect:!0})],e.prototype,"value",2),t([o("disabled")],e.prototype,"handleDisabledChange",1),t([o("selected")],e.prototype,"handleSelectedChange",1),t([o("value")],e.prototype,"handleValueChange",1),e=t([h("sd-4-0-0-next-6-option")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{b as C}from"./chunk.5CK64GWQ.js";import{a as x}from"./chunk.D7TMPF3D.js";import{b as g}from"./chunk.65NSSTJE.js";import{a as r}from"./chunk.HE2LNCWW.js";import{a as u}from"./chunk.E2DRD2OX.js";import{a as y}from"./chunk.6HO6CE4A.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as v,b as i,c as d,d as c,h as m}from"./chunk.APMDRZQD.js";import{b,e as h}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends m{constructor(){super(...arguments);this.formControlController=new g(this);this.hasSlotController=new y(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,a,o="none"){this.textarea.setSelectionRange(l,a,o)}setRangeText(l,a,o,n){this.textarea.setRangeText(l,a,o,n),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},a=this.label?!0:!!l.label,o=this.helpText?!0:!!l.helpText,n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",p=this.size==="sm"?"text-sm":"text-base",f={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return h`<div part="form-control" class="flex flex-col h-full text-left"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(a?"inline-block":"hidden",p)}" for="input" aria-hidden="${a?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${s("textarea h-full px-4 flex items-top rounded-default group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${s("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",p)}" title="${this.title}" name="${r(this.name)}" .value="${C(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${r(this.placeholder)}" minlength="${r(this.minlength)}" maxlength="${r(this.maxlength)}" rows="${r(this.rows)}" autocapitalize="${r(this.autocapitalize)}" autocorrect="${r(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${r(this.spellcheck)}" enterkeyhint="${r(this.enterkeyhint)}" inputmode="${r(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?h`<sd-4-0-0-next-
|
1
|
+
import{b as C}from"./chunk.5CK64GWQ.js";import{a as x}from"./chunk.D7TMPF3D.js";import{b as g}from"./chunk.65NSSTJE.js";import{a as r}from"./chunk.HE2LNCWW.js";import{a as u}from"./chunk.E2DRD2OX.js";import{a as y}from"./chunk.6HO6CE4A.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as v,b as i,c as d,d as c,h as m}from"./chunk.APMDRZQD.js";import{b,e as h}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends m{constructor(){super(...arguments);this.formControlController=new g(this);this.hasSlotController=new y(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,a,o="none"){this.textarea.setSelectionRange(l,a,o)}setRangeText(l,a,o,n){this.textarea.setRangeText(l,a,o,n),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},a=this.label?!0:!!l.label,o=this.helpText?!0:!!l.helpText,n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",p=this.size==="sm"?"text-sm":"text-base",f={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return h`<div part="form-control" class="flex flex-col h-full text-left"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(a?"inline-block":"hidden",p)}" for="input" aria-hidden="${a?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${s("textarea h-full px-4 flex items-top rounded-default group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${s("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",p)}" title="${this.title}" name="${r(this.name)}" .value="${C(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${r(this.placeholder)}" minlength="${r(this.minlength)}" maxlength="${r(this.maxlength)}" rows="${r(this.rows)}" autocapitalize="${r(this.autocapitalize)}" autocorrect="${r(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${r(this.spellcheck)}" enterkeyhint="${r(this.enterkeyhint)}" inputmode="${r(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?h`<sd-4-0-0-next-6-icon class="${s("text-error absolute right-4 bg-white group-hover:bg-neutral-200",f)}" library="system" name="risk" part="invalid-icon"></sd-4-0-0-next-6-icon>`:""} ${this.styleOnValid&&this.showValidStyle?h`<sd-4-0-0-next-6-icon class="${s("text-success absolute right-4 bg-white group-hover:bg-neutral-200",f)}" library="system" name="status-check" part="valid-icon"></sd-4-0-0-next-6-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${s("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};e.styles=[...m.styles,b`:host{display:block;height:100%}:host([required]) #label:after{content:" *"}.no-scrollbar::-webkit-scrollbar{display:none}`],t([c("#input")],e.prototype,"textarea",2),t([c("#invalid-message")],e.prototype,"invalidMessage",2),t([d()],e.prototype,"hasFocus",2),t([d()],e.prototype,"showValidStyle",2),t([d()],e.prototype,"showInvalidStyle",2),t([i()],e.prototype,"title",2),t([i()],e.prototype,"name",2),t([i()],e.prototype,"value",2),t([i({reflect:!0})],e.prototype,"size",2),t([i()],e.prototype,"label",2),t([i({attribute:"help-text"})],e.prototype,"helpText",2),t([i()],e.prototype,"placeholder",2),t([i({type:Number})],e.prototype,"rows",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"readonly",2),t([i({reflect:!0})],e.prototype,"form",2),t([i({type:Boolean,reflect:!0})],e.prototype,"required",2),t([i({type:Number})],e.prototype,"minlength",2),t([i({type:Number})],e.prototype,"maxlength",2),t([i()],e.prototype,"autocapitalize",2),t([i()],e.prototype,"autocorrect",2),t([i()],e.prototype,"autocomplete",2),t([i({type:Boolean})],e.prototype,"autofocus",2),t([i()],e.prototype,"enterkeyhint",2),t([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],e.prototype,"styleOnValid",2),t([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],e.prototype,"spellcheck",2),t([i()],e.prototype,"inputmode",2),t([x()],e.prototype,"defaultValue",2),t([u("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([u("rows",{waitUntilFirstUpdate:!0})],e.prototype,"handleRowsChange",1),t([u("value",{waitUntilFirstUpdate:!0})],e.prototype,"handleValueChange",1),e=t([v("sd-4-0-0-next-6-textarea")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.26YUWEYR.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as i,b as s,h as l}from"./chunk.APMDRZQD.js";import{b as t,e as o}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.color="currentColor";this.localize=new a(this)}render(){return o`<svg role="progressbar" viewBox="0 0 24 24" class="${m("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};e.styles=[...l.styles,t`:host{display:inline-block;height:1em;width:1em}`],r([s({reflect:!0})],e.prototype,"color",2),e=r([i("sd-4-0-0-next-
|
1
|
+
import{a}from"./chunk.26YUWEYR.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as i,b as s,h as l}from"./chunk.APMDRZQD.js";import{b as t,e as o}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.color="currentColor";this.localize=new a(this)}render(){return o`<svg role="progressbar" viewBox="0 0 24 24" class="${m("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};e.styles=[...l.styles,t`:host{display:inline-block;height:1em;width:1em}`],r([s({reflect:!0})],e.prototype,"color",2),e=r([i("sd-4-0-0-next-6-spinner")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.APMDRZQD.js";import{b as r,e as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var p=0,t=class extends i{constructor(){super(...arguments);this.attrId=++p;this.componentId=`sd-4-0-0-next-
|
1
|
+
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.APMDRZQD.js";import{b as r,e as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var p=0,t=class extends i{constructor(){super(...arguments);this.attrId=++p;this.componentId=`sd-4-0-0-next-6-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return s`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...i.styles,r`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([a({reflect:!0})],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-4-0-0-next-6-tab-panel")],t);export{t as a};
|