@solid-design-system/components 6.2.1 → 6.3.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.QJ2LWN24.js → chunk.PDHMAKVQ.js} +2 -2
- package/cdn/chunks/chunk.Q6GEIXGA.js +2 -0
- package/cdn/chunks/chunk.TWNEU4H4.js +4 -0
- package/cdn/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/menu/menu.d.ts +2 -0
- package/cdn/components/menu/menu.js +1 -1
- package/cdn/components/menu-item/menu-item.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.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.DC6UQXYF.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.HYUIC2O6.js +2 -2
- package/cdn-versioned/chunks/chunk.I234MSSB.js +2 -2
- package/cdn-versioned/chunks/chunk.I3TTTGLW.js +1 -1
- 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.QJ2LWN24.js → 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 -0
- 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 +4 -0
- 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.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/breadcrumb.js +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.js +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 +3 -1
- package/cdn-versioned/components/menu/menu.js +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.js +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 +244 -244
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +80 -80
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +80 -80
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +94 -94
- package/cdn-versioned/web-types.json +157 -157
- package/dist/chunks/{chunk.N3I674PE.js → chunk.D4UC3BVQ.js} +8 -1
- package/dist/chunks/{chunk.TKDFONFB.js → chunk.SVYFJMYF.js} +17 -1
- package/dist/chunks/{chunk.DZEAXPRA.js → chunk.TUMONDN4.js} +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/dropdown/dropdown.js +1 -1
- package/dist/components/menu/menu.d.ts +2 -0
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/menu-item/menu-item.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +3 -3
- package/dist/web-types.json +1 -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.N3I674PE.js → chunk.D4UC3BVQ.js} +20 -13
- 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.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.NW7LJJS2.js +8 -8
- 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.QM4E25CD.js +5 -5
- 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.TKDFONFB.js → chunk.SVYFJMYF.js} +20 -4
- package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
- package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
- package/dist-versioned/chunks/{chunk.DZEAXPRA.js → 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/breadcrumb.js +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +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 +3 -1
- package/dist-versioned/components/menu/menu.js +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.js +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 +244 -244
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +3 -3
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +157 -157
- package/package.json +2 -2
- package/cdn/chunks/chunk.H7S7D4YV.js +0 -2
- package/cdn/chunks/chunk.RKKB23ZF.js +0 -4
- package/cdn-versioned/chunks/chunk.H7S7D4YV.js +0 -2
- package/cdn-versioned/chunks/chunk.RKKB23ZF.js +0 -4
|
@@ -181,6 +181,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
181
181
|
}
|
|
182
182
|
handleTriggerClick() {
|
|
183
183
|
if (this.open) {
|
|
184
|
+
const menu = this.getMenu();
|
|
185
|
+
if (menu) {
|
|
186
|
+
const current = menu.getCurrentItem();
|
|
187
|
+
current == null ? void 0 : current.classList.remove("menu-item-focus");
|
|
188
|
+
}
|
|
184
189
|
this.hide();
|
|
185
190
|
} else {
|
|
186
191
|
this.show();
|
|
@@ -190,7 +195,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
190
195
|
if (event.key === "Escape" && this.open) {
|
|
191
196
|
event.stopPropagation();
|
|
192
197
|
this.focusOnTrigger();
|
|
193
|
-
this.
|
|
198
|
+
this.handleTriggerClick();
|
|
194
199
|
return;
|
|
195
200
|
}
|
|
196
201
|
if ([" ", "Enter"].includes(event.key)) {
|
|
@@ -213,10 +218,12 @@ var SdDropdown = class extends SolidElement {
|
|
|
213
218
|
if (event.key === "ArrowDown" || event.key === "Home") {
|
|
214
219
|
menu.setCurrentItem(firstMenuItem);
|
|
215
220
|
firstMenuItem.focus();
|
|
221
|
+
firstMenuItem.classList.add("menu-item-focus");
|
|
216
222
|
}
|
|
217
223
|
if (event.key === "ArrowUp" || event.key === "End") {
|
|
218
224
|
menu.setCurrentItem(lastMenuItem);
|
|
219
225
|
lastMenuItem.focus();
|
|
226
|
+
lastMenuItem.classList.add("menu-item-focus");
|
|
220
227
|
}
|
|
221
228
|
});
|
|
222
229
|
}
|
|
@@ -16,10 +16,20 @@ var SdMenu = class extends SolidElement {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.localize = new LocalizeController(this);
|
|
19
|
+
this.handleOutsideClick = (event) => {
|
|
20
|
+
if (!this.contains(event.target)) {
|
|
21
|
+
this.getAllItems().forEach((item) => item.classList.remove("menu-item-focus"));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
25
|
connectedCallback() {
|
|
21
26
|
super.connectedCallback();
|
|
22
27
|
this.setAttribute("role", "menu");
|
|
28
|
+
document.addEventListener("click", this.handleOutsideClick);
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
super.disconnectedCallback();
|
|
32
|
+
document.removeEventListener("click", this.handleOutsideClick);
|
|
23
33
|
}
|
|
24
34
|
handleClick(event) {
|
|
25
35
|
const menuItemTypes = ["menuitem", "menuitemcheckbox"];
|
|
@@ -42,15 +52,20 @@ var SdMenu = class extends SolidElement {
|
|
|
42
52
|
this.emit("sd-select", { detail: { item } });
|
|
43
53
|
}
|
|
44
54
|
handleKeyDown(event) {
|
|
45
|
-
if (event.key === "
|
|
55
|
+
if (event.key === "Escape") {
|
|
56
|
+
const item = this.getCurrentItem();
|
|
57
|
+
item == null ? void 0 : item.classList.remove("menu-item-focus");
|
|
58
|
+
} else if (event.key === "Enter" || event.key === " ") {
|
|
46
59
|
const item = this.getCurrentItem();
|
|
47
60
|
event.preventDefault();
|
|
48
61
|
event.stopPropagation();
|
|
62
|
+
item == null ? void 0 : item.classList.remove("menu-item-focus");
|
|
49
63
|
item == null ? void 0 : item.click();
|
|
50
64
|
} else if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
|
|
51
65
|
const items = this.getAllItems();
|
|
52
66
|
const activeItem = this.getCurrentItem();
|
|
53
67
|
let index = activeItem ? items.indexOf(activeItem) : 0;
|
|
68
|
+
activeItem == null ? void 0 : activeItem.classList.remove("menu-item-focus");
|
|
54
69
|
if (items.length > 0) {
|
|
55
70
|
event.preventDefault();
|
|
56
71
|
event.stopPropagation();
|
|
@@ -80,6 +95,7 @@ var SdMenu = class extends SolidElement {
|
|
|
80
95
|
}
|
|
81
96
|
this.setCurrentItem(items[index]);
|
|
82
97
|
items[index].focus();
|
|
98
|
+
items[index].classList.add("menu-item-focus");
|
|
83
99
|
}
|
|
84
100
|
}
|
|
85
101
|
}
|
|
@@ -113,7 +113,7 @@ var SdMenuItem = class extends SolidElement {
|
|
|
113
113
|
SdMenuItem.styles = [
|
|
114
114
|
...SolidElement.styles,
|
|
115
115
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
116
|
-
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:rgba(var(--outline-color-primary));outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}:host [part=checked-icon],:host [part=icon-indent],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon))}:host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`
|
|
116
|
+
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:rgba(var(--outline-color-primary));outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:rgba(var(--outline-color-primary));outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}:host [part=checked-icon],:host [part=icon-indent],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon))}:host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`
|
|
117
117
|
];
|
|
118
118
|
__decorateClass([
|
|
119
119
|
query("slot:not([name])")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdBreadcrumb
|
|
3
3
|
} from "../../chunks/chunk.XALPLS2Y.js";
|
|
4
|
-
import "../../chunks/chunk.
|
|
4
|
+
import "../../chunks/chunk.D4UC3BVQ.js";
|
|
5
5
|
import "../../chunks/chunk.P5FGSFP3.js";
|
|
6
6
|
import "../../chunks/chunk.UMIKFOMI.js";
|
|
7
7
|
import "../../chunks/chunk.WDWV53JP.js";
|
|
@@ -5,6 +5,8 @@ export default class SdMenu extends SolidElement {
|
|
|
5
5
|
localize: LocalizeController;
|
|
6
6
|
defaultSlot: HTMLSlotElement;
|
|
7
7
|
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
private handleOutsideClick;
|
|
8
10
|
private handleClick;
|
|
9
11
|
private handleKeyDown;
|
|
10
12
|
private handleMouseDown;
|
|
@@ -22493,7 +22493,7 @@
|
|
|
22493
22493
|
"package": {
|
|
22494
22494
|
"name": "@solid-design-system/components",
|
|
22495
22495
|
"description": "Solid Design System: Components",
|
|
22496
|
-
"version": "6.
|
|
22496
|
+
"version": "6.3.0",
|
|
22497
22497
|
"author": "Union Investment",
|
|
22498
22498
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
22499
22499
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -86,10 +86,10 @@ import {
|
|
|
86
86
|
} from "./chunks/chunk.UPCVQSXM.js";
|
|
87
87
|
import {
|
|
88
88
|
SdMenu
|
|
89
|
-
} from "./chunks/chunk.
|
|
89
|
+
} from "./chunks/chunk.SVYFJMYF.js";
|
|
90
90
|
import {
|
|
91
91
|
SdMenuItem
|
|
92
|
-
} from "./chunks/chunk.
|
|
92
|
+
} from "./chunks/chunk.TUMONDN4.js";
|
|
93
93
|
import "./chunks/chunk.KEJFWGZI.js";
|
|
94
94
|
import {
|
|
95
95
|
SdNavigationItem
|
|
@@ -142,7 +142,7 @@ import {
|
|
|
142
142
|
} from "./chunks/chunk.XALPLS2Y.js";
|
|
143
143
|
import {
|
|
144
144
|
SdDropdown
|
|
145
|
-
} from "./chunks/chunk.
|
|
145
|
+
} from "./chunks/chunk.D4UC3BVQ.js";
|
|
146
146
|
import {
|
|
147
147
|
SdPopup
|
|
148
148
|
} from "./chunks/chunk.P5FGSFP3.js";
|
package/dist/web-types.json
CHANGED
|
@@ -84,7 +84,7 @@ var SdLink = class extends SolidElement {
|
|
|
84
84
|
SdLink.styles = [
|
|
85
85
|
...SolidElement.styles,
|
|
86
86
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
87
|
-
::slotted(sd-6-
|
|
87
|
+
::slotted(sd-6-3-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-6-3-0-icon){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-6-3-0-icon){font-size:var(--sd-text-xl);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-6-
|
|
114
|
+
customElement("sd-6-3-0-link")
|
|
115
115
|
], SdLink);
|
|
116
116
|
|
|
117
117
|
export {
|
|
@@ -60,10 +60,10 @@ var SdTeaser = class extends SolidElement {
|
|
|
60
60
|
"flex",
|
|
61
61
|
{
|
|
62
62
|
white: "bg-white",
|
|
63
|
-
"white border-neutral-400": "bg-white border sd-6-
|
|
64
|
-
"neutral-100": "sd-6-
|
|
63
|
+
"white border-neutral-400": "bg-white border sd-6-3-0-teaser--neutral-400-color-border",
|
|
64
|
+
"neutral-100": "sd-6-3-0-teaser--neutral-100-color-background",
|
|
65
65
|
primary: "bg-primary text-white",
|
|
66
|
-
"primary-100": "sd-6-
|
|
66
|
+
"primary-100": "sd-6-3-0-teaser--primary-100-color-background"
|
|
67
67
|
}[this.variant],
|
|
68
68
|
this._orientation === "vertical" && "flex-col",
|
|
69
69
|
this._orientation === "horizontal" && "flex-row gap-8",
|
|
@@ -105,7 +105,7 @@ __decorateClass([
|
|
|
105
105
|
state()
|
|
106
106
|
], SdTeaser.prototype, "_orientation", 2);
|
|
107
107
|
SdTeaser = __decorateClass([
|
|
108
|
-
customElement("sd-6-
|
|
108
|
+
customElement("sd-6-3-0-teaser")
|
|
109
109
|
], SdTeaser);
|
|
110
110
|
|
|
111
111
|
export {
|
|
@@ -78,7 +78,7 @@ var SdRange = class extends SolidElement {
|
|
|
78
78
|
var _a, _b;
|
|
79
79
|
const tooltip = thumb.parentElement;
|
|
80
80
|
await tooltip.updateComplete;
|
|
81
|
-
(_b = (_a = tooltip.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-
|
|
81
|
+
(_b = (_a = tooltip.shadowRoot) == null ? void 0 : _a.querySelector("sd-6-3-0-popup")) == null ? void 0 : _b.setAttribute("distance", "14");
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
willUpdate(changedProperties) {
|
|
@@ -411,10 +411,10 @@ var SdRange = class extends SolidElement {
|
|
|
411
411
|
ariaLabel = this.tooltipFormatter(value);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
return html`<sd-6-
|
|
414
|
+
return html`<sd-6-3-0-tooltip hoist trigger="${this.tooltip === "on-interaction" ? "focus" : "manual"}" disabled="${ifDefined(this.disabled || this.visuallyDisabled || this.tooltip === "hidden" ? true : void 0)}"><div id="${id}" part="thumb" role="slider" tabindex="${this.disabled || this.visuallyDisabled ? -1 : 0}" aria-disabled="${ifDefined(this.disabled || this.visuallyDisabled ? "true" : void 0)}" aria-labelledby="${ariaLabeledBy}" aria-label="${ariaLabel}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${value}" aria-valuetext="${this.tooltipFormatter(value)}" data-range-id="${rangeId}" data-disabled="${ifDefined(this.disabled || this.visuallyDisabled || void 0)}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${cx(
|
|
415
415
|
"rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",
|
|
416
416
|
this.disabled || this.visuallyDisabled ? "outline-none" : "cursor-pointer focus-visible:focus-outline"
|
|
417
|
-
)}"></div></sd-6-
|
|
417
|
+
)}"></div></sd-6-3-0-tooltip>`;
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
render() {
|
|
@@ -484,7 +484,7 @@ __decorateClass([
|
|
|
484
484
|
property({ type: String })
|
|
485
485
|
], SdRange.prototype, "value", 1);
|
|
486
486
|
SdRange = __decorateClass([
|
|
487
|
-
customElement("sd-6-
|
|
487
|
+
customElement("sd-6-3-0-range")
|
|
488
488
|
], SdRange);
|
|
489
489
|
|
|
490
490
|
export {
|
|
@@ -54,7 +54,7 @@ var SdHeader = class extends SolidElement {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return html`<header class="w-full sd-6-
|
|
57
|
+
return html`<header class="w-full sd-6-3-0-header-color-background relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`;
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
SdHeader.styles = [
|
|
@@ -72,7 +72,7 @@ __decorateClass([
|
|
|
72
72
|
debounce(100)
|
|
73
73
|
], SdHeader.prototype, "updateCalculatedHeight", 1);
|
|
74
74
|
SdHeader = __decorateClass([
|
|
75
|
-
customElement("sd-6-
|
|
75
|
+
customElement("sd-6-3-0-header")
|
|
76
76
|
], SdHeader);
|
|
77
77
|
|
|
78
78
|
export {
|
|
@@ -55,7 +55,7 @@ var SdStepGroup = class extends SolidElement {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
getAllSteps() {
|
|
58
|
-
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-6-
|
|
58
|
+
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-6-3-0-step");
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Sets the active step.
|
|
@@ -121,7 +121,7 @@ __decorateClass([
|
|
|
121
121
|
watch("notInteractive")
|
|
122
122
|
], SdStepGroup.prototype, "handleInteractivityChange", 1);
|
|
123
123
|
SdStepGroup = __decorateClass([
|
|
124
|
-
customElement("sd-6-
|
|
124
|
+
customElement("sd-6-3-0-step-group")
|
|
125
125
|
], SdStepGroup);
|
|
126
126
|
|
|
127
127
|
export {
|
|
@@ -221,7 +221,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
221
221
|
textareaState === "disabled" || textareaState === "visuallyDisabled" ? "text-neutral-500" : "form-control-color-text",
|
|
222
222
|
["invalid", "activeInvalid"].includes(textareaState) && "form-control--invalid-color-background"
|
|
223
223
|
)}"><textarea part="textarea" id="input" class="${cx(
|
|
224
|
-
"ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-
|
|
224
|
+
"ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-3-0-icon]:pe-8",
|
|
225
225
|
{
|
|
226
226
|
sm: this.floatingLabel ? "pb-1" : "py-1",
|
|
227
227
|
md: this.floatingLabel ? "pb-1" : "py-1",
|
|
@@ -229,7 +229,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
229
229
|
}[this.size],
|
|
230
230
|
this.disabled && "cursor-not-allowed",
|
|
231
231
|
textSize
|
|
232
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel || isFloatingLabelActive ? ifDefined(this.placeholder) : ""}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-6-
|
|
232
|
+
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel || isFloatingLabelActive ? ifDefined(this.placeholder) : ""}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-6-3-0-icon class="${cx("text-error absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="risk" part="invalid-icon"></sd-6-3-0-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-6-3-0-icon class="${cx("text-success absolute right-4 pointer-events-none", iconSize)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-3-0-icon>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-1", hasHelpText && !this.showInvalidStyle ? "block" : "hidden")}" aria-hidden="${!hasHelpText || this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`;
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
235
|
/**
|
|
@@ -347,7 +347,7 @@ __decorateClass([
|
|
|
347
347
|
watch("value", { waitUntilFirstUpdate: true })
|
|
348
348
|
], SdTextarea.prototype, "handleValueChange", 1);
|
|
349
349
|
SdTextarea = __decorateClass([
|
|
350
|
-
customElement("sd-6-
|
|
350
|
+
customElement("sd-6-3-0-textarea")
|
|
351
351
|
], SdTextarea);
|
|
352
352
|
|
|
353
353
|
export {
|
|
@@ -54,7 +54,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
54
54
|
constructor() {
|
|
55
55
|
super(...arguments);
|
|
56
56
|
this.formControlController = new FormControlController(this, {
|
|
57
|
-
assumeInteractionOn: ["sd-blur", "sd-6-
|
|
57
|
+
assumeInteractionOn: ["sd-blur", "sd-6-3-0-input"]
|
|
58
58
|
});
|
|
59
59
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
60
60
|
this.localize = new LocalizeController(this);
|
|
@@ -98,11 +98,11 @@ var SdCombobox = class extends SolidElement {
|
|
|
98
98
|
return normalizedOption.includes(normalizedQuery) || normalizedOptionLabel.includes(normalizedQuery);
|
|
99
99
|
};
|
|
100
100
|
this.getTag = (option) => {
|
|
101
|
-
return html`<sd-6-
|
|
101
|
+
return html`<sd-6-3-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
102
102
|
base:tag__base,
|
|
103
103
|
content:tag__content,
|
|
104
104
|
removable-indicator:tag__removable-indicator,
|
|
105
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-6-
|
|
105
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-6-3-0-tag>`;
|
|
106
106
|
};
|
|
107
107
|
this.handleDocumentFocusIn = (event) => {
|
|
108
108
|
const path = event.composedPath();
|
|
@@ -237,9 +237,9 @@ var SdCombobox = class extends SolidElement {
|
|
|
237
237
|
return html`${typeof optionHtml === "string" ? unsafeHTML(optionHtml) : optionHtml}`;
|
|
238
238
|
};
|
|
239
239
|
return this.filteredOptions.map((item) => {
|
|
240
|
-
if (item.tagName.toLowerCase() === "sd-6-
|
|
240
|
+
if (item.tagName.toLowerCase() === "sd-6-3-0-optgroup") {
|
|
241
241
|
Array.from(item.children).forEach((option) => {
|
|
242
|
-
if (option.tagName.toLowerCase() === "sd-6-
|
|
242
|
+
if (option.tagName.toLowerCase() === "sd-6-3-0-option") {
|
|
243
243
|
renderOption(option);
|
|
244
244
|
}
|
|
245
245
|
});
|
|
@@ -259,11 +259,11 @@ var SdCombobox = class extends SolidElement {
|
|
|
259
259
|
});
|
|
260
260
|
} else {
|
|
261
261
|
return [
|
|
262
|
-
html`<sd-6-
|
|
262
|
+
html`<sd-6-3-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
263
263
|
base:tag__base,
|
|
264
264
|
content:tag__content,
|
|
265
265
|
removable-indicator:tag__removable-indicator,
|
|
266
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-
|
|
266
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-3-0-tag>`
|
|
267
267
|
];
|
|
268
268
|
}
|
|
269
269
|
}
|
|
@@ -382,7 +382,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
382
382
|
}
|
|
383
383
|
handleOptionClick(event) {
|
|
384
384
|
const target = event.target;
|
|
385
|
-
const option = target.closest("sd-6-
|
|
385
|
+
const option = target.closest("sd-6-3-0-option");
|
|
386
386
|
const oldValue = this.value;
|
|
387
387
|
if (option && !option.disabled) {
|
|
388
388
|
if (this.multiple) {
|
|
@@ -434,7 +434,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
434
434
|
scrollIntoView(this.getCurrentOption(), this.listbox, "vertical", "auto");
|
|
435
435
|
}
|
|
436
436
|
getAllFilteredOptions() {
|
|
437
|
-
return [...this.filteredWrapper.querySelectorAll("sd-6-
|
|
437
|
+
return [...this.filteredWrapper.querySelectorAll("sd-6-3-0-option")];
|
|
438
438
|
}
|
|
439
439
|
getCurrentOption() {
|
|
440
440
|
return this.getAllFilteredOptions().find((option) => option.current);
|
|
@@ -564,7 +564,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
564
564
|
clonedOption.selected = option.selected;
|
|
565
565
|
clonedOption.checkbox = option.checkbox;
|
|
566
566
|
clonedOption.size = option.size;
|
|
567
|
-
const hasOptgroup = ((_b = option.parentElement) == null ? void 0 : _b.tagName.toLowerCase()) === "sd-6-
|
|
567
|
+
const hasOptgroup = ((_b = option.parentElement) == null ? void 0 : _b.tagName.toLowerCase()) === "sd-6-3-0-optgroup";
|
|
568
568
|
if (!hasOptgroup) {
|
|
569
569
|
return clonedOption;
|
|
570
570
|
}
|
|
@@ -588,7 +588,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
588
588
|
this.formControlController.emitInvalidEvent(event);
|
|
589
589
|
this.invalidMessage.textContent = event.target.validationMessage;
|
|
590
590
|
}
|
|
591
|
-
/** Receives incoming event detail from sd-6-
|
|
591
|
+
/** Receives incoming event detail from sd-6-3-0-popup and updates local state for conditional styling. */
|
|
592
592
|
handleCurrentPlacement(e) {
|
|
593
593
|
const incomingPlacement = e.detail;
|
|
594
594
|
if (incomingPlacement) {
|
|
@@ -600,7 +600,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
600
600
|
}
|
|
601
601
|
handleUseTagsChange() {
|
|
602
602
|
const allOptions = this.getAllFilteredOptions();
|
|
603
|
-
if (customElements.get("sd-6-
|
|
603
|
+
if (customElements.get("sd-6-3-0-option")) {
|
|
604
604
|
allOptions.forEach((option) => {
|
|
605
605
|
option.checkbox = this.multiple;
|
|
606
606
|
});
|
|
@@ -726,8 +726,8 @@ var SdCombobox = class extends SolidElement {
|
|
|
726
726
|
return filterOnlyOptgroups(getAssignedElementsForSlot(this.defaultSlot));
|
|
727
727
|
}
|
|
728
728
|
async handleDefaultSlotChange() {
|
|
729
|
-
if (!customElements.get("sd-6-
|
|
730
|
-
customElements.whenDefined("sd-6-
|
|
729
|
+
if (!customElements.get("sd-6-3-0-option")) {
|
|
730
|
+
customElements.whenDefined("sd-6-3-0-option").then(() => this.handleDefaultSlotChange());
|
|
731
731
|
return;
|
|
732
732
|
}
|
|
733
733
|
const slottedOptions = this.getSlottedOptions();
|
|
@@ -739,10 +739,10 @@ var SdCombobox = class extends SolidElement {
|
|
|
739
739
|
if (this.multiple) {
|
|
740
740
|
option.checkbox = true;
|
|
741
741
|
}
|
|
742
|
-
option.id = option.id || `sd-6-
|
|
742
|
+
option.id = option.id || `sd-6-3-0-combobox-option-${index}`;
|
|
743
743
|
});
|
|
744
744
|
slottedOptgroups.forEach((optgroup, index) => {
|
|
745
|
-
optgroup.id = optgroup.id || `sd-6-
|
|
745
|
+
optgroup.id = optgroup.id || `sd-6-3-0-combobox-optgroup-${index}`;
|
|
746
746
|
});
|
|
747
747
|
await this.syncSelectedOptionsAndValue();
|
|
748
748
|
if (this.multiple) {
|
|
@@ -804,7 +804,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
804
804
|
default: "form-control-color-border"
|
|
805
805
|
}[selectState],
|
|
806
806
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
807
|
-
)}"></div><sd-6-
|
|
807
|
+
)}"></div><sd-6-3-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
808
808
|
"inline-flex relative w-full",
|
|
809
809
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
810
810
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -830,27 +830,27 @@ var SdCombobox = class extends SolidElement {
|
|
|
830
830
|
"flex justify-center",
|
|
831
831
|
iconMarginLeft,
|
|
832
832
|
this.value.length > 0 ? "visible" : "invisible"
|
|
833
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-
|
|
833
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-3-0-icon class="${cx("text-neutral-700", iconSize)}" name="closing-round" library="_internal"></sd-6-3-0-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-6-3-0-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="_internal" name="risk"></sd-6-3-0-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-6-3-0-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle"></sd-6-3-0-icon>` : ""}<slot name="right" part="right" class="${cx(
|
|
834
834
|
"inline-flex ml-2 leading-[0]",
|
|
835
835
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-primary",
|
|
836
836
|
iconSize
|
|
837
|
-
)}">${this.type !== "search" ? html`<sd-6-
|
|
837
|
+
)}">${this.type !== "search" ? html`<sd-6-3-0-icon class="${cx(
|
|
838
838
|
"transition-transform duration-medium ease-in-out",
|
|
839
839
|
this.open ? "rotate-180" : "rotate-0"
|
|
840
|
-
)}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-
|
|
840
|
+
)}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-3-0-icon>` : ""}</slot>${this.type === "search" ? html`<button class="${cx("flex items-center sd-interactive", iconMarginLeft)}" type="button"><sd-6-3-0-icon class="${cx(iconColor, iconSize)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-3-0-icon></button>` : html`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${ifDefined(!this.multiple ? "listbox" : void 0)}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${cx(
|
|
841
841
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
842
842
|
this.open && "shadow transition-shadow duration-medium ease-in-out",
|
|
843
843
|
this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default"
|
|
844
|
-
)}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length === 0 ? html`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>` : this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-6-
|
|
844
|
+
)}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length === 0 ? html`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>` : this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-6-3-0-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)}`;
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
847
|
SdCombobox.styles = [
|
|
848
848
|
...SolidElement.styles,
|
|
849
849
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
850
|
-
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-
|
|
850
|
+
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-6-3-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-3-0-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-3-0-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-3-0-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-3-0-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-6-3-0-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`
|
|
851
851
|
];
|
|
852
852
|
__decorateClass([
|
|
853
|
-
query("sd-6-
|
|
853
|
+
query("sd-6-3-0-popup")
|
|
854
854
|
], SdCombobox.prototype, "popup", 2);
|
|
855
855
|
__decorateClass([
|
|
856
856
|
query('[part="combobox"]')
|
|
@@ -1011,7 +1011,7 @@ __decorateClass([
|
|
|
1011
1011
|
watch("open", { waitUntilFirstUpdate: true })
|
|
1012
1012
|
], SdCombobox.prototype, "handleOpenChange", 1);
|
|
1013
1013
|
SdCombobox = __decorateClass([
|
|
1014
|
-
customElement("sd-6-
|
|
1014
|
+
customElement("sd-6-3-0-combobox")
|
|
1015
1015
|
], SdCombobox);
|
|
1016
1016
|
setDefaultAnimation("combobox.show", {
|
|
1017
1017
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -115,14 +115,14 @@ var SdSwitch = class extends SolidElement {
|
|
|
115
115
|
`relative flex flex-initial items-center justify-center border 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 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-6-
|
|
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-6-3-0-switch--checked--hover-color-background bg-accent hover:border-accent-550 group-hover:sd-6-3-0-switch--checked--hover-color-background" : "sd-6-3-0-switch--unchecked-color-border bg-white hover:bg-neutral-200 group-hover:bg-neutral-200"
|
|
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-6-
|
|
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-6-3-0-switch--unchecked__icon-color-background"
|
|
122
122
|
)}"></span> </span><span part="label" id="label" class="${cx(
|
|
123
123
|
"select-none inline-block ml-2",
|
|
124
|
-
this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "sd-6-
|
|
125
|
-
)}"><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-6-
|
|
124
|
+
this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "sd-6-3-0-switch-color-text"
|
|
125
|
+
)}"><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-6-3-0-icon part="invalid-icon" class="${cx("text-error")}" library="_internal" name="risk"></sd-6-3-0-icon>` : ""} ${this.formControlController.renderInvalidMessage("lg")}</div>`;
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
@@ -173,7 +173,7 @@ __decorateClass([
|
|
|
173
173
|
watch(["checked"], { waitUntilFirstUpdate: true })
|
|
174
174
|
], SdSwitch.prototype, "handleStateChange", 1);
|
|
175
175
|
SdSwitch = __decorateClass([
|
|
176
|
-
customElement("sd-6-
|
|
176
|
+
customElement("sd-6-3-0-switch")
|
|
177
177
|
], SdSwitch);
|
|
178
178
|
|
|
179
179
|
export {
|