@solid-design-system/components 6.4.1 → 6.4.2
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.I6EGY7RT.js +2 -0
- package/cdn/components/datepicker/datepicker.d.ts +3 -0
- package/cdn/components/datepicker/datepicker.js +1 -1
- package/cdn/custom-elements.json +8 -1
- package/cdn/solid-components.bundle.js +76 -76
- package/cdn/solid-components.iife.js +76 -76
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +2 -1
- package/cdn-versioned/chunks/chunk.2DPSCPM4.js +2 -2
- package/cdn-versioned/chunks/chunk.2HJLVWCE.js +2 -2
- package/cdn-versioned/chunks/chunk.2KV3QDYA.js +2 -2
- package/cdn-versioned/chunks/chunk.3ETEQAPR.js +2 -2
- package/cdn-versioned/chunks/chunk.47H4SDKN.js +2 -2
- package/cdn-versioned/chunks/chunk.4LGCXG7D.js +2 -2
- package/cdn-versioned/chunks/chunk.4P5PT6MV.js +2 -2
- package/cdn-versioned/chunks/chunk.5M2K2EXR.js +2 -2
- package/cdn-versioned/chunks/chunk.5OE2GCRH.js +2 -2
- package/cdn-versioned/chunks/chunk.6GU6NFBF.js +1 -1
- package/cdn-versioned/chunks/chunk.745GDIND.js +2 -2
- package/cdn-versioned/chunks/chunk.ALCKOGA7.js +1 -1
- package/cdn-versioned/chunks/chunk.BZ3VHECJ.js +3 -3
- package/cdn-versioned/chunks/chunk.C44GZOLG.js +9 -9
- package/cdn-versioned/chunks/chunk.C4QT4K6T.js +2 -2
- package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
- package/cdn-versioned/chunks/chunk.CJ34NUTS.js +1 -1
- package/cdn-versioned/chunks/chunk.CMY3VPYA.js +2 -2
- package/cdn-versioned/chunks/chunk.D5FVDNYV.js +2 -2
- package/cdn-versioned/chunks/chunk.DEEJ4ON7.js +2 -2
- package/cdn-versioned/chunks/chunk.DXGVZ3KG.js +1 -1
- package/cdn-versioned/chunks/chunk.E64WXH47.js +1 -1
- package/cdn-versioned/chunks/chunk.EASLRW3B.js +2 -2
- package/cdn-versioned/chunks/chunk.G42N3VHE.js +2 -2
- package/cdn-versioned/chunks/chunk.GP2QVZP5.js +1 -1
- package/cdn-versioned/chunks/chunk.H77CNSMK.js +2 -2
- package/cdn-versioned/chunks/chunk.HHASCDC2.js +5 -5
- package/cdn-versioned/chunks/chunk.I234MSSB.js +2 -2
- package/cdn-versioned/chunks/chunk.I3TTTGLW.js +1 -1
- package/cdn-versioned/chunks/chunk.I6EGY7RT.js +2 -0
- package/cdn-versioned/chunks/chunk.IAEOXYGB.js +1 -1
- package/cdn-versioned/chunks/chunk.JRSX44R6.js +2 -2
- package/cdn-versioned/chunks/chunk.KKKGNXIR.js +2 -2
- package/cdn-versioned/chunks/chunk.KM5W4EDY.js +2 -2
- package/cdn-versioned/chunks/chunk.L6PAHLSN.js +2 -2
- package/cdn-versioned/chunks/chunk.MWO5B7BA.js +2 -2
- package/cdn-versioned/chunks/chunk.OAVVKKBJ.js +2 -2
- package/cdn-versioned/chunks/chunk.OG2BQH6T.js +2 -2
- package/cdn-versioned/chunks/chunk.PDHMAKVQ.js +2 -2
- package/cdn-versioned/chunks/chunk.PPIS2HQ5.js +1 -1
- package/cdn-versioned/chunks/chunk.PRGLNPUF.js +1 -1
- package/cdn-versioned/chunks/chunk.PT6G5HKE.js +1 -1
- package/cdn-versioned/chunks/chunk.Q6GEIXGA.js +2 -2
- package/cdn-versioned/chunks/chunk.QMKNC76J.js +2 -2
- package/cdn-versioned/chunks/chunk.QUGI3FMS.js +2 -2
- package/cdn-versioned/chunks/chunk.RBVWPWFK.js +2 -2
- package/cdn-versioned/chunks/chunk.S4II2NTI.js +2 -2
- package/cdn-versioned/chunks/chunk.S7VIPIYX.js +2 -2
- package/cdn-versioned/chunks/chunk.TWNEU4H4.js +3 -3
- package/cdn-versioned/chunks/chunk.TWTQHJPN.js +2 -2
- package/cdn-versioned/chunks/chunk.U44PXBV2.js +2 -2
- package/cdn-versioned/chunks/chunk.U5N7L5RI.js +2 -2
- package/cdn-versioned/chunks/chunk.UVRZTPOZ.js +2 -2
- package/cdn-versioned/chunks/chunk.VAUP57XZ.js +2 -2
- package/cdn-versioned/chunks/chunk.VMUNNUNV.js +1 -1
- package/cdn-versioned/chunks/chunk.VTDQOKJM.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WOZKICWV.js +5 -5
- package/cdn-versioned/chunks/chunk.XAPH6XNH.js +2 -2
- package/cdn-versioned/chunks/chunk.XQWDDXL2.js +2 -2
- package/cdn-versioned/chunks/chunk.XTRMRKZ6.js +2 -2
- package/cdn-versioned/chunks/chunk.Z6TAAGCD.js +2 -2
- package/cdn-versioned/chunks/chunk.ZTELVJ34.js +1 -1
- package/cdn-versioned/chunks/chunk.ZVHLKL7F.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 +4 -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/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/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 +251 -244
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +86 -86
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +86 -86
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +94 -94
- package/cdn-versioned/web-types.json +158 -157
- package/dist/chunks/{chunk.QM4E25CD.js → chunk.CMGWC5BG.js} +46 -15
- package/dist/components/datepicker/datepicker.d.ts +3 -0
- package/dist/components/datepicker/datepicker.js +1 -1
- package/dist/custom-elements.json +8 -1
- package/dist/solid-components.js +1 -1
- package/dist/web-types.json +2 -1
- package/dist-versioned/chunks/chunk.22PWID5B.js +2 -2
- package/dist-versioned/chunks/chunk.2EWH2DC2.js +1 -1
- package/dist-versioned/chunks/chunk.2HTII44Q.js +4 -4
- package/dist-versioned/chunks/chunk.2VPWVTT6.js +4 -4
- package/dist-versioned/chunks/chunk.3EJL5IKL.js +1 -1
- package/dist-versioned/chunks/chunk.3PTRIEGP.js +2 -2
- package/dist-versioned/chunks/chunk.4UT3FCHQ.js +2 -2
- package/dist-versioned/chunks/chunk.5XWO3USG.js +3 -3
- package/dist-versioned/chunks/chunk.75WDCMIC.js +24 -24
- package/dist-versioned/chunks/chunk.ASEJW6QN.js +5 -5
- package/dist-versioned/chunks/chunk.AUSBWPVD.js +7 -7
- package/dist-versioned/chunks/chunk.AZPOFDJP.js +4 -4
- package/dist-versioned/chunks/chunk.BBLAIT57.js +2 -2
- package/dist-versioned/chunks/chunk.BSP6J6R2.js +2 -2
- package/dist-versioned/chunks/chunk.BTNS6ZNO.js +4 -4
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +3 -3
- package/dist-versioned/chunks/{chunk.QM4E25CD.js → chunk.CMGWC5BG.js} +48 -17
- package/dist-versioned/chunks/chunk.D4UC3BVQ.js +12 -12
- package/dist-versioned/chunks/chunk.D7CJJHHA.js +1 -1
- package/dist-versioned/chunks/chunk.DCHRUIDY.js +1 -1
- package/dist-versioned/chunks/chunk.DCOB6WLB.js +3 -3
- package/dist-versioned/chunks/chunk.DFHY67LW.js +5 -5
- package/dist-versioned/chunks/chunk.DTTVI7KT.js +11 -11
- package/dist-versioned/chunks/chunk.DXDDB6AB.js +1 -1
- package/dist-versioned/chunks/chunk.FKFGVTXH.js +3 -3
- package/dist-versioned/chunks/chunk.FSUOT4WC.js +12 -12
- package/dist-versioned/chunks/chunk.IJIPMNT2.js +3 -3
- package/dist-versioned/chunks/chunk.IYXPHPNO.js +1 -1
- package/dist-versioned/chunks/chunk.JGRI4R23.js +1 -1
- package/dist-versioned/chunks/chunk.K66JHYHC.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.L2RS3IA6.js +8 -8
- package/dist-versioned/chunks/chunk.L3OEOSPQ.js +1 -1
- package/dist-versioned/chunks/chunk.L6ZE3RXX.js +14 -14
- package/dist-versioned/chunks/chunk.LBDV5GNR.js +4 -4
- package/dist-versioned/chunks/chunk.LZVVDTSP.js +26 -26
- package/dist-versioned/chunks/chunk.M2D3WWF3.js +8 -8
- package/dist-versioned/chunks/chunk.MH7JHBWP.js +2 -2
- package/dist-versioned/chunks/chunk.MLRNCOWA.js +3 -3
- package/dist-versioned/chunks/chunk.NEUULRS7.js +5 -5
- package/dist-versioned/chunks/chunk.OJXVBFUH.js +5 -5
- package/dist-versioned/chunks/chunk.P5FGSFP3.js +1 -1
- package/dist-versioned/chunks/chunk.PBXAIJQ4.js +5 -5
- package/dist-versioned/chunks/chunk.Q7ZMX7IB.js +3 -3
- package/dist-versioned/chunks/chunk.R56JDQAF.js +2 -2
- package/dist-versioned/chunks/chunk.RFDAZXJG.js +3 -3
- package/dist-versioned/chunks/chunk.SCWR4Q4K.js +10 -10
- package/dist-versioned/chunks/chunk.SQYISG5I.js +4 -4
- package/dist-versioned/chunks/chunk.SVYFJMYF.js +3 -3
- package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
- package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
- package/dist-versioned/chunks/chunk.TUMONDN4.js +4 -4
- package/dist-versioned/chunks/chunk.TVWV4PUH.js +2 -2
- package/dist-versioned/chunks/chunk.U2BN2DBY.js +4 -4
- package/dist-versioned/chunks/chunk.UDPSGKZL.js +4 -4
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UPCVQSXM.js +3 -3
- package/dist-versioned/chunks/chunk.UWQPJU3Q.js +3 -3
- package/dist-versioned/chunks/chunk.XALPLS2Y.js +6 -6
- package/dist-versioned/chunks/chunk.XV2UO6TF.js +2 -2
- package/dist-versioned/chunks/chunk.YATRFNET.js +28 -28
- package/dist-versioned/chunks/chunk.YFRD2UEO.js +8 -8
- package/dist-versioned/chunks/chunk.YNBR5ZDU.js +4 -4
- package/dist-versioned/chunks/chunk.ZMEUQIVY.js +9 -9
- 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 +4 -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/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/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 +251 -244
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +158 -157
- package/package.json +3 -3
- package/cdn/chunks/chunk.DC6UQXYF.js +0 -2
- package/cdn-versioned/chunks/chunk.DC6UQXYF.js +0 -2
|
@@ -84,7 +84,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
84
84
|
this.localize = new LocalizeController(this);
|
|
85
85
|
this.hasSlotController = new HasSlotController(this, "label", "help-text", "tooltip");
|
|
86
86
|
this.formControlController = new FormControlController(this, {
|
|
87
|
-
assumeInteractionOn: ["sd-blur", "sd-6-4-
|
|
87
|
+
assumeInteractionOn: ["sd-blur", "sd-6-4-2-input"]
|
|
88
88
|
});
|
|
89
89
|
this.locale = "en-US";
|
|
90
90
|
this.value = null;
|
|
@@ -151,7 +151,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
151
151
|
};
|
|
152
152
|
this.handleInput = (ev) => {
|
|
153
153
|
var _a, _b, _c, _d, _e;
|
|
154
|
-
if (this.disabled || this.visuallyDisabled) {
|
|
154
|
+
if (this.disabled || this.visuallyDisabled || this.readonly) {
|
|
155
155
|
(_a = ev.preventDefault) == null ? void 0 : _a.call(ev);
|
|
156
156
|
(_b = ev.stopPropagation) == null ? void 0 : _b.call(ev);
|
|
157
157
|
return;
|
|
@@ -349,10 +349,16 @@ var SdDatepicker = class extends SolidElement {
|
|
|
349
349
|
}
|
|
350
350
|
this.handleBlur();
|
|
351
351
|
};
|
|
352
|
-
this.handleCurrentPlacement = (
|
|
353
|
-
|
|
352
|
+
this.handleCurrentPlacement = (e) => {
|
|
353
|
+
const incomingPlacement = e.detail;
|
|
354
|
+
if (incomingPlacement) {
|
|
355
|
+
this.currentPlacement = incomingPlacement;
|
|
356
|
+
}
|
|
354
357
|
};
|
|
355
358
|
this.handleHeaderKeyDown = (ev, type, direction, isLastHeaderControl) => {
|
|
359
|
+
if (this.disabled || this.visuallyDisabled || this.readonly) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
356
362
|
if (ev.key === "Tab" && !ev.shiftKey) {
|
|
357
363
|
if (isLastHeaderControl) {
|
|
358
364
|
ev.preventDefault();
|
|
@@ -370,7 +376,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
370
376
|
}
|
|
371
377
|
};
|
|
372
378
|
this.onKeyDown = (ev) => {
|
|
373
|
-
if (this.disabled || this.visuallyDisabled) {
|
|
379
|
+
if (this.disabled || this.visuallyDisabled || this.readonly) {
|
|
374
380
|
ev.preventDefault();
|
|
375
381
|
ev.stopPropagation();
|
|
376
382
|
return;
|
|
@@ -441,7 +447,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
441
447
|
}
|
|
442
448
|
};
|
|
443
449
|
this.handleInputKeyDown = (ev) => {
|
|
444
|
-
if ((this.disabled || this.visuallyDisabled) && ev.key !== "Tab") {
|
|
450
|
+
if ((this.disabled || this.visuallyDisabled || this.readonly) && ev.key !== "Tab") {
|
|
445
451
|
ev.preventDefault();
|
|
446
452
|
ev.stopPropagation();
|
|
447
453
|
return;
|
|
@@ -455,7 +461,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
455
461
|
this.emit("sd-datepicker-close");
|
|
456
462
|
return;
|
|
457
463
|
}
|
|
458
|
-
if (ev.key === "Enter" && !this.open && !this.disabled && !this.visuallyDisabled) {
|
|
464
|
+
if (ev.key === "Enter" && !this.open && !this.disabled && !this.visuallyDisabled && !this.readonly) {
|
|
459
465
|
ev.preventDefault();
|
|
460
466
|
this.show();
|
|
461
467
|
}
|
|
@@ -489,6 +495,11 @@ var SdDatepicker = class extends SolidElement {
|
|
|
489
495
|
firstUpdated() {
|
|
490
496
|
this.formControlController.updateValidity();
|
|
491
497
|
}
|
|
498
|
+
handleOpenChange() {
|
|
499
|
+
if (this.popup) {
|
|
500
|
+
this.popup.active = this.open && !this.disabled && !this.visuallyDisabled;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
492
503
|
disconnectedCallback() {
|
|
493
504
|
super.disconnectedCallback();
|
|
494
505
|
this.removeEventListener("focusin", this.onFocusIn);
|
|
@@ -888,7 +899,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
888
899
|
}
|
|
889
900
|
}
|
|
890
901
|
show() {
|
|
891
|
-
if (this.open || this.disabled || this.visuallyDisabled) {
|
|
902
|
+
if (this.open || this.disabled || this.visuallyDisabled || this.readonly) {
|
|
892
903
|
this.open = false;
|
|
893
904
|
return;
|
|
894
905
|
}
|
|
@@ -902,7 +913,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
902
913
|
this.open = false;
|
|
903
914
|
}
|
|
904
915
|
handleMouseDown(event) {
|
|
905
|
-
if (this.visuallyDisabled || this.disabled) {
|
|
916
|
+
if (this.visuallyDisabled || this.disabled || this.readonly) {
|
|
906
917
|
event.preventDefault();
|
|
907
918
|
event.stopPropagation();
|
|
908
919
|
return;
|
|
@@ -916,7 +927,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
916
927
|
}
|
|
917
928
|
handleFocus() {
|
|
918
929
|
this.hasFocus = true;
|
|
919
|
-
if (!this.open && !this.disabled && !this.visuallyDisabled) {
|
|
930
|
+
if (!this.open && !this.disabled && !this.visuallyDisabled && !this.readonly) {
|
|
920
931
|
this.show();
|
|
921
932
|
}
|
|
922
933
|
this.emit("sd-focus");
|
|
@@ -979,6 +990,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
979
990
|
});
|
|
980
991
|
}
|
|
981
992
|
selectSingleDate(d) {
|
|
993
|
+
if (this.readonly) return;
|
|
982
994
|
if (this.isDisabled(d)) return;
|
|
983
995
|
const localMidnight = DateUtils.startOfDayLocal(d);
|
|
984
996
|
const iso = DateUtils.toLocalISODate(localMidnight);
|
|
@@ -1003,6 +1015,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1003
1015
|
});
|
|
1004
1016
|
}
|
|
1005
1017
|
selectRangeDate(d) {
|
|
1018
|
+
if (this.readonly) return;
|
|
1006
1019
|
const day = DateUtils.startOfDayLocal(d);
|
|
1007
1020
|
const rs = this.rangeStart ? DateUtils.parseLocalISO(this.rangeStart) : null;
|
|
1008
1021
|
const re = this.rangeEnd ? DateUtils.parseLocalISO(this.rangeEnd) : null;
|
|
@@ -1131,6 +1144,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1131
1144
|
}
|
|
1132
1145
|
}
|
|
1133
1146
|
selectDate(d) {
|
|
1147
|
+
if (this.readonly) return;
|
|
1134
1148
|
if (this.range) this.selectRangeDate(d);
|
|
1135
1149
|
else this.selectSingleDate(d);
|
|
1136
1150
|
}
|
|
@@ -1191,7 +1205,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1191
1205
|
}
|
|
1192
1206
|
/** Mouse enter on a day: updates preview end when selecting a range. */
|
|
1193
1207
|
onDayMouseEnter(day) {
|
|
1194
|
-
if (!this.range) return;
|
|
1208
|
+
if (!this.range || this.readonly) return;
|
|
1195
1209
|
const rs = this.rangeStart ? DateUtils.parseLocalISO(this.rangeStart) : null;
|
|
1196
1210
|
const re = this.rangeEnd ? DateUtils.parseLocalISO(this.rangeEnd) : null;
|
|
1197
1211
|
if (rs && !re) {
|
|
@@ -1207,6 +1221,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1207
1221
|
}
|
|
1208
1222
|
}
|
|
1209
1223
|
renderCalendar() {
|
|
1224
|
+
var _a;
|
|
1210
1225
|
const { weeks } = this.getMonthMatrix(this.viewMonth);
|
|
1211
1226
|
const monthLabel = this.formatMonthYear(this.viewMonth);
|
|
1212
1227
|
const weekdays = this.weekdayLabels();
|
|
@@ -1219,7 +1234,12 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1219
1234
|
return DateUtils.isBetweenInclusive(day, rs, pe);
|
|
1220
1235
|
};
|
|
1221
1236
|
const tabTarget = this.getTabTargetDayForCurrentView(weeks);
|
|
1222
|
-
return html`<div part="datepicker" class="
|
|
1237
|
+
return html`<div part="datepicker" class="${cx(
|
|
1238
|
+
"w-[284px] z-50 bg-white py-3 px-4",
|
|
1239
|
+
this.open ? "block" : "hidden",
|
|
1240
|
+
((_a = this.currentPlacement) == null ? void 0 : _a.startsWith("bottom")) ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default",
|
|
1241
|
+
"border-primary"
|
|
1242
|
+
)}"><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="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${() => this.setYear(-1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "year", -1, false)}" aria-label="${this.localize.term("previousYear")}"><sd-6-4-2-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-4-2-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${() => this.setMonth(-1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "month", -1, false)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-4-2-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-4-2-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${monthLabel}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${() => this.setMonth(1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "month", 1, false)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-4-2-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-4-2-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${() => this.setYear(1)}" @keydown="${(ev) => this.handleHeaderKeyDown(ev, "year", 1, true)}" aria-label="${this.localize.term("nextYear")}"><sd-6-4-2-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-4-2-icon></button></div></div><sd-6-4-2-divider></sd-6-4-2-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="${() => {
|
|
1223
1243
|
this.tabbingIntoGrid = false;
|
|
1224
1244
|
}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${weekdays.map(
|
|
1225
1245
|
(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>`
|
|
@@ -1262,7 +1282,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1262
1282
|
isToday && !isSelectedSingle && !isRangeStart && !isRangeEnd && isFocused ? "today border-[1px] border-primary font-bold" : "",
|
|
1263
1283
|
disabled ? "disabled cursor-not-allowed hover:bg-transparent" : "cursor-pointer",
|
|
1264
1284
|
isFocused && !isToday ? "focused outline outline-2 outline-primary" : ""
|
|
1265
|
-
)}" role="gridcell" aria-colindex="${colIndex + 1}" aria-labelledby="${"col-" + (colIndex + 1)}" .tabIndex="${tabIndex}" ?disabled="${disabled || this.disabled}" aria-disabled="${disabled || this.visuallyDisabled || this.disabled ? "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="${() => {
|
|
1285
|
+
)}" role="gridcell" aria-colindex="${colIndex + 1}" aria-labelledby="${"col-" + (colIndex + 1)}" .tabIndex="${tabIndex}" ?disabled="${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="${() => {
|
|
1266
1286
|
this.focusedDate = DateUtils.startOfDayLocal(day);
|
|
1267
1287
|
this.selectDate(day);
|
|
1268
1288
|
}}">${day.getDate()}</button>`;
|
|
@@ -1270,6 +1290,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1270
1290
|
)}</div></div>`;
|
|
1271
1291
|
}
|
|
1272
1292
|
render() {
|
|
1293
|
+
var _a, _b;
|
|
1273
1294
|
const slots = {
|
|
1274
1295
|
label: this.hasSlotController.test("label"),
|
|
1275
1296
|
helpText: this.hasSlotController.test("help-text"),
|
|
@@ -1308,7 +1329,8 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1308
1329
|
"absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",
|
|
1309
1330
|
borderColor,
|
|
1310
1331
|
this.open && this.alignment === "left" ? "rounded-bl-none" : "",
|
|
1311
|
-
this.open && this.alignment === "right" ? "rounded-br-none" : ""
|
|
1332
|
+
this.open && this.alignment === "right" ? "rounded-br-none" : "",
|
|
1333
|
+
this.open && (((_a = this.currentPlacement) == null ? void 0 : _a.startsWith("bottom")) ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
1312
1334
|
)}">${hasLabel && this.floatingLabel ? html`<label id="label" part="form-control-floating-label" class="${cx(
|
|
1313
1335
|
"absolute left-4 z-20 pointer-events-none transition-all duration-200",
|
|
1314
1336
|
!isFloatingLabelActive ? "top-1/2 -translate-y-1/2 text-base" : this.size === "lg" ? "top-2 text-xs" : "top-1 text-xs",
|
|
@@ -1317,7 +1339,10 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1317
1339
|
"leading-none",
|
|
1318
1340
|
(this.visuallyDisabled || this.disabled) && "text-neutral-500",
|
|
1319
1341
|
isFloatingLabelActive && !this.visuallyDisabled && !this.disabled && "form-control--filled__floating-label-color-text"
|
|
1320
|
-
)}">${this.label}</span></label>` : null}</div><sd-6-4-
|
|
1342
|
+
)}">${this.label}</span></label>` : null}</div><sd-6-4-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
1343
|
+
"inline-flex relative w-full",
|
|
1344
|
+
((_b = this.currentPlacement) == null ? void 0 : _b.startsWith("bottom")) ? "origin-top" : "origin-bottom"
|
|
1345
|
+
)}" 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(
|
|
1321
1346
|
"px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",
|
|
1322
1347
|
!this.disabled && !this.readonly && !this.visuallyDisabled ? "hover:bg-neutral-200" : "",
|
|
1323
1348
|
this.readonly ? "bg-neutral-100" : "bg-white",
|
|
@@ -1328,7 +1353,7 @@ var SdDatepicker = class extends SolidElement {
|
|
|
1328
1353
|
{ sm: "h-8", md: "h-10", lg: "h-12" }[this.size],
|
|
1329
1354
|
textSize,
|
|
1330
1355
|
this.floatingLabel && "mt-4"
|
|
1331
|
-
)}" 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}"> ${this.showInvalidStyle ? html`<sd-6-4-
|
|
1356
|
+
)}" 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}"> ${this.showInvalidStyle ? html`<sd-6-4-2-icon part="invalid-icon" class="${cx("text-error", iconMarginLeft, iconSize)}" library="_internal" name="risk"></sd-6-4-2-icon>` : ""} ${this.showValidStyle && this.styleOnValid ? html`<sd-6-4-2-icon class="${cx("text-success flex-shrink-0", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-2-icon>` : ""}<sd-6-4-2-icon class="${cx(iconColor, iconMarginLeft, iconSize, "hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-4-2-icon></div>${this.renderCalendar()}</sd-6-4-2-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-1", hasHelpText ? "block" : "hidden")}" aria-hidden="${!hasHelpText}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`;
|
|
1332
1357
|
}
|
|
1333
1358
|
};
|
|
1334
1359
|
SdDatepicker.styles = [
|
|
@@ -1453,12 +1478,18 @@ __decorateClass([
|
|
|
1453
1478
|
__decorateClass([
|
|
1454
1479
|
state()
|
|
1455
1480
|
], SdDatepicker.prototype, "inputValue", 2);
|
|
1481
|
+
__decorateClass([
|
|
1482
|
+
query("sd-6-4-2-popup")
|
|
1483
|
+
], SdDatepicker.prototype, "popup", 2);
|
|
1456
1484
|
__decorateClass([
|
|
1457
1485
|
query("#invalid-message")
|
|
1458
1486
|
], SdDatepicker.prototype, "invalidMessage", 2);
|
|
1459
1487
|
__decorateClass([
|
|
1460
1488
|
query("#input")
|
|
1461
1489
|
], SdDatepicker.prototype, "input", 2);
|
|
1490
|
+
__decorateClass([
|
|
1491
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
1492
|
+
], SdDatepicker.prototype, "handleOpenChange", 1);
|
|
1462
1493
|
__decorateClass([
|
|
1463
1494
|
watch("locale")
|
|
1464
1495
|
], SdDatepicker.prototype, "handleLocaleChange", 1);
|
|
@@ -1476,7 +1507,7 @@ __decorateClass([
|
|
|
1476
1507
|
watch(["disabled", "visually-disabled"], { waitUntilFirstUpdate: true })
|
|
1477
1508
|
], SdDatepicker.prototype, "handleDisabledChange", 1);
|
|
1478
1509
|
SdDatepicker = __decorateClass([
|
|
1479
|
-
customElement("sd-6-4-
|
|
1510
|
+
customElement("sd-6-4-2-datepicker")
|
|
1480
1511
|
], SdDatepicker);
|
|
1481
1512
|
|
|
1482
1513
|
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-4-
|
|
100
|
+
* e.g. the accessible trigger of an <sd-6-4-2-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-4-
|
|
112
|
-
case "sd-6-4-
|
|
111
|
+
case "sd-6-4-2-button":
|
|
112
|
+
case "sd-6-4-2-icon-button":
|
|
113
113
|
target = accessibleTrigger.button;
|
|
114
114
|
break;
|
|
115
|
-
case "sd-6-4-
|
|
115
|
+
case "sd-6-4-2-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-4-
|
|
139
|
+
return this.panel.assignedElements({ flatten: true }).find((el) => el.tagName.toLowerCase() === "sd-6-4-2-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-4-
|
|
151
|
+
if (this.open && ((_a = document.activeElement) == null ? void 0 : _a.tagName.toLowerCase()) === "sd-6-4-2-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-4-
|
|
177
|
+
if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === "sd-6-4-2-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-4-
|
|
266
|
+
this.panel.addEventListener("sd-6-4-2-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-4-
|
|
274
|
+
this.panel.removeEventListener("sd-6-4-2-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-4-
|
|
307
|
+
return html`<sd-6-4-2-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
310
|
"panel-color-border border shadow bg-white 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-4-
|
|
313
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-6-4-2-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-4-
|
|
367
|
+
customElement("sd-6-4-2-dropdown")
|
|
368
368
|
], SdDropdown);
|
|
369
369
|
setDefaultAnimation("dropdown.show", {
|
|
370
370
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -53,7 +53,7 @@ SdThemeListener.styles = [
|
|
|
53
53
|
:host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`
|
|
54
54
|
];
|
|
55
55
|
SdThemeListener = __decorateClass([
|
|
56
|
-
customElement("sd-6-4-
|
|
56
|
+
customElement("sd-6-4-2-theme-listener")
|
|
57
57
|
], SdThemeListener);
|
|
58
58
|
|
|
59
59
|
export {
|
|
@@ -24,7 +24,7 @@ var SdTab = class extends SolidElement {
|
|
|
24
24
|
constructor() {
|
|
25
25
|
super(...arguments);
|
|
26
26
|
this.attrId = ++id;
|
|
27
|
-
this.componentId = `sd-6-4-
|
|
27
|
+
this.componentId = `sd-6-4-2-tab-${this.attrId}`;
|
|
28
28
|
this.hasSlotController = new HasSlotController(this, "left");
|
|
29
29
|
this.localize = new LocalizeController(this);
|
|
30
30
|
this.variant = "default";
|
|
@@ -73,7 +73,7 @@ var SdTab = class extends SolidElement {
|
|
|
73
73
|
)}"></slot><slot class="${cx(this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-primary")}"></slot>${this.variant === "container" ? html`<div part="active-tab-indicator" class="${cx(
|
|
74
74
|
"absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-[calc(100%-2px)] navigable__current-indicator-height navigable__current-indicator-border-radius"
|
|
75
75
|
)}"></div>` : ""}<div part="hover-bottom-border" class="${cx(
|
|
76
|
-
!this.active && !this.disabled && "absolute bottom-0 left-0 w-full h-0.25 border-b sd-6-4-
|
|
76
|
+
!this.active && !this.disabled && "absolute bottom-0 left-0 w-full h-0.25 border-b sd-6-4-2-tab-color-border"
|
|
77
77
|
)}"></div></div></div>`;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
@@ -110,7 +110,7 @@ __decorateClass([
|
|
|
110
110
|
watch(["disabled", "visually-disabled"])
|
|
111
111
|
], SdTab.prototype, "handleDisabledChange", 1);
|
|
112
112
|
SdTab = __decorateClass([
|
|
113
|
-
customElement("sd-6-4-
|
|
113
|
+
customElement("sd-6-4-2-tab")
|
|
114
114
|
], SdTab);
|
|
115
115
|
|
|
116
116
|
export {
|
|
@@ -26,7 +26,7 @@ var SdCheckboxGroup = class extends SolidElement {
|
|
|
26
26
|
this.helpText = "";
|
|
27
27
|
}
|
|
28
28
|
getAllCheckboxes() {
|
|
29
|
-
return [...this.querySelectorAll("sd-6-4-
|
|
29
|
+
return [...this.querySelectorAll("sd-6-4-2-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-6-4-
|
|
42
|
+
if (customElements.get("sd-6-4-2-checkbox")) {
|
|
43
43
|
this.syncCheckboxElements();
|
|
44
44
|
} else {
|
|
45
|
-
customElements.whenDefined("sd-6-4-
|
|
45
|
+
customElements.whenDefined("sd-6-4-2-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.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
83
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-4-
|
|
83
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-4-2-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-6-4-2-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-6-4-2-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-6-4-2-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-4-2-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-4-2-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 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-6-4-
|
|
104
|
+
customElement("sd-6-4-2-checkbox-group")
|
|
105
105
|
], SdCheckboxGroup);
|
|
106
106
|
|
|
107
107
|
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-4-
|
|
20
|
+
button == null ? void 0 : button.classList.add("sd-6-4-2-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-4-
|
|
24
|
+
button == null ? void 0 : button.classList.remove("sd-6-4-2-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-4-
|
|
28
|
+
button == null ? void 0 : button.classList.add("sd-6-4-2-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-4-
|
|
32
|
+
button == null ? void 0 : button.classList.remove("sd-6-4-2-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-4-
|
|
41
|
-
button.classList.toggle("sd-6-4-
|
|
42
|
-
button.classList.toggle("sd-6-4-
|
|
43
|
-
button.classList.toggle("sd-6-4-
|
|
44
|
-
button.classList.toggle("sd-6-4-
|
|
40
|
+
button.classList.add("sd-6-4-2-button-group__button");
|
|
41
|
+
button.classList.toggle("sd-6-4-2-button-group__button--first", index === 0);
|
|
42
|
+
button.classList.toggle("sd-6-4-2-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
|
|
43
|
+
button.classList.toggle("sd-6-4-2-button-group__button--last", index === slottedElements.length - 1);
|
|
44
|
+
button.classList.toggle("sd-6-4-2-button-group__button--radio", button.tagName.toLowerCase() === "sd-6-4-2-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-4-
|
|
67
|
+
customElement("sd-6-4-2-button-group")
|
|
68
68
|
], SdButtonGroup);
|
|
69
69
|
function findButton(el) {
|
|
70
70
|
var _a;
|
|
71
|
-
const selector = "sd-6-4-
|
|
71
|
+
const selector = "sd-6-4-2-button, sd-6-4-2-radio-button";
|
|
72
72
|
return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -42,9 +42,9 @@ var SdTeaserMedia = class extends SolidElement {
|
|
|
42
42
|
"absolute inset-0",
|
|
43
43
|
{
|
|
44
44
|
white: "bg-white/[.8] group-hover:bg-white/90",
|
|
45
|
-
"neutral-100": "sd-6-4-
|
|
45
|
+
"neutral-100": "sd-6-4-2-teaser-media--neutral-100-color-background group-hover:sd-6-4-2-teaser-media--neutral-100--hover-color-background",
|
|
46
46
|
primary: "bg-primary/[.8] text-white group-hover:bg-primary/90",
|
|
47
|
-
"primary-100": "sd-6-4-
|
|
47
|
+
"primary-100": "sd-6-4-2-teaser-media--primary-100-color-background group-hover:sd-6-4-2-teaser-media--primary-100--hover-color-background",
|
|
48
48
|
"gradient-light": "bg-gradient-to-t from-white/90 to-white/[.8]",
|
|
49
49
|
"gradient-dark": "bg-gradient-to-t from-primary-800/90 to-primary-800/[.8]"
|
|
50
50
|
}[this.variant]
|
|
@@ -69,7 +69,7 @@ __decorateClass([
|
|
|
69
69
|
query('[part="base"]')
|
|
70
70
|
], SdTeaserMedia.prototype, "teaserMedia", 2);
|
|
71
71
|
SdTeaserMedia = __decorateClass([
|
|
72
|
-
customElement("sd-6-4-
|
|
72
|
+
customElement("sd-6-4-2-teaser-media")
|
|
73
73
|
], SdTeaserMedia);
|
|
74
74
|
|
|
75
75
|
export {
|
|
@@ -73,10 +73,10 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
73
73
|
this.formControlController.updateValidity();
|
|
74
74
|
}
|
|
75
75
|
getAllRadios() {
|
|
76
|
-
return [...this.querySelectorAll("sd-6-4-
|
|
76
|
+
return [...this.querySelectorAll("sd-6-4-2-radio, sd-6-4-2-radio-button")];
|
|
77
77
|
}
|
|
78
78
|
handleRadioClick(event) {
|
|
79
|
-
const target = event.target.closest("sd-6-4-
|
|
79
|
+
const target = event.target.closest("sd-6-4-2-radio, sd-6-4-2-radio-button");
|
|
80
80
|
const radios = this.getAllRadios();
|
|
81
81
|
const oldValue = this.value;
|
|
82
82
|
if (target.disabled) {
|
|
@@ -153,7 +153,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
153
153
|
}
|
|
154
154
|
})
|
|
155
155
|
);
|
|
156
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-6-4-
|
|
156
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-6-4-2-radio-button");
|
|
157
157
|
if (!radios.some((radio) => radio.checked)) {
|
|
158
158
|
if (this.hasButtonGroup) {
|
|
159
159
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -165,26 +165,26 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
if (this.hasButtonGroup) {
|
|
168
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-6-4-
|
|
168
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-6-4-2-button-group");
|
|
169
169
|
if (buttonGroup) {
|
|
170
170
|
buttonGroup.disableRole = true;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
syncRadios() {
|
|
175
|
-
if (customElements.get("sd-6-4-
|
|
175
|
+
if (customElements.get("sd-6-4-2-radio") && customElements.get("sd-6-4-2-radio-button")) {
|
|
176
176
|
this.syncRadioElements();
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
if (customElements.get("sd-6-4-
|
|
179
|
+
if (customElements.get("sd-6-4-2-radio")) {
|
|
180
180
|
this.syncRadioElements();
|
|
181
181
|
} else {
|
|
182
|
-
customElements.whenDefined("sd-6-4-
|
|
182
|
+
customElements.whenDefined("sd-6-4-2-radio").then(() => this.syncRadios());
|
|
183
183
|
}
|
|
184
|
-
if (customElements.get("sd-6-4-
|
|
184
|
+
if (customElements.get("sd-6-4-2-radio-button")) {
|
|
185
185
|
this.syncRadioElements();
|
|
186
186
|
} else {
|
|
187
|
-
customElements.whenDefined("sd-6-4-
|
|
187
|
+
customElements.whenDefined("sd-6-4-2-radio-button").then(() => this.syncRadios());
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
updateCheckedRadio() {
|
|
@@ -259,7 +259,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
259
259
|
vertical: "flex-col",
|
|
260
260
|
horizontal: "flex-row"
|
|
261
261
|
}[this.orientation]
|
|
262
|
-
)}"><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-6-4-
|
|
262
|
+
)}"><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-6-4-2-button-group class="border border-primary sd-6-4-2-radio-button-group-border-radius sd-6-4-2-radio-button-group-border-width sd-6-4-2-radio-button-group-padding" part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-6-4-2-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-6-4-2-icon part="invalid-icon" class="${cx("text-error")}" library="_internal" name="risk"></sd-6-4-2-icon>` : ""} ${this.formControlController.renderInvalidMessage(this.size)}</div>`;
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
/**
|
|
@@ -268,7 +268,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
268
268
|
SdRadioGroup.styles = [
|
|
269
269
|
...SolidElement.styles,
|
|
270
270
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
271
|
-
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-4-
|
|
271
|
+
:host{display:block}:host([orientation=vertical]) ::slotted(sd-6-4-2-radio){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-6-4-2-radio:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-6-4-2-radio){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-6-4-2-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-4-2-radio){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-6-4-2-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([required]) #label::after{content:' *'}:host:has(sd-6-4-2-button-group){display:inline-flex}`
|
|
272
272
|
];
|
|
273
273
|
__decorateClass([
|
|
274
274
|
query("slot:not([name])")
|
|
@@ -322,7 +322,7 @@ __decorateClass([
|
|
|
322
322
|
watch("value")
|
|
323
323
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
324
324
|
SdRadioGroup = __decorateClass([
|
|
325
|
-
customElement("sd-6-4-
|
|
325
|
+
customElement("sd-6-4-2-radio-group")
|
|
326
326
|
], SdRadioGroup);
|
|
327
327
|
|
|
328
328
|
export {
|
|
@@ -38,13 +38,13 @@ var SdBreadcrumbItem = class extends SolidElement {
|
|
|
38
38
|
requestAnimationFrame(() => this.handleCurrentChange());
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return html`<sd-6-4-
|
|
41
|
+
return html`<sd-6-4-2-link part="base" href="${ifDefined(!this.current ? this.href : void 0)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-6-4-2-link>`;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
SdBreadcrumbItem.styles = [
|
|
45
45
|
...SolidElement.styles,
|
|
46
46
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
47
|
-
:host{display:inline-flex;align-items:center}sd-6-4-
|
|
47
|
+
:host{display:inline-flex;align-items:center}sd-6-4-2-link::part(base){align-items:center}sd-6-4-2-link::part(icon-left){margin-right:calc(var(--sd-spacing-1) * 0);display:inline-flex}:host([current]) sd-6-4-2-link::part(base){color:rgba(var(--sd-color-text-neutral-700))}:host([current]) sd-6-4-2-link::part(label){text-decoration-line:none}`
|
|
48
48
|
];
|
|
49
49
|
__decorateClass([
|
|
50
50
|
query('[part="base"]')
|
|
@@ -62,7 +62,7 @@ __decorateClass([
|
|
|
62
62
|
watch("current")
|
|
63
63
|
], SdBreadcrumbItem.prototype, "handleCurrentChange", 1);
|
|
64
64
|
SdBreadcrumbItem = __decorateClass([
|
|
65
|
-
customElement("sd-6-4-
|
|
65
|
+
customElement("sd-6-4-2-breadcrumb-item")
|
|
66
66
|
], SdBreadcrumbItem);
|
|
67
67
|
|
|
68
68
|
export {
|