@solid-design-system/components 6.17.1 → 6.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.PUDOHTPG.js → chunk.MOZSGQET.js} +1 -1
- package/cdn/chunks/chunk.ZSZLZIYX.js +12 -0
- package/cdn/components/carousel/carousel.d.ts +2 -0
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/custom-elements.json +21 -1
- package/cdn/solid-components.bundle.js +65 -65
- package/cdn/solid-components.iife.js +65 -65
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +5 -0
- package/cdn/web-types.json +11 -1
- package/cdn-versioned/chunks/chunk.2DHBC2XZ.js +2 -2
- package/cdn-versioned/chunks/chunk.3GRKVX3Y.js +2 -2
- package/cdn-versioned/chunks/chunk.4V4SW2MU.js +2 -2
- package/cdn-versioned/chunks/chunk.52TRFRJK.js +2 -2
- package/cdn-versioned/chunks/chunk.72BMHDYW.js +2 -2
- package/cdn-versioned/chunks/chunk.A4Y2ZTQS.js +2 -2
- package/cdn-versioned/chunks/chunk.ACBSQQGQ.js +2 -2
- package/cdn-versioned/chunks/chunk.B66QBBOC.js +1 -1
- package/cdn-versioned/chunks/chunk.BAAF4SAM.js +2 -2
- package/cdn-versioned/chunks/chunk.BDF5Y2DV.js +2 -2
- package/cdn-versioned/chunks/chunk.BOEKLLMY.js +2 -2
- package/cdn-versioned/chunks/chunk.C2B2WHBX.js +2 -2
- package/cdn-versioned/chunks/chunk.CEWEUYL5.js +2 -2
- package/cdn-versioned/chunks/chunk.CSMKAOUE.js +2 -2
- package/cdn-versioned/chunks/chunk.CZUZXVXM.js +1 -1
- package/cdn-versioned/chunks/chunk.DDGEG3JJ.js +2 -2
- package/cdn-versioned/chunks/chunk.DSXSUMRR.js +3 -3
- package/cdn-versioned/chunks/chunk.E2V26BUA.js +1 -1
- package/cdn-versioned/chunks/chunk.ETLWMEM7.js +5 -5
- package/cdn-versioned/chunks/chunk.EYHWAYCC.js +2 -2
- package/cdn-versioned/chunks/chunk.F2YBTYYO.js +1 -1
- package/cdn-versioned/chunks/chunk.FSMYSRQ5.js +2 -2
- package/cdn-versioned/chunks/chunk.G6OWFL7B.js +2 -2
- package/cdn-versioned/chunks/chunk.GBSKWBQY.js +5 -5
- package/cdn-versioned/chunks/chunk.GS46R6QO.js +2 -2
- package/cdn-versioned/chunks/chunk.HX4A7MNJ.js +2 -2
- package/cdn-versioned/chunks/chunk.JG5FT5V3.js +2 -2
- package/cdn-versioned/chunks/chunk.K65Y3BMV.js +2 -2
- package/cdn-versioned/chunks/chunk.KAVHO7BF.js +2 -2
- package/cdn-versioned/chunks/chunk.KXYEKUBH.js +1 -1
- package/cdn-versioned/chunks/chunk.L4Q4HWT2.js +1 -1
- package/cdn-versioned/chunks/chunk.LFLXMIIF.js +2 -2
- package/cdn-versioned/chunks/{chunk.PUDOHTPG.js → chunk.MOZSGQET.js} +2 -2
- package/cdn-versioned/chunks/chunk.OGNOPC3L.js +1 -1
- package/cdn-versioned/chunks/chunk.PCPQDPIJ.js +2 -2
- package/cdn-versioned/chunks/chunk.Q36PSPCX.js +1 -1
- package/cdn-versioned/chunks/chunk.QDWVVB6U.js +2 -2
- package/cdn-versioned/chunks/chunk.QKQ2FAEH.js +2 -2
- package/cdn-versioned/chunks/chunk.QRCDP5AE.js +2 -2
- package/cdn-versioned/chunks/chunk.RAP66B6O.js +1 -1
- package/cdn-versioned/chunks/chunk.RJVOMEKW.js +2 -2
- package/cdn-versioned/chunks/chunk.SH4PMEHV.js +2 -2
- package/cdn-versioned/chunks/chunk.SWMRHLCD.js +2 -2
- package/cdn-versioned/chunks/chunk.T2VQOPNR.js +2 -2
- package/cdn-versioned/chunks/chunk.TEQ3DTJK.js +2 -2
- package/cdn-versioned/chunks/chunk.THPGET7V.js +2 -2
- package/cdn-versioned/chunks/chunk.TXQVRNR7.js +2 -2
- package/cdn-versioned/chunks/chunk.U5H4A4ZD.js +2 -2
- package/cdn-versioned/chunks/chunk.UK3QQAGA.js +2 -2
- package/cdn-versioned/chunks/chunk.VREAKVXD.js +2 -2
- package/cdn-versioned/chunks/chunk.VW4SG3XG.js +2 -2
- package/cdn-versioned/chunks/chunk.VXGSYVQJ.js +3 -3
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WC4UPG7R.js +2 -2
- package/cdn-versioned/chunks/chunk.WMBV6H4W.js +2 -2
- package/cdn-versioned/chunks/chunk.WOCCV524.js +1 -1
- package/cdn-versioned/chunks/chunk.XF2NJUOO.js +2 -2
- package/cdn-versioned/chunks/chunk.XFJLF5M4.js +2 -2
- package/cdn-versioned/chunks/chunk.XGLBODZT.js +2 -2
- package/cdn-versioned/chunks/chunk.XYQCPWUJ.js +1 -1
- package/cdn-versioned/chunks/chunk.YDS5VIM3.js +2 -2
- package/cdn-versioned/chunks/chunk.YPTZDABK.js +1 -1
- package/cdn-versioned/chunks/chunk.ZMRAUCHT.js +9 -9
- package/cdn-versioned/chunks/chunk.ZSZLZIYX.js +12 -0
- 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 +3 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/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-button/radio-button.js +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +265 -245
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +82 -82
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +83 -83
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +112 -107
- package/cdn-versioned/web-types.json +167 -157
- package/dist/chunks/{chunk.B43IHGRK.js → chunk.4Z5IGWSP.js} +1 -1
- package/dist/chunks/{chunk.DOQJMWSI.js → chunk.BWFGZZU7.js} +15 -3
- package/dist/components/carousel/carousel.d.ts +2 -0
- package/dist/components/carousel/carousel.js +1 -1
- package/dist/components/radio-button/radio-button.js +1 -1
- package/dist/custom-elements.json +21 -1
- package/dist/solid-components.js +2 -2
- package/dist/vscode.html-custom-data.json +5 -0
- package/dist/web-types.json +11 -1
- package/dist-versioned/chunks/chunk.2U32VSHR.js +3 -3
- package/dist-versioned/chunks/chunk.2WGBXYET.js +3 -3
- package/dist-versioned/chunks/chunk.33OSBM2L.js +1 -1
- package/dist-versioned/chunks/chunk.37VMM4OR.js +1 -1
- package/dist-versioned/chunks/chunk.3ZZBKPOH.js +5 -5
- package/dist-versioned/chunks/chunk.4VG6NHCU.js +6 -6
- package/dist-versioned/chunks/{chunk.B43IHGRK.js → chunk.4Z5IGWSP.js} +4 -4
- package/dist-versioned/chunks/chunk.5IARX66P.js +11 -11
- package/dist-versioned/chunks/chunk.6RD6BJ43.js +1 -1
- package/dist-versioned/chunks/chunk.6UAU2Y7U.js +2 -2
- package/dist-versioned/chunks/chunk.7EU5PQGA.js +5 -5
- package/dist-versioned/chunks/chunk.AFMRRRYY.js +2 -2
- package/dist-versioned/chunks/chunk.AXQ65JS3.js +6 -6
- package/dist-versioned/chunks/chunk.B46QWFGW.js +5 -5
- package/dist-versioned/chunks/chunk.BDBRCTEF.js +10 -10
- package/dist-versioned/chunks/chunk.BDOSAOAF.js +1 -1
- package/dist-versioned/chunks/chunk.BKNVWJRC.js +4 -4
- package/dist-versioned/chunks/chunk.BNUP4TMP.js +6 -6
- package/dist-versioned/chunks/chunk.BQINNFJP.js +5 -5
- package/dist-versioned/chunks/chunk.BV25PV23.js +6 -6
- package/dist-versioned/chunks/{chunk.DOQJMWSI.js → chunk.BWFGZZU7.js} +24 -12
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.COSVGBTT.js +12 -12
- package/dist-versioned/chunks/chunk.DEYMV3AS.js +11 -11
- package/dist-versioned/chunks/chunk.E2PJNXY4.js +3 -3
- package/dist-versioned/chunks/chunk.EQ3WBPH5.js +1 -1
- package/dist-versioned/chunks/chunk.EREHAJGM.js +5 -5
- package/dist-versioned/chunks/chunk.FKPD6TIK.js +14 -14
- package/dist-versioned/chunks/chunk.GQEY7HYL.js +1 -1
- package/dist-versioned/chunks/chunk.GU6XT67W.js +2 -2
- package/dist-versioned/chunks/chunk.GXX7ZVMH.js +2 -2
- package/dist-versioned/chunks/chunk.HPHV4VKP.js +3 -3
- package/dist-versioned/chunks/chunk.HPYZXPZN.js +2 -2
- package/dist-versioned/chunks/chunk.IOIU7TDJ.js +9 -9
- package/dist-versioned/chunks/chunk.IQMEFOSJ.js +4 -4
- package/dist-versioned/chunks/chunk.JZSKAHSL.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KENPAY6Q.js +2 -2
- package/dist-versioned/chunks/chunk.KQYOSLIW.js +5 -5
- package/dist-versioned/chunks/chunk.KVQN5R3X.js +11 -11
- package/dist-versioned/chunks/chunk.MACL5DD6.js +6 -6
- package/dist-versioned/chunks/chunk.MFLCJDVY.js +25 -25
- package/dist-versioned/chunks/chunk.MQG727Y4.js +4 -4
- package/dist-versioned/chunks/chunk.N4W5UD4U.js +3 -3
- package/dist-versioned/chunks/chunk.NMS67TKX.js +13 -13
- package/dist-versioned/chunks/chunk.NO5K5NRM.js +5 -5
- package/dist-versioned/chunks/chunk.RC4YZBAG.js +4 -4
- package/dist-versioned/chunks/chunk.RJQAUVFZ.js +5 -5
- package/dist-versioned/chunks/chunk.S4SI3HWM.js +2 -2
- package/dist-versioned/chunks/chunk.SBC2I6JO.js +8 -8
- package/dist-versioned/chunks/chunk.T27MZUKA.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UQIEZ6RZ.js +25 -25
- package/dist-versioned/chunks/chunk.USC7EHJV.js +32 -32
- package/dist-versioned/chunks/chunk.VDMPM2P2.js +2 -2
- package/dist-versioned/chunks/chunk.VLHNMJ5F.js +10 -10
- package/dist-versioned/chunks/chunk.VSWXW4QR.js +3 -3
- package/dist-versioned/chunks/chunk.W76DK5Q3.js +2 -2
- package/dist-versioned/chunks/chunk.WC2SM7KI.js +4 -4
- package/dist-versioned/chunks/chunk.WG6PNLWA.js +10 -10
- package/dist-versioned/chunks/chunk.WOZA4YTR.js +5 -5
- package/dist-versioned/chunks/chunk.XF6FDNUR.js +2 -2
- package/dist-versioned/chunks/chunk.ZGCNF5LQ.js +1 -1
- package/dist-versioned/chunks/chunk.ZR5RDB6B.js +7 -7
- 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 +3 -1
- package/dist-versioned/components/carousel/carousel.js +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/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-button/radio-button.js +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +265 -245
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +112 -107
- package/dist-versioned/web-types.json +167 -157
- package/package.json +1 -1
- package/cdn/chunks/chunk.HYIE6V5T.js +0 -12
- package/cdn-versioned/chunks/chunk.HYIE6V5T.js +0 -12
|
@@ -414,14 +414,14 @@ var SdInput = class extends SolidElement {
|
|
|
414
414
|
!isFloatingLabelActive || !hasValue && (this.readonly || this.visuallyDisabled) ? textSize : "text-xs",
|
|
415
415
|
(this.visuallyDisabled || this.disabled) && "text-neutral-500",
|
|
416
416
|
isFloatingLabelActive && !this.visuallyDisabled && !this.disabled && "form-control--filled__floating-label-color-text"
|
|
417
|
-
)}">${this.label}</span></label>` : null} ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-
|
|
417
|
+
)}">${this.label}</span></label>` : null} ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-18-1-icon class="${cx(
|
|
418
418
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-neutral-700",
|
|
419
419
|
iconSize
|
|
420
|
-
)}" library="_internal" name="closing-round"></sd-6-
|
|
420
|
+
)}" library="_internal" name="closing-round"></sd-6-18-1-icon></slot></button>` : ""} ${this.passwordToggle && this.type === "password" ? html`<button aria-label="${this.localize.term(this.passwordVisible ? "hidePassword" : "showPassword")}" part="password-toggle-button" class="${cx(
|
|
421
421
|
"flex items-center sd-interactive",
|
|
422
422
|
iconMarginLeft,
|
|
423
423
|
this.floatingLabel && !isFloatingLabelActive && "hide-password-toggle"
|
|
424
|
-
)}" type="button" @click="${this.handlePasswordToggle}" @mousedown="${this.handleClickableIconFocusIn}" @focus="${() => this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}">${this.passwordVisible ? html`<slot name="show-password-icon"><sd-6-
|
|
424
|
+
)}" type="button" @click="${this.handlePasswordToggle}" @mousedown="${this.handleClickableIconFocusIn}" @focus="${() => this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}">${this.passwordVisible ? html`<slot name="show-password-icon"><sd-6-18-1-icon class="${cx(iconColor, iconSize)}" library="_internal" name="eye"></sd-6-18-1-icon></slot>` : html`<slot name="hide-password-icon"><sd-6-18-1-icon class="${cx(iconColor, iconSize)}" library="_internal" name="eye-crossed-out"></sd-6-18-1-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-6-18-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="_internal" name="calendar"></sd-6-18-1-icon>` : ""} ${this.type === "time" ? html`<sd-6-18-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="_internal" name="clock"></sd-6-18-1-icon>` : ""} ${this.type === "search" ? html`<button class="${cx("flex items-center sd-interactive", iconMarginLeft)}" type="button" @click="${this.handleSearchClick}"><sd-6-18-1-icon class="${cx(iconColor, iconSize)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-18-1-icon></button>` : ""} ${this.showInvalidStyle ? html`<sd-6-18-1-icon part="invalid-icon" class="${cx("text-error", iconMarginLeft, iconSize)}" library="_internal" name="risk"></sd-6-18-1-icon>` : ""} ${this.showValidStyle && this.styleOnValid ? html`<sd-6-18-1-icon class="${cx("text-success flex-shrink-0", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-18-1-icon>` : ""} ${slots["right"] ? html`<slot name="right" part="right" class="${cx("inline-flex", iconColor, iconMarginLeft, iconSize)}"></slot>` : ""} ${this.type === "number" && this.spinButtons ? html`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${longPress({ start: () => this.handleStepDown(), end: () => this.handleChange() })} tabindex="-1" @mousedown="${this.handleClickableIconFocusIn}" @focus="${() => this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}"><slot name="decrement-number-stepper"><sd-6-18-1-icon library="_internal" name="minus-circle" label="Decrease value" class="${cx(iconColor, iconMarginLeft, iconSize)}"></sd-6-18-1-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange() })} tabindex="-1"><slot name="increment-number-stepper"><sd-6-18-1-icon library="_internal" name="plus-circle" label="Decrease value" class="${cx(iconColor, iconMarginLeft, iconSize)}"></sd-6-18-1-icon></slot></button></div>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-1", hasHelpText && !this.showInvalidStyle ? "block" : "hidden")}" aria-hidden="${!hasHelpText || this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`;
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
/**
|
|
@@ -430,7 +430,7 @@ var SdInput = class extends SolidElement {
|
|
|
430
430
|
SdInput.styles = [
|
|
431
431
|
...SolidElement.styles,
|
|
432
432
|
css`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
433
|
-
:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0;display:none;-webkit-appearance:none}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-
|
|
433
|
+
:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0;display:none;-webkit-appearance:none}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-18-1-icon{color:rgba(var(--sd-color-text-neutral-500))}.hide-password-toggle{display:none}.has-floating-label input[type=date]:not(.has-value),.has-floating-label input[type=datetime-local]:not(.has-value),.has-floating-label input[type=time]:not(.has-value){color:transparent}.has-floating-label input[type=date]:focus,.has-floating-label input[type=datetime-local]:focus,.has-floating-label input[type=time]:focus{color:inherit}.icon-color{color:rgb(var(--sd-color-icon-fill-primary))}`
|
|
434
434
|
];
|
|
435
435
|
__decorateClass([
|
|
436
436
|
query("#input")
|
|
@@ -569,7 +569,7 @@ __decorateClass([
|
|
|
569
569
|
watch(["size", "floatingLabel"])
|
|
570
570
|
], SdInput.prototype, "handleSizeChange", 1);
|
|
571
571
|
SdInput = __decorateClass([
|
|
572
|
-
customElement("sd-6-
|
|
572
|
+
customElement("sd-6-18-1-input")
|
|
573
573
|
], SdInput);
|
|
574
574
|
|
|
575
575
|
export {
|
|
@@ -17,19 +17,19 @@ var SdButtonGroup = class extends SolidElement {
|
|
|
17
17
|
}
|
|
18
18
|
handleFocus(event) {
|
|
19
19
|
const button = findButton(event.target);
|
|
20
|
-
button == null ? void 0 : button.classList.add("sd-6-
|
|
20
|
+
button == null ? void 0 : button.classList.add("sd-6-18-1-button-group__button--focus");
|
|
21
21
|
}
|
|
22
22
|
handleBlur(event) {
|
|
23
23
|
const button = findButton(event.target);
|
|
24
|
-
button == null ? void 0 : button.classList.remove("sd-6-
|
|
24
|
+
button == null ? void 0 : button.classList.remove("sd-6-18-1-button-group__button--focus");
|
|
25
25
|
}
|
|
26
26
|
handleMouseOver(event) {
|
|
27
27
|
const button = findButton(event.target);
|
|
28
|
-
button == null ? void 0 : button.classList.add("sd-6-
|
|
28
|
+
button == null ? void 0 : button.classList.add("sd-6-18-1-button-group__button--hover");
|
|
29
29
|
}
|
|
30
30
|
handleMouseOut(event) {
|
|
31
31
|
const button = findButton(event.target);
|
|
32
|
-
button == null ? void 0 : button.classList.remove("sd-6-
|
|
32
|
+
button == null ? void 0 : button.classList.remove("sd-6-18-1-button-group__button--hover");
|
|
33
33
|
}
|
|
34
34
|
handleSlotChange() {
|
|
35
35
|
const slottedElements = [...this.defaultSlot.assignedElements({ flatten: true })];
|
|
@@ -37,11 +37,11 @@ var SdButtonGroup = class extends SolidElement {
|
|
|
37
37
|
const index = slottedElements.indexOf(el);
|
|
38
38
|
const button = findButton(el);
|
|
39
39
|
if (button !== null) {
|
|
40
|
-
button.classList.add("sd-6-
|
|
41
|
-
button.classList.toggle("sd-6-
|
|
42
|
-
button.classList.toggle("sd-6-
|
|
43
|
-
button.classList.toggle("sd-6-
|
|
44
|
-
button.classList.toggle("sd-6-
|
|
40
|
+
button.classList.add("sd-6-18-1-button-group__button");
|
|
41
|
+
button.classList.toggle("sd-6-18-1-button-group__button--first", index === 0);
|
|
42
|
+
button.classList.toggle("sd-6-18-1-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
|
|
43
|
+
button.classList.toggle("sd-6-18-1-button-group__button--last", index === slottedElements.length - 1);
|
|
44
|
+
button.classList.toggle("sd-6-18-1-button-group__button--radio", button.tagName.toLowerCase() === "sd-6-18-1-radio-button");
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -64,11 +64,11 @@ __decorateClass([
|
|
|
64
64
|
property({ type: String, reflect: true })
|
|
65
65
|
], SdButtonGroup.prototype, "label", 2);
|
|
66
66
|
SdButtonGroup = __decorateClass([
|
|
67
|
-
customElement("sd-6-
|
|
67
|
+
customElement("sd-6-18-1-button-group")
|
|
68
68
|
], SdButtonGroup);
|
|
69
69
|
function findButton(el) {
|
|
70
70
|
var _a;
|
|
71
|
-
const selector = "sd-6-
|
|
71
|
+
const selector = "sd-6-18-1-button, sd-6-18-1-radio-button";
|
|
72
72
|
return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -300,19 +300,19 @@ var SdAudio = class extends SolidElement {
|
|
|
300
300
|
)}" part="audio-controls"><button class="${cx(
|
|
301
301
|
"playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",
|
|
302
302
|
this.inverted && "sd-interactive--inverted"
|
|
303
|
-
)}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-6-
|
|
303
|
+
)}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-6-18-1-button ?inverted="${this.inverted ? true : false}" part="play-button" size="lg" @click="${!this.isPlaying ? this.playAudio : this.pauseAudio}" aria-label="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" title="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" class="mb-4">${this.isPlaying ? html`<slot name="pause-icon"><sd-6-18-1-icon class="text-xl" name="pause" library="_internal"></sd-6-18-1-icon></slot>` : html`<slot name="play-icon"><sd-6-18-1-icon class="text-xl" name="start" library="_internal"></sd-6-18-1-icon></slot>`}</sd-6-18-1-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript") ? html`<button class="${cx("w-6 h-6 hover:cursor-pointer sd-interactive", this.inverted && "sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen ? this.localize.term("transcriptIsOpen") : this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-6-18-1-icon class="w-6 h-6" name="transcript" library="_internal"></sd-6-18-1-icon></button>` : null} <button class="${cx("w-6 h-6 hover:cursor-pointer sd-interactive", this.inverted && "sd-interactive--inverted")}" part="volume" aria-label="${!this.isMuted ? this.localize.term("mute") : this.localize.term("unmute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-6-18-1-icon class="w-6 h-6" name="${this.isMuted ? "mute" : "volume"}" library="_internal"></sd-6-18-1-icon></button></div></div>`;
|
|
304
304
|
const renderTimestamps = html`<div class="${cx(
|
|
305
305
|
"w-full flex justify-between",
|
|
306
306
|
this.reversedLayout ? "mb-0.5" : "mt-0.5",
|
|
307
307
|
this.animated && this.reversedLayout && "absolute bottom-0 left-0 !mb-4"
|
|
308
|
-
)}" part="timestamps"><div class="${cx("current-time text-sm", this.inverted ? "text-primary-400" : "sd-6-
|
|
309
|
-
return html`<div class="${cx("w-full flex relative", this.reversedLayout ? "flex-col-reverse" : "flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated || this.animated && this.reversedLayout ? renderAudioControls : null}<div class="relative">${this.animated && !this.reversedLayout ? html`${renderAudioControls}` : null} ${this.animated ? html`<canvas class="w-full h-16 -mb-2"></canvas>` : null} ${!this.hideTimestamps && this.animated && this.reversedLayout ? renderTimestamps : null}<sd-6-
|
|
308
|
+
)}" part="timestamps"><div class="${cx("current-time text-sm", this.inverted ? "text-primary-400" : "sd-6-18-1-audio__timestamp-color-text")}">${this.currentTime}</div><div class="${cx("current-time text-sm", this.inverted ? "text-primary-400" : "sd-6-18-1-audio__timestamp-color-text")}">${this.duration}</div></div>`;
|
|
309
|
+
return html`<div class="${cx("w-full flex relative", this.reversedLayout ? "flex-col-reverse" : "flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated || this.animated && this.reversedLayout ? renderAudioControls : null}<div class="relative">${this.animated && !this.reversedLayout ? html`${renderAudioControls}` : null} ${this.animated ? html`<canvas class="w-full h-16 -mb-2"></canvas>` : null} ${!this.hideTimestamps && this.animated && this.reversedLayout ? renderTimestamps : null}<sd-6-18-1-range part="progress-slider" tooltip="hidden" min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-6-18-1-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-6-18-1-range></div>${this.hasSlotController.test("transcript") ? html`<sd-6-18-1-drawer><slot name="transcript"></slot></sd-6-18-1-drawer>` : null} ${!this.hideTimestamps && (!this.animated || !this.reversedLayout) ? renderTimestamps : null}</div><sd-6-18-1-theme-listener></sd-6-18-1-theme-listener>`;
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
312
|
SdAudio.styles = [
|
|
313
313
|
...SolidElement.styles,
|
|
314
314
|
css`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
315
|
-
sd-6-
|
|
315
|
+
sd-6-18-1-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-spacing-12);align-items:center;justify-content:center;border-radius:var(--sd-radius-full)}sd-6-18-1-button::part(motion-wrapper){border-radius:var(--sd-radius-full)}sd-6-18-1-button::part(label){display:flex;flex-grow:0;align-items:center}sd-6-18-1-range::part(form-control-label){display:none}:host([inverted]) sd-6-18-1-range::part(thumb){outline-color:rgba(var(--sd-color-border-white,var(--sd-color-white)));background-color:rgba(var(--sd-color-icon-fill-white,rgba(var(--sd-color-white))))}:host([animated]) sd-6-18-1-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-6-18-1-range::part(track){background-color:rgba(var(--sd-audio__slide-bar--inverted-color-background,rgba(var(--sd-color-primary-400))))}:host([inverted]:not([animated])) sd-6-18-1-range::part(active-track){background-color:rgba(var(--sd-audio__track-bar--inverted-color-background,rgba(var(--sd-color-white))))}.sd-6-18-1-audio__timestamp-color-text{color:rgb(var(--sd-audio__timestamp-color-text,var(--sd-color-text-neutral-700)))}`
|
|
316
316
|
];
|
|
317
317
|
__decorateClass([
|
|
318
318
|
property({ type: Boolean, reflect: true, attribute: "reversed-layout" })
|
|
@@ -354,13 +354,13 @@ __decorateClass([
|
|
|
354
354
|
query('[part="audio-player"]')
|
|
355
355
|
], SdAudio.prototype, "audioPlayerContainer", 2);
|
|
356
356
|
__decorateClass([
|
|
357
|
-
query("sd-6-
|
|
357
|
+
query("sd-6-18-1-drawer")
|
|
358
358
|
], SdAudio.prototype, "drawer", 2);
|
|
359
359
|
__decorateClass([
|
|
360
360
|
query("canvas")
|
|
361
361
|
], SdAudio.prototype, "canvas", 2);
|
|
362
362
|
SdAudio = __decorateClass([
|
|
363
|
-
customElement("sd-6-
|
|
363
|
+
customElement("sd-6-18-1-audio")
|
|
364
364
|
], SdAudio);
|
|
365
365
|
|
|
366
366
|
export {
|
|
@@ -77,11 +77,11 @@ var SdSelect = class extends SolidElement {
|
|
|
77
77
|
this.styleOnValid = false;
|
|
78
78
|
this.hoist = false;
|
|
79
79
|
this.getTag = (option) => {
|
|
80
|
-
return html`<sd-6-
|
|
80
|
+
return html`<sd-6-18-1-tag class="relative z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
81
81
|
base:tag__base,
|
|
82
82
|
content:tag__content,
|
|
83
83
|
removable-indicator:tag__removable-indicator,
|
|
84
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-6-
|
|
84
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-6-18-1-tag>`;
|
|
85
85
|
};
|
|
86
86
|
this.handleDocumentFocusIn = (event) => {
|
|
87
87
|
const path = event.composedPath();
|
|
@@ -92,7 +92,7 @@ var SdSelect = class extends SolidElement {
|
|
|
92
92
|
this.handleDocumentKeyDown = (event) => {
|
|
93
93
|
const target = event.target;
|
|
94
94
|
const isClearButton = target.closest(".select__clear") !== null;
|
|
95
|
-
const isIconButton = target.closest("sd-6-
|
|
95
|
+
const isIconButton = target.closest("sd-6-18-1-icon-button") !== null;
|
|
96
96
|
if (isClearButton || isIconButton) {
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
@@ -227,8 +227,8 @@ var SdSelect = class extends SolidElement {
|
|
|
227
227
|
event.preventDefault();
|
|
228
228
|
event.stopPropagation();
|
|
229
229
|
const tagParent = (_a = event.currentTarget) == null ? void 0 : _a.parentElement;
|
|
230
|
-
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-6-
|
|
231
|
-
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-6-
|
|
230
|
+
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-6-18-1-tag");
|
|
231
|
+
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-6-18-1-tag");
|
|
232
232
|
this.handleTagRemove(new CustomEvent("sd-remove"), option);
|
|
233
233
|
this.updateComplete.then(() => {
|
|
234
234
|
if (nextTag) {
|
|
@@ -248,7 +248,7 @@ var SdSelect = class extends SolidElement {
|
|
|
248
248
|
this.handleTagRemove(new CustomEvent("sd-remove"), this.selectedOptions[this.selectedOptions.length - 1]);
|
|
249
249
|
this.updateComplete.then(() => {
|
|
250
250
|
var _a;
|
|
251
|
-
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-6-
|
|
251
|
+
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-6-18-1-tag");
|
|
252
252
|
if (tags && tags.length > 0) {
|
|
253
253
|
tags == null ? void 0 : tags[(tags == null ? void 0 : tags.length) - 1].focus();
|
|
254
254
|
} else {
|
|
@@ -294,7 +294,7 @@ var SdSelect = class extends SolidElement {
|
|
|
294
294
|
}
|
|
295
295
|
handleOptionClick(event) {
|
|
296
296
|
const target = event.target;
|
|
297
|
-
const option = target.closest("sd-6-
|
|
297
|
+
const option = target.closest("sd-6-18-1-option");
|
|
298
298
|
const oldValue = this.value;
|
|
299
299
|
if (option && !option.disabled) {
|
|
300
300
|
if (this.multiple) {
|
|
@@ -319,7 +319,7 @@ var SdSelect = class extends SolidElement {
|
|
|
319
319
|
const allOptions = this.getAllOptions();
|
|
320
320
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
321
321
|
const values = [];
|
|
322
|
-
if (customElements.get("sd-6-
|
|
322
|
+
if (customElements.get("sd-6-18-1-option")) {
|
|
323
323
|
allOptions.forEach((option) => {
|
|
324
324
|
if (this.multiple) {
|
|
325
325
|
option.checkbox = true;
|
|
@@ -328,7 +328,7 @@ var SdSelect = class extends SolidElement {
|
|
|
328
328
|
});
|
|
329
329
|
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
330
330
|
} else {
|
|
331
|
-
customElements.whenDefined("sd-6-
|
|
331
|
+
customElements.whenDefined("sd-6-18-1-option").then(() => this.handleDefaultSlotChange());
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
handleTagRemove(event, option) {
|
|
@@ -345,13 +345,13 @@ var SdSelect = class extends SolidElement {
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
// Gets an array of all <sd-6-
|
|
348
|
+
// Gets an array of all <sd-6-18-1-option> elements
|
|
349
349
|
getAllOptions() {
|
|
350
|
-
return [...this.querySelectorAll("sd-6-
|
|
350
|
+
return [...this.querySelectorAll("sd-6-18-1-option")];
|
|
351
351
|
}
|
|
352
|
-
// Gets the first <sd-6-
|
|
352
|
+
// Gets the first <sd-6-18-1-option> element
|
|
353
353
|
getFirstOption() {
|
|
354
|
-
return this.querySelector("sd-6-
|
|
354
|
+
return this.querySelector("sd-6-18-1-option");
|
|
355
355
|
}
|
|
356
356
|
// Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
357
357
|
// option may be "current" at a time.
|
|
@@ -450,11 +450,11 @@ var SdSelect = class extends SolidElement {
|
|
|
450
450
|
});
|
|
451
451
|
} else {
|
|
452
452
|
return [
|
|
453
|
-
html`<sd-6-
|
|
453
|
+
html`<sd-6-18-1-tag class="z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
454
454
|
base:tag__base,
|
|
455
455
|
content:tag__content,
|
|
456
456
|
removable-indicator:tag__removable-indicator,
|
|
457
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-
|
|
457
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-18-1-tag>`
|
|
458
458
|
];
|
|
459
459
|
}
|
|
460
460
|
}
|
|
@@ -463,7 +463,7 @@ var SdSelect = class extends SolidElement {
|
|
|
463
463
|
this.formControlController.emitInvalidEvent(event);
|
|
464
464
|
this.invalidMessage.textContent = event.target.validationMessage;
|
|
465
465
|
}
|
|
466
|
-
/** Receives incoming event detail from sd-6-
|
|
466
|
+
/** Receives incoming event detail from sd-6-18-1-popup and updates local state for conditional styling. */
|
|
467
467
|
handleCurrentPlacement(e) {
|
|
468
468
|
const incomingPlacement = e.detail;
|
|
469
469
|
if (incomingPlacement) {
|
|
@@ -472,7 +472,7 @@ var SdSelect = class extends SolidElement {
|
|
|
472
472
|
}
|
|
473
473
|
handleUseTagsChange() {
|
|
474
474
|
const allOptions = this.getAllOptions();
|
|
475
|
-
if (customElements.get("sd-6-
|
|
475
|
+
if (customElements.get("sd-6-18-1-option")) {
|
|
476
476
|
allOptions.forEach((option) => {
|
|
477
477
|
option.checkbox = this.multiple;
|
|
478
478
|
});
|
|
@@ -626,7 +626,7 @@ var SdSelect = class extends SolidElement {
|
|
|
626
626
|
default: "form-control-color-border"
|
|
627
627
|
}[selectState],
|
|
628
628
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
629
|
-
)}"></div><sd-6-
|
|
629
|
+
)}"></div><sd-6-18-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
630
630
|
"inline-flex relative w-full",
|
|
631
631
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
632
632
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -653,12 +653,12 @@ var SdSelect = class extends SolidElement {
|
|
|
653
653
|
"select__clear flex justify-center",
|
|
654
654
|
iconMarginLeft,
|
|
655
655
|
this.value.length > 0 ? "visible" : "hidden"
|
|
656
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-
|
|
656
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-18-1-icon class="${cx("text-neutral-700 z-10", iconSize)}" library="_internal" name="closing-round"></sd-6-18-1-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-6-18-1-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize)}" library="_internal" name="risk"></sd-6-18-1-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-6-18-1-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle"></sd-6-18-1-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx(
|
|
657
657
|
"inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",
|
|
658
658
|
this.open ? "rotate-180" : "rotate-0",
|
|
659
659
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "icon-color",
|
|
660
660
|
iconSize
|
|
661
|
-
)}"><sd-6-
|
|
661
|
+
)}"><sd-6-18-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-6-18-1-icon></slot></div><button part="combobox" class="${cx(
|
|
662
662
|
"relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",
|
|
663
663
|
cursorStyles,
|
|
664
664
|
this.open && "shadow transition-shadow duration-medium ease-in-out",
|
|
@@ -671,7 +671,7 @@ var SdSelect = class extends SolidElement {
|
|
|
671
671
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
672
672
|
this.open && "shadow-listbox transition-shadow duration-medium ease-in-out",
|
|
673
673
|
this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius" : "border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius"
|
|
674
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-6-
|
|
674
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-6-18-1-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`;
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
/**
|
|
@@ -680,13 +680,13 @@ var SdSelect = class extends SolidElement {
|
|
|
680
680
|
SdSelect.styles = [
|
|
681
681
|
...SolidElement.styles,
|
|
682
682
|
css`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
683
|
-
:host{position:relative;display:block;width:auto}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error,--sd-color-error))}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-6-
|
|
683
|
+
:host{position:relative;display:block;width:auto}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error,--sd-color-error))}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-6-18-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-18-1-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-18-1-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-18-1-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-18-1-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}.icon-color{color:rgb(var(--sd-color-icon-fill-primary))}`
|
|
684
684
|
];
|
|
685
685
|
__decorateClass([
|
|
686
|
-
queryAssignedElements({ selector: "sd-6-
|
|
686
|
+
queryAssignedElements({ selector: "sd-6-18-1-option" })
|
|
687
687
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
688
688
|
__decorateClass([
|
|
689
|
-
query("sd-6-
|
|
689
|
+
query("sd-6-18-1-popup")
|
|
690
690
|
], SdSelect.prototype, "popup", 2);
|
|
691
691
|
__decorateClass([
|
|
692
692
|
query('[part="combobox"]')
|
|
@@ -814,7 +814,7 @@ __decorateClass([
|
|
|
814
814
|
watch(["size", "floatingLabel"])
|
|
815
815
|
], SdSelect.prototype, "handleSizeChange", 1);
|
|
816
816
|
SdSelect = __decorateClass([
|
|
817
|
-
customElement("sd-6-
|
|
817
|
+
customElement("sd-6-18-1-select")
|
|
818
818
|
], SdSelect);
|
|
819
819
|
setDefaultAnimation("select.show", {
|
|
820
820
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -10,7 +10,7 @@ function setupAutocomplete(selector, { setValueOnSelection, scrollSelectionIntoV
|
|
|
10
10
|
var _a, _b;
|
|
11
11
|
const ul = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("ul");
|
|
12
12
|
ul == null ? void 0 : ul.setAttribute("part", "listbox");
|
|
13
|
-
const popup = document.createElement("sd-6-
|
|
13
|
+
const popup = document.createElement("sd-6-18-1-popup");
|
|
14
14
|
popup.appendChild(ul);
|
|
15
15
|
(_b = sdInput.shadowRoot) == null ? void 0 : _b.appendChild(popup);
|
|
16
16
|
popup == null ? void 0 : popup.setAttribute("exportparts", "popup__content");
|
|
@@ -23,7 +23,7 @@ function setupAutocomplete(selector, { setValueOnSelection, scrollSelectionIntoV
|
|
|
23
23
|
popup.sync = "width";
|
|
24
24
|
}
|
|
25
25
|
const styles = css`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
26
|
-
sd-6-
|
|
26
|
+
sd-6-18-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll;border-bottom-right-radius:var(--sd-radius);border-bottom-left-radius:var(--sd-radius);border-style:var(--tw-border-style);border-width:var(--sd-border-width-2);border-top-style:var(--tw-border-style);border-top-width:0;border-color:rgba(var(--sd-color-border-primary));background-color:rgba(var(--sd-color-background-white));padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-6-18-1-popup li{transition-property:all;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))}sd-6-18-1-popup li:hover:not([disabled]){background-color:rgba(var(--sd-color-background-neutral-100))}sd-6-18-1-popup li{list-style-type:''}sd-6-18-1-popup li mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold)}sd-6-18-1-popup li:not(:has(sd-6-18-1-option)){cursor:pointer;padding-inline:var(--sd-spacing-4);padding-block:var(--sd-spacing-3);font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)));color:rgba(var(--sd-color-text-black))}sd-6-18-1-popup li:not(:has(sd-6-18-1-option)):hover{background-color:rgba(var(--sd-color-background-neutral-200))}sd-6-18-1-popup li[aria-selected=true]{background-color:rgba(var(--sd-color-background-neutral-200))}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:"*";inherits:false}`;
|
|
27
27
|
const styleSheet = new CSSStyleSheet();
|
|
28
28
|
styleSheet.replaceSync(styles);
|
|
29
29
|
sdInput.shadowRoot.adoptedStyleSheets = [...sdInput.shadowRoot.adoptedStyleSheets, styleSheet];
|
|
@@ -36,13 +36,13 @@ sd-6-17-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:s
|
|
|
36
36
|
}
|
|
37
37
|
input.addEventListener("open", () => {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f;
|
|
39
|
-
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-
|
|
39
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-18-1-popup")) == null ? void 0 : _b.setAttribute("active", "true");
|
|
40
40
|
(_d = (_c = sdInput.shadowRoot) == null ? void 0 : _c.querySelector('[part="border"]')) == null ? void 0 : _d.classList.add("rounded-b-none");
|
|
41
41
|
(_f = (_e = sdInput.shadowRoot) == null ? void 0 : _e.querySelector('[part="form-control"]')) == null ? void 0 : _f.classList.add("z-50");
|
|
42
42
|
});
|
|
43
43
|
input.addEventListener("close", () => {
|
|
44
44
|
var _a, _b, _c, _d, _e, _f;
|
|
45
|
-
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-
|
|
45
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-18-1-popup")) == null ? void 0 : _b.removeAttribute("active");
|
|
46
46
|
(_d = (_c = sdInput.shadowRoot) == null ? void 0 : _c.querySelector('[part="border"]')) == null ? void 0 : _d.classList.remove("rounded-b-none");
|
|
47
47
|
(_f = (_e = sdInput.shadowRoot) == null ? void 0 : _e.querySelector('[part="form-control"]')) == null ? void 0 : _f.classList.remove("z-50");
|
|
48
48
|
});
|
|
@@ -224,7 +224,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
224
224
|
textareaState === "disabled" || textareaState === "visuallyDisabled" ? "text-neutral-500" : "text-black",
|
|
225
225
|
["invalid", "activeInvalid"].includes(textareaState) && "form-control--invalid-color-background"
|
|
226
226
|
)}"><textarea part="textarea" id="input" class="${cx(
|
|
227
|
-
"ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-
|
|
227
|
+
"ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-18-1-icon]:pe-8",
|
|
228
228
|
{
|
|
229
229
|
sm: isFloatingLabelActive ? "pb-1" : "py-2",
|
|
230
230
|
md: isFloatingLabelActive ? "pb-1" : "py-2",
|
|
@@ -232,7 +232,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
232
232
|
}[this.size],
|
|
233
233
|
this.disabled && "cursor-not-allowed",
|
|
234
234
|
textSize
|
|
235
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel || isFloatingLabelActive ? ifDefined(this.placeholder) : ""}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(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 ? html`<sd-6-
|
|
235
|
+
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel || isFloatingLabelActive ? ifDefined(this.placeholder) : ""}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(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 ? html`<sd-6-18-1-icon class="${cx("text-error absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="risk" part="invalid-icon"></sd-6-18-1-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-6-18-1-icon class="${cx("text-success absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-18-1-icon>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-1", hasHelpText && !this.showInvalidStyle ? "block" : "hidden")}" aria-hidden="${!hasHelpText || this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`;
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
/**
|
|
@@ -353,7 +353,7 @@ __decorateClass([
|
|
|
353
353
|
watch(["size", "floatingLabel"])
|
|
354
354
|
], SdTextarea.prototype, "handleSizeChange", 1);
|
|
355
355
|
SdTextarea = __decorateClass([
|
|
356
|
-
customElement("sd-6-
|
|
356
|
+
customElement("sd-6-18-1-textarea")
|
|
357
357
|
], SdTextarea);
|
|
358
358
|
|
|
359
359
|
export {
|
|
@@ -97,7 +97,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
97
97
|
* within the slotted trigger. This could be the slotted element itself, a child of the slotted element,
|
|
98
98
|
* or an element within the slotted elements shadow root.
|
|
99
99
|
*
|
|
100
|
-
* e.g. the accessible trigger of an <sd-6-
|
|
100
|
+
* e.g. the accessible trigger of an <sd-6-18-1-button> is a <button> located inside its shadow root.
|
|
101
101
|
*
|
|
102
102
|
* To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
103
103
|
* */
|
|
@@ -108,11 +108,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
108
108
|
if (accessibleTrigger) {
|
|
109
109
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
110
110
|
// Solid buttons have to update the internal button so it's announced correctly by screen readers
|
|
111
|
-
case "sd-6-
|
|
112
|
-
case "sd-6-
|
|
111
|
+
case "sd-6-18-1-button":
|
|
112
|
+
case "sd-6-18-1-icon-button":
|
|
113
113
|
target = accessibleTrigger.button;
|
|
114
114
|
break;
|
|
115
|
-
case "sd-6-
|
|
115
|
+
case "sd-6-18-1-navigation-item":
|
|
116
116
|
target = accessibleTrigger.button;
|
|
117
117
|
break;
|
|
118
118
|
default:
|
|
@@ -136,7 +136,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
getMenu() {
|
|
139
|
-
return this.panel.assignedElements({ flatten: true }).find((el) => el.tagName.toLowerCase() === "sd-6-
|
|
139
|
+
return this.panel.assignedElements({ flatten: true }).find((el) => el.tagName.toLowerCase() === "sd-6-18-1-menu");
|
|
140
140
|
}
|
|
141
141
|
handleKeyDown(event) {
|
|
142
142
|
if (this.open && event.key === "Escape") {
|
|
@@ -148,7 +148,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
148
148
|
handleDocumentKeyDown(event) {
|
|
149
149
|
var _a;
|
|
150
150
|
if (event.key === "Tab") {
|
|
151
|
-
if (this.open && ((_a = document.activeElement) == null ? void 0 : _a.tagName.toLowerCase()) === "sd-6-
|
|
151
|
+
if (this.open && ((_a = document.activeElement) == null ? void 0 : _a.tagName.toLowerCase()) === "sd-6-18-1-menu-item") {
|
|
152
152
|
event.preventDefault();
|
|
153
153
|
this.hide();
|
|
154
154
|
this.focusOnTrigger();
|
|
@@ -174,7 +174,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
174
174
|
}
|
|
175
175
|
handlePanelSelect(event) {
|
|
176
176
|
const target = event.target;
|
|
177
|
-
if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === "sd-6-
|
|
177
|
+
if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === "sd-6-18-1-menu") {
|
|
178
178
|
this.hide();
|
|
179
179
|
this.focusOnTrigger();
|
|
180
180
|
}
|
|
@@ -263,7 +263,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
263
263
|
}
|
|
264
264
|
addOpenListeners() {
|
|
265
265
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
|
266
|
-
this.panel.addEventListener("sd-6-
|
|
266
|
+
this.panel.addEventListener("sd-6-18-1-select", this.handlePanelSelect);
|
|
267
267
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
|
268
268
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
269
269
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
@@ -271,7 +271,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
271
271
|
removeOpenListeners() {
|
|
272
272
|
if (this.panel) {
|
|
273
273
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
|
274
|
-
this.panel.removeEventListener("sd-6-
|
|
274
|
+
this.panel.removeEventListener("sd-6-18-1-select", this.handlePanelSelect);
|
|
275
275
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
|
276
276
|
}
|
|
277
277
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -304,13 +304,13 @@ var SdDropdown = class extends SolidElement {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
render() {
|
|
307
|
-
return html`<sd-6-
|
|
307
|
+
return html`<sd-6-18-1-popup part="base" id="dropdown" exportparts="
|
|
308
308
|
popup:base__popup,
|
|
309
309
|
" placement="${this.placement}" distance="${this.rounded && this.distance < 1 ? 1 : this.distance}" skidding="${this.skidding}" strategy="${this.hoist ? "fixed" : "absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${cx(
|
|
310
|
-
"panel-color-border border shadow sd-6-
|
|
310
|
+
"panel-color-border border shadow sd-6-18-1-dropdown-color-background block",
|
|
311
311
|
this.open ? "pointer-events-auto" : "pointer-events-none",
|
|
312
312
|
this.rounded && "rounded-md"
|
|
313
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-6-
|
|
313
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-6-18-1-popup>`;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
SdDropdown.styles = [
|
|
@@ -364,7 +364,7 @@ __decorateClass([
|
|
|
364
364
|
watch("open", { waitUntilFirstUpdate: true })
|
|
365
365
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
366
366
|
SdDropdown = __decorateClass([
|
|
367
|
-
customElement("sd-6-
|
|
367
|
+
customElement("sd-6-18-1-dropdown")
|
|
368
368
|
], SdDropdown);
|
|
369
369
|
setDefaultAnimation("dropdown.show", {
|
|
370
370
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -118,7 +118,7 @@ var SdCheckbox = class extends SolidElement {
|
|
|
118
118
|
render() {
|
|
119
119
|
const checkboxState = this.disabled && this.indeterminate ? "disabledIndeterminate" : this.disabled && this.checked ? "disabledChecked" : this.disabled ? "disabled" : this.visuallyDisabled ? "visuallyDisabled" : this.showInvalidStyle && this.indeterminate ? "invalidIndeterminate" : this.showInvalidStyle ? "invalid" : this.checked || this.indeterminate ? "filled" : "default";
|
|
120
120
|
return html`<div class="flex flex-col"><label part="base" class="${cx(
|
|
121
|
-
"sd-6-
|
|
121
|
+
"sd-6-18-1-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",
|
|
122
122
|
(this.disabled || this.visuallyDisabled) && "hover:cursor-not-allowed",
|
|
123
123
|
{
|
|
124
124
|
/* sizes, fonts */
|
|
@@ -127,7 +127,7 @@ var SdCheckbox = class extends SolidElement {
|
|
|
127
127
|
lg: "text-base"
|
|
128
128
|
}[this.size]
|
|
129
129
|
)}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ifDefined(this.value)}" .indeterminate="${live(this.indeterminate)}" .checked="${live(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate ? "mixed" : this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled ? "true" : "false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked ? " control--checked" : "control--unchecked"} ${this.indeterminate ? " control--indeterminate" : ""}" class="${cx(
|
|
130
|
-
"relative flex flex-shrink-0 items-center justify-center border sd-6-
|
|
130
|
+
"relative flex flex-shrink-0 items-center justify-center border sd-6-18-1-checkbox-border-width rounded-sm h-4 w-4",
|
|
131
131
|
"transition-colors ease-in-out duration-medium group-hover:duration-fast",
|
|
132
132
|
"peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",
|
|
133
133
|
{
|
|
@@ -160,10 +160,10 @@ var SdCheckbox = class extends SolidElement {
|
|
|
160
160
|
filled: "bg-accent group-hover:bg-accent-550",
|
|
161
161
|
default: "hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"
|
|
162
162
|
}[checkboxState]
|
|
163
|
-
)}"></div></div>${this.checked ? html`<sd-6-
|
|
163
|
+
)}"></div></div>${this.checked ? html`<sd-6-18-1-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-6-18-1-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-6-18-1-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-6-18-1-icon>` : ""} </span><span part="label" id="label" class="${cx(
|
|
164
164
|
"select-none inline-block ml-2",
|
|
165
165
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-black"
|
|
166
|
-
)}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${cx("flex items-center gap-2", this.showInvalidStyle && "mt-2")}">${this.showInvalidStyle ? html`<sd-6-
|
|
166
|
+
)}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${cx("flex items-center gap-2", this.showInvalidStyle && "mt-2")}">${this.showInvalidStyle ? html`<sd-6-18-1-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-6-18-1-icon>` : ""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`;
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
/**
|
|
@@ -223,7 +223,7 @@ __decorateClass([
|
|
|
223
223
|
watch(["checked", "indeterminate"], { waitUntilFirstUpdate: true })
|
|
224
224
|
], SdCheckbox.prototype, "handleStateChange", 1);
|
|
225
225
|
SdCheckbox = __decorateClass([
|
|
226
|
-
customElement("sd-6-
|
|
226
|
+
customElement("sd-6-18-1-checkbox")
|
|
227
227
|
], SdCheckbox);
|
|
228
228
|
|
|
229
229
|
export {
|