@solid-design-system/components 6.0.0-next.8 → 6.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/chunk.5Z5ZOJIA.js +5 -0
- package/cdn/components/teaser-media/teaser-media.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.3DB2ELEL.js +1 -1
- package/cdn-versioned/chunks/chunk.3ZRUHOGI.js +1 -1
- package/cdn-versioned/chunks/chunk.5G7ZOEWT.js +5 -5
- package/cdn-versioned/chunks/chunk.5PA35WD2.js +1 -1
- package/cdn-versioned/chunks/chunk.5TUC644H.js +2 -2
- package/cdn-versioned/chunks/chunk.5Z5ZOJIA.js +5 -0
- package/cdn-versioned/chunks/chunk.5ZPLQS6G.js +2 -2
- package/cdn-versioned/chunks/chunk.5ZYFWIRD.js +1 -1
- package/cdn-versioned/chunks/chunk.66LOVPZM.js +1 -1
- package/cdn-versioned/chunks/chunk.66OZDVLX.js +2 -2
- package/cdn-versioned/chunks/chunk.6GHBG4PY.js +2 -2
- package/cdn-versioned/chunks/chunk.6Q6FRPBQ.js +2 -2
- package/cdn-versioned/chunks/chunk.6XTQ6373.js +2 -2
- package/cdn-versioned/chunks/chunk.6ZXO6XV7.js +2 -2
- package/cdn-versioned/chunks/chunk.7JAXJRX2.js +2 -2
- package/cdn-versioned/chunks/chunk.7WZBSGVO.js +1 -1
- package/cdn-versioned/chunks/chunk.ALIY2YIR.js +2 -2
- package/cdn-versioned/chunks/chunk.AZC2MB6N.js +2 -2
- package/cdn-versioned/chunks/chunk.BL5NWLDW.js +1 -1
- package/cdn-versioned/chunks/chunk.BTMWUMPI.js +1 -1
- package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
- package/cdn-versioned/chunks/chunk.E7DVDO4P.js +1 -1
- package/cdn-versioned/chunks/chunk.EGKVLCBO.js +2 -2
- package/cdn-versioned/chunks/chunk.EIG3V7LV.js +2 -2
- package/cdn-versioned/chunks/chunk.F3OBG73C.js +1 -1
- package/cdn-versioned/chunks/chunk.H7N4XIFF.js +2 -2
- package/cdn-versioned/chunks/chunk.HO5NN73W.js +1 -1
- package/cdn-versioned/chunks/chunk.HWXFA3JT.js +2 -2
- package/cdn-versioned/chunks/chunk.IQUVFHYA.js +1 -1
- package/cdn-versioned/chunks/chunk.J3HOSC6V.js +2 -2
- package/cdn-versioned/chunks/chunk.J4LE3LKP.js +2 -2
- package/cdn-versioned/chunks/chunk.JGU23CP4.js +2 -2
- package/cdn-versioned/chunks/chunk.JS2HQ2N4.js +1 -1
- package/cdn-versioned/chunks/chunk.MPLKGS34.js +2 -2
- package/cdn-versioned/chunks/chunk.MQ6HTONQ.js +2 -2
- package/cdn-versioned/chunks/chunk.MWU6TZ4N.js +2 -2
- package/cdn-versioned/chunks/chunk.NMHY6H5N.js +6 -6
- package/cdn-versioned/chunks/chunk.OXYZANQK.js +2 -2
- package/cdn-versioned/chunks/chunk.P3QDLITO.js +1 -1
- package/cdn-versioned/chunks/chunk.P6YYQ6VT.js +3 -3
- package/cdn-versioned/chunks/chunk.PES7MZKA.js +1 -1
- package/cdn-versioned/chunks/chunk.Q36WGVZ7.js +5 -5
- package/cdn-versioned/chunks/chunk.RJVGGY3Q.js +2 -2
- package/cdn-versioned/chunks/chunk.RXQYBUHG.js +2 -2
- package/cdn-versioned/chunks/chunk.S4EKTV5A.js +2 -2
- package/cdn-versioned/chunks/chunk.S5SNELX3.js +2 -2
- package/cdn-versioned/chunks/chunk.U6FGIHUI.js +2 -2
- package/cdn-versioned/chunks/chunk.URYTIP6C.js +2 -2
- package/cdn-versioned/chunks/chunk.UVDP4CO5.js +2 -2
- package/cdn-versioned/chunks/chunk.V7IMVXRC.js +2 -2
- package/cdn-versioned/chunks/chunk.VA5ZPE34.js +2 -2
- package/cdn-versioned/chunks/chunk.VGYX7TTE.js +2 -2
- package/cdn-versioned/chunks/chunk.VHHOKYE5.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WUWSF33N.js +1 -1
- package/cdn-versioned/chunks/chunk.XBZZFEMG.js +2 -2
- package/cdn-versioned/chunks/chunk.XG6CO665.js +1 -1
- package/cdn-versioned/chunks/chunk.XHDZVSCR.js +2 -2
- package/cdn-versioned/chunks/chunk.XIRAK67B.js +1 -1
- package/cdn-versioned/chunks/chunk.YL7YHMIF.js +3 -3
- package/cdn-versioned/chunks/chunk.YUPZE4GS.js +2 -2
- package/cdn-versioned/chunks/chunk.YXMHHML2.js +2 -2
- package/cdn-versioned/chunks/chunk.ZATYZ65D.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/teaser-media/teaser-media.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +248 -248
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +75 -75
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +75 -75
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +94 -94
- package/cdn-versioned/web-types.json +163 -163
- package/dist/chunks/{chunk.WSXRRFIW.js → chunk.OAT2OUR3.js} +3 -3
- package/dist/components/teaser-media/teaser-media.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +9 -9
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.2ER4MXZC.js +1 -1
- package/dist-versioned/chunks/chunk.3BVNSUFD.js +1 -1
- package/dist-versioned/chunks/chunk.4FY6QRJ7.js +3 -3
- package/dist-versioned/chunks/chunk.5D7C4MXB.js +2 -2
- package/dist-versioned/chunks/chunk.5H7CWETG.js +2 -2
- package/dist-versioned/chunks/chunk.5WAWAUSM.js +2 -2
- package/dist-versioned/chunks/chunk.5ZRRM6UH.js +2 -2
- package/dist-versioned/chunks/chunk.662O4CMZ.js +12 -12
- package/dist-versioned/chunks/chunk.7RSL7EOY.js +6 -6
- package/dist-versioned/chunks/chunk.7XXRAMBH.js +1 -1
- package/dist-versioned/chunks/chunk.A3YMYTLW.js +4 -4
- package/dist-versioned/chunks/chunk.AAY5JRCW.js +4 -4
- package/dist-versioned/chunks/chunk.AEFLWSEK.js +12 -12
- package/dist-versioned/chunks/chunk.ANYT6TR4.js +1 -1
- package/dist-versioned/chunks/chunk.BFDY2E6R.js +11 -11
- package/dist-versioned/chunks/chunk.CR5C6OL5.js +26 -26
- package/dist-versioned/chunks/chunk.CT4BIUEI.js +6 -6
- package/dist-versioned/chunks/chunk.DFQ2QJI5.js +2 -2
- package/dist-versioned/chunks/chunk.DJ3WYVWV.js +6 -6
- package/dist-versioned/chunks/chunk.E7L2RBML.js +5 -5
- package/dist-versioned/chunks/chunk.EORXKFFT.js +1 -1
- package/dist-versioned/chunks/chunk.ES7AAS4J.js +4 -4
- package/dist-versioned/chunks/chunk.F4A7G427.js +3 -3
- package/dist-versioned/chunks/chunk.FMSAUZWF.js +4 -4
- package/dist-versioned/chunks/chunk.FPMNMEXR.js +2 -2
- package/dist-versioned/chunks/chunk.HB45IF2T.js +1 -1
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KKZHPMY4.js +2 -2
- package/dist-versioned/chunks/chunk.KVVYC4DL.js +5 -5
- package/dist-versioned/chunks/chunk.M5EPD6OZ.js +6 -6
- package/dist-versioned/chunks/chunk.MB47FVBP.js +1 -1
- package/dist-versioned/chunks/chunk.MFE2NCVX.js +3 -3
- package/dist-versioned/chunks/chunk.N5XK43AK.js +18 -18
- package/dist-versioned/chunks/chunk.NCZBBZOR.js +1 -1
- package/dist-versioned/chunks/chunk.NK5K5MMW.js +1 -1
- package/dist-versioned/chunks/chunk.NKPJM2WV.js +5 -5
- package/dist-versioned/chunks/chunk.O6OCXI2L.js +3 -3
- package/dist-versioned/chunks/{chunk.WSXRRFIW.js → chunk.OAT2OUR3.js} +4 -4
- package/dist-versioned/chunks/chunk.OBQTYYBW.js +2 -2
- package/dist-versioned/chunks/chunk.OK3VBJRJ.js +3 -3
- package/dist-versioned/chunks/chunk.PF4UKMOY.js +2 -2
- package/dist-versioned/chunks/chunk.PJOYWTXL.js +1 -1
- package/dist-versioned/chunks/chunk.PQ7HSAL7.js +4 -4
- package/dist-versioned/chunks/chunk.QHUH3UZT.js +2 -2
- package/dist-versioned/chunks/chunk.QJ2PELD5.js +2 -2
- package/dist-versioned/chunks/chunk.RIWKWSAL.js +2 -2
- package/dist-versioned/chunks/chunk.RY4KWEME.js +1 -1
- package/dist-versioned/chunks/chunk.SIUXYHUU.js +8 -8
- package/dist-versioned/chunks/chunk.SNTOP4NU.js +3 -3
- package/dist-versioned/chunks/chunk.SZDLCBRQ.js +24 -24
- package/dist-versioned/chunks/chunk.TIOVWVCD.js +2 -2
- package/dist-versioned/chunks/chunk.TXNCIVE5.js +14 -14
- package/dist-versioned/chunks/chunk.U7ASTWXS.js +5 -5
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UIXXR3N5.js +3 -3
- package/dist-versioned/chunks/chunk.VN6V46I7.js +2 -2
- package/dist-versioned/chunks/chunk.WSXDUNN7.js +1 -1
- package/dist-versioned/chunks/chunk.WTFF4KWO.js +3 -3
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/chunk.YBIM4TC7.js +1 -1
- package/dist-versioned/chunks/chunk.ZBAABZKL.js +1 -1
- package/dist-versioned/chunks/chunk.ZRJRFFVA.js +3 -3
- package/dist-versioned/chunks/chunk.ZXOKRAZP.js +2 -2
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/teaser-media/teaser-media.js +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +248 -248
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +9 -9
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +163 -163
- package/package.json +2 -2
- package/cdn/chunks/chunk.63IQ23S4.js +0 -5
- package/cdn-versioned/chunks/chunk.63IQ23S4.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.YEDQWNIV.js";import{a as s,b as n,d,h as i}from"./chunk.PES7MZKA.js";import{b as e,e as l}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var a=class extends i{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return l`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${r("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0",{white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"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/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${r("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${r(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${r("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};a.styles=[...i.styles,e`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}:host([variant=white]) .background:focus-within{background-color:var(--sd-color-background-white)}@supports (color:color-mix(in lab,red,red)){:host([variant=white]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-white) var(--sd-opacity-90),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:var(--sd-color-background-neutral-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=neutral-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-neutral-100) var(--sd-opacity-90),transparent)}}:host([variant=primary]) .background:focus-within{background-color:var(--sd-color-background-primary)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary) var(--sd-opacity-90),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:var(--sd-color-background-primary-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary-100) var(--sd-opacity-90),transparent)}}:host([variant=gradient-light]) .bg-gradient-to-t{--sd-color-background-white:var(--sd-informational-gradient--white-color-background, var(--sd-color-white))}:host([variant=gradient-dark]) .bg-gradient-to-t{--sd-color-background-primary-800:var(
|
|
3
|
+
--sd-informational-gradient--primary-800-color-background,
|
|
4
|
+
var(--sd-color-primary-800)
|
|
5
|
+
)}`],o([n({type:String,reflect:!0})],a.prototype,"variant",2),o([d('[part="base"]')],a.prototype,"teaserMedia",2),a=o([s("sd-teaser-media")],a);export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.5Z5ZOJIA.js";import"../../chunks/chunk.CGQ2BPPZ.js";import"../../chunks/chunk.YEDQWNIV.js";import"../../chunks/chunk.PES7MZKA.js";import"../../chunks/chunk.763RLJEK.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
package/cdn/custom-elements.json
CHANGED
|
@@ -21849,7 +21849,7 @@
|
|
|
21849
21849
|
"package": {
|
|
21850
21850
|
"name": "@solid-design-system/components",
|
|
21851
21851
|
"description": "Solid Design System: Components",
|
|
21852
|
-
"version": "6.0.0-next.
|
|
21852
|
+
"version": "6.0.0-next.9",
|
|
21853
21853
|
"author": "Union Investment",
|
|
21854
21854
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
21855
21855
|
"license": "MIT"
|
|
@@ -268,11 +268,11 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
268
268
|
:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){border-bottom-color:var(--sd-color-border-neutral-400)}.tab-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-content:'';content:var(--tw-content)}.tab--active-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:var(--sd-color-border-neutral-400);transition-property:border;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-content:'';content:var(--tw-content);border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`],a([b("[part=base]")],Ot.prototype,"tab",2),a([b("[part=active-tab-indicator]")],Ot.prototype,"currentIndicator",2),a([d({type:String,reflect:!0})],Ot.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],Ot.prototype,"active",2),a([d({type:Boolean,reflect:!0})],Ot.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Ot.prototype,"visuallyDisabled",2),a([d({type:String,reflect:!0})],Ot.prototype,"panel",2),a([k("active")],Ot.prototype,"handleActiveChange",1),a([k(["disabled","visually-disabled"])],Ot.prototype,"handleDisabledChange",1),Ot=a([x("sd-tab")],Ot);var Tt=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls(),this.repositionIndicator()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}updated(t){!t.get("canScroll")&&this.canScroll&&this.handleScroll()}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),l=this.tabs[n+1];r!==null&&l&&te(l,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),l=this.tabs[n-1];r!==null&&l&&te(l,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(c=>c.matches(":focus")),l=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let c=this.tabs.indexOf(n);t.key==="Home"?c=0:t.key==="End"?c=this.tabs.length-1:t.key===(l?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?c--:(t.key===(l?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&c++,c<0&&(c=this.tabs.length-1),c>this.tabs.length-1&&(c=0),this.tabs[c].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[c],{scrollBehavior:"smooth"}),te(this.tabs[c],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=B({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),te(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.repositionIndicator(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),l=getComputedStyle(r).justifyContent==="center",c=n.left+n.width/2,u=o.left+o.width/2,m=t.offsetWidth,f=l?u-c:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${f}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return p`<div part="base" class="${h("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${h(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?p`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${E(!this.canScroll.left||void 0)}" class="${h("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${h("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?p`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30 navigable__current-indicator-height navigable__current-indicator-border-radius"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?p`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${E(!this.canScroll.right||void 0)}" class="${h("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${h("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};Tt.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
269
269
|
:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary)}`],a([b("[part=base]")],Tt.prototype,"tabGroup",2),a([b("[part=body]")],Tt.prototype,"body",2),a([b("[part=scroll-container]")],Tt.prototype,"nav",2),a([b("[part=active-tab-indicator]")],Tt.prototype,"indicator",2),a([b('[part="tabs"]')],Tt.prototype,"tabsContainer",2),a([T()],Tt.prototype,"hasScrollControls",2),a([T()],Tt.prototype,"variant",2),a([T()],Tt.prototype,"canScroll",2),a([d({type:String,reflect:!0})],Tt.prototype,"activation",2),a([wi(20)],Tt.prototype,"handleScroll",1),Tt=a([x("sd-tab-group")],Tt);var Dd=0,pe=class extends g{constructor(){super(...arguments);this.attrId=++Dd;this.componentId=`sd-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 p`<slot part="base" class="${h("block",this.active&&"tab-panel--active")}"></slot>`}};pe.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
270
270
|
:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([d({type:String,reflect:!0})],pe.prototype,"name",2),a([d({type:Boolean,reflect:!0})],pe.prototype,"active",2),a([k("active")],pe.prototype,"handleActiveChange",1),pe=a([x("sd-tab-panel")],pe);var Wt=class extends g{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new P(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"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")};return p`<div class="${h("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${h("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${h("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${h(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${h("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};Wt.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
271
|
-
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],Wt.prototype,"variant",2),a([d({reflect:!0,type:Number})],Wt.prototype,"breakpoint",2),a([d({type:Boolean,reflect:!0})],Wt.prototype,"inset",2),a([d({type:Boolean,reflect:!0,attribute:"reversed-layout"})],Wt.prototype,"reversedLayout",2),a([b('[part="base"]')],Wt.prototype,"teaser",2),a([T()],Wt.prototype,"_orientation",2),Wt=a([x("sd-teaser")],Wt);var Le=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return p`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${h("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${h("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${h("absolute inset-0",{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/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};Le.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer
|
|
272
|
-
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}
|
|
271
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],Wt.prototype,"variant",2),a([d({reflect:!0,type:Number})],Wt.prototype,"breakpoint",2),a([d({type:Boolean,reflect:!0})],Wt.prototype,"inset",2),a([d({type:Boolean,reflect:!0,attribute:"reversed-layout"})],Wt.prototype,"reversedLayout",2),a([b('[part="base"]')],Wt.prototype,"teaser",2),a([T()],Wt.prototype,"_orientation",2),Wt=a([x("sd-teaser")],Wt);var Le=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return p`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${h("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${h("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${h("absolute inset-0",{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/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};Le.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
272
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}:host([variant=white]) .background:focus-within{background-color:var(--sd-color-background-white)}@supports (color:color-mix(in lab,red,red)){:host([variant=white]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-white) var(--sd-opacity-90),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:var(--sd-color-background-neutral-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=neutral-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-neutral-100) var(--sd-opacity-90),transparent)}}:host([variant=primary]) .background:focus-within{background-color:var(--sd-color-background-primary)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary) var(--sd-opacity-90),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:var(--sd-color-background-primary-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary-100) var(--sd-opacity-90),transparent)}}:host([variant=gradient-light]) .bg-gradient-to-t{--sd-color-background-white:var(--sd-informational-gradient--white-color-background, var(--sd-color-white))}:host([variant=gradient-dark]) .bg-gradient-to-t{--sd-color-background-primary-800:var(
|
|
273
273
|
--sd-informational-gradient--primary-800-color-background,
|
|
274
274
|
var(--sd-color-primary-800)
|
|
275
|
-
)}
|
|
275
|
+
)}`],a([d({type:String,reflect:!0})],Le.prototype,"variant",2),a([b('[part="base"]')],Le.prototype,"teaserMedia",2),Le=a([x("sd-teaser-media")],Le);var N=class extends g{constructor(){super(...arguments);this.formControlController=new lt(this);this.hasSlotController=new P(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.visuallyDisabled=!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(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.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(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.textarea.setRangeText(t,e,r,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",l=this.size==="sm"?"text-sm":"text-base",c={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return p`<div part="form-control" class="flex flex-col h-full text-left">${e||o?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",l)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[n])}"></div><div part="base" class="${h("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${h("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",l)}" title="${this.title}" name="${E(this.name)}" .value="${ke(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" rows="${E(this.rows)}" autocapitalize="${E(this.autocapitalize)}" autocorrect="${E(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${E(this.spellcheck)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?p`<sd-icon class="${h("text-error absolute right-4 pointer-events-none",c)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon class="${h("text-success absolute right-4 pointer-events-none",c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};N.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
276
276
|
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],a([b("#input")],N.prototype,"textarea",2),a([b("#invalid-message")],N.prototype,"invalidMessage",2),a([T()],N.prototype,"hasFocus",2),a([T()],N.prototype,"showValidStyle",2),a([T()],N.prototype,"showInvalidStyle",2),a([d({type:String,reflect:!0})],N.prototype,"title",2),a([d({type:String,reflect:!0})],N.prototype,"name",2),a([d()],N.prototype,"value",2),a([d({type:String,reflect:!0})],N.prototype,"size",2),a([d({type:String,reflect:!0})],N.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],N.prototype,"helpText",2),a([d({type:String,reflect:!0})],N.prototype,"placeholder",2),a([d({type:Number,reflect:!0})],N.prototype,"rows",2),a([d({type:Boolean,reflect:!0})],N.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],N.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],N.prototype,"readonly",2),a([d({type:String,reflect:!0})],N.prototype,"form",2),a([d({type:Boolean,reflect:!0})],N.prototype,"required",2),a([d({type:Number,reflect:!0})],N.prototype,"minlength",2),a([d({type:Number,reflect:!0})],N.prototype,"maxlength",2),a([d({type:String,reflect:!0})],N.prototype,"autocapitalize",2),a([d({type:String,reflect:!0})],N.prototype,"autocorrect",2),a([d({reflect:!0})],N.prototype,"autocomplete",2),a([d({type:Boolean,reflect:!0})],N.prototype,"autofocus",2),a([d({type:String,reflect:!0})],N.prototype,"enterkeyhint",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],N.prototype,"styleOnValid",2),a([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],N.prototype,"spellcheck",2),a([d({type:String,reflect:!0})],N.prototype,"inputmode",2),a([Ht()],N.prototype,"defaultValue",2),a([k("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),a([k("rows",{waitUntilFirstUpdate:!0})],N.prototype,"handleRowsChange",1),a([k("value",{waitUntilFirstUpdate:!0})],N.prototype,"handleValueChange",1),N=a([x("sd-textarea")],N);var ft=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.hasSlotController=new P(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=gi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=gi(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await W(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"tooltip.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"tooltip.hide",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,X(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),X(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return p`<sd-popup part="base" exportparts="
|
|
277
277
|
popup:base__popup,
|
|
278
278
|
arrow:base__arrow
|
|
@@ -268,11 +268,11 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
268
268
|
:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){border-bottom-color:var(--sd-color-border-neutral-400)}.tab-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-content:'';content:var(--tw-content)}.tab--active-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:var(--sd-color-border-neutral-400);transition-property:border;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-content:'';content:var(--tw-content);border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`],a([b("[part=base]")],At.prototype,"tab",2),a([b("[part=active-tab-indicator]")],At.prototype,"currentIndicator",2),a([d({type:String,reflect:!0})],At.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],At.prototype,"active",2),a([d({type:Boolean,reflect:!0})],At.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],At.prototype,"visuallyDisabled",2),a([d({type:String,reflect:!0})],At.prototype,"panel",2),a([k("active")],At.prototype,"handleActiveChange",1),a([k(["disabled","visually-disabled"])],At.prototype,"handleDisabledChange",1),At=a([x("sd-tab")],At);var $t=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls(),this.repositionIndicator()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}updated(t){!t.get("canScroll")&&this.canScroll&&this.handleScroll()}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),l=this.tabs[n+1];r!==null&&l&&re(l,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),l=this.tabs[n-1];r!==null&&l&&re(l,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(c=>c.matches(":focus")),l=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let c=this.tabs.indexOf(n);t.key==="Home"?c=0:t.key==="End"?c=this.tabs.length-1:t.key===(l?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?c--:(t.key===(l?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&c++,c<0&&(c=this.tabs.length-1),c>this.tabs.length-1&&(c=0),this.tabs[c].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[c],{scrollBehavior:"smooth"}),re(this.tabs[c],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=B({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),re(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.repositionIndicator(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),l=getComputedStyle(r).justifyContent==="center",c=n.left+n.width/2,u=o.left+o.width/2,m=t.offsetWidth,f=l?u-c:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${f}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return p`<div part="base" class="${h("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${h(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?p`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${E(!this.canScroll.left||void 0)}" class="${h("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${h("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?p`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30 navigable__current-indicator-height navigable__current-indicator-border-radius"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?p`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${E(!this.canScroll.right||void 0)}" class="${h("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${h("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};$t.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
269
269
|
:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:calc(var(--sd-spacing-1) * 0);width:calc(var(--sd-spacing-1) * 0)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary)}`],a([b("[part=base]")],$t.prototype,"tabGroup",2),a([b("[part=body]")],$t.prototype,"body",2),a([b("[part=scroll-container]")],$t.prototype,"nav",2),a([b("[part=active-tab-indicator]")],$t.prototype,"indicator",2),a([b('[part="tabs"]')],$t.prototype,"tabsContainer",2),a([T()],$t.prototype,"hasScrollControls",2),a([T()],$t.prototype,"variant",2),a([T()],$t.prototype,"canScroll",2),a([d({type:String,reflect:!0})],$t.prototype,"activation",2),a([wi(20)],$t.prototype,"handleScroll",1),$t=a([x("sd-tab-group")],$t);var Pd=0,de=class extends g{constructor(){super(...arguments);this.attrId=++Pd;this.componentId=`sd-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 p`<slot part="base" class="${h("block",this.active&&"tab-panel--active")}"></slot>`}};de.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
270
270
|
:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([d({type:String,reflect:!0})],de.prototype,"name",2),a([d({type:Boolean,reflect:!0})],de.prototype,"active",2),a([k("active")],de.prototype,"handleActiveChange",1),de=a([x("sd-tab-panel")],de);var qt=class extends g{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new P(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"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")};return p`<div class="${h("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${h("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${h("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${h(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${h("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};qt.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
271
|
-
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],qt.prototype,"variant",2),a([d({reflect:!0,type:Number})],qt.prototype,"breakpoint",2),a([d({type:Boolean,reflect:!0})],qt.prototype,"inset",2),a([d({type:Boolean,reflect:!0,attribute:"reversed-layout"})],qt.prototype,"reversedLayout",2),a([b('[part="base"]')],qt.prototype,"teaser",2),a([T()],qt.prototype,"_orientation",2),qt=a([x("sd-teaser")],qt);var be=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return p`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${h("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${h("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${h("absolute inset-0",{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/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};be.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer
|
|
272
|
-
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}
|
|
271
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}::slotted([slot=headline]){margin:calc(var(--sd-spacing-1) * 0)!important;font-size:var(--sd-text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)))!important;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}@property --tw-font-weight{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],qt.prototype,"variant",2),a([d({reflect:!0,type:Number})],qt.prototype,"breakpoint",2),a([d({type:Boolean,reflect:!0})],qt.prototype,"inset",2),a([d({type:Boolean,reflect:!0,attribute:"reversed-layout"})],qt.prototype,"reversedLayout",2),a([b('[part="base"]')],qt.prototype,"teaser",2),a([T()],qt.prototype,"_orientation",2),qt=a([x("sd-teaser")],qt);var be=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return p`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${h("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${h("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${h("absolute inset-0",{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/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};be.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
272
|
+
:host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}:host([variant=white]) .background:focus-within{background-color:var(--sd-color-background-white)}@supports (color:color-mix(in lab,red,red)){:host([variant=white]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-white) var(--sd-opacity-90),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:var(--sd-color-background-neutral-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=neutral-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-neutral-100) var(--sd-opacity-90),transparent)}}:host([variant=primary]) .background:focus-within{background-color:var(--sd-color-background-primary)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary) var(--sd-opacity-90),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:var(--sd-color-background-primary-100)}@supports (color:color-mix(in lab,red,red)){:host([variant=primary-100]) .background:focus-within{background-color:color-mix(in oklab,var(--sd-color-background-primary-100) var(--sd-opacity-90),transparent)}}:host([variant=gradient-light]) .bg-gradient-to-t{--sd-color-background-white:var(--sd-informational-gradient--white-color-background, var(--sd-color-white))}:host([variant=gradient-dark]) .bg-gradient-to-t{--sd-color-background-primary-800:var(
|
|
273
273
|
--sd-informational-gradient--primary-800-color-background,
|
|
274
274
|
var(--sd-color-primary-800)
|
|
275
|
-
)}
|
|
275
|
+
)}`],a([d({type:String,reflect:!0})],be.prototype,"variant",2),a([b('[part="base"]')],be.prototype,"teaserMedia",2),be=a([x("sd-teaser-media")],be);var N=class extends g{constructor(){super(...arguments);this.formControlController=new ut(this);this.hasSlotController=new P(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.visuallyDisabled=!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(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.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(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.textarea.setRangeText(t,e,r,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",l=this.size==="sm"?"text-sm":"text-base",c={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return p`<div part="form-control" class="flex flex-col h-full text-left">${e||o?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",l)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[n])}"></div><div part="base" class="${h("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${h("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",l)}" title="${this.title}" name="${E(this.name)}" .value="${$e(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" rows="${E(this.rows)}" autocapitalize="${E(this.autocapitalize)}" autocorrect="${E(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${E(this.spellcheck)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?p`<sd-icon class="${h("text-error absolute right-4 pointer-events-none",c)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon class="${h("text-success absolute right-4 pointer-events-none",c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};N.styles=[...g.styles,w`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
276
276
|
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],a([b("#input")],N.prototype,"textarea",2),a([b("#invalid-message")],N.prototype,"invalidMessage",2),a([T()],N.prototype,"hasFocus",2),a([T()],N.prototype,"showValidStyle",2),a([T()],N.prototype,"showInvalidStyle",2),a([d({type:String,reflect:!0})],N.prototype,"title",2),a([d({type:String,reflect:!0})],N.prototype,"name",2),a([d()],N.prototype,"value",2),a([d({type:String,reflect:!0})],N.prototype,"size",2),a([d({type:String,reflect:!0})],N.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],N.prototype,"helpText",2),a([d({type:String,reflect:!0})],N.prototype,"placeholder",2),a([d({type:Number,reflect:!0})],N.prototype,"rows",2),a([d({type:Boolean,reflect:!0})],N.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],N.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],N.prototype,"readonly",2),a([d({type:String,reflect:!0})],N.prototype,"form",2),a([d({type:Boolean,reflect:!0})],N.prototype,"required",2),a([d({type:Number,reflect:!0})],N.prototype,"minlength",2),a([d({type:Number,reflect:!0})],N.prototype,"maxlength",2),a([d({type:String,reflect:!0})],N.prototype,"autocapitalize",2),a([d({type:String,reflect:!0})],N.prototype,"autocorrect",2),a([d({reflect:!0})],N.prototype,"autocomplete",2),a([d({type:Boolean,reflect:!0})],N.prototype,"autofocus",2),a([d({type:String,reflect:!0})],N.prototype,"enterkeyhint",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],N.prototype,"styleOnValid",2),a([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],N.prototype,"spellcheck",2),a([d({type:String,reflect:!0})],N.prototype,"inputmode",2),a([Rt()],N.prototype,"defaultValue",2),a([k("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),a([k("rows",{waitUntilFirstUpdate:!0})],N.prototype,"handleRowsChange",1),a([k("value",{waitUntilFirstUpdate:!0})],N.prototype,"handleValueChange",1),N=a([x("sd-textarea")],N);var ft=class extends g{constructor(){super(...arguments);this.localize=new O(this);this.hasSlotController=new P(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=gi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=gi(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await W(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"tooltip.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"tooltip.hide",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,G(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),G(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return p`<sd-popup part="base" exportparts="
|
|
277
277
|
popup:base__popup,
|
|
278
278
|
arrow:base__arrow
|
package/cdn/solid-components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunks/chunk.HAL7R4WT.js";import{a as ae}from"./chunks/chunk.XIRAK67B.js";import{a as ee}from"./chunks/chunk.P6YYQ6VT.js";import{a as oe}from"./chunks/chunk.S4EKTV5A.js";import{a as fe}from"./chunks/chunk.5TUC644H.js";import{a as U}from"./chunks/chunk.BL5NWLDW.js";import{a as W}from"./chunks/chunk.6GHBG4PY.js";import{a as X}from"./chunks/chunk.6XTQ6373.js";import{a as Y}from"./chunks/chunk.H7N4XIFF.js";import{a as Z}from"./chunks/chunk.P3QDLITO.js";import{a as _}from"./chunks/chunk.
|
|
1
|
+
import"./chunks/chunk.HAL7R4WT.js";import{a as ae}from"./chunks/chunk.XIRAK67B.js";import{a as ee}from"./chunks/chunk.P6YYQ6VT.js";import{a as oe}from"./chunks/chunk.S4EKTV5A.js";import{a as fe}from"./chunks/chunk.5TUC644H.js";import{a as U}from"./chunks/chunk.BL5NWLDW.js";import{a as W}from"./chunks/chunk.6GHBG4PY.js";import{a as X}from"./chunks/chunk.6XTQ6373.js";import{a as Y}from"./chunks/chunk.H7N4XIFF.js";import{a as Z}from"./chunks/chunk.P3QDLITO.js";import{a as _}from"./chunks/chunk.5Z5ZOJIA.js";import{a as $}from"./chunks/chunk.6ZXO6XV7.js";import{a as V}from"./chunks/chunk.URYTIP6C.js";import"./chunks/chunk.IVHEBGOY.js";import{a as j}from"./chunks/chunk.WUWSF33N.js";import{a as q}from"./chunks/chunk.XHDZVSCR.js";import{a as y}from"./chunks/chunk.Q36WGVZ7.js";import{a as z}from"./chunks/chunk.IQUVFHYA.js";import{a as J}from"./chunks/chunk.6Q6FRPBQ.js";import{a as K}from"./chunks/chunk.ALIY2YIR.js";import{a as N}from"./chunks/chunk.MWU6TZ4N.js";import{a as O}from"./chunks/chunk.MQ6HTONQ.js";import{a as P}from"./chunks/chunk.RJVGGY3Q.js";import{a as E}from"./chunks/chunk.V7IMVXRC.js";import{a as H}from"./chunks/chunk.VHHOKYE5.js";import{a as Q}from"./chunks/chunk.5ZPLQS6G.js";import{a as F}from"./chunks/chunk.J4LE3LKP.js";import{a as M}from"./chunks/chunk.RXQYBUHG.js";import{a as R}from"./chunks/chunk.F3OBG73C.js";import{a as A}from"./chunks/chunk.3ZRUHOGI.js";import{a as w}from"./chunks/chunk.S5SNELX3.js";import{a as L}from"./chunks/chunk.ZATYZ65D.js";import"./chunks/chunk.CDP46OS4.js";import"./chunks/chunk.CSLPZKLY.js";import{a as v}from"./chunks/chunk.MPLKGS34.js";import{a as C}from"./chunks/chunk.OXYZANQK.js";import{a as g}from"./chunks/chunk.VGYX7TTE.js";import"./chunks/chunk.635MGLIZ.js";import{a as k}from"./chunks/chunk.J3HOSC6V.js";import{a as I}from"./chunks/chunk.5PA35WD2.js";import{a as B}from"./chunks/chunk.YL7YHMIF.js";import{a as h}from"./chunks/chunk.JGU23CP4.js";import{a as D}from"./chunks/chunk.U6FGIHUI.js";import{a as G}from"./chunks/chunk.3DB2ELEL.js";import{a as i}from"./chunks/chunk.EIG3V7LV.js";import"./chunks/chunk.VYBQ3X2B.js";import"./chunks/chunk.SIY4LRPB.js";import{a as n}from"./chunks/chunk.UVDP4CO5.js";import{a as T}from"./chunks/chunk.5G7ZOEWT.js";import"./chunks/chunk.US3OB3XU.js";import{a as b}from"./chunks/chunk.YUPZE4GS.js";import{a as c}from"./chunks/chunk.66LOVPZM.js";import"./chunks/chunk.N3WG3NAL.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as u}from"./chunks/chunk.XG6CO665.js";import{a as l}from"./chunks/chunk.E7DVDO4P.js";import{a as x}from"./chunks/chunk.VA5ZPE34.js";import{a as m}from"./chunks/chunk.YXMHHML2.js";import"./chunks/chunk.HWXFA3JT.js";import{a as S}from"./chunks/chunk.AZC2MB6N.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as s}from"./chunks/chunk.5ZYFWIRD.js";import"./chunks/chunk.CBQWVOOS.js";import{a}from"./chunks/chunk.7WZBSGVO.js";import{a as o}from"./chunks/chunk.XBZZFEMG.js";import{a as r}from"./chunks/chunk.HO5NN73W.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as p}from"./chunks/chunk.EGKVLCBO.js";import{a as f}from"./chunks/chunk.7JAXJRX2.js";import"./chunks/chunk.I2H6CZK5.js";import"./chunks/chunk.2AQOPKKH.js";import"./chunks/chunk.G7HKVXLR.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.NMHY6H5N.js";import{a as t}from"./chunks/chunk.BTMWUMPI.js";import"./chunks/chunk.JS2HQ2N4.js";import"./chunks/chunk.CGQ2BPPZ.js";import"./chunks/chunk.PV6UYBMY.js";import"./chunks/chunk.B2NUKX6G.js";import"./chunks/chunk.PJ7JCMQF.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as e}from"./chunks/chunk.66OZDVLX.js";import"./chunks/chunk.MP6XEXRW.js";import"./chunks/chunk.D6LAH53B.js";import{d as re,e as te}from"./chunks/chunk.ESKMS5I6.js";import"./chunks/chunk.YMZZDCP3.js";import"./chunks/chunk.3KWSM3HE.js";import"./chunks/chunk.PYHYYOBE.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import"./chunks/chunk.YEDQWNIV.js";import{a as de}from"./chunks/chunk.7BPPDSHY.js";import"./chunks/chunk.CIAY7P3F.js";import"./chunks/chunk.2PZOUYOE.js";import"./chunks/chunk.HJGLYEWV.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.PES7MZKA.js";import"./chunks/chunk.763RLJEK.js";import"./chunks/chunk.W4QBFD6E.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.6EV4YU6C.js";export{de as LocalizeController,o as SdAccordion,a as SdAccordionGroup,r as SdAnimation,p as SdAudio,u as SdBadge,l as SdBrandshape,m as SdBreadcrumb,x as SdBreadcrumbItem,d as SdButton,S as SdCarousel,s as SdCarouselItem,i as SdCheckbox,n as SdCheckboxGroup,T as SdCombobox,g as SdDatepicker,k as SdDialog,I as SdDivider,f as SdDrawer,B as SdDropdown,h as SdExpandable,C as SdFlipcard,D as SdHeader,e as SdIcon,G as SdInclude,M as SdInput,R as SdLink,t as SdLoader,A as SdMapMarker,w as SdMenu,L as SdMenuItem,v as SdNavigationItem,N as SdNotification,O as SdOptgroup,P as SdOption,c as SdPopup,E as SdQuickfact,F as SdRadio,H as SdRadioButton,Q as SdRadioGroup,V as SdRange,j as SdRangeTick,q as SdScrollable,y as SdSelect,z as SdSpinner,J as SdStep,K as SdStepGroup,U as SdSwitch,W as SdTab,X as SdTabGroup,Y as SdTabPanel,b as SdTag,Z as SdTeaser,_ as SdTeaserMedia,$ as SdTextarea,ae as SdThemeListener,ee as SdTooltip,oe as SdVideo,re as registerIconLibrary,fe as setupAutocomplete,te as unregisterIconLibrary};
|
package/cdn/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@solid-design-system/components",
|
|
4
|
-
"version": "6.0.0-next.
|
|
4
|
+
"version": "6.0.0-next.9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as m}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as n,b as o,h as a}from"./chunk.PES7MZKA.js";import{b as c,e as l}from"./chunk.763RLJEK.js";import{e as s}from"./chunk.6EV4YU6C.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await m(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return l`<slot></slot>`}};t.styles=[...a.styles,c`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-6-0-0-next-
|
|
2
|
+
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-6-0-0-next-9-include")],t);export{t as a};
|
|
@@ -8,4 +8,4 @@ import{a as i}from"./chunk.PV6UYBMY.js";import{a as n,b as l}from"./chunk.PJ7JCM
|
|
|
8
8
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
9
9
|
<path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
|
|
10
10
|
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let s=this.isLink(),c=this.notInteractive?n`div`:s?n`a`:n`button`,d=h(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${i(s?this.href:void 0)}" target="${i(s?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||s?void 0:"button")}" aria-label="${i(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${i(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${c}>`}};t.styles=[...o.styles,m`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
11
|
-
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([v("sd-6-0-0-next-
|
|
11
|
+
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([v("sd-6-0-0-next-9-map-marker")],t);export{t as a};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{a as P}from"./chunk.N3WG3NAL.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as R,e as K,f as w}from"./chunk.W7A3TU2Z.js";import{c as A}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.JS2HQ2N4.js";import{a as F}from"./chunk.CGQ2BPPZ.js";import{a as M}from"./chunk.PV6UYBMY.js";import{a as E,c as C}from"./chunk.B2NUKX6G.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as $}from"./chunk.MP6XEXRW.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as V}from"./chunk.7BPPDSHY.js";import{a as g}from"./chunk.NYKJXI3Q.js";import{a as k,b as r,c as u,d as c,h as T}from"./chunk.PES7MZKA.js";import{b as D,e as p}from"./chunk.763RLJEK.js";import{b as S,e as I}from"./chunk.W4QBFD6E.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends T{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-6-0-0-next-
|
|
1
|
+
import{a as P}from"./chunk.N3WG3NAL.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as R,e as K,f as w}from"./chunk.W7A3TU2Z.js";import{c as A}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.JS2HQ2N4.js";import{a as F}from"./chunk.CGQ2BPPZ.js";import{a as M}from"./chunk.PV6UYBMY.js";import{a as E,c as C}from"./chunk.B2NUKX6G.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as $}from"./chunk.MP6XEXRW.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as V}from"./chunk.7BPPDSHY.js";import{a as g}from"./chunk.NYKJXI3Q.js";import{a as k,b as r,c as u,d as c,h as T}from"./chunk.PES7MZKA.js";import{b as D,e as p}from"./chunk.763RLJEK.js";import{b as S,e as I}from"./chunk.W4QBFD6E.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends T{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-6-0-0-next-9-input"]});this.hasSlotController=new F(this,"help-text","label");this.localize=new V(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>p`<sd-6-0-0-next-9-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
2
2
|
base:tag__base,
|
|
3
3
|
content:tag__content,
|
|
4
4
|
removable-indicator:tag__removable-indicator,
|
|
5
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-0-0-next-
|
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-0-0-next-9-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let i=t.composedPath().some(o=>o instanceof HTMLButtonElement&&o.classList.contains("combobox-button"));if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}if(!(i||t.target.closest(".combobox__clear")!==null)){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let o=this.getCurrentOption(),f=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!f){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||o!=null&&o.disabled)return;if(o&&!o.disabled){let h=this.value;this.multiple?(this.toggleOptionSelection(o),this.lastOption=o,this.setOrderedSelectedOptions(o),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(o),this.setSelectedOptions(o)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==h&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return e.tabIndex=0,p`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-6-0-0-next-9-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-6-0-0-next-9-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return p`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[p``]}):[p`<sd-6-0-0-next-9-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
6
6
|
base:tag__base,
|
|
7
7
|
content:tag__content,
|
|
8
8
|
removable-indicator:tag__removable-indicator,
|
|
9
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-0-0-next-8-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-6-0-0-next-8-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),A(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-6-0-0-next-8-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,b,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((b=i.parentElement)==null?void 0:b.tagName.toLowerCase())==="sd-6-0-0-next-8-optgroup"))return a;let o=i.parentElement,f=(m=o.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),h=e.find(O=>O.id===o.id);if(h){h==null||h.appendChild(a),f&&(h==null||h.appendChild(f));return}let v=o.cloneNode();return v.appendChild(a),f&&v.appendChild(f),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-6-0-0-next-8-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await I(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=C(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await I(this);let{keyframes:t,options:e}=C(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return R(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return K(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-6-0-0-next-8-option")){customElements.whenDefined("sd-6-0-0-next-8-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-6-0-0-next-8-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-6-0-0-next-8-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",h,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-0-0-next-8-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-0-0-next-9-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-6-0-0-next-9-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),A(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-6-0-0-next-9-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,b,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((b=i.parentElement)==null?void 0:b.tagName.toLowerCase())==="sd-6-0-0-next-9-optgroup"))return a;let o=i.parentElement,f=(m=o.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),h=e.find(O=>O.id===o.id);if(h){h==null||h.appendChild(a),f&&(h==null||h.appendChild(f));return}let v=o.cloneNode();return v.appendChild(a),f&&v.appendChild(f),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-6-0-0-next-9-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await I(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=C(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await I(this);let{keyframes:t,options:e}=C(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return R(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return K(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-6-0-0-next-9-option")){customElements.whenDefined("sd-6-0-0-next-9-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-6-0-0-next-9-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-6-0-0-next-9-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",h,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-0-0-next-9-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
10
10
|
popup:popup__content,
|
|
11
|
-
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{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}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",b,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",b)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",h,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(O=>O==null?void 0:O.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-0-0-next-
|
|
12
|
-
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-0-0-next-
|
|
11
|
+
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{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}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",b,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",b)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",h,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(O=>O==null?void 0:O.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-0-0-next-9-icon class="${d("text-neutral-700",m)}" name="closing-round" library="_internal"></sd-6-0-0-next-9-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-6-0-0-next-9-icon part="invalid-icon" class="${d(y,m,"text-error")}" library="_internal" name="risk"></sd-6-0-0-next-9-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-6-0-0-next-9-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,m)}" library="_internal" name="confirm-circle"></sd-6-0-0-next-9-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",m)}">${this.type!=="search"?p`<sd-6-0-0-next-9-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-0-0-next-9-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-6-0-0-next-9-icon class="${d(v,m)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-0-0-next-9-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${M(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-6-0-0-next-9-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...T.styles,D`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
12
|
+
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-0-0-next-9-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-0-0-next-9-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-0-0-next-9-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-0-0-next-9-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-0-0-next-9-tag[disabled=false]::part(base):hover{background-color:var(--sd-color-background-primary-100)}[part=filtered-listbox] sd-6-0-0-next-9-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],l([c("sd-6-0-0-next-9-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([u()],s.prototype,"hasFocus",2),l([u()],s.prototype,"displayInputValue",2),l([u()],s.prototype,"selectedTextLabel",2),l([u()],s.prototype,"selectedOptions",2),l([u()],s.prototype,"filteredOptions",2),l([u()],s.prototype,"allOptions",2),l([u()],s.prototype,"lastOption",2),l([u()],s.prototype,"showValidStyle",2),l([u()],s.prototype,"showInvalidStyle",2),l([u()],s.prototype,"deletedTagLabel",2),l([r({reflect:!0})],s.prototype,"name",2),l([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([P()],s.prototype,"defaultValue",2),l([r({type:String,reflect:!0})],s.prototype,"size",2),l([r({type:String,reflect:!0})],s.prototype,"placeholder",2),l([r({type:String,attribute:"max-options-tag-label",reflect:!0})],s.prototype,"maxOptionsTagLabel",2),l([r({type:Boolean,reflect:!0})],s.prototype,"disabled",2),l([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],s.prototype,"visuallyDisabled",2),l([r({type:Boolean,reflect:!0})],s.prototype,"clearable",2),l([r({type:Boolean,reflect:!0})],s.prototype,"open",2),l([r({type:Boolean,reflect:!0})],s.prototype,"hoist",2),l([r({type:String,reflect:!0})],s.prototype,"label",2),l([r({type:String,reflect:!0})],s.prototype,"placement",2),l([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),l([r({type:String,reflect:!0})],s.prototype,"form",2),l([r({type:Boolean,reflect:!0})],s.prototype,"required",2),l([r({type:String,reflect:!0})],s.prototype,"type",2),l([u()],s.prototype,"currentPlacement",2),l([r()],s.prototype,"getOption",2),l([r({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([r({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([r({type:Number,reflect:!0,attribute:"max-options-visible"})],s.prototype,"maxOptionsVisible",2),l([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([r()],s.prototype,"filter",2),l([r()],s.prototype,"getTag",2),l([g("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([g("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([g("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([g(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([g("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([g("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([g("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-6-0-0-next-9-combobox")],s);E("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});E("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as n}from"./chunk.YEDQWNIV.js";import{a as l,b as r,h as o}from"./chunk.PES7MZKA.js";import{b as i,e as a}from"./chunk.763RLJEK.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return a`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,i`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-6-0-0-next-
|
|
2
|
+
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-6-0-0-next-9-divider[orientation=horizontal]){display:block}:host(sd-6-0-0-next-9-divider[orientation=vertical]){display:inline-block}`],e([r({type:String,reflect:!0})],t.prototype,"orientation",2),e([r({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=e([l("sd-6-0-0-next-9-divider")],t);export{t as a};
|