@solid-design-system/components 4.6.12 → 4.6.14
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.3CZQFEYM.js +1 -0
- package/cdn/chunks/chunk.J3MO67NR.js +4 -0
- package/cdn/components/notification/notification.d.ts +0 -4
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/tooltip/tooltip.d.ts +1 -0
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +15 -15
- package/cdn/solid-components.iife.js +15 -15
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.3CZQFEYM.js +1 -0
- package/cdn-versioned/chunks/chunk.3LNKE2CG.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.6G6DPUNG.js +1 -1
- package/cdn-versioned/chunks/chunk.6NP6ACYF.js +1 -1
- package/cdn-versioned/chunks/chunk.6WMAE6EM.js +1 -1
- package/cdn-versioned/chunks/chunk.7QJPML7E.js +1 -1
- package/cdn-versioned/chunks/chunk.7R5WVKOU.js +1 -1
- package/cdn-versioned/chunks/chunk.7VF3CHZ2.js +1 -1
- package/cdn-versioned/chunks/chunk.A2HHAWSZ.js +1 -1
- package/cdn-versioned/chunks/chunk.A4472UE3.js +1 -1
- package/cdn-versioned/chunks/chunk.AULSVEYK.js +1 -1
- package/cdn-versioned/chunks/chunk.C7TENCCC.js +1 -1
- package/cdn-versioned/chunks/chunk.CDEAOHOV.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.CJHO2CRN.js +1 -1
- package/cdn-versioned/chunks/chunk.CNGICFLY.js +1 -1
- package/cdn-versioned/chunks/chunk.CRUS5X5G.js +1 -1
- package/cdn-versioned/chunks/chunk.EAAM3VG2.js +3 -3
- package/cdn-versioned/chunks/chunk.EQSUVFCF.js +1 -1
- package/cdn-versioned/chunks/chunk.ETYUJIA4.js +1 -1
- package/cdn-versioned/chunks/chunk.FK5LYWC7.js +1 -1
- package/cdn-versioned/chunks/chunk.FPWMHC7P.js +1 -1
- package/cdn-versioned/chunks/chunk.FYIER3I3.js +1 -1
- package/cdn-versioned/chunks/chunk.G3JDMNCB.js +1 -1
- package/cdn-versioned/chunks/chunk.G5HXH4DJ.js +1 -1
- package/cdn-versioned/chunks/chunk.GG4532YR.js +1 -1
- package/cdn-versioned/chunks/chunk.HLHBWQSY.js +1 -1
- package/cdn-versioned/chunks/chunk.IMSUZE4K.js +1 -1
- package/cdn-versioned/chunks/chunk.J3MO67NR.js +4 -0
- package/cdn-versioned/chunks/chunk.KMWJUXQH.js +1 -1
- package/cdn-versioned/chunks/chunk.KSYRDJ33.js +1 -1
- package/cdn-versioned/chunks/chunk.L2PFOOBK.js +1 -1
- package/cdn-versioned/chunks/chunk.L7T6YEYN.js +1 -1
- package/cdn-versioned/chunks/chunk.LSAUVFWV.js +1 -1
- package/cdn-versioned/chunks/chunk.M7NPMAK2.js +1 -1
- package/cdn-versioned/chunks/chunk.MT35MRN2.js +1 -1
- package/cdn-versioned/chunks/chunk.NTK6WXO7.js +1 -1
- package/cdn-versioned/chunks/chunk.O62YAWLB.js +4 -4
- package/cdn-versioned/chunks/chunk.OCOLBSJK.js +2 -2
- package/cdn-versioned/chunks/chunk.P2CPGH2M.js +1 -1
- package/cdn-versioned/chunks/chunk.QE3HRWOD.js +4 -4
- package/cdn-versioned/chunks/chunk.QJK7ON6G.js +1 -1
- package/cdn-versioned/chunks/chunk.QX6EC2OV.js +1 -1
- package/cdn-versioned/chunks/chunk.RCNLUAML.js +1 -1
- package/cdn-versioned/chunks/chunk.RTOLPQCZ.js +1 -1
- package/cdn-versioned/chunks/chunk.SA2YRNVP.js +1 -1
- package/cdn-versioned/chunks/chunk.TGMCWOXL.js +1 -1
- package/cdn-versioned/chunks/chunk.TWHESFGL.js +1 -1
- package/cdn-versioned/chunks/chunk.UJZJOR6Z.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.YICLGCNM.js +1 -1
- package/cdn-versioned/chunks/chunk.ZDACAU6O.js +1 -1
- 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/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/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/map-marker/map-marker.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 -5
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
- 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 +2 -2
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.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/tooltip/tooltip.d.ts +2 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +211 -211
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +20 -20
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +20 -20
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +80 -80
- package/cdn-versioned/web-types.json +137 -137
- package/dist/chunks/{chunk.DCOXCIL6.js → chunk.5DTO5VHH.js} +12 -2
- package/dist/chunks/{chunk.SYPP74RS.js → chunk.QB4ZOKFD.js} +26 -44
- package/dist/components/notification/notification.d.ts +0 -4
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -0
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +2 -2
- package/dist/web-types.json +1 -1
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.2J5UWA4O.js +6 -6
- package/dist-versioned/chunks/chunk.2ROGEIKB.js +2 -2
- package/dist-versioned/chunks/{chunk.DCOXCIL6.js → chunk.5DTO5VHH.js} +16 -6
- package/dist-versioned/chunks/chunk.5GXWP6YW.js +2 -2
- package/dist-versioned/chunks/chunk.5H3SWQYU.js +2 -2
- package/dist-versioned/chunks/chunk.5PZUOPFS.js +4 -4
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.7HZNYBYX.js +2 -2
- package/dist-versioned/chunks/chunk.AIC2K6F6.js +2 -2
- package/dist-versioned/chunks/chunk.BCX6GWFU.js +1 -1
- package/dist-versioned/chunks/chunk.BLEQBK6L.js +2 -2
- package/dist-versioned/chunks/chunk.BTFVVZN7.js +2 -2
- package/dist-versioned/chunks/chunk.C3OAT5IL.js +8 -8
- package/dist-versioned/chunks/chunk.COLY2AS3.js +3 -3
- package/dist-versioned/chunks/chunk.DCMNY5PW.js +1 -1
- package/dist-versioned/chunks/chunk.DDQ43DMG.js +1 -1
- package/dist-versioned/chunks/chunk.DRFKZJ6U.js +2 -2
- package/dist-versioned/chunks/chunk.EJADH4TP.js +2 -2
- package/dist-versioned/chunks/chunk.G6HSZF64.js +1 -1
- package/dist-versioned/chunks/chunk.GG6EDMMX.js +1 -1
- package/dist-versioned/chunks/chunk.GR4QWBKR.js +2 -2
- package/dist-versioned/chunks/chunk.HY3UDFFO.js +3 -3
- package/dist-versioned/chunks/chunk.IGLAKKCM.js +2 -2
- package/dist-versioned/chunks/chunk.IJO3II3P.js +2 -2
- package/dist-versioned/chunks/chunk.IUDU7IPQ.js +3 -3
- package/dist-versioned/chunks/chunk.IZJ3ASKW.js +2 -2
- package/dist-versioned/chunks/chunk.JKMRTFLI.js +1 -1
- package/dist-versioned/chunks/chunk.KDKAOP5K.js +5 -5
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.LHDIK3CL.js +1 -1
- package/dist-versioned/chunks/chunk.LMZE7CWI.js +2 -2
- package/dist-versioned/chunks/chunk.MHSIUMF2.js +5 -5
- package/dist-versioned/chunks/chunk.N4PCVM2O.js +1 -1
- package/dist-versioned/chunks/chunk.PAMIVTVZ.js +1 -1
- package/dist-versioned/chunks/{chunk.SYPP74RS.js → chunk.QB4ZOKFD.js} +30 -48
- package/dist-versioned/chunks/chunk.QGTHHUEP.js +11 -11
- package/dist-versioned/chunks/chunk.QJSVVX5A.js +5 -5
- package/dist-versioned/chunks/chunk.RSBV2TUF.js +3 -3
- package/dist-versioned/chunks/chunk.RX6EYXKU.js +1 -1
- package/dist-versioned/chunks/chunk.SA5CVRAH.js +1 -1
- package/dist-versioned/chunks/chunk.SH4PL7NS.js +26 -26
- package/dist-versioned/chunks/chunk.SONGMTFR.js +5 -5
- package/dist-versioned/chunks/chunk.TOAVJJSV.js +2 -2
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.ULJ5M2KG.js +1 -1
- package/dist-versioned/chunks/chunk.V2GCDMDD.js +9 -9
- package/dist-versioned/chunks/chunk.V32MUHC2.js +1 -1
- package/dist-versioned/chunks/chunk.VJYNSYQW.js +1 -1
- package/dist-versioned/chunks/chunk.WE6ILGOF.js +13 -13
- package/dist-versioned/chunks/chunk.XG3WGOFU.js +23 -23
- package/dist-versioned/chunks/chunk.ZFWQYTKN.js +14 -14
- package/dist-versioned/chunks/chunk.ZTC7JGWI.js +6 -6
- package/dist-versioned/chunks/chunk.ZW2FQM2X.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/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/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/map-marker/map-marker.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 -5
- package/dist-versioned/components/notification/notification.js +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- 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 +2 -2
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.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/tooltip/tooltip.d.ts +2 -1
- package/dist-versioned/components/tooltip/tooltip.js +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +211 -211
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +137 -137
- package/package.json +2 -2
- package/cdn/chunks/chunk.4YCOU55E.js +0 -4
- package/cdn/chunks/chunk.IQUBYV5M.js +0 -1
- package/cdn-versioned/chunks/chunk.4YCOU55E.js +0 -4
- package/cdn-versioned/chunks/chunk.IQUBYV5M.js +0 -1
|
@@ -84,8 +84,14 @@ var SdTooltip = class extends SolidElement {
|
|
|
84
84
|
document.removeEventListener("mousedown", this.handleMouseInteraction);
|
|
85
85
|
document.removeEventListener("keydown", this.handleKeyboardInteraction);
|
|
86
86
|
}
|
|
87
|
+
get hasCustomTrigger() {
|
|
88
|
+
return !!this.querySelector("*:not([slot])");
|
|
89
|
+
}
|
|
87
90
|
// removes empty text nodes from the default slot
|
|
88
91
|
formatDefaultSlot(slot) {
|
|
92
|
+
if (!slot) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
89
95
|
const nodes = slot.assignedNodes({ flatten: true });
|
|
90
96
|
nodes.forEach((node) => {
|
|
91
97
|
var _a, _b;
|
|
@@ -186,7 +192,11 @@ var SdTooltip = class extends SolidElement {
|
|
|
186
192
|
return void 0;
|
|
187
193
|
}
|
|
188
194
|
this.open = false;
|
|
189
|
-
this.
|
|
195
|
+
if (this.trigger === "click" || this.trigger === "click focus") {
|
|
196
|
+
this.focus();
|
|
197
|
+
} else {
|
|
198
|
+
this.blur();
|
|
199
|
+
}
|
|
190
200
|
return waitForEvent(this, "sd-after-hide");
|
|
191
201
|
}
|
|
192
202
|
render() {
|
|
@@ -195,7 +205,7 @@ var SdTooltip = class extends SolidElement {
|
|
|
195
205
|
return html`<sd-popup part="base" exportparts="
|
|
196
206
|
popup:base__popup,
|
|
197
207
|
arrow:base__arrow
|
|
198
|
-
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"
|
|
208
|
+
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger ? html`<slot slot="anchor"></slot>` : html`<button slot="anchor" aria-describedby="tooltip" class="${cx("flex sd-interactive rounded-full", this.size === "lg" ? "text-xl" : "text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-icon library="system" name="info-circle" label="Tooltip" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open ? "polite" : "off"}">${this.content}</slot></sd-popup>`;
|
|
199
209
|
}
|
|
200
210
|
};
|
|
201
211
|
SdTooltip.styles = [
|
|
@@ -27,14 +27,26 @@ import {
|
|
|
27
27
|
import { css, html } from "lit";
|
|
28
28
|
import { property, query } from "lit/decorators.js";
|
|
29
29
|
import cx from "classix";
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
var stacks = {
|
|
31
|
+
"top-right": null,
|
|
32
|
+
"bottom-center": null
|
|
33
|
+
};
|
|
34
|
+
var loadStacks = () => {
|
|
35
|
+
Object.entries(stacks).forEach(([name]) => {
|
|
36
|
+
const stack = document.querySelector(`#sd-toast-stack--${name}`);
|
|
37
|
+
if (stack) {
|
|
38
|
+
stack.setAttribute("role", "region");
|
|
39
|
+
stacks[name] = stack;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
stacks[name] = Object.assign(document.createElement("div"), {
|
|
43
|
+
role: "region",
|
|
44
|
+
id: `sd-toast-stack--${name}`,
|
|
45
|
+
className: `sd-toast-stack sd-toast-stack--${name}`
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
loadStacks();
|
|
38
50
|
var SdNotification = class extends SolidElement {
|
|
39
51
|
constructor() {
|
|
40
52
|
super(...arguments);
|
|
@@ -47,14 +59,9 @@ var SdNotification = class extends SolidElement {
|
|
|
47
59
|
this.toastStack = "top-right";
|
|
48
60
|
this.remainingDuration = this.duration;
|
|
49
61
|
this.startTime = Date.now();
|
|
50
|
-
this.tabDirection = "forward";
|
|
51
|
-
this.focused = false;
|
|
52
62
|
}
|
|
53
63
|
get stack() {
|
|
54
|
-
return
|
|
55
|
-
"top-right": toastStackDefault,
|
|
56
|
-
"bottom-center": toastStackBottomCenter
|
|
57
|
-
}[this.toastStack];
|
|
64
|
+
return stacks[this.toastStack];
|
|
58
65
|
}
|
|
59
66
|
connectedCallback() {
|
|
60
67
|
super.connectedCallback();
|
|
@@ -62,12 +69,9 @@ var SdNotification = class extends SolidElement {
|
|
|
62
69
|
document.body.append(this.stack);
|
|
63
70
|
this.stack.ariaLabel = this.localize.term("notifications");
|
|
64
71
|
}
|
|
65
|
-
this.handleFocusIn = this.handleFocusIn.bind(this);
|
|
66
|
-
document.addEventListener("focusin", this.handleFocusIn);
|
|
67
72
|
}
|
|
68
73
|
disconnectedCallback() {
|
|
69
74
|
super.disconnectedCallback();
|
|
70
|
-
document.removeEventListener("focusin", this.handleFocusIn);
|
|
71
75
|
}
|
|
72
76
|
firstUpdated() {
|
|
73
77
|
this.base.hidden = !this.open;
|
|
@@ -98,28 +102,10 @@ var SdNotification = class extends SolidElement {
|
|
|
98
102
|
handleCloseClick() {
|
|
99
103
|
this.hide();
|
|
100
104
|
}
|
|
101
|
-
checkFocus() {
|
|
102
|
-
if (!this.focused || !this.closable) return;
|
|
103
|
-
if (!this.matches(":focus-within")) {
|
|
104
|
-
const target = this.tabDirection === "forward" ? this.base : this.close;
|
|
105
|
-
if (typeof (target == null ? void 0 : target.focus) === "function") {
|
|
106
|
-
target.focus({ preventScroll: true });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
handleFocusIn() {
|
|
111
|
-
this.focused = true;
|
|
112
|
-
}
|
|
113
105
|
handleKeyDown(event) {
|
|
114
|
-
this.tabDirection = "forward";
|
|
115
106
|
if (this.closable && event.key === "Escape") {
|
|
116
107
|
this.hide();
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (event.key === "Tab" && event.shiftKey) {
|
|
120
|
-
this.tabDirection = "backwards";
|
|
121
108
|
}
|
|
122
|
-
requestAnimationFrame(() => this.checkFocus());
|
|
123
109
|
}
|
|
124
110
|
async handleOpenChange() {
|
|
125
111
|
if (this.open) {
|
|
@@ -168,11 +154,10 @@ var SdNotification = class extends SolidElement {
|
|
|
168
154
|
*/
|
|
169
155
|
async toast() {
|
|
170
156
|
return new Promise((resolve) => {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
document.body.append(toastStack);
|
|
157
|
+
if (this.stack.parentElement === null) {
|
|
158
|
+
document.body.append(this.stack);
|
|
174
159
|
}
|
|
175
|
-
|
|
160
|
+
this.stack.appendChild(this);
|
|
176
161
|
requestAnimationFrame(() => {
|
|
177
162
|
this.clientWidth;
|
|
178
163
|
this.show();
|
|
@@ -180,18 +165,15 @@ var SdNotification = class extends SolidElement {
|
|
|
180
165
|
this.addEventListener(
|
|
181
166
|
"sd-after-hide",
|
|
182
167
|
() => {
|
|
183
|
-
|
|
168
|
+
this.stack.removeChild(this);
|
|
184
169
|
resolve();
|
|
185
|
-
if (toastStack.querySelector("sd-notification") === null) {
|
|
186
|
-
toastStack.remove();
|
|
187
|
-
}
|
|
188
170
|
},
|
|
189
171
|
{ once: true }
|
|
190
172
|
);
|
|
191
173
|
});
|
|
192
174
|
}
|
|
193
175
|
render() {
|
|
194
|
-
return html`<div part="base" class="${cx("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}"
|
|
176
|
+
return html`<div part="base" class="${cx("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open ? "false" : "true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><slot name="icon" part="icon" class="${cx(
|
|
195
177
|
"min-w-min flex items-center px-3 justify-center",
|
|
196
178
|
{
|
|
197
179
|
info: "bg-info",
|
|
@@ -15,8 +15,6 @@ export default class SdNotification extends SolidElement {
|
|
|
15
15
|
toastStack: 'top-right' | 'bottom-center';
|
|
16
16
|
private remainingDuration;
|
|
17
17
|
private startTime;
|
|
18
|
-
private tabDirection;
|
|
19
|
-
private focused;
|
|
20
18
|
get stack(): HTMLElement;
|
|
21
19
|
connectedCallback(): void;
|
|
22
20
|
disconnectedCallback(): void;
|
|
@@ -25,8 +23,6 @@ export default class SdNotification extends SolidElement {
|
|
|
25
23
|
private onHover;
|
|
26
24
|
private onHoverEnd;
|
|
27
25
|
private handleCloseClick;
|
|
28
|
-
private checkFocus;
|
|
29
|
-
private handleFocusIn;
|
|
30
26
|
private handleKeyDown;
|
|
31
27
|
handleOpenChange(): Promise<void>;
|
|
32
28
|
handleDurationChange(): void;
|
|
@@ -19,6 +19,7 @@ export default class SdTooltip extends SolidElement {
|
|
|
19
19
|
connectedCallback(): void;
|
|
20
20
|
firstUpdated(): void;
|
|
21
21
|
disconnectedCallback(): void;
|
|
22
|
+
private get hasCustomTrigger();
|
|
22
23
|
private formatDefaultSlot;
|
|
23
24
|
private handleMouseInteraction;
|
|
24
25
|
private handleKeyboardInteraction;
|
|
@@ -17188,7 +17188,7 @@
|
|
|
17188
17188
|
"package": {
|
|
17189
17189
|
"name": "@solid-design-system/components",
|
|
17190
17190
|
"description": "Solid Design System: Components",
|
|
17191
|
-
"version": "4.6.
|
|
17191
|
+
"version": "4.6.14",
|
|
17192
17192
|
"author": "Union Investment",
|
|
17193
17193
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
17194
17194
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunks/chunk.BLEQBK6L.js";
|
|
17
17
|
import {
|
|
18
18
|
SdTooltip
|
|
19
|
-
} from "./chunks/chunk.
|
|
19
|
+
} from "./chunks/chunk.5DTO5VHH.js";
|
|
20
20
|
import {
|
|
21
21
|
SdVideo
|
|
22
22
|
} from "./chunks/chunk.ZW2FQM2X.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "./chunks/chunk.ZFWQYTKN.js";
|
|
44
44
|
import {
|
|
45
45
|
SdNotification
|
|
46
|
-
} from "./chunks/chunk.
|
|
46
|
+
} from "./chunks/chunk.QB4ZOKFD.js";
|
|
47
47
|
import {
|
|
48
48
|
SdOptgroup
|
|
49
49
|
} from "./chunks/chunk.SONGMTFR.js";
|
package/dist/web-types.json
CHANGED
|
@@ -32,7 +32,7 @@ let SdMenu = class SdMenu extends SolidElement {
|
|
|
32
32
|
if (item.type === 'checkbox') {
|
|
33
33
|
item.checked = !item.checked;
|
|
34
34
|
}
|
|
35
|
-
this.emit('sd-4-6-
|
|
35
|
+
this.emit('sd-4-6-14-select', { detail: { item } });
|
|
36
36
|
}
|
|
37
37
|
handleKeyDown(event) {
|
|
38
38
|
if (event.key === 'Enter') {
|
|
@@ -74,7 +74,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
|
|
|
74
74
|
})}
|
|
75
75
|
>
|
|
76
76
|
<span part="checked-icon" class="menu-item__check">
|
|
77
|
-
<sd-4-6-
|
|
77
|
+
<sd-4-6-14-icon name="check" library="system" aria-hidden="true"></sd-4-6-14-icon>
|
|
78
78
|
</span>
|
|
79
79
|
|
|
80
80
|
<slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
|
|
@@ -84,7 +84,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
|
|
|
84
84
|
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
|
|
85
85
|
|
|
86
86
|
<span class="menu-item__chevron">
|
|
87
|
-
<sd-4-6-
|
|
87
|
+
<sd-4-6-14-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-6-14-icon>
|
|
88
88
|
</span>
|
|
89
89
|
</div>
|
|
90
90
|
`;
|
|
@@ -56,7 +56,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
56
56
|
this.pausedAutoplay = false;
|
|
57
57
|
this.autoplayController = new AutoplayController(this, () => this.next());
|
|
58
58
|
this.scrollController = new ScrollController(this);
|
|
59
|
-
this.slides = this.getElementsByTagName("sd-4-6-
|
|
59
|
+
this.slides = this.getElementsByTagName("sd-4-6-14-carousel-item");
|
|
60
60
|
// determines which slide is displayed
|
|
61
61
|
// A map containing the state of all the slides
|
|
62
62
|
this.intersectionObserverEntries = /* @__PURE__ */ new Map();
|
|
@@ -380,7 +380,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
380
380
|
)}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${prevEnabled ? (e) => {
|
|
381
381
|
this.previous();
|
|
382
382
|
this.unblockAutoplay(e, this.previousButton);
|
|
383
|
-
} : null}"><slot name="previous-icon"><sd-4-6-
|
|
383
|
+
} : null}"><slot name="previous-icon"><sd-4-6-14-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-4-6-14-icon></slot></button> ${this.variant === "dot" ? html`<div part="pagination-dot" role="tablist" class="${cx("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${map(range(pagesCount), (index) => {
|
|
384
384
|
const isActive = index + 1 === currentPage;
|
|
385
385
|
return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
|
|
386
386
|
"carousel__pagination-item",
|
|
@@ -403,7 +403,7 @@ var SdCarousel = class extends SolidElement {
|
|
|
403
403
|
)}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${nextEnabled ? (e) => {
|
|
404
404
|
this.next();
|
|
405
405
|
this.unblockAutoplay(e, this.nextButton);
|
|
406
|
-
} : null}"><slot name="next-icon"><sd-4-6-
|
|
406
|
+
} : null}"><slot name="next-icon"><sd-4-6-14-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-4-6-14-icon></slot></button></div><button class="${cx(
|
|
407
407
|
"ml-6 !rounded-sm",
|
|
408
408
|
"!absolute !right-0 sd-interactive",
|
|
409
409
|
this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
|
|
@@ -413,12 +413,12 @@ var SdCarousel = class extends SolidElement {
|
|
|
413
413
|
if (e.detail) {
|
|
414
414
|
this.autoplayControls.blur();
|
|
415
415
|
}
|
|
416
|
-
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-4-6-
|
|
416
|
+
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-4-6-14-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-4-6-14-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-4-6-14-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-4-6-14-icon></slot></button></div></div>`;
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
419
|
SdCarousel.styles = [
|
|
420
420
|
...SolidElement.styles,
|
|
421
|
-
css`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-4-6-
|
|
421
|
+
css`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-4-6-14-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`
|
|
422
422
|
];
|
|
423
423
|
__decorateClass([
|
|
424
424
|
query('[part~="autoplay-controls"]')
|
|
@@ -485,7 +485,7 @@ __decorateClass([
|
|
|
485
485
|
watch("autoplay")
|
|
486
486
|
], SdCarousel.prototype, "handleAutoplayChange", 1);
|
|
487
487
|
SdCarousel = __decorateClass([
|
|
488
|
-
customElement("sd-4-6-
|
|
488
|
+
customElement("sd-4-6-14-carousel")
|
|
489
489
|
], SdCarousel);
|
|
490
490
|
|
|
491
491
|
export {
|
|
@@ -210,7 +210,7 @@ var SdDrawer = class extends SolidElement {
|
|
|
210
210
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
211
211
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
212
212
|
}[this.placement]
|
|
213
|
-
)}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-4-6-
|
|
213
|
+
)}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-4-6-14-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-4-6-14-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-6-14-icon></sd-4-6-14-button></div></header>` : html`<sd-4-6-14-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-4-6-14-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-6-14-icon></sd-4-6-14-button>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${cx(this.hasSlotController.test("footer") ? "text-left p-4" : "hidden")}"><slot name="footer"></slot></footer></div></section>`;
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
SdDrawer.styles = [
|
|
@@ -251,7 +251,7 @@ __decorateClass([
|
|
|
251
251
|
watch("contained", { waitUntilFirstUpdate: true })
|
|
252
252
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
|
253
253
|
SdDrawer = __decorateClass([
|
|
254
|
-
customElement("sd-4-6-
|
|
254
|
+
customElement("sd-4-6-14-drawer")
|
|
255
255
|
], SdDrawer);
|
|
256
256
|
setDefaultAnimation("drawer.showStart", {
|
|
257
257
|
keyframes: [
|
|
@@ -84,8 +84,14 @@ var SdTooltip = class extends SolidElement {
|
|
|
84
84
|
document.removeEventListener("mousedown", this.handleMouseInteraction);
|
|
85
85
|
document.removeEventListener("keydown", this.handleKeyboardInteraction);
|
|
86
86
|
}
|
|
87
|
+
get hasCustomTrigger() {
|
|
88
|
+
return !!this.querySelector("*:not([slot])");
|
|
89
|
+
}
|
|
87
90
|
// removes empty text nodes from the default slot
|
|
88
91
|
formatDefaultSlot(slot) {
|
|
92
|
+
if (!slot) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
89
95
|
const nodes = slot.assignedNodes({ flatten: true });
|
|
90
96
|
nodes.forEach((node) => {
|
|
91
97
|
var _a, _b;
|
|
@@ -186,21 +192,25 @@ var SdTooltip = class extends SolidElement {
|
|
|
186
192
|
return void 0;
|
|
187
193
|
}
|
|
188
194
|
this.open = false;
|
|
189
|
-
this.
|
|
195
|
+
if (this.trigger === "click" || this.trigger === "click focus") {
|
|
196
|
+
this.focus();
|
|
197
|
+
} else {
|
|
198
|
+
this.blur();
|
|
199
|
+
}
|
|
190
200
|
return waitForEvent(this, "sd-after-hide");
|
|
191
201
|
}
|
|
192
202
|
render() {
|
|
193
203
|
const isStart = this.placement.endsWith("-start");
|
|
194
204
|
const isEnd = this.placement.endsWith("-end");
|
|
195
|
-
return html`<sd-4-6-
|
|
205
|
+
return html`<sd-4-6-14-popup part="base" exportparts="
|
|
196
206
|
popup:base__popup,
|
|
197
207
|
arrow:base__arrow
|
|
198
|
-
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"
|
|
208
|
+
" class="${cx(this.open && "tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{ start: 2, end: -2, default: 0 }[isStart ? "start" : isEnd ? "end" : "default"] * (this.size === "sm" ? -1 : 1)}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger ? html`<slot slot="anchor"></slot>` : html`<button slot="anchor" aria-describedby="tooltip" class="${cx("flex sd-interactive rounded-full", this.size === "lg" ? "text-xl" : "text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-4-6-14-icon library="system" name="info-circle" label="Tooltip" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-4-6-14-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open ? "polite" : "off"}">${this.content}</slot></sd-4-6-14-popup>`;
|
|
199
209
|
}
|
|
200
210
|
};
|
|
201
211
|
SdTooltip.styles = [
|
|
202
212
|
...SolidElement.styles,
|
|
203
|
-
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-6-
|
|
213
|
+
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-6-14-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-6-14-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-6-14-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-6-14-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-6-14-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`
|
|
204
214
|
];
|
|
205
215
|
__decorateClass([
|
|
206
216
|
query("slot:not([name])")
|
|
@@ -209,7 +219,7 @@ __decorateClass([
|
|
|
209
219
|
query("#tooltip")
|
|
210
220
|
], SdTooltip.prototype, "body", 2);
|
|
211
221
|
__decorateClass([
|
|
212
|
-
query("sd-4-6-
|
|
222
|
+
query("sd-4-6-14-popup")
|
|
213
223
|
], SdTooltip.prototype, "popup", 2);
|
|
214
224
|
__decorateClass([
|
|
215
225
|
property({ type: String, reflect: true })
|
|
@@ -242,7 +252,7 @@ __decorateClass([
|
|
|
242
252
|
watch("disabled")
|
|
243
253
|
], SdTooltip.prototype, "handleDisabledChange", 1);
|
|
244
254
|
SdTooltip = __decorateClass([
|
|
245
|
-
customElement("sd-4-6-
|
|
255
|
+
customElement("sd-4-6-14-tooltip")
|
|
246
256
|
], SdTooltip);
|
|
247
257
|
setDefaultAnimation("tooltip.show", {
|
|
248
258
|
keyframes: [
|
|
@@ -21,7 +21,7 @@ var SdTab = class extends SolidElement {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.attrId = ++id;
|
|
24
|
-
this.componentId = `sd-4-6-
|
|
24
|
+
this.componentId = `sd-4-6-14-tab-${this.attrId}`;
|
|
25
25
|
this.hasSlotController = new HasSlotController(this, "left");
|
|
26
26
|
this.variant = "default";
|
|
27
27
|
this.active = false;
|
|
@@ -102,7 +102,7 @@ __decorateClass([
|
|
|
102
102
|
watch(["disabled", "visually-disabled"])
|
|
103
103
|
], SdTab.prototype, "handleDisabledChange", 1);
|
|
104
104
|
SdTab = __decorateClass([
|
|
105
|
-
customElement("sd-4-6-
|
|
105
|
+
customElement("sd-4-6-14-tab")
|
|
106
106
|
], SdTab);
|
|
107
107
|
|
|
108
108
|
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-4-6-
|
|
74
|
+
"sd-4-6-14-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",
|
|
75
75
|
(this.disabled || this.visuallyDisabled) && "hover:cursor-not-allowed",
|
|
76
76
|
{
|
|
77
77
|
/* sizes, fonts */
|
|
@@ -126,7 +126,7 @@ __decorateClass([
|
|
|
126
126
|
watch(["disabled", "visually-disabled"], { waitUntilFirstUpdate: true })
|
|
127
127
|
], SdRadio.prototype, "handleDisabledChange", 1);
|
|
128
128
|
SdRadio = __decorateClass([
|
|
129
|
-
customElement("sd-4-6-
|
|
129
|
+
customElement("sd-4-6-14-radio")
|
|
130
130
|
], SdRadio);
|
|
131
131
|
|
|
132
132
|
export {
|
|
@@ -202,7 +202,7 @@ var SdButton = class extends SolidElement {
|
|
|
202
202
|
md: "ml-2",
|
|
203
203
|
lg: "ml-2"
|
|
204
204
|
}[this.size]
|
|
205
|
-
)}"></slot>${this.loading ? html`<sd-4-6-
|
|
205
|
+
)}"></slot>${this.loading ? html`<sd-4-6-14-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-4-6-14-spinner>` : ""}</${tag}>`;
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
/**
|
|
@@ -210,13 +210,13 @@ var SdButton = class extends SolidElement {
|
|
|
210
210
|
*/
|
|
211
211
|
SdButton.styles = [
|
|
212
212
|
...SolidElement.styles,
|
|
213
|
-
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-6-
|
|
213
|
+
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-6-14-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-4-6-14-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-4-6-14-icon),sd-4-6-14-spinner{font-size:calc(var(--tw-varspacing)/2)}`
|
|
214
214
|
];
|
|
215
215
|
__decorateClass([
|
|
216
216
|
query("a, button")
|
|
217
217
|
], SdButton.prototype, "button", 2);
|
|
218
218
|
__decorateClass([
|
|
219
|
-
queryAssignedElements({ selector: "sd-4-6-
|
|
219
|
+
queryAssignedElements({ selector: "sd-4-6-14-icon" })
|
|
220
220
|
], SdButton.prototype, "_iconsInDefaultSlot", 2);
|
|
221
221
|
__decorateClass([
|
|
222
222
|
state()
|
|
@@ -282,7 +282,7 @@ __decorateClass([
|
|
|
282
282
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
283
283
|
], SdButton.prototype, "handleDisabledChange", 1);
|
|
284
284
|
SdButton = __decorateClass([
|
|
285
|
-
customElement("sd-4-6-
|
|
285
|
+
customElement("sd-4-6-14-button")
|
|
286
286
|
], SdButton);
|
|
287
287
|
|
|
288
288
|
export {
|
|
@@ -10,7 +10,7 @@ function setupAutocomplete(selector, { setValueOnSelection, scrollSelectionIntoV
|
|
|
10
10
|
var _a, _b;
|
|
11
11
|
const ul = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("ul");
|
|
12
12
|
ul == null ? void 0 : ul.setAttribute("part", "listbox");
|
|
13
|
-
const popup = document.createElement("sd-4-6-
|
|
13
|
+
const popup = document.createElement("sd-4-6-14-popup");
|
|
14
14
|
popup.appendChild(ul);
|
|
15
15
|
(_b = sdInput.shadowRoot) == null ? void 0 : _b.appendChild(popup);
|
|
16
16
|
popup == null ? void 0 : popup.setAttribute("exportparts", "popup__content");
|
|
@@ -22,7 +22,7 @@ function setupAutocomplete(selector, { setValueOnSelection, scrollSelectionIntoV
|
|
|
22
22
|
popup.anchor = sdInput;
|
|
23
23
|
popup.sync = "width";
|
|
24
24
|
}
|
|
25
|
-
const styles = css`sd-4-6-
|
|
25
|
+
const styles = css`sd-4-6-14-popup::part(popup){border-bottom-left-radius:var(--sd-border-radius-default,.25rem);border-bottom-right-radius:var(--sd-border-radius-default,.25rem);border-width:0 2px 2px;overflow-y:scroll;z-index:var(--sd-z-index-dropdown,900);--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-6-14-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-4-6-14-popup li:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--tw-bg-opacity,1))}sd-4-6-14-popup li{list-style-type:""}sd-4-6-14-popup li mark{background-color:transparent;font-weight:700}sd-4-6-14-popup li:not(:has(sd-4-6-14-option)){cursor:pointer;font-size:var(--sd-font-size-base,1rem);padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-4,1rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity,1))}sd-4-6-14-popup li:not(:has(sd-4-6-14-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-4-6-14-popup li[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}`;
|
|
26
26
|
const styleSheet = new CSSStyleSheet();
|
|
27
27
|
styleSheet.replaceSync(styles);
|
|
28
28
|
sdInput.shadowRoot.adoptedStyleSheets = [...sdInput.shadowRoot.adoptedStyleSheets, styleSheet];
|
|
@@ -35,13 +35,13 @@ function setupAutocomplete(selector, { setValueOnSelection, scrollSelectionIntoV
|
|
|
35
35
|
}
|
|
36
36
|
input.addEventListener("open", () => {
|
|
37
37
|
var _a, _b, _c, _d, _e, _f;
|
|
38
|
-
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-6-
|
|
38
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-6-14-popup")) == null ? void 0 : _b.setAttribute("active", "true");
|
|
39
39
|
(_d = (_c = sdInput.shadowRoot) == null ? void 0 : _c.querySelector('[part="border"]')) == null ? void 0 : _d.classList.add("rounded-b-none");
|
|
40
40
|
(_f = (_e = sdInput.shadowRoot) == null ? void 0 : _e.querySelector('[part="form-control"]')) == null ? void 0 : _f.classList.add("z-50");
|
|
41
41
|
});
|
|
42
42
|
input.addEventListener("close", () => {
|
|
43
43
|
var _a, _b, _c, _d, _e, _f;
|
|
44
|
-
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-6-
|
|
44
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-6-14-popup")) == null ? void 0 : _b.removeAttribute("active");
|
|
45
45
|
(_d = (_c = sdInput.shadowRoot) == null ? void 0 : _c.querySelector('[part="border"]')) == null ? void 0 : _d.classList.remove("rounded-b-none");
|
|
46
46
|
(_f = (_e = sdInput.shadowRoot) == null ? void 0 : _e.querySelector('[part="form-control"]')) == null ? void 0 : _f.classList.remove("z-50");
|
|
47
47
|
});
|
|
@@ -142,7 +142,7 @@ var SdAccordion = class extends SolidElement {
|
|
|
142
142
|
)}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
|
|
143
143
|
"flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
|
|
144
144
|
this.open && "rotate-180"
|
|
145
|
-
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-4-6-
|
|
145
|
+
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-4-6-14-icon library="system" name="chevron-down"></sd-4-6-14-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-4-6-14-icon library="system" name="chevron-down"></sd-4-6-14-icon></slot></span></summary><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></details>`;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
SdAccordion.styles = [
|
|
@@ -168,7 +168,7 @@ __decorateClass([
|
|
|
168
168
|
watch("open", { waitUntilFirstUpdate: true })
|
|
169
169
|
], SdAccordion.prototype, "handleOpenChange", 1);
|
|
170
170
|
SdAccordion = __decorateClass([
|
|
171
|
-
customElement("sd-4-6-
|
|
171
|
+
customElement("sd-4-6-14-accordion")
|
|
172
172
|
], SdAccordion);
|
|
173
173
|
setDefaultAnimation("accordion.show", {
|
|
174
174
|
keyframes: [
|
|
@@ -171,7 +171,7 @@ var SdDialog = class extends SolidElement {
|
|
|
171
171
|
)}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
|
|
172
172
|
"flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",
|
|
173
173
|
this.open && "flex opacity-100"
|
|
174
|
-
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${ifDefined(this.headline ? this.headline : void 0)}" aria-labelledby="${ifDefined(!this.headline ? "title" : void 0)}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-4-6-
|
|
174
|
+
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${ifDefined(this.headline ? this.headline : void 0)}" aria-labelledby="${ifDefined(!this.headline ? "title" : void 0)}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-4-6-14-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${cx("absolute top-2 right-2")}" name="x-lg" @click="${() => this.requestClose("close-button")}" type="button"><sd-4-6-14-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-6-14-icon></sd-4-6-14-button>` : ""}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`;
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
SdDialog.styles = [
|
|
@@ -200,7 +200,7 @@ __decorateClass([
|
|
|
200
200
|
watch("open", { waitUntilFirstUpdate: true })
|
|
201
201
|
], SdDialog.prototype, "handleOpenChange", 1);
|
|
202
202
|
SdDialog = __decorateClass([
|
|
203
|
-
customElement("sd-4-6-
|
|
203
|
+
customElement("sd-4-6-14-dialog")
|
|
204
204
|
], SdDialog);
|
|
205
205
|
setDefaultAnimation("dialog.show", {
|
|
206
206
|
keyframes: [
|