@solid-design-system/components 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.NER6LFUE.js → chunk.5YWPH3S7.js} +2 -2
- package/cdn/chunks/chunk.HT2MRC4Z.js +1 -0
- package/cdn/chunks/chunk.NQXQB7LN.js +1 -0
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/step/step.d.ts +1 -0
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/step-group/step-group.d.ts +1 -0
- package/cdn/components/step-group/step-group.js +1 -1
- package/cdn/custom-elements.json +20 -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/vscode.html-custom-data.json +5 -0
- package/cdn/web-types.json +11 -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.247MZWMU.js +1 -1
- package/cdn-versioned/chunks/chunk.2BLQ3VDT.js +4 -4
- package/cdn-versioned/chunks/chunk.2HJF2D4H.js +2 -2
- package/cdn-versioned/chunks/chunk.43NFQGWL.js +1 -1
- package/cdn-versioned/chunks/chunk.4QAJB6AU.js +1 -1
- package/cdn-versioned/chunks/chunk.5AILWWY2.js +1 -1
- package/cdn-versioned/chunks/chunk.5TTHL3M2.js +3 -3
- package/cdn-versioned/chunks/{chunk.NER6LFUE.js → chunk.5YWPH3S7.js} +2 -2
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.777DWZOA.js +1 -1
- package/cdn-versioned/chunks/chunk.7TRFUW6U.js +1 -1
- package/cdn-versioned/chunks/chunk.BHWV44KN.js +1 -1
- package/cdn-versioned/chunks/chunk.BWMHPT4Y.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.CNGIUOE5.js +1 -1
- package/cdn-versioned/chunks/chunk.DDLTKNEO.js +1 -1
- package/cdn-versioned/chunks/chunk.DLY5AX2P.js +1 -1
- package/cdn-versioned/chunks/chunk.E5FCRWHS.js +1 -1
- package/cdn-versioned/chunks/chunk.F45IDVYA.js +1 -1
- package/cdn-versioned/chunks/chunk.FHU3KJ7Y.js +1 -1
- package/cdn-versioned/chunks/chunk.FVXID42E.js +1 -1
- package/cdn-versioned/chunks/chunk.HT2MRC4Z.js +1 -0
- package/cdn-versioned/chunks/chunk.I2WEQVU3.js +1 -1
- package/cdn-versioned/chunks/chunk.IUC5UQ2V.js +1 -1
- package/cdn-versioned/chunks/chunk.JCNKLGIS.js +1 -1
- package/cdn-versioned/chunks/chunk.JDSUZDP4.js +1 -1
- package/cdn-versioned/chunks/chunk.KLNBBP4R.js +4 -4
- package/cdn-versioned/chunks/chunk.KV424MMD.js +1 -1
- package/cdn-versioned/chunks/chunk.KWNRVZ54.js +1 -1
- package/cdn-versioned/chunks/chunk.LET4FMBB.js +1 -1
- package/cdn-versioned/chunks/chunk.LKO4ZRE7.js +1 -1
- package/cdn-versioned/chunks/chunk.NFQN6UG4.js +1 -1
- package/cdn-versioned/chunks/chunk.NOJV6ZZF.js +1 -1
- package/cdn-versioned/chunks/chunk.NQXQB7LN.js +1 -0
- package/cdn-versioned/chunks/chunk.NZT4ORYP.js +1 -1
- package/cdn-versioned/chunks/chunk.O3IRROA2.js +1 -1
- package/cdn-versioned/chunks/chunk.ONLECFTO.js +1 -1
- package/cdn-versioned/chunks/chunk.PDIUABFP.js +1 -1
- package/cdn-versioned/chunks/chunk.PGBIGG5I.js +1 -1
- package/cdn-versioned/chunks/chunk.QWMQJ6TF.js +1 -1
- package/cdn-versioned/chunks/chunk.RCLIOOS5.js +1 -1
- package/cdn-versioned/chunks/chunk.RGJXEMYT.js +1 -1
- package/cdn-versioned/chunks/chunk.SDZ6E4CH.js +1 -1
- package/cdn-versioned/chunks/chunk.V3YHI2G2.js +1 -1
- package/cdn-versioned/chunks/chunk.VZSFEHBE.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WJ55QSS3.js +1 -1
- package/cdn-versioned/chunks/chunk.WMV7GLXF.js +1 -1
- package/cdn-versioned/chunks/chunk.WUTY672B.js +1 -1
- package/cdn-versioned/chunks/chunk.XYZ5DKTA.js +1 -1
- package/cdn-versioned/chunks/chunk.Y4PTSCEB.js +1 -1
- package/cdn-versioned/chunks/chunk.ZN24IDXT.js +1 -1
- package/cdn-versioned/chunks/chunk.ZVVSLR3B.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/carousel.js +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 +4 -4
- 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 -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 +4 -4
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +2 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +2 -1
- package/cdn-versioned/components/step-group/step-group.js +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 +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +221 -202
- 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 +21 -21
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +85 -80
- package/cdn-versioned/web-types.json +147 -137
- package/dist/chunks/{chunk.RI66LCUS.js → chunk.5AX4S2QZ.js} +9 -1
- package/dist/chunks/{chunk.2LL4ZNH4.js → chunk.JMAPLJHF.js} +5 -1
- package/dist/chunks/{chunk.5R6D4NTV.js → chunk.L5QYLWGO.js} +0 -2
- package/dist/components/carousel/carousel.js +1 -1
- package/dist/components/step/step.d.ts +1 -0
- package/dist/components/step/step.js +2 -1
- package/dist/components/step-group/step-group.d.ts +1 -0
- package/dist/components/step-group/step-group.js +1 -1
- package/dist/custom-elements.json +20 -1
- package/dist/solid-components.js +3 -3
- package/dist/vscode.html-custom-data.json +5 -0
- package/dist/web-types.json +11 -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.35GLHXMN.js +2 -2
- package/dist-versioned/chunks/chunk.3UO2LKG5.js +13 -13
- package/dist-versioned/chunks/chunk.3YTMF6YZ.js +2 -2
- package/dist-versioned/chunks/{chunk.RI66LCUS.js → chunk.5AX4S2QZ.js} +11 -3
- package/dist-versioned/chunks/chunk.5V7TZU4Q.js +5 -5
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6MMBMCHF.js +9 -9
- package/dist-versioned/chunks/chunk.6S3CCHLZ.js +1 -1
- package/dist-versioned/chunks/chunk.73HAOWEX.js +2 -2
- package/dist-versioned/chunks/chunk.7SZFMAVT.js +1 -1
- package/dist-versioned/chunks/chunk.AWASHA2T.js +1 -1
- package/dist-versioned/chunks/chunk.BFHRLREK.js +1 -1
- package/dist-versioned/chunks/chunk.CVHGDRIM.js +2 -2
- package/dist-versioned/chunks/chunk.DI4CIT2A.js +1 -1
- package/dist-versioned/chunks/chunk.DNHLNGIL.js +13 -13
- package/dist-versioned/chunks/chunk.F4BRIYYD.js +1 -1
- package/dist-versioned/chunks/chunk.G6KPFA3G.js +4 -4
- package/dist-versioned/chunks/chunk.GQXJC6ZE.js +2 -2
- package/dist-versioned/chunks/chunk.GWCHNKGW.js +1 -1
- package/dist-versioned/chunks/chunk.H54CZFCF.js +5 -5
- package/dist-versioned/chunks/chunk.HJ3ZUH4A.js +1 -1
- package/dist-versioned/chunks/chunk.I2JBWY5C.js +2 -2
- package/dist-versioned/chunks/chunk.IKWY7WM6.js +3 -3
- package/dist-versioned/chunks/chunk.JD5XFZKL.js +2 -2
- package/dist-versioned/chunks/{chunk.2LL4ZNH4.js → chunk.JMAPLJHF.js} +7 -3
- package/dist-versioned/chunks/chunk.JPGDK3CW.js +2 -2
- package/dist-versioned/chunks/chunk.K5MKZJEB.js +5 -5
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/{chunk.5R6D4NTV.js → chunk.L5QYLWGO.js} +6 -8
- package/dist-versioned/chunks/chunk.LRQ55FZL.js +1 -1
- package/dist-versioned/chunks/chunk.LUV3NLSJ.js +3 -3
- package/dist-versioned/chunks/chunk.MCUC6LS6.js +2 -2
- package/dist-versioned/chunks/chunk.MKZ5TRQH.js +1 -1
- package/dist-versioned/chunks/chunk.OENW3EQT.js +5 -5
- package/dist-versioned/chunks/chunk.ONBGPY5D.js +5 -5
- package/dist-versioned/chunks/chunk.QN2ROZHZ.js +3 -3
- package/dist-versioned/chunks/chunk.RFVRT5UG.js +2 -2
- package/dist-versioned/chunks/chunk.SH45GYZL.js +1 -1
- package/dist-versioned/chunks/chunk.T5VRGBLR.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UXEDWUMA.js +26 -26
- package/dist-versioned/chunks/chunk.WHFYHMF4.js +2 -2
- package/dist-versioned/chunks/chunk.WJHCLJNK.js +1 -1
- package/dist-versioned/chunks/chunk.WPHOQL7V.js +2 -2
- package/dist-versioned/chunks/chunk.WZGJQPPD.js +2 -2
- package/dist-versioned/chunks/chunk.X7HEAUGJ.js +2 -2
- package/dist-versioned/chunks/chunk.XCNH2K2U.js +5 -5
- package/dist-versioned/chunks/chunk.XNH47HGG.js +29 -29
- package/dist-versioned/chunks/chunk.Y6WJUTMM.js +6 -6
- package/dist-versioned/chunks/chunk.Z3T4BG2M.js +1 -1
- package/dist-versioned/chunks/chunk.ZH6BP5XL.js +3 -3
- package/dist-versioned/chunks/chunk.ZJGD23K6.js +3 -3
- package/dist-versioned/chunks/chunk.ZWJNBDIV.js +11 -11
- 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/carousel.js +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 +4 -4
- 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 -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 +4 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +2 -1
- package/dist-versioned/components/step/step.js +2 -1
- package/dist-versioned/components/step-group/step-group.d.ts +2 -1
- package/dist-versioned/components/step-group/step-group.js +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 +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +221 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +3 -3
- package/dist-versioned/vscode.html-custom-data.json +85 -80
- package/dist-versioned/web-types.json +147 -137
- package/package.json +2 -2
- package/cdn/chunks/chunk.HKGBSLKX.js +0 -1
- package/cdn/chunks/chunk.NLOKZURD.js +0 -1
- package/cdn-versioned/chunks/chunk.HKGBSLKX.js +0 -1
- package/cdn-versioned/chunks/chunk.NLOKZURD.js +0 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
3
|
} from "./chunk.X2OQMWGY.js";
|
|
4
|
+
import {
|
|
5
|
+
HasSlotController
|
|
6
|
+
} from "./chunk.YEZS5ZR2.js";
|
|
4
7
|
import {
|
|
5
8
|
SolidElement,
|
|
6
9
|
customElement
|
|
@@ -18,6 +21,7 @@ import cx from "classix";
|
|
|
18
21
|
var SdStep = class extends SolidElement {
|
|
19
22
|
constructor() {
|
|
20
23
|
super(...arguments);
|
|
24
|
+
this.hasSlotController = new HasSlotController(this, "label", "[default]");
|
|
21
25
|
this.size = "lg";
|
|
22
26
|
this.orientation = "horizontal";
|
|
23
27
|
this.disabled = false;
|
|
@@ -60,6 +64,10 @@ var SdStep = class extends SolidElement {
|
|
|
60
64
|
render() {
|
|
61
65
|
const isLink = this.isLink();
|
|
62
66
|
const tag = this.notInteractive ? literal`div` : isLink ? literal`a` : literal`button`;
|
|
67
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
68
|
+
const hasLabel = this.label ? true : hasLabelSlot;
|
|
69
|
+
const hasDefaultSlot = this.hasSlotController.test("[default]");
|
|
70
|
+
const hasDescription = this.description ? true : hasDefaultSlot;
|
|
63
71
|
return html`<div role="listitem" part="base" class="${cx(
|
|
64
72
|
"flex pt-1",
|
|
65
73
|
this.orientation === "horizontal" ? "flex-col w-full" : "flex-row gap-4 items-stretch h-full w-min overflow-hidden",
|
|
@@ -69,7 +77,7 @@ var SdStep = class extends SolidElement {
|
|
|
69
77
|
this.noTail && "w-max",
|
|
70
78
|
this.orientation === "horizontal" ? "flex-row" : "flex-col items-stretch",
|
|
71
79
|
this.orientation === "horizontal" ? this.size === "lg" ? "translateLg" : "translateSm" : this.size === "lg" ? "mt-1" : "mt-3"
|
|
72
|
-
)}"><${tag} part="circle" href="${ifDefined(isLink ? this.href : void 0)}" aria-disabled="${ifDefined(this.disabled || void 0)}" aria-current="${this.current ? "step" : void 0}" aria-labelledby="${ifDefined("label")}" aria-describedby="${ifDefined("description")}" class="${cx(
|
|
80
|
+
)}"><${tag} part="circle" href="${ifDefined(isLink ? this.href : void 0)}" aria-disabled="${ifDefined(this.disabled || void 0)}" aria-current="${this.current ? "step" : void 0}" aria-labelledby="${ifDefined(this.notInteractive || !hasLabel ? void 0 : "label")}" aria-describedby="${ifDefined(this.notInteractive || !hasDescription ? void 0 : "description")}" class="${cx(
|
|
73
81
|
"border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",
|
|
74
82
|
this.disabled ? "focus-visible:outline-none cursor-not-allowed" : "focus-visible:focus-outline group-hover:cursor-pointer",
|
|
75
83
|
this.notInteractive ? this.size === "lg" ? "w-[72px]" : "w-12" : this.size === "lg" ? "w-12" : "w-8",
|
|
@@ -21,6 +21,7 @@ var SdStepGroup = class extends SolidElement {
|
|
|
21
21
|
this.orientation = "horizontal";
|
|
22
22
|
this.activeStep = 0;
|
|
23
23
|
this.notInteractive = false;
|
|
24
|
+
this.label = "";
|
|
24
25
|
}
|
|
25
26
|
connectedCallback() {
|
|
26
27
|
super.connectedCallback();
|
|
@@ -84,7 +85,7 @@ var SdStepGroup = class extends SolidElement {
|
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
render() {
|
|
87
|
-
return html`<div role="${!this.notInteractive ? "navigation" : "group"}" class="h-full"><div role="list" part="base" class="${cx("flex", this.orientation === "vertical" && "flex-col h-full")}"><slot part="body"></slot></div></div>`;
|
|
88
|
+
return html`<div role="${!this.notInteractive ? "navigation" : "group"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${cx("flex", this.orientation === "vertical" && "flex-col h-full")}"><slot part="body"></slot></div></div>`;
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
91
|
SdStepGroup.styles = [
|
|
@@ -106,6 +107,9 @@ __decorateClass([
|
|
|
106
107
|
__decorateClass([
|
|
107
108
|
property({ type: Boolean, reflect: true, attribute: "not-interactive" })
|
|
108
109
|
], SdStepGroup.prototype, "notInteractive", 2);
|
|
110
|
+
__decorateClass([
|
|
111
|
+
property({ type: String })
|
|
112
|
+
], SdStepGroup.prototype, "label", 2);
|
|
109
113
|
__decorateClass([
|
|
110
114
|
watch("size", { waitUntilFirstUpdate: true })
|
|
111
115
|
], SdStepGroup.prototype, "updateSize", 1);
|
|
@@ -84,8 +84,6 @@ var SdCarousel = class extends SolidElement {
|
|
|
84
84
|
}
|
|
85
85
|
connectedCallback() {
|
|
86
86
|
super.connectedCallback();
|
|
87
|
-
this.setAttribute("role", "region");
|
|
88
|
-
this.setAttribute("aria-label", this.localize.term("carousel"));
|
|
89
87
|
["click", "keydown"].forEach((event) => this.addEventListener(event, this.handleUserInteraction));
|
|
90
88
|
const intersectionObserver = new IntersectionObserver(
|
|
91
89
|
(entries) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdStep
|
|
3
|
-
} from "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.5AX4S2QZ.js";
|
|
4
4
|
import "../../chunks/chunk.X2OQMWGY.js";
|
|
5
|
+
import "../../chunks/chunk.YEZS5ZR2.js";
|
|
5
6
|
import "../../chunks/chunk.T5VRGBLR.js";
|
|
6
7
|
import "../../chunks/chunk.S3NI7NKU.js";
|
|
7
8
|
export {
|
|
@@ -13748,6 +13748,16 @@
|
|
|
13748
13748
|
"attribute": "not-interactive",
|
|
13749
13749
|
"reflects": true
|
|
13750
13750
|
},
|
|
13751
|
+
{
|
|
13752
|
+
"kind": "field",
|
|
13753
|
+
"name": "label",
|
|
13754
|
+
"type": {
|
|
13755
|
+
"text": "string"
|
|
13756
|
+
},
|
|
13757
|
+
"default": "''",
|
|
13758
|
+
"description": "A label to use in the step-group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
|
|
13759
|
+
"attribute": "label"
|
|
13760
|
+
},
|
|
13751
13761
|
{
|
|
13752
13762
|
"kind": "method",
|
|
13753
13763
|
"name": "setActiveStep",
|
|
@@ -13850,6 +13860,15 @@
|
|
|
13850
13860
|
"description": "Determines if the step-group is not interactive.",
|
|
13851
13861
|
"fieldName": "notInteractive"
|
|
13852
13862
|
},
|
|
13863
|
+
{
|
|
13864
|
+
"name": "label",
|
|
13865
|
+
"type": {
|
|
13866
|
+
"text": "string"
|
|
13867
|
+
},
|
|
13868
|
+
"default": "''",
|
|
13869
|
+
"description": "A label to use in the step-group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
|
|
13870
|
+
"fieldName": "label"
|
|
13871
|
+
},
|
|
13853
13872
|
{
|
|
13854
13873
|
"name": "dir",
|
|
13855
13874
|
"type": {
|
|
@@ -16991,7 +17010,7 @@
|
|
|
16991
17010
|
"package": {
|
|
16992
17011
|
"name": "@solid-design-system/components",
|
|
16993
17012
|
"description": "Solid Design System: Components",
|
|
16994
|
-
"version": "4.
|
|
17013
|
+
"version": "4.4.0",
|
|
16995
17014
|
"author": "Union Investment",
|
|
16996
17015
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
16997
17016
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
} from "./chunks/chunk.XNH47HGG.js";
|
|
29
29
|
import {
|
|
30
30
|
SdStep
|
|
31
|
-
} from "./chunks/chunk.
|
|
31
|
+
} from "./chunks/chunk.5AX4S2QZ.js";
|
|
32
32
|
import {
|
|
33
33
|
SdStepGroup
|
|
34
|
-
} from "./chunks/chunk.
|
|
34
|
+
} from "./chunks/chunk.JMAPLJHF.js";
|
|
35
35
|
import {
|
|
36
36
|
SdSwitch
|
|
37
37
|
} from "./chunks/chunk.MKZ5TRQH.js";
|
|
@@ -135,7 +135,7 @@ import "./chunks/chunk.KVKRZJS7.js";
|
|
|
135
135
|
import "./chunks/chunk.ZWJNBDIV.js";
|
|
136
136
|
import {
|
|
137
137
|
SdCarousel
|
|
138
|
-
} from "./chunks/chunk.
|
|
138
|
+
} from "./chunks/chunk.L5QYLWGO.js";
|
|
139
139
|
import "./chunks/chunk.F4VGSDIW.js";
|
|
140
140
|
import "./chunks/chunk.2LMWBUBT.js";
|
|
141
141
|
import "./chunks/chunk.NOWCQZBS.js";
|
|
@@ -2366,6 +2366,11 @@
|
|
|
2366
2366
|
"description": "Determines if the step-group is not interactive.",
|
|
2367
2367
|
"values": []
|
|
2368
2368
|
},
|
|
2369
|
+
{
|
|
2370
|
+
"name": "label",
|
|
2371
|
+
"description": "A label to use in the step-group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
|
|
2372
|
+
"values": []
|
|
2373
|
+
},
|
|
2369
2374
|
{
|
|
2370
2375
|
"name": "dir",
|
|
2371
2376
|
"description": "The element's directionality.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@solid-design-system/components",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.4.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5450,6 +5450,11 @@
|
|
|
5450
5450
|
"description": "Determines if the step-group is not interactive.",
|
|
5451
5451
|
"value": { "type": "boolean", "default": "false" }
|
|
5452
5452
|
},
|
|
5453
|
+
{
|
|
5454
|
+
"name": "label",
|
|
5455
|
+
"description": "A label to use in the step-group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
|
|
5456
|
+
"value": { "type": "string", "default": "''" }
|
|
5457
|
+
},
|
|
5453
5458
|
{
|
|
5454
5459
|
"name": "dir",
|
|
5455
5460
|
"description": "The element's directionality.",
|
|
@@ -5490,6 +5495,11 @@
|
|
|
5490
5495
|
"description": "Determines if the step-group is not interactive.",
|
|
5491
5496
|
"type": "boolean"
|
|
5492
5497
|
},
|
|
5498
|
+
{
|
|
5499
|
+
"name": "label",
|
|
5500
|
+
"description": "A label to use in the step-group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
|
|
5501
|
+
"type": "string"
|
|
5502
|
+
},
|
|
5493
5503
|
{
|
|
5494
5504
|
"name": "dir",
|
|
5495
5505
|
"description": "The element's directionality.",
|
|
@@ -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-
|
|
35
|
+
this.emit('sd-4-4-0-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-
|
|
77
|
+
<sd-4-4-0-icon name="check" library="system" aria-hidden="true"></sd-4-4-0-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-
|
|
87
|
+
<sd-4-4-0-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-4-0-icon>
|
|
88
88
|
</span>
|
|
89
89
|
</div>
|
|
90
90
|
`;
|
|
@@ -209,7 +209,7 @@ var SdDrawer = class extends SolidElement {
|
|
|
209
209
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
210
210
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
211
211
|
}[this.placement]
|
|
212
|
-
)}" 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-
|
|
212
|
+
)}" 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-4-0-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-4-4-0-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-4-0-icon></sd-4-4-0-button></div></header>` : html`<sd-4-4-0-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-4-4-0-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-4-0-icon></sd-4-4-0-button>`}<div part="body" class="flex-auto block px-4" role="region" 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></div>`;
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
SdDrawer.styles = [
|
|
@@ -250,7 +250,7 @@ __decorateClass([
|
|
|
250
250
|
watch("contained", { waitUntilFirstUpdate: true })
|
|
251
251
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
|
252
252
|
SdDrawer = __decorateClass([
|
|
253
|
-
customElement("sd-4-
|
|
253
|
+
customElement("sd-4-4-0-drawer")
|
|
254
254
|
], SdDrawer);
|
|
255
255
|
setDefaultAnimation("drawer.showStart", {
|
|
256
256
|
keyframes: [
|
|
@@ -77,10 +77,10 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
77
77
|
this.formControlController.updateValidity();
|
|
78
78
|
}
|
|
79
79
|
getAllRadios() {
|
|
80
|
-
return [...this.querySelectorAll("sd-4-
|
|
80
|
+
return [...this.querySelectorAll("sd-4-4-0-radio, sd-4-4-0-radio-button")];
|
|
81
81
|
}
|
|
82
82
|
handleRadioClick(event) {
|
|
83
|
-
const target = event.target.closest("sd-4-
|
|
83
|
+
const target = event.target.closest("sd-4-4-0-radio, sd-4-4-0-radio-button");
|
|
84
84
|
const radios = this.getAllRadios();
|
|
85
85
|
const oldValue = this.value;
|
|
86
86
|
if (target.disabled) {
|
|
@@ -157,7 +157,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
157
157
|
}
|
|
158
158
|
})
|
|
159
159
|
);
|
|
160
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-4-
|
|
160
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-4-4-0-radio-button");
|
|
161
161
|
if (!radios.some((radio) => radio.checked)) {
|
|
162
162
|
if (this.hasButtonGroup) {
|
|
163
163
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -169,26 +169,26 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
if (this.hasButtonGroup) {
|
|
172
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-4-
|
|
172
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-4-4-0-button-group");
|
|
173
173
|
if (buttonGroup) {
|
|
174
174
|
buttonGroup.disableRole = true;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
syncRadios() {
|
|
179
|
-
if (customElements.get("sd-4-
|
|
179
|
+
if (customElements.get("sd-4-4-0-radio") && customElements.get("sd-4-4-0-radio-button")) {
|
|
180
180
|
this.syncRadioElements();
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
if (customElements.get("sd-4-
|
|
183
|
+
if (customElements.get("sd-4-4-0-radio")) {
|
|
184
184
|
this.syncRadioElements();
|
|
185
185
|
} else {
|
|
186
|
-
customElements.whenDefined("sd-4-
|
|
186
|
+
customElements.whenDefined("sd-4-4-0-radio").then(() => this.syncRadios());
|
|
187
187
|
}
|
|
188
|
-
if (customElements.get("sd-4-
|
|
188
|
+
if (customElements.get("sd-4-4-0-radio-button")) {
|
|
189
189
|
this.syncRadioElements();
|
|
190
190
|
} else {
|
|
191
|
-
customElements.whenDefined("sd-4-
|
|
191
|
+
customElements.whenDefined("sd-4-4-0-radio-button").then(() => this.syncRadios());
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
updateCheckedRadio() {
|
|
@@ -267,16 +267,16 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
267
267
|
vertical: "flex-col",
|
|
268
268
|
horizontal: "flex-row"
|
|
269
269
|
}[this.orientation]
|
|
270
|
-
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-4-
|
|
270
|
+
)}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup ? html`<sd-4-4-0-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${defaultSlot}</sd-4-4-0-button-group>` : defaultSlot}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-2", hasHelpText ? "block" : "hidden")}" aria-hidden="${!hasHelpText}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`;
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
|
-
SdRadioGroup.dependencies = { "sd-4-
|
|
273
|
+
SdRadioGroup.dependencies = { "sd-4-4-0-button-group": SdButtonGroup };
|
|
274
274
|
/**
|
|
275
275
|
* Inherits Tailwind classes and includes additional styling.
|
|
276
276
|
*/
|
|
277
277
|
SdRadioGroup.styles = [
|
|
278
278
|
...SolidElement.styles,
|
|
279
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-
|
|
279
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-4-0-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-4-0-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-4-0-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-4-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-4-0-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-4-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`
|
|
280
280
|
];
|
|
281
281
|
__decorateClass([
|
|
282
282
|
query("slot:not([name])")
|
|
@@ -333,7 +333,7 @@ __decorateClass([
|
|
|
333
333
|
watch("value")
|
|
334
334
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
335
335
|
SdRadioGroup = __decorateClass([
|
|
336
|
-
customElement("sd-4-
|
|
336
|
+
customElement("sd-4-4-0-radio-group")
|
|
337
337
|
], SdRadioGroup);
|
|
338
338
|
|
|
339
339
|
export {
|
|
@@ -211,7 +211,7 @@ var SdTextarea = class extends SolidElement {
|
|
|
211
211
|
"flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",
|
|
212
212
|
this.disabled && "cursor-not-allowed",
|
|
213
213
|
textSize
|
|
214
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-4-
|
|
214
|
+
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" rows="${ifDefined(this.rows)}" autocapitalize="${ifDefined(this.autocapitalize)}" autocorrect="${ifDefined(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ifDefined(this.spellcheck)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled || this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-4-4-0-icon class="${cx("text-error absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="risk" part="invalid-icon"></sd-4-4-0-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-4-4-0-icon class="${cx("text-success absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="status-check" part="valid-icon"></sd-4-4-0-icon>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700 mt-2", hasHelpText ? "block" : "hidden")}" aria-hidden="${hasHelpText ? "false" : "true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
/**
|
|
@@ -325,7 +325,7 @@ __decorateClass([
|
|
|
325
325
|
watch("value", { waitUntilFirstUpdate: true })
|
|
326
326
|
], SdTextarea.prototype, "handleValueChange", 1);
|
|
327
327
|
SdTextarea = __decorateClass([
|
|
328
|
-
customElement("sd-4-
|
|
328
|
+
customElement("sd-4-4-0-textarea")
|
|
329
329
|
], SdTextarea);
|
|
330
330
|
|
|
331
331
|
export {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
3
|
} from "./chunk.X2OQMWGY.js";
|
|
4
|
+
import {
|
|
5
|
+
HasSlotController
|
|
6
|
+
} from "./chunk.YEZS5ZR2.js";
|
|
4
7
|
import {
|
|
5
8
|
SolidElement,
|
|
6
9
|
customElement
|
|
@@ -18,6 +21,7 @@ import cx from "classix";
|
|
|
18
21
|
var SdStep = class extends SolidElement {
|
|
19
22
|
constructor() {
|
|
20
23
|
super(...arguments);
|
|
24
|
+
this.hasSlotController = new HasSlotController(this, "label", "[default]");
|
|
21
25
|
this.size = "lg";
|
|
22
26
|
this.orientation = "horizontal";
|
|
23
27
|
this.disabled = false;
|
|
@@ -60,6 +64,10 @@ var SdStep = class extends SolidElement {
|
|
|
60
64
|
render() {
|
|
61
65
|
const isLink = this.isLink();
|
|
62
66
|
const tag = this.notInteractive ? literal`div` : isLink ? literal`a` : literal`button`;
|
|
67
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
68
|
+
const hasLabel = this.label ? true : hasLabelSlot;
|
|
69
|
+
const hasDefaultSlot = this.hasSlotController.test("[default]");
|
|
70
|
+
const hasDescription = this.description ? true : hasDefaultSlot;
|
|
63
71
|
return html`<div role="listitem" part="base" class="${cx(
|
|
64
72
|
"flex pt-1",
|
|
65
73
|
this.orientation === "horizontal" ? "flex-col w-full" : "flex-row gap-4 items-stretch h-full w-min overflow-hidden",
|
|
@@ -69,7 +77,7 @@ var SdStep = class extends SolidElement {
|
|
|
69
77
|
this.noTail && "w-max",
|
|
70
78
|
this.orientation === "horizontal" ? "flex-row" : "flex-col items-stretch",
|
|
71
79
|
this.orientation === "horizontal" ? this.size === "lg" ? "translateLg" : "translateSm" : this.size === "lg" ? "mt-1" : "mt-3"
|
|
72
|
-
)}"><${tag} part="circle" href="${ifDefined(isLink ? this.href : void 0)}" aria-disabled="${ifDefined(this.disabled || void 0)}" aria-current="${this.current ? "step" : void 0}" aria-labelledby="${ifDefined("label")}" aria-describedby="${ifDefined("description")}" class="${cx(
|
|
80
|
+
)}"><${tag} part="circle" href="${ifDefined(isLink ? this.href : void 0)}" aria-disabled="${ifDefined(this.disabled || void 0)}" aria-current="${this.current ? "step" : void 0}" aria-labelledby="${ifDefined(this.notInteractive || !hasLabel ? void 0 : "label")}" aria-describedby="${ifDefined(this.notInteractive || !hasDescription ? void 0 : "description")}" class="${cx(
|
|
73
81
|
"border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",
|
|
74
82
|
this.disabled ? "focus-visible:outline-none cursor-not-allowed" : "focus-visible:focus-outline group-hover:cursor-pointer",
|
|
75
83
|
this.notInteractive ? this.size === "lg" ? "w-[72px]" : "w-12" : this.size === "lg" ? "w-12" : "w-8",
|
|
@@ -81,7 +89,7 @@ var SdStep = class extends SolidElement {
|
|
|
81
89
|
!this.disabled && !this.current && !this.notInteractive && "text-primary group-hover:text-primary-500 group-hover:fill-primary-500",
|
|
82
90
|
this.notInteractive && "text-primary",
|
|
83
91
|
this.size === "lg" ? "text-lg" : "text-sm"
|
|
84
|
-
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-
|
|
92
|
+
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-4-0-icon name="status-check" library="system"></sd-4-4-0-icon>` : html`${this.index}`}</slot></${tag}>${this.noTail ? "" : html`<div part="tail" class="${cx(
|
|
85
93
|
this.orientation === "horizontal" ? "border-t w-full my-auto mr-2" : "border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",
|
|
86
94
|
!this.disabled && !this.current && !this.notInteractive ? " border-primary group-hover:border-primary-500" : "border-neutral-400"
|
|
87
95
|
)}"></div>`}</div><div part="text-container" class="${cx("mt-4 break-words flex flex-col gap-2", this.orientation === "horizontal" ? "text-center w-40" : "w-max text-left", this.disabled && "!text-neutral-700", this.notInteractive ? "ml-3" : "mr-4")}"><div part="label" id="label" class="${cx("!font-bold sd-paragraph", this.disabled && "!text-neutral-700", !this.disabled && !this.current && !this.notInteractive ? "!text-primary group-hover:!text-primary-500 group-hover:cursor-pointer" : "text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${cx("sd-paragraph sd-paragraph--size-sm", this.disabled && "!text-neutral-700")}">${this.description || html`<slot></slot>`}</div></div></div>`;
|
|
@@ -131,7 +139,7 @@ __decorateClass([
|
|
|
131
139
|
watch("notInteractive")
|
|
132
140
|
], SdStep.prototype, "handleInteractivityChange", 1);
|
|
133
141
|
SdStep = __decorateClass([
|
|
134
|
-
customElement("sd-4-
|
|
142
|
+
customElement("sd-4-4-0-step")
|
|
135
143
|
], SdStep);
|
|
136
144
|
|
|
137
145
|
export {
|
|
@@ -192,15 +192,15 @@ var SdTooltip = class extends SolidElement {
|
|
|
192
192
|
render() {
|
|
193
193
|
const isStart = this.placement.endsWith("-start");
|
|
194
194
|
const isEnd = this.placement.endsWith("-end");
|
|
195
|
-
return html`<sd-4-
|
|
195
|
+
return html`<sd-4-4-0-popup part="base" exportparts="
|
|
196
196
|
popup:base__popup,
|
|
197
197
|
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"><slot slot="anchor" class="${cx(this.size === "lg" ? "text-xl" : "text-base")}"><button aria-describedby="tooltip" class="flex sd-interactive rounded-full" ?disabled="${this.disabled}"><sd-4-
|
|
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"><slot slot="anchor" class="${cx(this.size === "lg" ? "text-xl" : "text-base")}"><button aria-describedby="tooltip" class="flex sd-interactive rounded-full" ?disabled="${this.disabled}"><sd-4-4-0-icon library="system" name="info-circle" label="Tooltip" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-4-4-0-icon></button></slot><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="Tooltip" aria-live="${this.open ? "polite" : "off"}">${this.content}</slot></sd-4-4-0-popup>`;
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
SdTooltip.styles = [
|
|
202
202
|
...SolidElement.styles,
|
|
203
|
-
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-
|
|
203
|
+
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-4-0-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-4-0-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-4-0-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-4-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-4-0-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
204
|
];
|
|
205
205
|
__decorateClass([
|
|
206
206
|
query("slot:not([name])")
|
|
@@ -209,7 +209,7 @@ __decorateClass([
|
|
|
209
209
|
query("#tooltip")
|
|
210
210
|
], SdTooltip.prototype, "body", 2);
|
|
211
211
|
__decorateClass([
|
|
212
|
-
query("sd-4-
|
|
212
|
+
query("sd-4-4-0-popup")
|
|
213
213
|
], SdTooltip.prototype, "popup", 2);
|
|
214
214
|
__decorateClass([
|
|
215
215
|
property()
|
|
@@ -242,7 +242,7 @@ __decorateClass([
|
|
|
242
242
|
watch("disabled")
|
|
243
243
|
], SdTooltip.prototype, "handleDisabledChange", 1);
|
|
244
244
|
SdTooltip = __decorateClass([
|
|
245
|
-
customElement("sd-4-
|
|
245
|
+
customElement("sd-4-4-0-tooltip")
|
|
246
246
|
], SdTooltip);
|
|
247
247
|
setDefaultAnimation("tooltip.show", {
|
|
248
248
|
keyframes: [
|
|
@@ -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-
|
|
13
|
+
const popup = document.createElement("sd-4-4-0-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-
|
|
25
|
+
const styles = css`sd-4-4-0-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-4-0-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-4-4-0-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-4-0-popup li{list-style-type:""}sd-4-4-0-popup li mark{background-color:transparent;font-weight:700}sd-4-4-0-popup li:not(:has(sd-4-4-0-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-4-0-popup li:not(:has(sd-4-4-0-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-4-4-0-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-
|
|
38
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-4-0-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-
|
|
44
|
+
(_b = (_a = sdInput.shadowRoot) == null ? void 0 : _a.querySelector("sd-4-4-0-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
|
});
|
|
@@ -76,7 +76,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
76
76
|
* within the slotted trigger. This could be the slotted element itself, a child of the slotted element,
|
|
77
77
|
* or an element within the slotted elements shadow root.
|
|
78
78
|
*
|
|
79
|
-
* e.g. the accessible trigger of an <sd-4-
|
|
79
|
+
* e.g. the accessible trigger of an <sd-4-4-0-button> is a <button> located inside its shadow root.
|
|
80
80
|
*
|
|
81
81
|
* To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
82
82
|
* */
|
|
@@ -87,11 +87,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
87
87
|
if (accessibleTrigger) {
|
|
88
88
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
89
89
|
// Solid buttons have to update the internal button so it's announced correctly by screen readers
|
|
90
|
-
case "sd-4-
|
|
91
|
-
case "sd-4-
|
|
90
|
+
case "sd-4-4-0-button":
|
|
91
|
+
case "sd-4-4-0-icon-button":
|
|
92
92
|
target = accessibleTrigger.button;
|
|
93
93
|
break;
|
|
94
|
-
case "sd-4-
|
|
94
|
+
case "sd-4-4-0-navigation-item":
|
|
95
95
|
target = accessibleTrigger.button;
|
|
96
96
|
break;
|
|
97
97
|
default:
|
|
@@ -236,7 +236,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
236
236
|
}
|
|
237
237
|
addOpenListeners() {
|
|
238
238
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
|
239
|
-
this.panel.addEventListener("sd-4-
|
|
239
|
+
this.panel.addEventListener("sd-4-4-0-select", this.handlePanelSelect);
|
|
240
240
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
|
241
241
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
242
242
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
@@ -244,7 +244,7 @@ var SdDropdown = class extends SolidElement {
|
|
|
244
244
|
removeOpenListeners() {
|
|
245
245
|
if (this.panel) {
|
|
246
246
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
|
247
|
-
this.panel.removeEventListener("sd-4-
|
|
247
|
+
this.panel.removeEventListener("sd-4-4-0-select", this.handlePanelSelect);
|
|
248
248
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
|
249
249
|
}
|
|
250
250
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -277,11 +277,11 @@ var SdDropdown = class extends SolidElement {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return html`<sd-4-
|
|
280
|
+
return html`<sd-4-4-0-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded && this.distance < 1 ? 1 : this.distance}" skidding="${this.skidding}" strategy="${this.hoist ? "fixed" : "absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${cx(
|
|
281
281
|
"shadow bg-white",
|
|
282
282
|
this.open ? "block pointer-events-auto" : "pointer-events-none",
|
|
283
283
|
this.rounded && "rounded-md"
|
|
284
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-4-
|
|
284
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-4-4-0-popup>`;
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
SdDropdown.styles = [
|
|
@@ -334,7 +334,7 @@ __decorateClass([
|
|
|
334
334
|
watch("open", { waitUntilFirstUpdate: true })
|
|
335
335
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
336
336
|
SdDropdown = __decorateClass([
|
|
337
|
-
customElement("sd-4-
|
|
337
|
+
customElement("sd-4-4-0-dropdown")
|
|
338
338
|
], SdDropdown);
|
|
339
339
|
setDefaultAnimation("dropdown.show", {
|
|
340
340
|
keyframes: [
|