@solid-design-system/components 7.0.3 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn/components/datepicker/datepicker.d.ts +4 -0
- package/cdn/components/datepicker/datepicker.js +1 -1
- package/cdn/custom-elements.json +33 -1
- package/cdn/solid-components.bundle.js +2 -2
- package/cdn/solid-components.iife.js +2 -2
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +6 -1
- package/cdn/web-types.json +24 -2
- package/cdn-versioned/chunks/chunk.2C3UQTSS.js +2 -2
- package/cdn-versioned/chunks/chunk.2O3FM7UB.js +2 -2
- package/cdn-versioned/chunks/chunk.35XPUMS2.js +1 -1
- package/cdn-versioned/chunks/chunk.37JCS2XH.js +5 -5
- package/cdn-versioned/chunks/chunk.3IZUMERL.js +2 -2
- package/cdn-versioned/chunks/chunk.3RIAU3TH.js +3 -3
- package/cdn-versioned/chunks/chunk.4GA43M6X.js +2 -2
- package/cdn-versioned/chunks/chunk.4QTJXGRR.js +2 -2
- package/cdn-versioned/chunks/chunk.ADVB3FPU.js +2 -2
- package/cdn-versioned/chunks/chunk.AJGTKHU5.js +2 -2
- package/cdn-versioned/chunks/chunk.C37LGAL3.js +2 -2
- package/cdn-versioned/chunks/chunk.CGMKBGJU.js +2 -2
- package/cdn-versioned/chunks/chunk.CQNFI34K.js +2 -2
- package/cdn-versioned/chunks/chunk.DCAJAXUP.js +2 -2
- package/cdn-versioned/chunks/chunk.DS2MKMMN.js +3 -3
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.GA3PWYR4.js +2 -2
- package/cdn-versioned/chunks/chunk.HNBY226D.js +1 -1
- package/cdn-versioned/chunks/chunk.HY624TPC.js +2 -2
- package/cdn-versioned/chunks/chunk.I7OVY27Y.js +10 -10
- package/cdn-versioned/chunks/chunk.IFLRUJCI.js +2 -2
- package/cdn-versioned/chunks/chunk.IQBZ7GRB.js +2 -2
- package/cdn-versioned/chunks/chunk.J45556RK.js +1 -1
- package/cdn-versioned/chunks/chunk.JMX6KLDZ.js +2 -2
- package/cdn-versioned/chunks/chunk.JQV2BZ2E.js +2 -2
- package/cdn-versioned/chunks/chunk.KE2YEQDL.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MR54F6CV.js +2 -2
- package/cdn-versioned/chunks/chunk.MYPRMCUO.js +1 -1
- package/cdn-versioned/chunks/chunk.N4L76IWF.js +1 -1
- package/cdn-versioned/chunks/chunk.NGU7NO3O.js +5 -5
- package/cdn-versioned/chunks/chunk.NJKSWXOS.js +2 -2
- package/cdn-versioned/chunks/chunk.NOP4DTP2.js +2 -2
- package/cdn-versioned/chunks/chunk.OOIX4OAP.js +2 -2
- package/cdn-versioned/chunks/chunk.P7GMFHO5.js +1 -1
- package/cdn-versioned/chunks/chunk.PCXVXYU2.js +2 -2
- package/cdn-versioned/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn-versioned/chunks/chunk.PFPUD5HR.js +2 -2
- package/cdn-versioned/chunks/chunk.PKCNX4R2.js +2 -2
- package/cdn-versioned/chunks/chunk.PQW77KHE.js +2 -2
- package/cdn-versioned/chunks/chunk.PURR56D5.js +2 -2
- package/cdn-versioned/chunks/chunk.Q63S2Z2M.js +2 -2
- package/cdn-versioned/chunks/chunk.QK3WCIP5.js +2 -2
- package/cdn-versioned/chunks/chunk.RHC6WZ6V.js +2 -2
- package/cdn-versioned/chunks/chunk.RRJCCIDH.js +1 -1
- package/cdn-versioned/chunks/chunk.SPL6VR5S.js +2 -2
- package/cdn-versioned/chunks/chunk.SSE7T5OF.js +2 -2
- package/cdn-versioned/chunks/chunk.SZNU4NHI.js +1 -1
- package/cdn-versioned/chunks/chunk.T7I5MFNS.js +2 -2
- package/cdn-versioned/chunks/chunk.TIMZJKMF.js +2 -2
- package/cdn-versioned/chunks/chunk.TX5WPWH2.js +2 -2
- package/cdn-versioned/chunks/chunk.UI3ZVKSU.js +2 -2
- package/cdn-versioned/chunks/chunk.V6IM4GAA.js +2 -2
- package/cdn-versioned/chunks/chunk.VPBXFCBA.js +2 -2
- package/cdn-versioned/chunks/chunk.VSX5LY2D.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WL6NNNG5.js +2 -2
- package/cdn-versioned/chunks/chunk.WQZWYMH3.js +1 -1
- package/cdn-versioned/chunks/chunk.WUXX2P2S.js +2 -2
- package/cdn-versioned/chunks/chunk.XGVG7F7T.js +2 -2
- package/cdn-versioned/chunks/chunk.XHYIXZF4.js +2 -2
- package/cdn-versioned/chunks/chunk.XZ5JTM6K.js +2 -2
- package/cdn-versioned/chunks/chunk.Y4ZS3BWH.js +2 -2
- package/cdn-versioned/chunks/chunk.YUDSN6HJ.js +3 -3
- package/cdn-versioned/chunks/chunk.Z2M7BQV5.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +5 -1
- package/cdn-versioned/components/datepicker/datepicker.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/file-selector/file-selector.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +298 -266
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +3 -3
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +120 -115
- package/cdn-versioned/web-types.json +195 -173
- package/dist/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +37 -2
- package/dist/components/datepicker/datepicker.d.ts +4 -0
- package/dist/components/datepicker/datepicker.js +1 -1
- package/dist/custom-elements.json +33 -1
- package/dist/solid-components.js +4 -4
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +24 -2
- package/dist-versioned/chunks/chunk.2EXNVXP2.js +2 -2
- package/dist-versioned/chunks/chunk.2M6Y3YHU.js +4 -4
- package/dist-versioned/chunks/chunk.2NXJZVSN.js +11 -11
- package/dist-versioned/chunks/chunk.2OT7JZJP.js +10 -10
- package/dist-versioned/chunks/chunk.2Y2MTVGF.js +3 -3
- package/dist-versioned/chunks/chunk.3PHACHZ2.js +7 -7
- package/dist-versioned/chunks/chunk.42XKKRQ2.js +6 -6
- package/dist-versioned/chunks/chunk.4FXMBMSY.js +3 -3
- package/dist-versioned/chunks/chunk.4JC6XNQW.js +4 -4
- package/dist-versioned/chunks/chunk.4VWOZ477.js +4 -4
- package/dist-versioned/chunks/chunk.5JPFIM5W.js +3 -3
- package/dist-versioned/chunks/chunk.5TU4CAN7.js +6 -6
- package/dist-versioned/chunks/chunk.65FELEDA.js +3 -3
- package/dist-versioned/chunks/chunk.67LY7Y75.js +4 -4
- package/dist-versioned/chunks/chunk.6F52A4JB.js +3 -3
- package/dist-versioned/chunks/chunk.72LCNWVE.js +3 -3
- package/dist-versioned/chunks/chunk.7DQB3MN6.js +7 -7
- package/dist-versioned/chunks/chunk.7EXDALNL.js +5 -5
- package/dist-versioned/chunks/chunk.AHIYNPL4.js +1 -1
- package/dist-versioned/chunks/chunk.ALJ34SPY.js +4 -4
- package/dist-versioned/chunks/chunk.B5BWUIZC.js +2 -2
- package/dist-versioned/chunks/chunk.BW5BXFWA.js +5 -5
- package/dist-versioned/chunks/chunk.C3L34J75.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.C4HDZU75.js +2 -2
- package/dist-versioned/chunks/chunk.CB7PF3MZ.js +6 -6
- package/dist-versioned/chunks/chunk.CXFXIMXV.js +13 -13
- package/dist-versioned/chunks/chunk.DF2LZ65H.js +2 -2
- package/dist-versioned/chunks/chunk.DGLSKBZE.js +3 -3
- package/dist-versioned/chunks/chunk.DZED227Y.js +1 -1
- package/dist-versioned/chunks/chunk.EQIZ7J5Z.js +25 -25
- package/dist-versioned/chunks/chunk.ES5DW7MC.js +2 -2
- package/dist-versioned/chunks/chunk.HFRDUE6W.js +11 -11
- package/dist-versioned/chunks/chunk.I3DVEGNB.js +11 -11
- package/dist-versioned/chunks/chunk.JKJXDDJU.js +3 -3
- package/dist-versioned/chunks/chunk.JPGYEMXS.js +2 -2
- package/dist-versioned/chunks/chunk.JXDY64LH.js +10 -10
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KSU44YSO.js +7 -7
- package/dist-versioned/chunks/chunk.KXUT6UJL.js +2 -2
- package/dist-versioned/chunks/chunk.MPHRXV2B.js +1 -1
- package/dist-versioned/chunks/chunk.N5RQE7OC.js +1 -1
- package/dist-versioned/chunks/chunk.PAXRRXRW.js +4 -4
- package/dist-versioned/chunks/chunk.PGECK7YI.js +1 -1
- package/dist-versioned/chunks/chunk.QGCJ4WUV.js +5 -5
- package/dist-versioned/chunks/chunk.QIYLIH7P.js +5 -5
- package/dist-versioned/chunks/chunk.QNHUD2SQ.js +42 -42
- package/dist-versioned/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +46 -11
- package/dist-versioned/chunks/chunk.S2ZVBJYN.js +5 -5
- package/dist-versioned/chunks/chunk.SEWHXNAY.js +5 -5
- package/dist-versioned/chunks/chunk.SG7H3CVK.js +12 -12
- package/dist-versioned/chunks/chunk.SMRP2JEM.js +1 -1
- package/dist-versioned/chunks/chunk.TFAIMBF7.js +11 -11
- package/dist-versioned/chunks/chunk.TLAI6IVF.js +2 -2
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UORTR6WB.js +5 -5
- package/dist-versioned/chunks/chunk.VX7JXCCH.js +2 -2
- package/dist-versioned/chunks/chunk.XAU2YS2A.js +5 -5
- package/dist-versioned/chunks/chunk.XQMBT64Z.js +8 -8
- package/dist-versioned/chunks/chunk.YJ46MX3X.js +6 -6
- package/dist-versioned/chunks/chunk.YKGIJFJM.js +23 -23
- package/dist-versioned/chunks/chunk.YRKHHYV5.js +2 -2
- package/dist-versioned/chunks/chunk.Z4IULIBO.js +10 -10
- package/dist-versioned/chunks/chunk.ZLPWCNY6.js +14 -14
- package/dist-versioned/chunks/chunk.ZQ6CXL6H.js +5 -5
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +5 -1
- package/dist-versioned/components/datepicker/datepicker.js +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/file-selector/file-selector.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +298 -266
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +3 -3
- package/dist-versioned/solid-components.js +4 -4
- package/dist-versioned/vscode.html-custom-data.json +120 -115
- package/dist-versioned/web-types.json +195 -173
- package/package.json +3 -3
- package/cdn/chunks/chunk.7OG7ICBB.js +0 -2
- package/cdn-versioned/chunks/chunk.7OG7ICBB.js +0 -2
|
@@ -62,6 +62,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
62
62
|
this.visuallyDisabled = false;
|
|
63
63
|
this.styleOnValid = false;
|
|
64
64
|
this.readonly = false;
|
|
65
|
+
this.clearable = false;
|
|
65
66
|
this.placement = "bottom";
|
|
66
67
|
this.placeholder = "";
|
|
67
68
|
this.name = "";
|
|
@@ -79,6 +80,8 @@ var SdDatepicker = class extends SolidElement {
|
|
|
79
80
|
this.inputValue = "";
|
|
80
81
|
/** Internal flag used when tabbing from header into grid to pick initial tabbable day. */
|
|
81
82
|
this.tabbingIntoGrid = false;
|
|
83
|
+
/** Internal flag used when clearing to keep the restored focus from opening the calendar. */
|
|
84
|
+
this.clearing = false;
|
|
82
85
|
/** Bump counter ensuring live region text updates are recognized. */
|
|
83
86
|
this.statusBumpCounter = 0;
|
|
84
87
|
this.onFocusOut = (ev) => {
|
|
@@ -941,13 +944,37 @@ var SdDatepicker = class extends SolidElement {
|
|
|
941
944
|
event.preventDefault();
|
|
942
945
|
if (!this.open) this.show();
|
|
943
946
|
}
|
|
947
|
+
preventLoosingFocus(event) {
|
|
948
|
+
event.stopPropagation();
|
|
949
|
+
event.preventDefault();
|
|
950
|
+
}
|
|
951
|
+
handleClearClick(event) {
|
|
952
|
+
event.stopPropagation();
|
|
953
|
+
if (!this.inputValue) return;
|
|
954
|
+
this.value = null;
|
|
955
|
+
this.rangeStart = null;
|
|
956
|
+
this.rangeEnd = null;
|
|
957
|
+
this.previewEnd = null;
|
|
958
|
+
this.inputValue = "";
|
|
959
|
+
this.showInvalidStyle = false;
|
|
960
|
+
this.showValidStyle = false;
|
|
961
|
+
this.input.setCustomValidity("");
|
|
962
|
+
this.clearing = true;
|
|
963
|
+
this.input.focus({ preventScroll: true });
|
|
964
|
+
this.clearing = false;
|
|
965
|
+
this.updateComplete.then(() => {
|
|
966
|
+
this.input.value = "";
|
|
967
|
+
this.formControlController.updateValidity();
|
|
968
|
+
this.emit("sd-clear");
|
|
969
|
+
});
|
|
970
|
+
}
|
|
944
971
|
handleBlur() {
|
|
945
972
|
this.hasFocus = false;
|
|
946
973
|
this.emit("sd-blur");
|
|
947
974
|
}
|
|
948
975
|
handleFocus() {
|
|
949
976
|
this.hasFocus = true;
|
|
950
|
-
if (!this.open && !this.disabled && !this.visuallyDisabled && !this.readonly) {
|
|
977
|
+
if (!this.open && !this.clearing && !this.disabled && !this.visuallyDisabled && !this.readonly) {
|
|
951
978
|
this.show();
|
|
952
979
|
}
|
|
953
980
|
this.emit("sd-focus");
|
|
@@ -1296,7 +1323,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1296
1323
|
this.open ? "block shadow-listbox" : "hidden",
|
|
1297
1324
|
((_b = this.currentPlacement) == null ? void 0 : _b.startsWith("bottom")) ? "border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius" : "border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius",
|
|
1298
1325
|
"border-primary"
|
|
1299
|
-
)}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${cx("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline", iconColor)}" part="prev-year-button" @click="${() => this.setYear(-1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "year", -1, false)}" aria-label="${this.localize.term("previousYear")}"><sd-7-0-
|
|
1326
|
+
)}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${cx("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline", iconColor)}" part="prev-year-button" @click="${() => this.setYear(-1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "year", -1, false)}" aria-label="${this.localize.term("previousYear")}"><sd-7-1-0-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-7-1-0-icon></button> <button type="button" tabindex="0" class="${cx("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline", iconColor)}" part="prev-month-button" @click="${() => this.setMonth(-1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "month", -1, false)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-1-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-1-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${monthLabel}</div><div class="flex items-center"><button type="button" tabindex="0" class="${cx("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline", iconColor)}" part="next-month-button" @click="${() => this.setMonth(1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "month", 1, false)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-1-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-1-0-icon></button> <button type="button" tabindex="0" class="${cx("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline", iconColor)}" part="next-year-button" @click="${() => this.setYear(1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "year", 1, true)}" aria-label="${this.localize.term("nextYear")}"><sd-7-1-0-icon library="_internal" name="chevrons-small-right" class="h-6 w-6"></sd-7-1-0-icon></button></div></div><sd-7-1-0-divider></sd-7-1-0-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${monthLabel}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${() => {
|
|
1300
1327
|
this.tabbingIntoGrid = false;
|
|
1301
1328
|
}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${weekdays.map(
|
|
1302
1329
|
(w, colIndex) => html`<div role="columnheader" aria-colindex="${colIndex + 1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${w}" title="${w}" id="${"col-" + (colIndex + 1)}">${w}</div>`
|
|
@@ -1329,14 +1356,14 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1329
1356
|
return html`<button type="button" part="day" class="${cx(
|
|
1330
1357
|
"cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",
|
|
1331
1358
|
this.size === "sm" ? "text-sm h-6" : "text-base h-8",
|
|
1332
|
-
isRangeStart || isRangeEnd ? "sd-7-0-
|
|
1333
|
-
!isRangeStart && !isRangeEnd && !inSelectedRange && "hover:sd-7-0-
|
|
1334
|
-
isSelectedSingle ? "selected border-primary sd-7-0-
|
|
1359
|
+
isRangeStart || isRangeEnd ? "sd-7-1-0-datepicker__date-item--selected-color-background sd-7-1-0-datepicker__date-item--selected-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text" : "hover:sd-7-1-0-datepicker__date-item--hover--default-color-text",
|
|
1360
|
+
!isRangeStart && !isRangeEnd && !inSelectedRange && "hover:sd-7-1-0-datepicker__date-item--hover--default-color-background",
|
|
1361
|
+
isSelectedSingle ? "selected border-primary sd-7-1-0-datepicker__date-item--selected-color-background sd-7-1-0-datepicker__date-item--selected-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background" : (isRangeStart || isRangeEnd) && !inMonth ? "out-month" : !inMonth ? this.disabledWeekends && isWeekendDay ? "out-month weekend-day text-neutral-500" : isWeekendDay ? "out-month weekend-day text-neutral-700" : "out-month text-neutral-700 hover:sd-7-1-0-datepicker__date-item--hover--prev-next-color-text hover:sd-7-1-0-datepicker__date-item--hover--prev-next-color-background" : this.isInDisabledDates(day) || !this.inMinMax(day) ? "out-month text-neutral-500" : this.disabledWeekends && isWeekendDay ? "weekend-day text-neutral-500" : "in-month sd-7-1-0-datepicker__date-item--default-color-text",
|
|
1335
1362
|
isRangeStart ? "rounded-l-md rounded-r-none" : "",
|
|
1336
1363
|
isRangeEnd ? "range-end rounded-r-md rounded-l-none" : "",
|
|
1337
|
-
inSelectedRange && !isRangeStart && !isRangeEnd ? "in-range selected sd-7-0-
|
|
1364
|
+
inSelectedRange && !isRangeStart && !isRangeEnd ? "in-range selected sd-7-1-0-datepicker__date-item--range-color-background rounded-none hover:sd-7-1-0-datepicker__date-item--selected--hover-color-background hover:sd-7-1-0-datepicker__date-item--selected--hover-color-text" : "",
|
|
1338
1365
|
!inSelectedRange && inPreviewRange && !isRangeStart && !isRangeEnd ? "in-preview-range bg-primary-100 text-primary-500 rounded-none" : "",
|
|
1339
|
-
isToday && !isSelectedSingle && !isRangeStart && !isRangeEnd && isFocused ? "today border-[1px] border-primary focus-visible:border-transparent sd-7-0-
|
|
1366
|
+
isToday && !isSelectedSingle && !isRangeStart && !isRangeEnd && isFocused ? "today border-[1px] border-primary focus-visible:border-transparent sd-7-1-0-datepicker__date-item--current-font-weight" : "",
|
|
1340
1367
|
disabled ? "disabled cursor-not-allowed hover:bg-transparent" : "cursor-pointer",
|
|
1341
1368
|
isFocused ? "focused" : ""
|
|
1342
1369
|
)}" role="gridcell" aria-colindex="${colIndex + 1}" aria-labelledby="${"col-" + (colIndex + 1)}" .tabIndex="${tabIndex}" ?disabled="${this.disabled || this.readonly}" aria-disabled="${disabled || this.visuallyDisabled || this.disabled || this.readonly ? "true" : "false"}" aria-selected="${isSelectedSingle || inSelectedRange || isRangeStart || isRangeEnd ? "true" : "false"}" aria-current="${isToday ? "date" : nothing}" aria-label="${label}" aria-roledescription="${roleDesc != null ? roleDesc : nothing}" @focus="${() => this.focusedDate = DateUtils.startOfDayLocal(day)}" @mouseenter="${() => this.onDayMouseEnter(day)}" @keydown="${this.onKeyDown}" @click="${() => {
|
|
@@ -1357,6 +1384,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1357
1384
|
const hasHelpText = this.helpText ? true : !!slots["helpText"];
|
|
1358
1385
|
const hasTooltip = !!slots["tooltip"];
|
|
1359
1386
|
const hasValue = this.value !== null && String(this.value).length > 0 || this.range && this.rangeStart !== null || this.rangeEnd !== null;
|
|
1387
|
+
const hasClearIcon = this.clearable && !this.readonly && !this.disabled && !this.visuallyDisabled;
|
|
1360
1388
|
const isFloatingLabelActive = this.floatingLabel && hasLabel && (this.hasFocus || this.open || hasValue) && !this.disabled && !this.visuallyDisabled;
|
|
1361
1389
|
const iconColor = this.disabled || this.visuallyDisabled ? "text-neutral-500" : "icon-color";
|
|
1362
1390
|
const iconMarginLeft = { sm: "ml-1", md: "ml-2", lg: "ml-2" }[this.size];
|
|
@@ -1398,7 +1426,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1398
1426
|
"absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",
|
|
1399
1427
|
borderColor,
|
|
1400
1428
|
this.open && (((_a = this.currentPlacement) == null ? void 0 : _a.startsWith("bottom")) ? this.open && this.alignment === "left" ? "rounded-bl-none" : "rounded-br-none" : this.open && this.alignment === "left" ? "rounded-tl-none" : "rounded-tr-none")
|
|
1401
|
-
)}"></div><sd-7-0-
|
|
1429
|
+
)}"></div><sd-7-1-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
1402
1430
|
"inline-flex relative w-full",
|
|
1403
1431
|
((_b = this.currentPlacement) == null ? void 0 : _b.startsWith("bottom")) ? "origin-top" : "origin-bottom"
|
|
1404
1432
|
)}" placement="${this.alignment === "left" ? `${this.placement}-start` : `${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${cx(
|
|
@@ -1414,7 +1442,11 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1414
1442
|
{ sm: "h-8", md: "h-10", lg: "h-12" }[this.size],
|
|
1415
1443
|
textSize,
|
|
1416
1444
|
this.floatingLabel && "mt-4"
|
|
1417
|
-
)}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel || isFloatingLabelActive ? this.placeholder || this.localize.term(this.range ? "dateRangePlaceholder" : "datePlaceholder") : ""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly || this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${
|
|
1445
|
+
)}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel || isFloatingLabelActive ? this.placeholder || this.localize.term(this.range ? "dateRangePlaceholder" : "datePlaceholder") : ""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly || this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx(
|
|
1446
|
+
"flex justify-center",
|
|
1447
|
+
iconMarginLeft,
|
|
1448
|
+
this.inputValue.length > 0 ? "visible" : "invisible"
|
|
1449
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}"><slot name="clear-icon"><sd-7-1-0-icon class="${cx("text-neutral-700", iconSize)}" library="_internal" name="close-circle"></sd-7-1-0-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-7-1-0-icon part="invalid-icon" class="${cx("text-error", iconMarginLeft, iconSize)}" library="_internal" name="risk"></sd-7-1-0-icon>` : ""} ${this.showValidStyle && this.styleOnValid ? html`<sd-7-1-0-icon class="${cx("text-success shrink-0", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-1-0-icon>` : ""}<sd-7-1-0-icon class="${cx(iconColor, iconMarginLeft, iconSize, "hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.handleCalendarIconClick}"></sd-7-1-0-icon></div>${this.renderCalendar()}</sd-7-1-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx(
|
|
1418
1450
|
"text-sm mt-1",
|
|
1419
1451
|
hasHelpText ? "block" : "hidden",
|
|
1420
1452
|
this.visuallyDisabled || this.disabled ? "text-neutral-500" : "text-neutral-700"
|
|
@@ -1495,6 +1527,9 @@ __decorateClass([
|
|
|
1495
1527
|
__decorateClass([
|
|
1496
1528
|
property({ type: Boolean, reflect: true })
|
|
1497
1529
|
], SdDatepicker.prototype, "readonly", 2);
|
|
1530
|
+
__decorateClass([
|
|
1531
|
+
property({ type: Boolean, reflect: true })
|
|
1532
|
+
], SdDatepicker.prototype, "clearable", 2);
|
|
1498
1533
|
__decorateClass([
|
|
1499
1534
|
property({ type: String, reflect: true })
|
|
1500
1535
|
], SdDatepicker.prototype, "placement", 2);
|
|
@@ -1544,7 +1579,7 @@ __decorateClass([
|
|
|
1544
1579
|
state()
|
|
1545
1580
|
], SdDatepicker.prototype, "inputValue", 2);
|
|
1546
1581
|
__decorateClass([
|
|
1547
|
-
query("sd-7-0-
|
|
1582
|
+
query("sd-7-1-0-popup")
|
|
1548
1583
|
], SdDatepicker.prototype, "popup", 2);
|
|
1549
1584
|
__decorateClass([
|
|
1550
1585
|
query("#invalid-message")
|
|
@@ -1578,7 +1613,7 @@ __decorateClass([
|
|
|
1578
1613
|
watch(["size", "floatingLabel"])
|
|
1579
1614
|
], SdDatepicker.prototype, "handleSizeChange", 1);
|
|
1580
1615
|
SdDatepicker = __decorateClass([
|
|
1581
|
-
customElement("sd-7-0-
|
|
1616
|
+
customElement("sd-7-1-0-datepicker")
|
|
1582
1617
|
], SdDatepicker);
|
|
1583
1618
|
|
|
1584
1619
|
export {
|
|
@@ -26,7 +26,7 @@ var SdCheckboxGroup = class extends SolidElement {
|
|
|
26
26
|
this.helpText = "";
|
|
27
27
|
}
|
|
28
28
|
getAllCheckboxes() {
|
|
29
|
-
return [...this.querySelectorAll("sd-7-0-
|
|
29
|
+
return [...this.querySelectorAll("sd-7-1-0-checkbox")];
|
|
30
30
|
}
|
|
31
31
|
async syncCheckboxElements() {
|
|
32
32
|
const checkboxes = this.getAllCheckboxes();
|
|
@@ -39,10 +39,10 @@ var SdCheckboxGroup = class extends SolidElement {
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
syncCheckboxes() {
|
|
42
|
-
if (customElements.get("sd-7-0-
|
|
42
|
+
if (customElements.get("sd-7-1-0-checkbox")) {
|
|
43
43
|
this.syncCheckboxElements();
|
|
44
44
|
} else {
|
|
45
|
-
customElements.whenDefined("sd-7-0-
|
|
45
|
+
customElements.whenDefined("sd-7-1-0-checkbox").then(() => this.syncCheckboxes());
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
handleSizeChange() {
|
|
@@ -80,7 +80,7 @@ var SdCheckboxGroup = class extends SolidElement {
|
|
|
80
80
|
SdCheckboxGroup.styles = [
|
|
81
81
|
...SolidElement.styles,
|
|
82
82
|
css`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
83
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-7-0-
|
|
83
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-7-1-0-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-7-1-0-checkbox:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-7-1-0-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-7-1-0-checkbox:last-of-type){margin-right:0}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-7-1-0-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-7-1-0-checkbox:last-of-type){margin-right:0}`
|
|
84
84
|
];
|
|
85
85
|
__decorateClass([
|
|
86
86
|
property({ type: String, reflect: true })
|
|
@@ -101,7 +101,7 @@ __decorateClass([
|
|
|
101
101
|
watch("invalid", { waitUntilFirstUpdate: true })
|
|
102
102
|
], SdCheckboxGroup.prototype, "handleInvalid", 1);
|
|
103
103
|
SdCheckboxGroup = __decorateClass([
|
|
104
|
-
customElement("sd-7-0-
|
|
104
|
+
customElement("sd-7-1-0-checkbox-group")
|
|
105
105
|
], SdCheckboxGroup);
|
|
106
106
|
|
|
107
107
|
export {
|
|
@@ -92,7 +92,7 @@ var SdStep = class extends SolidElement {
|
|
|
92
92
|
this.orientation === "horizontal" && !this.horizontalInline ? this.size === "lg" ? "translateLg" : "translateSm" : this.size === "lg" || this.size === "xs" ? "mt-1" : "mt-3"
|
|
93
93
|
);
|
|
94
94
|
const circleButtonClasses = cx(
|
|
95
|
-
"border sd-7-0-
|
|
95
|
+
"border sd-7-1-0-step__circle-border-width rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",
|
|
96
96
|
this.disabled ? "focus-visible:outline-none cursor-not-allowed" : !this.notInteractive && !this.waiting ? "focus-visible:focus-outline hover:cursor-pointer" : "",
|
|
97
97
|
this.notInteractive ? this.size === "lg" ? "not-interactive-lg" : this.size === "xs" ? "w-2" : "w-12" : this.size === "lg" ? "w-12" : this.size === "xs" ? "w-2" : "w-8 h-8",
|
|
98
98
|
this.disabled && "border-neutral-500 text-neutral-500",
|
|
@@ -110,8 +110,8 @@ var SdStep = class extends SolidElement {
|
|
|
110
110
|
)}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${circleAndTailContainerClasses}"><${tag} part="circle" href="${ifDefined(isLink ? this.href : void 0)}" aria-disabled="${ifDefined(this.disabled || this.waiting || void 0)}" aria-current="${this.current ? "step" : void 0}" aria-labelledby="${ifDefined(this.notInteractive || this.waiting || !hasLabel ? void 0 : "label")}" aria-describedby="${ifDefined(this.notInteractive || this.waiting || !hasDescription ? void 0 : "description")}" class="${circleButtonClasses}"><slot name="circle-content" class="${cx(
|
|
111
111
|
"text-lg",
|
|
112
112
|
!this.disabled && !this.current && !this.notInteractive && !this.waiting && "text-primary hover:text-primary-500 hover:fill-primary-500",
|
|
113
|
-
this.notInteractive && "sd-7-0-
|
|
114
|
-
)}">${!this.disabled && !this.current && !this.notInteractive && !this.waiting && this.size !== "xs" ? html`<sd-7-0-
|
|
113
|
+
this.notInteractive && "sd-7-1-0-step-color-text"
|
|
114
|
+
)}">${!this.disabled && !this.current && !this.notInteractive && !this.waiting && this.size !== "xs" ? html`<sd-7-1-0-icon library="sd-status-assets" name="status-check" class="${cx(this.size === "sm" && "text-sm")}"></sd-7-1-0-icon>` : this.size === "xs" ? "" : html`${this.index}`}</slot></${tag}>${isHorizontalInline ? html`<div class="${cx(!this.noTail && "flex-1", "flex flex-col gap-1")}"><div class="${cx(
|
|
115
115
|
"flex w-full",
|
|
116
116
|
hasLabel && "gap-2",
|
|
117
117
|
this.size === "sm" && !hasDescription ? "mt-1" : "mt-3"
|
|
@@ -152,7 +152,7 @@ var SdStep = class extends SolidElement {
|
|
|
152
152
|
SdStep.styles = [
|
|
153
153
|
...SolidElement.styles,
|
|
154
154
|
css`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
155
|
-
:host{flex:1}:host([orientation=horizontal]) [part=tail]{border-top-width:var(--sd-step__tail-border-width)}:host([orientation=vertical]) [part=tail]{border-left-width:var(--sd-step__tail-border-width)}:host([no-tail]){flex-grow:0}:host(:not([current])) (:not([notInteractive])) slot[name=circle-content]{color:rgba(var(--sd-color-text-neutral-700))}slot[name=circle-content] sd-7-0-
|
|
155
|
+
:host{flex:1}:host([orientation=horizontal]) [part=tail]{border-top-width:var(--sd-step__tail-border-width)}:host([orientation=vertical]) [part=tail]{border-left-width:var(--sd-step__tail-border-width)}:host([no-tail]){flex-grow:0}:host(:not([current])) (:not([notInteractive])) slot[name=circle-content]{color:rgba(var(--sd-color-text-neutral-700))}slot[name=circle-content] sd-7-1-0-icon,slot[name=circle-content]::slotted(sd-7-1-0-icon){color:rgba(var(--sd-color-icon-fill-primary))}[part=circle]:hover slot[name=circle-content] sd-7-1-0-icon,[part=circle]:hover slot[name=circle-content]::slotted(sd-7-1-0-icon){color:rgba(var(--sd-color-icon-fill-primary-500))}:host([horizontal-inline]):has([part=description]){min-width:0;flex:1}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`
|
|
156
156
|
];
|
|
157
157
|
__decorateClass([
|
|
158
158
|
property({ type: String, reflect: true })
|
|
@@ -203,7 +203,7 @@ __decorateClass([
|
|
|
203
203
|
watch("notInteractive")
|
|
204
204
|
], SdStep.prototype, "handleInteractivityChange", 1);
|
|
205
205
|
SdStep = __decorateClass([
|
|
206
|
-
customElement("sd-7-0-
|
|
206
|
+
customElement("sd-7-1-0-step")
|
|
207
207
|
], SdStep);
|
|
208
208
|
|
|
209
209
|
export {
|
|
@@ -88,14 +88,14 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
getAllRadios() {
|
|
91
|
-
const radios = [...this.querySelectorAll("sd-7-0-
|
|
91
|
+
const radios = [...this.querySelectorAll("sd-7-1-0-radio, sd-7-1-0-radio-button")];
|
|
92
92
|
if (radios.length === 0) {
|
|
93
93
|
console.warn("No radios found in the radio group.");
|
|
94
94
|
}
|
|
95
95
|
return radios;
|
|
96
96
|
}
|
|
97
97
|
handleRadioClick(event) {
|
|
98
|
-
const target = event.target.closest("sd-7-0-
|
|
98
|
+
const target = event.target.closest("sd-7-1-0-radio, sd-7-1-0-radio-button");
|
|
99
99
|
const oldValue = this.value;
|
|
100
100
|
const radios = this.getAllRadios();
|
|
101
101
|
if (radios.length === 0) {
|
|
@@ -185,7 +185,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
185
185
|
}
|
|
186
186
|
})
|
|
187
187
|
);
|
|
188
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-7-0-
|
|
188
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-7-1-0-radio-button");
|
|
189
189
|
if (!radios.some((radio) => radio.checked)) {
|
|
190
190
|
if (this.hasButtonGroup) {
|
|
191
191
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -197,26 +197,26 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
if (this.hasButtonGroup) {
|
|
200
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-7-0-
|
|
200
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-7-1-0-button-group");
|
|
201
201
|
if (buttonGroup) {
|
|
202
202
|
buttonGroup.disableRole = true;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
syncRadios() {
|
|
207
|
-
if (customElements.get("sd-7-0-
|
|
207
|
+
if (customElements.get("sd-7-1-0-radio") && customElements.get("sd-7-1-0-radio-button")) {
|
|
208
208
|
this.syncRadioElements();
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
if (customElements.get("sd-7-0-
|
|
211
|
+
if (customElements.get("sd-7-1-0-radio")) {
|
|
212
212
|
this.syncRadioElements();
|
|
213
213
|
} else {
|
|
214
|
-
customElements.whenDefined("sd-7-0-
|
|
214
|
+
customElements.whenDefined("sd-7-1-0-radio").then(() => this.syncRadios());
|
|
215
215
|
}
|
|
216
|
-
if (customElements.get("sd-7-0-
|
|
216
|
+
if (customElements.get("sd-7-1-0-radio-button")) {
|
|
217
217
|
this.syncRadioElements();
|
|
218
218
|
} else {
|
|
219
|
-
customElements.whenDefined("sd-7-0-
|
|
219
|
+
customElements.whenDefined("sd-7-1-0-radio-button").then(() => this.syncRadios());
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
updateCheckedRadio() {
|
|
@@ -294,7 +294,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
294
294
|
vertical: "flex-col",
|
|
295
295
|
horizontal: "flex-row"
|
|
296
296
|
}[this.orientation]
|
|
297
|
-
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-7-0-
|
|
297
|
+
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-7-1-0-button-group class="border border-primary sd-7-1-0-radio-button-group-border-radius sd-7-1-0-radio-button-group-border-width sd-7-1-0-radio-button-group-padding" part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-7-1-0-button-group>` : defaultSlot}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-2", hasHelpText ? "block" : "hidden")}" aria-hidden="${!hasHelpText}">${this.helpText}</slot><div part="invalid-icon-message" class="flex items-center gap-2 mt-2">${this.showInvalidStyle ? html`<sd-7-1-0-icon part="invalid-icon" class="${cx("text-error")}" library="_internal" name="risk"></sd-7-1-0-icon>` : ""} ${this.formControlController.renderInvalidMessage(this.size)}</div>`;
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
/**
|
|
@@ -303,7 +303,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
303
303
|
SdRadioGroup.styles = [
|
|
304
304
|
...SolidElement.styles,
|
|
305
305
|
css`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
306
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-7-0-
|
|
306
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-7-1-0-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-7-1-0-radio:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-7-1-0-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-7-1-0-radio:last-of-type){margin-right:0}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-7-1-0-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-7-1-0-radio:last-of-type){margin-right:0}:host([required]) #label::after{content:' *'}:host:has(sd-7-1-0-button-group){display:inline-flex}`
|
|
307
307
|
];
|
|
308
308
|
__decorateClass([
|
|
309
309
|
query("slot:not([name])")
|
|
@@ -357,7 +357,7 @@ __decorateClass([
|
|
|
357
357
|
watch("value")
|
|
358
358
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
359
359
|
SdRadioGroup = __decorateClass([
|
|
360
|
-
customElement("sd-7-0-
|
|
360
|
+
customElement("sd-7-1-0-radio-group")
|
|
361
361
|
], SdRadioGroup);
|
|
362
362
|
|
|
363
363
|
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-7-0-
|
|
20
|
+
button == null ? void 0 : button.classList.add("sd-7-1-0-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-7-0-
|
|
24
|
+
button == null ? void 0 : button.classList.remove("sd-7-1-0-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-7-0-
|
|
28
|
+
button == null ? void 0 : button.classList.add("sd-7-1-0-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-7-0-
|
|
32
|
+
button == null ? void 0 : button.classList.remove("sd-7-1-0-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-7-0-
|
|
41
|
-
button.classList.toggle("sd-7-0-
|
|
42
|
-
button.classList.toggle("sd-7-0-
|
|
43
|
-
button.classList.toggle("sd-7-0-
|
|
44
|
-
button.classList.toggle("sd-7-0-
|
|
40
|
+
button.classList.add("sd-7-1-0-button-group__button");
|
|
41
|
+
button.classList.toggle("sd-7-1-0-button-group__button--first", index === 0);
|
|
42
|
+
button.classList.toggle("sd-7-1-0-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
|
|
43
|
+
button.classList.toggle("sd-7-1-0-button-group__button--last", index === slottedElements.length - 1);
|
|
44
|
+
button.classList.toggle("sd-7-1-0-button-group__button--radio", button.tagName.toLowerCase() === "sd-7-1-0-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-7-0-
|
|
67
|
+
customElement("sd-7-1-0-button-group")
|
|
68
68
|
], SdButtonGroup);
|
|
69
69
|
function findButton(el) {
|
|
70
70
|
var _a;
|
|
71
|
-
const selector = "sd-7-0-
|
|
71
|
+
const selector = "sd-7-1-0-button, sd-7-1-0-radio-button";
|
|
72
72
|
return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -94,7 +94,7 @@ var SdExpandable = class extends SolidElement {
|
|
|
94
94
|
)}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${cx("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${cx(
|
|
95
95
|
"flex items-center mr-2 transition-transform duration-medium ease-in-out",
|
|
96
96
|
this.open && "rotate-180"
|
|
97
|
-
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-7-0-
|
|
97
|
+
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-7-1-0-icon library="_internal" name="chevron-bottom" class="text-xl"></sd-7-1-0-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-7-1-0-icon library="_internal" name="chevron-bottom" class="text-xl"></sd-7-1-0-icon></slot></span><slot name="toggle-closed" class="${cx(this.open && "hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${cx(!this.open && "hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${ifDefined(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`;
|
|
98
98
|
}
|
|
99
99
|
firstUpdated() {
|
|
100
100
|
this.cloneContentToLightDOM();
|
|
@@ -139,7 +139,7 @@ __decorateClass([
|
|
|
139
139
|
watch("open", { waitUntilFirstUpdate: true })
|
|
140
140
|
], SdExpandable.prototype, "onOpenChange", 1);
|
|
141
141
|
SdExpandable = __decorateClass([
|
|
142
|
-
customElement("sd-7-0-
|
|
142
|
+
customElement("sd-7-1-0-expandable")
|
|
143
143
|
], SdExpandable);
|
|
144
144
|
setDefaultAnimation("expandable.show", {
|
|
145
145
|
keyframes: [{ height: "var(--component-expandable-max-block-size, 90px)" }, { height: "auto" }],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/combobox/utils.ts
|
|
2
2
|
var getAssignedElementsForSlot = (slot) => Array.from(slot.assignedElements({ flatten: true }));
|
|
3
|
-
var getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-7-0-
|
|
4
|
-
var isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-7-0-
|
|
3
|
+
var getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-7-1-0-option" ? item : Array.from(item.querySelectorAll(":scope > sd-7-1-0-option"));
|
|
4
|
+
var isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-7-1-0-optgroup";
|
|
5
5
|
var getAllOptions = (items) => items.map(getOptionOrNestedOptions);
|
|
6
6
|
var filterOnlyOptgroups = (items) => items.filter(isOptgroup);
|
|
7
7
|
var normalizeString = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
@@ -220,16 +220,16 @@ var SdTooltip = class extends SolidElement {
|
|
|
220
220
|
render() {
|
|
221
221
|
const isStart = this.placement.endsWith("-start");
|
|
222
222
|
const isEnd = this.placement.endsWith("-end");
|
|
223
|
-
return html`<sd-7-0-
|
|
223
|
+
return html`<sd-7-1-0-popup part="base" exportparts="
|
|
224
224
|
popup:base__popup,
|
|
225
225
|
arrow:base__arrow
|
|
226
|
-
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger ? html`<slot slot="anchor"></slot>` : html`<button slot="anchor" aria-describedby="tooltip" class="${cx("flex sd-interactive rounded-full", this.size === "lg" ? "text-xl" : "text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-7-0-
|
|
226
|
+
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger ? html`<slot slot="anchor"></slot>` : html`<button slot="anchor" aria-describedby="tooltip" class="${cx("flex sd-interactive rounded-full", this.size === "lg" ? "text-xl" : "text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-7-1-0-icon library="_internal" name="info-circle" label="Tooltip" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-7-1-0-icon></button>`}<slot name="content" part="body" id="tooltip" class="sd-7-1-0-tooltip-color-background sd-7-1-0-tooltip-color-text py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open ? "polite" : "off"}">${this.content}</slot></sd-7-1-0-popup>`;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
SdTooltip.styles = [
|
|
230
230
|
...SolidElement.styles,
|
|
231
231
|
css`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
232
|
-
:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-7-0-
|
|
232
|
+
:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-7-1-0-popup{--arrow-color:rgba(var(--sd-tooltip-color-background));--arrow-size:10px}sd-7-1-0-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-1-0-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-1-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-7-1-0-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@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}`
|
|
233
233
|
];
|
|
234
234
|
__decorateClass([
|
|
235
235
|
query("slot:not([name])")
|
|
@@ -238,7 +238,7 @@ __decorateClass([
|
|
|
238
238
|
query("#tooltip")
|
|
239
239
|
], SdTooltip.prototype, "body", 2);
|
|
240
240
|
__decorateClass([
|
|
241
|
-
query("sd-7-0-
|
|
241
|
+
query("sd-7-1-0-popup")
|
|
242
242
|
], SdTooltip.prototype, "popup", 2);
|
|
243
243
|
__decorateClass([
|
|
244
244
|
property({ type: String, reflect: true })
|
|
@@ -274,7 +274,7 @@ __decorateClass([
|
|
|
274
274
|
watch("disabled")
|
|
275
275
|
], SdTooltip.prototype, "handleDisabledChange", 1);
|
|
276
276
|
SdTooltip = __decorateClass([
|
|
277
|
-
customElement("sd-7-0-
|
|
277
|
+
customElement("sd-7-1-0-tooltip")
|
|
278
278
|
], SdTooltip);
|
|
279
279
|
setDefaultAnimation("tooltip.show", {
|
|
280
280
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -84,7 +84,7 @@ var SdLink = class extends SolidElement {
|
|
|
84
84
|
SdLink.styles = [
|
|
85
85
|
...SolidElement.styles,
|
|
86
86
|
css`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
87
|
-
::slotted(sd-7-0-
|
|
87
|
+
::slotted(sd-7-1-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-7-1-0-icon){font-size:var(--sd-text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-7-1-0-icon){font-size:var(--sd-text-xl,1.5rem);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`
|
|
88
88
|
];
|
|
89
89
|
__decorateClass([
|
|
90
90
|
query("a")
|
|
@@ -111,7 +111,7 @@ __decorateClass([
|
|
|
111
111
|
property({ reflect: true })
|
|
112
112
|
], SdLink.prototype, "download", 2);
|
|
113
113
|
SdLink = __decorateClass([
|
|
114
|
-
customElement("sd-7-0-
|
|
114
|
+
customElement("sd-7-1-0-link")
|
|
115
115
|
], SdLink);
|
|
116
116
|
|
|
117
117
|
export {
|
|
@@ -112,14 +112,14 @@ var SdSwitch = class extends SolidElement {
|
|
|
112
112
|
"group flex items-center text-base leading-normal text-black cursor-pointer",
|
|
113
113
|
this.disabled && "hover:cursor-not-allowed"
|
|
114
114
|
)}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${ifDefined(this.value)}" .checked="${live(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked ? "true" : "false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @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"}" class="${cx(
|
|
115
|
-
`relative flex flex-initial items-center justify-center sd-7-0-
|
|
115
|
+
`relative flex flex-initial items-center justify-center sd-7-1-0-switch-border-width rounded-full h-4 w-8 transition-colors ease duration-100
|
|
116
116
|
peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
|
|
117
117
|
peer-focus-visible:outline-primary outline-transparent transition-colors ease-in-out duration-medium hover:duration-fast`,
|
|
118
|
-
this.disabled && this.checked ? "bg-neutral-500" : this.disabled ? "border-neutral-500" : this.showInvalidStyle ? this.checked ? "border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400" : "border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white" : this.checked ? "border-accent hover:sd-7-0-
|
|
118
|
+
this.disabled && this.checked ? "bg-neutral-500" : this.disabled ? "border-neutral-500" : this.showInvalidStyle ? this.checked ? "border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400" : "border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white" : this.checked ? "border-accent hover:sd-7-1-0-switch--checked--hover-color-background bg-accent hover:border-accent-550 group-hover:border-accent-550 group-hover:sd-7-1-0-switch--checked--hover-color-background" : "sd-7-1-0-switch--unchecked-color-border bg-white hover:sd-7-1-0-switch--unchecked--hover-color-background group-hover:sd-7-1-0-switch--unchecked--hover-color-background"
|
|
119
119
|
)}"><span id="thumb" part="thumb" class="${cx(
|
|
120
120
|
"w-2.5 h-2.5 rounded-full transition[transform,colors] ease-in-out duration-medium",
|
|
121
|
-
this.disabled && this.checked ? "translate-x-2" : this.disabled ? "-translate-x-2" : this.showInvalidStyle ? this.checked ? "translate-x-2" : "bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400" : this.checked ? "translate-x-2" : "-translate-x-2 sd-7-0-
|
|
122
|
-
)}"></span> </span><span part="label" id="label" class="${cx("select-none inline-block ml-2", this.disabled ? "text-neutral-500" : "sd-7-0-
|
|
121
|
+
this.disabled && this.checked ? "translate-x-2" : this.disabled ? "-translate-x-2" : this.showInvalidStyle ? this.checked ? "translate-x-2" : "bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400" : this.checked ? "translate-x-2" : "-translate-x-2 sd-7-1-0-switch--unchecked__icon-color-background"
|
|
122
|
+
)}"></span> </span><span part="label" id="label" class="${cx("select-none inline-block ml-2", this.disabled ? "text-neutral-500" : "sd-7-1-0-switch-color-text")}"><slot></slot></span></label> ${this.hasSlotController.test("tooltip") ? html`<slot name="tooltip"></slot>` : null}</div><div part="invalid-icon-message" class="flex items-center gap-2 mt-2">${this.showInvalidStyle ? html`<sd-7-1-0-icon part="invalid-icon" class="${cx("text-error")}" library="_internal" name="risk"></sd-7-1-0-icon>` : ""} ${this.formControlController.renderInvalidMessage("lg")}</div>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
@@ -170,7 +170,7 @@ __decorateClass([
|
|
|
170
170
|
watch(["checked"], { waitUntilFirstUpdate: true })
|
|
171
171
|
], SdSwitch.prototype, "handleStateChange", 1);
|
|
172
172
|
SdSwitch = __decorateClass([
|
|
173
|
-
customElement("sd-7-0-
|
|
173
|
+
customElement("sd-7-1-0-switch")
|
|
174
174
|
], SdSwitch);
|
|
175
175
|
|
|
176
176
|
export {
|