@solid-design-system/components 6.7.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/chunk.3G2JTYRD.js +2 -0
- package/cdn/components/range/range.d.ts +6 -0
- package/cdn/components/range/range.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +25 -25
- package/cdn/solid-components.iife.js +29 -29
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.3G2JTYRD.js +2 -0
- package/cdn-versioned/chunks/chunk.3GKNX2TO.js +3 -3
- package/cdn-versioned/chunks/chunk.4CHW5IDN.js +2 -2
- package/cdn-versioned/chunks/chunk.4KRNPHHH.js +2 -2
- package/cdn-versioned/chunks/chunk.5I4NSTZK.js +2 -2
- package/cdn-versioned/chunks/chunk.5QEBITWI.js +2 -2
- package/cdn-versioned/chunks/chunk.5ZY4FRPG.js +2 -2
- package/cdn-versioned/chunks/chunk.6MYDGBJD.js +2 -2
- package/cdn-versioned/chunks/chunk.7HAKRUIU.js +1 -1
- package/cdn-versioned/chunks/chunk.7JM7OSND.js +1 -1
- package/cdn-versioned/chunks/chunk.7JU65HUG.js +2 -2
- package/cdn-versioned/chunks/chunk.7NQHT75O.js +2 -2
- package/cdn-versioned/chunks/chunk.7NVWBDY2.js +1 -1
- package/cdn-versioned/chunks/chunk.A62VHDIL.js +2 -2
- package/cdn-versioned/chunks/chunk.AC25BNNG.js +2 -2
- package/cdn-versioned/chunks/chunk.AHB36YEA.js +2 -2
- package/cdn-versioned/chunks/chunk.AXNMKWZO.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.CMXQRUFT.js +1 -1
- package/cdn-versioned/chunks/chunk.DFJ6FD7J.js +2 -2
- package/cdn-versioned/chunks/chunk.DZHWN7RR.js +2 -2
- package/cdn-versioned/chunks/chunk.EENTRXWD.js +2 -2
- package/cdn-versioned/chunks/chunk.GZBVPA7S.js +2 -2
- package/cdn-versioned/chunks/chunk.HXNGWXXV.js +5 -5
- package/cdn-versioned/chunks/chunk.JKUZ7I52.js +2 -2
- package/cdn-versioned/chunks/chunk.JMTPGFJB.js +1 -1
- package/cdn-versioned/chunks/chunk.K3YVYEAO.js +2 -2
- package/cdn-versioned/chunks/chunk.KUNV4ZC6.js +2 -2
- package/cdn-versioned/chunks/chunk.LCB6IWY2.js +2 -2
- package/cdn-versioned/chunks/chunk.LPKXOADQ.js +2 -2
- package/cdn-versioned/chunks/chunk.LQCY4Q4V.js +2 -2
- package/cdn-versioned/chunks/chunk.LS2NAENW.js +1 -1
- package/cdn-versioned/chunks/chunk.MB7AGGLX.js +2 -2
- package/cdn-versioned/chunks/chunk.N6MWNUFJ.js +2 -2
- package/cdn-versioned/chunks/chunk.N6YWZXZL.js +1 -1
- package/cdn-versioned/chunks/chunk.NOEVVOED.js +2 -2
- package/cdn-versioned/chunks/chunk.NQFJN2CW.js +1 -1
- package/cdn-versioned/chunks/chunk.NTUMACZ6.js +9 -9
- package/cdn-versioned/chunks/chunk.NZ66E5AS.js +2 -2
- package/cdn-versioned/chunks/chunk.O2JYWK2X.js +2 -2
- package/cdn-versioned/chunks/chunk.OGH2CT55.js +2 -2
- package/cdn-versioned/chunks/chunk.PE5TZWM3.js +2 -2
- package/cdn-versioned/chunks/chunk.QFIY7MLK.js +2 -2
- package/cdn-versioned/chunks/chunk.QGV3BXCE.js +2 -2
- package/cdn-versioned/chunks/chunk.QLW3GMT7.js +2 -2
- package/cdn-versioned/chunks/chunk.QVVATD5X.js +1 -1
- package/cdn-versioned/chunks/chunk.R4ZOSKCW.js +2 -2
- package/cdn-versioned/chunks/chunk.R5D5IAKJ.js +1 -1
- package/cdn-versioned/chunks/chunk.REKTRG7S.js +2 -2
- package/cdn-versioned/chunks/chunk.RXJ46J4Q.js +2 -2
- package/cdn-versioned/chunks/chunk.S7ONP6BO.js +1 -1
- package/cdn-versioned/chunks/chunk.TZPXBIUB.js +2 -2
- package/cdn-versioned/chunks/chunk.UDRTTV56.js +5 -5
- package/cdn-versioned/chunks/chunk.UFCNOC3N.js +3 -3
- package/cdn-versioned/chunks/chunk.UJL7MHVM.js +2 -2
- package/cdn-versioned/chunks/chunk.UOLF3Z2F.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.XDXK4RJJ.js +2 -2
- package/cdn-versioned/chunks/chunk.XGRIXEAE.js +2 -2
- package/cdn-versioned/chunks/chunk.XNIBBYE6.js +2 -2
- package/cdn-versioned/chunks/chunk.XVE3HUDP.js +2 -2
- package/cdn-versioned/chunks/chunk.ZO3H5C7X.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +7 -1
- package/cdn-versioned/components/range/range.js +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 +85 -85
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +85 -85
- 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-versioned/chunks/chunk.TGZE77AF.js → dist/chunks/chunk.7UUYNJS5.js} +39 -6
- package/dist/components/range/range.d.ts +6 -0
- package/dist/components/range/range.js +13 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +4 -4
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.34FNDYY2.js +2 -2
- package/dist-versioned/chunks/chunk.35O2UVGB.js +1 -1
- package/dist-versioned/chunks/chunk.36PZ2ZYY.js +7 -7
- package/dist-versioned/chunks/chunk.37TQP26W.js +1 -1
- package/dist-versioned/chunks/chunk.3JA6XC66.js +5 -5
- package/dist-versioned/chunks/chunk.46HLMURY.js +4 -4
- package/dist-versioned/chunks/chunk.66BLBC6H.js +24 -24
- package/dist-versioned/chunks/chunk.6OQST4MV.js +10 -10
- package/dist-versioned/chunks/chunk.7TNM3KIX.js +2 -2
- package/{dist/chunks/chunk.TGZE77AF.js → dist-versioned/chunks/chunk.7UUYNJS5.js} +39 -6
- package/dist-versioned/chunks/chunk.7UVXJDH2.js +3 -3
- package/dist-versioned/chunks/chunk.7WUGACZI.js +3 -3
- package/dist-versioned/chunks/chunk.ADLNODYZ.js +4 -4
- package/dist-versioned/chunks/chunk.BMSVBL74.js +2 -2
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +3 -3
- package/dist-versioned/chunks/chunk.CBC4EZWD.js +4 -4
- package/dist-versioned/chunks/chunk.CECM7HKR.js +11 -11
- package/dist-versioned/chunks/chunk.CGQHCRPP.js +5 -5
- package/dist-versioned/chunks/chunk.CTZIFPPT.js +6 -6
- package/dist-versioned/chunks/chunk.DKXRGYTS.js +5 -5
- package/dist-versioned/chunks/chunk.EFL7UGJF.js +3 -3
- package/dist-versioned/chunks/chunk.EP3FJ6UU.js +4 -4
- package/dist-versioned/chunks/chunk.EY7UK2BZ.js +6 -6
- package/dist-versioned/chunks/chunk.F5PRJGBD.js +3 -3
- package/dist-versioned/chunks/chunk.FC3YSKGL.js +1 -1
- package/dist-versioned/chunks/chunk.FDRFLSGY.js +2 -2
- package/dist-versioned/chunks/chunk.FH7IYLFW.js +14 -14
- package/dist-versioned/chunks/chunk.FHD6XY2M.js +3 -3
- package/dist-versioned/chunks/chunk.FJ3FPGND.js +1 -1
- package/dist-versioned/chunks/chunk.GAZNGQ6X.js +5 -5
- package/dist-versioned/chunks/chunk.GMYIZ3J2.js +28 -28
- package/dist-versioned/chunks/chunk.H7FDVZRQ.js +1 -1
- package/dist-versioned/chunks/chunk.IM7UBJL2.js +1 -1
- package/dist-versioned/chunks/chunk.JHGB2ZMH.js +1 -1
- package/dist-versioned/chunks/chunk.JXJ5ABVB.js +8 -8
- package/dist-versioned/chunks/chunk.KB7VIBAE.js +3 -3
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KFH26OT3.js +1 -1
- package/dist-versioned/chunks/chunk.KGN4OSJS.js +8 -8
- package/dist-versioned/chunks/chunk.MA3U64BI.js +1 -1
- package/dist-versioned/chunks/chunk.MRI5QQUM.js +4 -4
- package/dist-versioned/chunks/chunk.NJMHI5UM.js +12 -12
- package/dist-versioned/chunks/chunk.O75UK37Y.js +3 -3
- package/dist-versioned/chunks/chunk.PBVPL25D.js +6 -6
- package/dist-versioned/chunks/chunk.QH2KMZDB.js +5 -5
- package/dist-versioned/chunks/chunk.QXENWV2D.js +4 -4
- package/dist-versioned/chunks/chunk.RS56W46S.js +26 -26
- package/dist-versioned/chunks/chunk.RVIQ642S.js +1 -1
- package/dist-versioned/chunks/chunk.SAOVIYDI.js +2 -2
- package/dist-versioned/chunks/chunk.TUSC7AK7.js +8 -8
- package/dist-versioned/chunks/chunk.U2BN2DBY.js +4 -4
- package/dist-versioned/chunks/chunk.UHNAADFP.js +4 -4
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UVGX2XYL.js +2 -2
- package/dist-versioned/chunks/chunk.V5OZWLLA.js +3 -3
- package/dist-versioned/chunks/chunk.VOPJWC6H.js +2 -2
- package/dist-versioned/chunks/chunk.W7QB7KQG.js +5 -5
- package/dist-versioned/chunks/chunk.WR3SE4O5.js +12 -12
- package/dist-versioned/chunks/chunk.WU5L6FE5.js +2 -2
- package/dist-versioned/chunks/chunk.WZQBNRPA.js +2 -2
- package/dist-versioned/chunks/chunk.XCFDPNXY.js +5 -5
- package/dist-versioned/chunks/chunk.XYDUW4SZ.js +9 -9
- package/dist-versioned/chunks/chunk.ZQFW6FCT.js +3 -3
- package/dist-versioned/chunks/chunk.ZULS2JUR.js +2 -2
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +7 -1
- package/dist-versioned/components/range/range.js +13 -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 +4 -4
- 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.G7D3WBTA.js +0 -2
- package/cdn-versioned/chunks/chunk.G7D3WBTA.js +0 -2
|
@@ -49,6 +49,8 @@ var SdRange = class extends SolidElement {
|
|
|
49
49
|
this._rangeValues = /* @__PURE__ */ new Map();
|
|
50
50
|
this._lastChangeValue = [];
|
|
51
51
|
this._hasFocus = false;
|
|
52
|
+
this._dragStyleElement = null;
|
|
53
|
+
this._preventSelectStart = (e) => e.preventDefault();
|
|
52
54
|
this.tooltipFormatter = this.localize.number.bind(this.localize);
|
|
53
55
|
}
|
|
54
56
|
set value(value) {
|
|
@@ -71,6 +73,10 @@ var SdRange = class extends SolidElement {
|
|
|
71
73
|
get rtl() {
|
|
72
74
|
return this.localize.dir() === "rtl";
|
|
73
75
|
}
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
super.disconnectedCallback();
|
|
78
|
+
this._restoreTextSelection();
|
|
79
|
+
}
|
|
74
80
|
firstUpdated() {
|
|
75
81
|
this.formControlController.updateValidity();
|
|
76
82
|
this._lastChangeValue = Array.from(this._value);
|
|
@@ -78,7 +84,7 @@ var SdRange = class extends SolidElement {
|
|
|
78
84
|
var _a, _b;
|
|
79
85
|
const tooltip = thumb.parentElement;
|
|
80
86
|
await tooltip.updateComplete;
|
|
81
|
-
(_b = (_a = tooltip.shadowRoot) == null ? void 0 : _a.querySelector("sd-
|
|
87
|
+
(_b = (_a = tooltip.shadowRoot) == null ? void 0 : _a.querySelector("sd-popup")) == null ? void 0 : _b.setAttribute("distance", "14");
|
|
82
88
|
});
|
|
83
89
|
}
|
|
84
90
|
willUpdate(changedProperties) {
|
|
@@ -246,15 +252,41 @@ var SdRange = class extends SolidElement {
|
|
|
246
252
|
onClickTrackItem(event) {
|
|
247
253
|
this.onClickTrack(event, false);
|
|
248
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Prevents text selection on the entire page during a drag.
|
|
257
|
+
* Uses an injected <style> with !important to ensure no CSS specificity overrides it,
|
|
258
|
+
* plus a selectstart event listener as a fallback.
|
|
259
|
+
*/
|
|
260
|
+
_preventTextSelection() {
|
|
261
|
+
if (!this._dragStyleElement) {
|
|
262
|
+
const style = document.createElement("style");
|
|
263
|
+
style.setAttribute("data-sd-range-drag", "");
|
|
264
|
+
style.textContent = "*, *::before, *::after { user-select: none !important; -webkit-user-select: none !important; }";
|
|
265
|
+
document.head.appendChild(style);
|
|
266
|
+
this._dragStyleElement = style;
|
|
267
|
+
}
|
|
268
|
+
document.addEventListener("selectstart", this._preventSelectStart);
|
|
269
|
+
}
|
|
270
|
+
_restoreTextSelection() {
|
|
271
|
+
if (this._dragStyleElement) {
|
|
272
|
+
this._dragStyleElement.remove();
|
|
273
|
+
this._dragStyleElement = null;
|
|
274
|
+
}
|
|
275
|
+
document.removeEventListener("selectstart", this._preventSelectStart);
|
|
276
|
+
}
|
|
249
277
|
async onClickThumb(event) {
|
|
250
278
|
if (this.disabled || this.visuallyDisabled) return;
|
|
251
279
|
const thumb = event.target;
|
|
252
280
|
this.updateTooltip(thumb);
|
|
253
281
|
if (thumb.dataset.pointerId) {
|
|
254
|
-
|
|
282
|
+
try {
|
|
283
|
+
thumb.releasePointerCapture(+thumb.dataset.pointerId);
|
|
284
|
+
} catch (e) {
|
|
285
|
+
}
|
|
255
286
|
}
|
|
256
287
|
thumb.dataset.pointerId = event.pointerId.toString();
|
|
257
288
|
thumb.setPointerCapture(event.pointerId);
|
|
289
|
+
this._preventTextSelection();
|
|
258
290
|
thumb.classList.add("grabbed");
|
|
259
291
|
if (this.tooltip === "on-interaction") {
|
|
260
292
|
await thumb.parentElement.show();
|
|
@@ -301,6 +333,7 @@ var SdRange = class extends SolidElement {
|
|
|
301
333
|
if (!thumb.dataset.pointerId || event.pointerId !== +thumb.dataset.pointerId) return;
|
|
302
334
|
thumb.classList.remove("grabbed");
|
|
303
335
|
thumb.releasePointerCapture(event.pointerId);
|
|
336
|
+
this._restoreTextSelection();
|
|
304
337
|
delete thumb.dataset.pointerId;
|
|
305
338
|
if (arraysDiffer(this._lastChangeValue, this._value)) {
|
|
306
339
|
this._lastChangeValue = Array.from(this._value);
|
|
@@ -412,10 +445,10 @@ var SdRange = class extends SolidElement {
|
|
|
412
445
|
ariaLabel = this.tooltipFormatter(value);
|
|
413
446
|
}
|
|
414
447
|
}
|
|
415
|
-
return html`<sd-
|
|
448
|
+
return html`<sd-tooltip 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}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${cx(
|
|
416
449
|
"rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",
|
|
417
450
|
this.disabled || this.visuallyDisabled ? "outline-none" : "cursor-pointer focus-visible:focus-outline"
|
|
418
|
-
)}"></div></sd-
|
|
451
|
+
)}"></div></sd-tooltip>`;
|
|
419
452
|
});
|
|
420
453
|
}
|
|
421
454
|
render() {
|
|
@@ -431,7 +464,7 @@ var SdRange = class extends SolidElement {
|
|
|
431
464
|
SdRange.styles = [
|
|
432
465
|
...SolidElement.styles,
|
|
433
466
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
434
|
-
[part='base']{touch-action:none;-webkit-touch-callout:none}[part=thumb]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=thumb]:hover{background-color:rgba(var(--sd-color-icon-fill-primary-500,rgba(var(--sd-color-primary-500))))}[part=thumb].grabbed{background-color:rgba(var(--sd-color-icon-fill-primary-800,rgba(var(--sd-color-primary-800))))}[part=thumb][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=track]{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}[part=track][data-disabled]{background-color:rgba(var(--sd-color-background-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=active-track]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=active-track][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}`
|
|
467
|
+
[part='base']{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}[part=thumb]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=thumb]:hover{background-color:rgba(var(--sd-color-icon-fill-primary-500,rgba(var(--sd-color-primary-500))))}[part=thumb].grabbed{background-color:rgba(var(--sd-color-icon-fill-primary-800,rgba(var(--sd-color-primary-800))))}[part=thumb][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=track]{background-color:rgba(var(--sd-color-border-neutral-400,rgba(var(--sd-color-neutral-400))))}[part=track][data-disabled]{background-color:rgba(var(--sd-color-background-neutral-500,rgba(var(--sd-color-neutral-500))))}[part=active-track]{background-color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=active-track][data-disabled]{background-color:rgba(var(--sd-color-icon-fill-neutral-500,rgba(var(--sd-color-neutral-500))))}`
|
|
435
468
|
];
|
|
436
469
|
__decorateClass([
|
|
437
470
|
query("#input")
|
|
@@ -485,7 +518,7 @@ __decorateClass([
|
|
|
485
518
|
property({ type: String })
|
|
486
519
|
], SdRange.prototype, "value", 1);
|
|
487
520
|
SdRange = __decorateClass([
|
|
488
|
-
customElement("sd-
|
|
521
|
+
customElement("sd-range")
|
|
489
522
|
], SdRange);
|
|
490
523
|
|
|
491
524
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../tooltip/tooltip';
|
|
1
2
|
import { FormControlController } from '../../internal/form';
|
|
2
3
|
import { LocalizeController } from '../../utilities/localize';
|
|
3
4
|
import SolidElement from '../../internal/solid-element';
|
|
@@ -31,8 +32,11 @@ export default class SdRange extends SolidElement implements SolidFormControl {
|
|
|
31
32
|
private _rangeValues;
|
|
32
33
|
private _lastChangeValue;
|
|
33
34
|
private _hasFocus;
|
|
35
|
+
private _dragStyleElement;
|
|
36
|
+
private _preventSelectStart;
|
|
34
37
|
get rtl(): boolean;
|
|
35
38
|
constructor();
|
|
39
|
+
disconnectedCallback(): void;
|
|
36
40
|
firstUpdated(): void;
|
|
37
41
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
38
42
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -48,6 +52,8 @@ export default class SdRange extends SolidElement implements SolidFormControl {
|
|
|
48
52
|
private handleInvalid;
|
|
49
53
|
private onClickTrack;
|
|
50
54
|
private onClickTrackItem;
|
|
55
|
+
private _preventTextSelection;
|
|
56
|
+
private _restoreTextSelection;
|
|
51
57
|
private onClickThumb;
|
|
52
58
|
private onDragThumb;
|
|
53
59
|
private onReleaseThumb;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdRange
|
|
3
|
-
} from "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.7UUYNJS5.js";
|
|
4
|
+
import "../../chunks/chunk.DKXRGYTS.js";
|
|
4
5
|
import "../../chunks/chunk.D3YSIVTB.js";
|
|
5
6
|
import "../../chunks/chunk.GI7VDIWX.js";
|
|
7
|
+
import "../../chunks/chunk.37TQP26W.js";
|
|
6
8
|
import "../../chunks/chunk.C3WIBDGG.js";
|
|
7
9
|
import "../../chunks/chunk.IVMQWO2L.js";
|
|
10
|
+
import "../../chunks/chunk.N4LHE3QK.js";
|
|
11
|
+
import "../../chunks/chunk.B4BZKR24.js";
|
|
12
|
+
import "../../chunks/chunk.ZULS2JUR.js";
|
|
13
|
+
import "../../chunks/chunk.GKH647YK.js";
|
|
14
|
+
import "../../chunks/chunk.2BO5LK23.js";
|
|
15
|
+
import "../../chunks/chunk.6SPABX2F.js";
|
|
16
|
+
import "../../chunks/chunk.4TPOL3LB.js";
|
|
17
|
+
import "../../chunks/chunk.P52GZVKG.js";
|
|
18
|
+
import "../../chunks/chunk.RPB53XXV.js";
|
|
8
19
|
import "../../chunks/chunk.X3FE7OHE.js";
|
|
9
20
|
import "../../chunks/chunk.GWKDETUD.js";
|
|
10
21
|
import "../../chunks/chunk.M6QWSNU3.js";
|
|
22
|
+
import "../../chunks/chunk.X2OQMWGY.js";
|
|
11
23
|
import "../../chunks/chunk.H7FDVZRQ.js";
|
|
12
24
|
import "../../chunks/chunk.HQWAKJBV.js";
|
|
13
25
|
import "../../chunks/chunk.S3NI7NKU.js";
|
|
@@ -22544,7 +22544,7 @@
|
|
|
22544
22544
|
"package": {
|
|
22545
22545
|
"name": "@solid-design-system/components",
|
|
22546
22546
|
"description": "Solid Design System: Components",
|
|
22547
|
-
"version": "6.7.
|
|
22547
|
+
"version": "6.7.1",
|
|
22548
22548
|
"author": "Union Investment",
|
|
22549
22549
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
22550
22550
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -8,9 +8,6 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
SdThemeListener
|
|
10
10
|
} from "./chunks/chunk.IM7UBJL2.js";
|
|
11
|
-
import {
|
|
12
|
-
SdTooltip
|
|
13
|
-
} from "./chunks/chunk.DKXRGYTS.js";
|
|
14
11
|
import {
|
|
15
12
|
SdVideo
|
|
16
13
|
} from "./chunks/chunk.WU5L6FE5.js";
|
|
@@ -37,7 +34,10 @@ import {
|
|
|
37
34
|
} from "./chunks/chunk.3JA6XC66.js";
|
|
38
35
|
import {
|
|
39
36
|
SdRange
|
|
40
|
-
} from "./chunks/chunk.
|
|
37
|
+
} from "./chunks/chunk.7UUYNJS5.js";
|
|
38
|
+
import {
|
|
39
|
+
SdTooltip
|
|
40
|
+
} from "./chunks/chunk.DKXRGYTS.js";
|
|
41
41
|
import "./chunks/chunk.D3YSIVTB.js";
|
|
42
42
|
import {
|
|
43
43
|
SdRangeTick
|
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-7-
|
|
87
|
+
::slotted(sd-6-7-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-6-7-1-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-7-1-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-7-
|
|
114
|
+
customElement("sd-6-7-1-link")
|
|
115
115
|
], SdLink);
|
|
116
116
|
|
|
117
117
|
export {
|
|
@@ -71,7 +71,7 @@ var SdRadio = class extends SolidElement {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
return html`<span part="base" class="${cx(
|
|
74
|
-
"sd-6-7-
|
|
74
|
+
"sd-6-7-1-radio group flex items-center text-base leading-normal text-black cursor-pointer",
|
|
75
75
|
(this.disabled || this.visuallyDisabled) && "hover:cursor-not-allowed",
|
|
76
76
|
{
|
|
77
77
|
/* sizes, fonts */
|
|
@@ -80,15 +80,15 @@ var SdRadio = class extends SolidElement {
|
|
|
80
80
|
lg: "text-base"
|
|
81
81
|
}[this.size]
|
|
82
82
|
)}"><span part="${`${this.checked ? "control--checked" : "control--unchecked"}`}" class="${cx(
|
|
83
|
-
"flex-initial shrink-0 relative inline-flex items-center justify-center border sd-6-7-
|
|
83
|
+
"flex-initial shrink-0 relative inline-flex items-center justify-center border sd-6-7-1-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",
|
|
84
84
|
this.disabled || this.visuallyDisabled ? "border-neutral-500" : this.invalid ? cx(
|
|
85
85
|
"border-error hover:border-error-400 group-hover:border-error-400",
|
|
86
|
-
this.checked ? "sd-6-7-
|
|
87
|
-
) : this.checked ? "sd-6-7-
|
|
86
|
+
this.checked ? "sd-6-7-1-radio--checked--invalid--default-color-background" : "sd-6-7-1-radio--default--invalid-color-background"
|
|
87
|
+
) : this.checked ? "sd-6-7-1-radio--checked--default-color-background hover:sd-6-7-1-radio--checked--hover-color-background group-hover:sd-6-7-1-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550" : "form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200"
|
|
88
88
|
)}"><span part="checked" class="${cx(
|
|
89
|
-
"rounded-full inline-flex text-white sd-6-7-
|
|
89
|
+
"rounded-full inline-flex text-white sd-6-7-1-radio--checked--default__icon-color-background h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",
|
|
90
90
|
this.checked ? "scale-100" : "scale-0",
|
|
91
|
-
this.disabled ? "bg-neutral-500" : this.visuallyDisabled ? "bg-white" : this.invalid ? "sd-6-7-
|
|
91
|
+
this.disabled ? "bg-neutral-500" : this.visuallyDisabled ? "bg-white" : this.invalid ? "sd-6-7-1-radio--checked--invalid--default__icon-color-background hover:sd-6-7-1-radio--checked--invalid--hover__icon-color-background group-hover:sd-6-7-1-radio--checked--invalid--hover__icon-color-background" : this.checked ? "sd-6-7-1-radio--checked--default__icon-color-background hover:sd-6-7-1-radio--checked--hover__icon-color-background group-hover:sd-6-7-1-radio--checked--hover__icon-color-background" : "bg-neutral-800"
|
|
92
92
|
)}"></span></span><slot part="label" class="${cx(
|
|
93
93
|
"ml-2 select-none inline-block",
|
|
94
94
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : this.invalid ? "text-error" : "text-black"
|
|
@@ -131,7 +131,7 @@ __decorateClass([
|
|
|
131
131
|
watch(["disabled", "visually-disabled"], { waitUntilFirstUpdate: true })
|
|
132
132
|
], SdRadio.prototype, "handleDisabledChange", 1);
|
|
133
133
|
SdRadio = __decorateClass([
|
|
134
|
-
customElement("sd-6-7-
|
|
134
|
+
customElement("sd-6-7-1-radio")
|
|
135
135
|
], SdRadio);
|
|
136
136
|
|
|
137
137
|
export {
|
|
@@ -324,7 +324,7 @@ __decorateClass([
|
|
|
324
324
|
property({ attribute: "auto-size-padding", type: Number })
|
|
325
325
|
], SdPopup.prototype, "autoSizePadding", 2);
|
|
326
326
|
SdPopup = __decorateClass([
|
|
327
|
-
customElement("sd-6-7-
|
|
327
|
+
customElement("sd-6-7-1-popup")
|
|
328
328
|
], SdPopup);
|
|
329
329
|
|
|
330
330
|
export {
|
|
@@ -46,9 +46,9 @@ var SdTeaserMedia = class extends SolidElement {
|
|
|
46
46
|
"absolute inset-0 pointer-events-none",
|
|
47
47
|
{
|
|
48
48
|
white: "bg-white/[.8] group-hover:bg-white/90",
|
|
49
|
-
"neutral-100": "sd-6-7-
|
|
49
|
+
"neutral-100": "sd-6-7-1-teaser-media--neutral-100-color-background group-hover:sd-6-7-1-teaser-media--neutral-100--hover-color-background",
|
|
50
50
|
primary: "bg-primary/[.8] text-white group-hover:bg-primary/90",
|
|
51
|
-
"primary-100": "sd-6-7-
|
|
51
|
+
"primary-100": "sd-6-7-1-teaser-media--primary-100-color-background group-hover:sd-6-7-1-teaser-media--primary-100--hover-color-background",
|
|
52
52
|
"gradient-light": "bg-gradient-to-t from-white/90 to-white/[.8]",
|
|
53
53
|
"gradient-dark": "bg-gradient-to-t from-primary-800/90 to-primary-800/[.8]"
|
|
54
54
|
}[this.variant]
|
|
@@ -56,11 +56,11 @@ var SdTeaserMedia = class extends SolidElement {
|
|
|
56
56
|
"mt-3 transition-opacity duration-300",
|
|
57
57
|
!this.open && "hidden",
|
|
58
58
|
this.open ? "opacity-100" : "opacity-0"
|
|
59
|
-
)}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div>${slots["teaser-has-expandable"] ? html`<button part="toggle" class="sd-interactive sd-interactive--reset mt-2" @click="${this.onToggleClick}" aria-expanded="${this.open}" aria-label="${this.open ? "Collapse content" : "Expand content"}"><div class="h-full justify-start flex items-start"><sd-6-7-
|
|
59
|
+
)}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div>${slots["teaser-has-expandable"] ? html`<button part="toggle" class="sd-interactive sd-interactive--reset mt-2" @click="${this.onToggleClick}" aria-expanded="${this.open}" aria-label="${this.open ? "Collapse content" : "Expand content"}"><div class="h-full justify-start flex items-start"><sd-6-7-1-icon class="${cx(
|
|
60
60
|
"w-6 h-6 transition-transform",
|
|
61
61
|
this.open && "rotate-180",
|
|
62
62
|
["primary", "gradient-dark"].includes(this.variant) ? "text-white" : "text-primary"
|
|
63
|
-
)}" library="_internal" name="chevron-down"></sd-6-7-
|
|
63
|
+
)}" library="_internal" name="chevron-down"></sd-6-7-1-icon></div></button>` : null}</div></div></div><div class="${cx("mb-4 -z-10", !slots["teaser-has-media"] && "hidden")}" part="media"><slot name="media"></slot></div></div>`;
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
SdTeaserMedia.styles = [
|
|
@@ -81,7 +81,7 @@ __decorateClass([
|
|
|
81
81
|
query('[part="base"]')
|
|
82
82
|
], SdTeaserMedia.prototype, "teaserMedia", 2);
|
|
83
83
|
SdTeaserMedia = __decorateClass([
|
|
84
|
-
customElement("sd-6-7-
|
|
84
|
+
customElement("sd-6-7-1-teaser-media")
|
|
85
85
|
], SdTeaserMedia);
|
|
86
86
|
|
|
87
87
|
export {
|
|
@@ -25,11 +25,11 @@ var SdOptgroup = class extends SolidElement {
|
|
|
25
25
|
this.label = "";
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Syncs the disabled prop for all slotted sd-6-7-
|
|
28
|
+
* Syncs the disabled prop for all slotted sd-6-7-1-options when it is triggered
|
|
29
29
|
*/
|
|
30
30
|
handleDisableOptions() {
|
|
31
31
|
const { disabled } = this;
|
|
32
|
-
this.defaultSlot.assignedElements().filter((opt) => opt.tagName.toLowerCase() === "sd-6-7-
|
|
32
|
+
this.defaultSlot.assignedElements().filter((opt) => opt.tagName.toLowerCase() === "sd-6-7-1-option").forEach((opt) => {
|
|
33
33
|
opt.disabled = disabled;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -38,7 +38,7 @@ var SdOptgroup = class extends SolidElement {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
const { disabled } = this;
|
|
41
|
-
return html`<div role="${disabled ? "presentation" : "group"}" class="${cx(this.disabled ? "text-neutral-500" : "")}" part="base" aria-labelledby="group-label"><sd-6-7-
|
|
41
|
+
return html`<div role="${disabled ? "presentation" : "group"}" class="${cx(this.disabled ? "text-neutral-500" : "")}" part="base" aria-labelledby="group-label"><sd-6-7-1-divider id="divider" class="pt-2 pb-4" part="divider"></sd-6-7-1-divider><div part="label-container" class="${cx(this.disabled ? "text-neutral-500" : "text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
SdOptgroup.styles = [
|
|
@@ -59,7 +59,7 @@ __decorateClass([
|
|
|
59
59
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
60
60
|
], SdOptgroup.prototype, "handleDisabledChange", 1);
|
|
61
61
|
SdOptgroup = __decorateClass([
|
|
62
|
-
customElement("sd-6-7-
|
|
62
|
+
customElement("sd-6-7-1-optgroup")
|
|
63
63
|
], SdOptgroup);
|
|
64
64
|
|
|
65
65
|
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-7-
|
|
57
|
+
assumeInteractionOn: ["sd-blur", "sd-6-7-1-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-7-
|
|
101
|
+
return html`<sd-6-7-1-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-7-
|
|
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-7-1-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-7-
|
|
240
|
+
if (item.tagName.toLowerCase() === "sd-6-7-1-optgroup") {
|
|
241
241
|
Array.from(item.children).forEach((option) => {
|
|
242
|
-
if (option.tagName.toLowerCase() === "sd-6-7-
|
|
242
|
+
if (option.tagName.toLowerCase() === "sd-6-7-1-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-7-
|
|
262
|
+
html`<sd-6-7-1-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-7-
|
|
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-7-1-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-7-
|
|
385
|
+
const option = target.closest("sd-6-7-1-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-7-
|
|
437
|
+
return [...this.filteredWrapper.querySelectorAll("sd-6-7-1-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-7-
|
|
567
|
+
const hasOptgroup = ((_b = option.parentElement) == null ? void 0 : _b.tagName.toLowerCase()) === "sd-6-7-1-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-7-
|
|
591
|
+
/** Receives incoming event detail from sd-6-7-1-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-7-
|
|
603
|
+
if (customElements.get("sd-6-7-1-option")) {
|
|
604
604
|
allOptions.forEach((option) => {
|
|
605
605
|
option.checkbox = this.multiple;
|
|
606
606
|
});
|
|
@@ -729,8 +729,8 @@ var SdCombobox = class extends SolidElement {
|
|
|
729
729
|
return filterOnlyOptgroups(getAssignedElementsForSlot(this.defaultSlot));
|
|
730
730
|
}
|
|
731
731
|
async handleDefaultSlotChange() {
|
|
732
|
-
if (!customElements.get("sd-6-7-
|
|
733
|
-
customElements.whenDefined("sd-6-7-
|
|
732
|
+
if (!customElements.get("sd-6-7-1-option")) {
|
|
733
|
+
customElements.whenDefined("sd-6-7-1-option").then(() => this.handleDefaultSlotChange());
|
|
734
734
|
return;
|
|
735
735
|
}
|
|
736
736
|
const slottedOptions = this.getSlottedOptions();
|
|
@@ -742,10 +742,10 @@ var SdCombobox = class extends SolidElement {
|
|
|
742
742
|
if (this.multiple) {
|
|
743
743
|
option.checkbox = true;
|
|
744
744
|
}
|
|
745
|
-
option.id = option.id || `sd-6-7-
|
|
745
|
+
option.id = option.id || `sd-6-7-1-combobox-option-${index}`;
|
|
746
746
|
});
|
|
747
747
|
slottedOptgroups.forEach((optgroup, index) => {
|
|
748
|
-
optgroup.id = optgroup.id || `sd-6-7-
|
|
748
|
+
optgroup.id = optgroup.id || `sd-6-7-1-combobox-optgroup-${index}`;
|
|
749
749
|
});
|
|
750
750
|
await this.syncSelectedOptionsAndValue();
|
|
751
751
|
if (this.multiple) {
|
|
@@ -807,7 +807,7 @@ var SdCombobox = class extends SolidElement {
|
|
|
807
807
|
default: "form-control-color-border"
|
|
808
808
|
}[selectState],
|
|
809
809
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
810
|
-
)}"></div><sd-6-7-
|
|
810
|
+
)}"></div><sd-6-7-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
811
811
|
"inline-flex relative w-full",
|
|
812
812
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
813
813
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -833,27 +833,27 @@ var SdCombobox = class extends SolidElement {
|
|
|
833
833
|
"flex justify-center",
|
|
834
834
|
iconMarginLeft,
|
|
835
835
|
this.value.length > 0 ? "visible" : "invisible"
|
|
836
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-7-
|
|
836
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-7-1-icon class="${cx("text-neutral-700", iconSize)}" name="closing-round" library="_internal"></sd-6-7-1-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-6-7-1-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="_internal" name="risk"></sd-6-7-1-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-6-7-1-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="_internal" name="confirm-circle"></sd-6-7-1-icon>` : ""}<slot name="right" part="right" class="${cx(
|
|
837
837
|
"inline-flex ml-2 leading-[0]",
|
|
838
838
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-primary",
|
|
839
839
|
iconSize
|
|
840
|
-
)}">${this.type !== "search" ? html`<sd-6-7-
|
|
840
|
+
)}">${this.type !== "search" ? html`<sd-6-7-1-icon class="${cx(
|
|
841
841
|
"transition-transform duration-medium ease-in-out",
|
|
842
842
|
this.open ? "rotate-180" : "rotate-0"
|
|
843
|
-
)}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-7-
|
|
843
|
+
)}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-6-7-1-icon>` : ""}</slot>${this.type === "search" ? html`<button class="${cx("flex items-center sd-interactive", iconMarginLeft)}" type="button"><sd-6-7-1-icon class="${cx(iconColor, iconSize)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-7-1-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(
|
|
844
844
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
845
845
|
this.open && "shadow transition-shadow duration-medium ease-in-out",
|
|
846
846
|
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"
|
|
847
|
-
)}" 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-7-
|
|
847
|
+
)}" 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-7-1-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)}`;
|
|
848
848
|
}
|
|
849
849
|
};
|
|
850
850
|
SdCombobox.styles = [
|
|
851
851
|
...SolidElement.styles,
|
|
852
852
|
css`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
853
|
-
: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-7-
|
|
853
|
+
: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-7-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-7-1-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-7-1-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-7-1-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-7-1-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-6-7-1-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}`
|
|
854
854
|
];
|
|
855
855
|
__decorateClass([
|
|
856
|
-
query("sd-6-7-
|
|
856
|
+
query("sd-6-7-1-popup")
|
|
857
857
|
], SdCombobox.prototype, "popup", 2);
|
|
858
858
|
__decorateClass([
|
|
859
859
|
query('[part="combobox"]')
|
|
@@ -1017,7 +1017,7 @@ __decorateClass([
|
|
|
1017
1017
|
watch(["size", "floatingLabel"])
|
|
1018
1018
|
], SdCombobox.prototype, "handleSizeChange", 1);
|
|
1019
1019
|
SdCombobox = __decorateClass([
|
|
1020
|
-
customElement("sd-6-7-
|
|
1020
|
+
customElement("sd-6-7-1-combobox")
|
|
1021
1021
|
], SdCombobox);
|
|
1022
1022
|
setDefaultAnimation("combobox.show", {
|
|
1023
1023
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|