@solid-design-system/components 5.13.5 → 5.13.7
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.PS5Q6QLR.js +1 -0
- package/cdn/chunks/{chunk.F6VUPTBP.js → chunk.XGJYAJG5.js} +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/tab-group/tab-group.d.ts +2 -0
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +14 -14
- package/cdn/solid-components.iife.js +13 -13
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +37 -37
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2AESCEHJ.js +1 -1
- package/cdn-versioned/chunks/chunk.2HJAPXID.js +1 -1
- package/cdn-versioned/chunks/chunk.2IXCDCBI.js +1 -1
- package/cdn-versioned/chunks/chunk.2KNDUWBP.js +1 -1
- package/cdn-versioned/chunks/chunk.3ED5FZPY.js +1 -1
- package/cdn-versioned/chunks/chunk.3O5CSFK6.js +1 -1
- package/cdn-versioned/chunks/chunk.54FIHRIN.js +1 -1
- package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
- package/cdn-versioned/chunks/chunk.6XXF5G5C.js +1 -1
- package/cdn-versioned/chunks/chunk.6YBQX3MQ.js +1 -1
- package/cdn-versioned/chunks/chunk.7HYHC4VH.js +1 -1
- package/cdn-versioned/chunks/chunk.7IH2NLBX.js +1 -1
- package/cdn-versioned/chunks/chunk.7INMWOUZ.js +1 -1
- package/cdn-versioned/chunks/chunk.7JI2ZUD5.js +1 -1
- package/cdn-versioned/chunks/chunk.7WMTV6I4.js +1 -1
- package/cdn-versioned/chunks/chunk.A25LJOFY.js +1 -1
- package/cdn-versioned/chunks/chunk.BBD6RMZH.js +1 -1
- package/cdn-versioned/chunks/chunk.BUD2EAST.js +1 -1
- package/cdn-versioned/chunks/chunk.C5W6LZD4.js +1 -1
- package/cdn-versioned/chunks/chunk.C6JGWWSD.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.CQ4QBZ5J.js +4 -4
- package/cdn-versioned/chunks/chunk.CQYFUSYG.js +1 -1
- package/cdn-versioned/chunks/chunk.CSSD2EF7.js +1 -1
- package/cdn-versioned/chunks/chunk.CZIBZYQR.js +1 -1
- package/cdn-versioned/chunks/chunk.DX3YFLMK.js +1 -1
- package/cdn-versioned/chunks/chunk.EAYWBCE7.js +1 -1
- package/cdn-versioned/chunks/chunk.EIYIMNPT.js +1 -1
- package/cdn-versioned/chunks/chunk.ENZOPZGC.js +1 -1
- package/cdn-versioned/chunks/chunk.FZHHVY6Y.js +1 -1
- package/cdn-versioned/chunks/chunk.HAL2ARMM.js +1 -1
- package/cdn-versioned/chunks/chunk.HLGRDYA3.js +1 -1
- package/cdn-versioned/chunks/chunk.IP26UT3O.js +1 -1
- package/cdn-versioned/chunks/chunk.ITMQUAG2.js +1 -1
- package/cdn-versioned/chunks/chunk.IUTS4ODJ.js +1 -1
- package/cdn-versioned/chunks/chunk.IXHLVTCE.js +1 -1
- package/cdn-versioned/chunks/chunk.JEBG27AS.js +1 -1
- package/cdn-versioned/chunks/chunk.LD75GZVE.js +1 -1
- package/cdn-versioned/chunks/chunk.LOVOZACS.js +1 -1
- package/cdn-versioned/chunks/chunk.NHN2NTOB.js +1 -1
- package/cdn-versioned/chunks/chunk.NS75T6AP.js +1 -1
- package/cdn-versioned/chunks/chunk.OAVL5PS2.js +1 -1
- package/cdn-versioned/chunks/chunk.OQTFQZQD.js +1 -1
- package/cdn-versioned/chunks/chunk.OTZWFXC6.js +1 -1
- package/cdn-versioned/chunks/chunk.PEJM3PLJ.js +1 -1
- package/cdn-versioned/chunks/chunk.PJZCF7M2.js +1 -1
- package/cdn-versioned/chunks/chunk.PS5Q6QLR.js +1 -0
- package/cdn-versioned/chunks/chunk.RRVZNEFJ.js +1 -1
- package/cdn-versioned/chunks/chunk.RU2MXVG3.js +1 -1
- package/cdn-versioned/chunks/chunk.SM5KISBS.js +1 -1
- package/cdn-versioned/chunks/chunk.STQUP635.js +1 -1
- package/cdn-versioned/chunks/chunk.UBO3W67S.js +1 -1
- package/cdn-versioned/chunks/chunk.VMPJQLWX.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WQU7XRRP.js +1 -1
- package/cdn-versioned/chunks/{chunk.F6VUPTBP.js → chunk.XGJYAJG5.js} +1 -1
- package/cdn-versioned/chunks/chunk.XGXHVRYA.js +1 -1
- package/cdn-versioned/chunks/chunk.Y77KMBSV.js +4 -4
- package/cdn-versioned/chunks/chunk.YGTSBRUS.js +1 -1
- package/cdn-versioned/chunks/chunk.YI3Y536X.js +1 -1
- package/cdn-versioned/chunks/chunk.ZWO2DZQK.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/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 +3 -1
- package/cdn-versioned/components/tab-group/tab-group.js +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 +238 -238
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +16 -16
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +16 -16
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +126 -126
- package/cdn-versioned/web-types.json +154 -154
- package/dist/chunks/{chunk.W2L2LAQR.js → chunk.VSSD4EBM.js} +1 -1
- package/dist/chunks/{chunk.SLDPP5NU.js → chunk.WJAVDZC4.js} +24 -2
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/tab-group/tab-group.d.ts +2 -0
- package/dist/components/tab-group/tab-group.js +2 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +2 -2
- package/dist/vscode.html-custom-data.json +37 -37
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.22XVLL4U.js +1 -1
- package/dist-versioned/chunks/chunk.2CWYTGUF.js +26 -26
- package/dist-versioned/chunks/chunk.2USKLT7E.js +6 -6
- package/dist-versioned/chunks/chunk.33JOPIXE.js +24 -24
- package/dist-versioned/chunks/chunk.3H34BS4K.js +1 -1
- package/dist-versioned/chunks/chunk.3HHT2OQH.js +12 -12
- package/dist-versioned/chunks/chunk.3IWFEPZF.js +4 -4
- package/dist-versioned/chunks/chunk.3P4CWN6B.js +3 -3
- package/dist-versioned/chunks/chunk.4GOBDXSS.js +1 -1
- package/dist-versioned/chunks/chunk.4JS6YQGE.js +3 -3
- package/dist-versioned/chunks/chunk.5DBXOC2V.js +1 -1
- package/dist-versioned/chunks/chunk.5PBRPBRT.js +5 -5
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6P3RKSUO.js +1 -1
- package/dist-versioned/chunks/chunk.7AKLVTJJ.js +3 -3
- package/dist-versioned/chunks/chunk.7L25CLNU.js +2 -2
- package/dist-versioned/chunks/chunk.A5Z4VKXC.js +2 -2
- package/dist-versioned/chunks/chunk.COXPSVWJ.js +3 -3
- package/dist-versioned/chunks/chunk.CURD6RBZ.js +6 -6
- package/dist-versioned/chunks/chunk.CZOZQ3VO.js +1 -1
- package/dist-versioned/chunks/chunk.CZXEOVSI.js +4 -4
- package/dist-versioned/chunks/chunk.D4DTFLNK.js +1 -1
- package/dist-versioned/chunks/chunk.DG2EQDME.js +2 -2
- package/dist-versioned/chunks/chunk.E3JOKBV7.js +2 -2
- package/dist-versioned/chunks/chunk.EQ6ES4D4.js +2 -2
- package/dist-versioned/chunks/chunk.HDOXCV5R.js +2 -2
- package/dist-versioned/chunks/chunk.I34ENUW2.js +2 -2
- package/dist-versioned/chunks/chunk.I55X5D52.js +2 -2
- package/dist-versioned/chunks/chunk.K2A6FAQM.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KGO6SGAI.js +2 -2
- package/dist-versioned/chunks/chunk.KTW4YKIN.js +2 -2
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.L3CJJWQH.js +5 -5
- package/dist-versioned/chunks/chunk.LJGEETGS.js +2 -2
- package/dist-versioned/chunks/chunk.LVKMRGF7.js +2 -2
- package/dist-versioned/chunks/chunk.NIOP54NF.js +1 -1
- package/dist-versioned/chunks/chunk.NIVOUKTJ.js +5 -5
- package/dist-versioned/chunks/chunk.OKJADCUF.js +3 -3
- package/dist-versioned/chunks/chunk.PMP3SJSG.js +4 -4
- package/dist-versioned/chunks/chunk.R6QYQOQJ.js +1 -1
- package/dist-versioned/chunks/chunk.R7SUBHGP.js +1 -1
- package/dist-versioned/chunks/chunk.S4BMH7I6.js +3 -3
- package/dist-versioned/chunks/chunk.S4W23ZFB.js +2 -2
- package/dist-versioned/chunks/chunk.SGY6Q5FM.js +1 -1
- package/dist-versioned/chunks/chunk.SVC3IWAA.js +2 -2
- package/dist-versioned/chunks/chunk.TB76LMSK.js +11 -11
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UMJTGYQ7.js +3 -3
- package/dist-versioned/chunks/chunk.VEBQYO6P.js +1 -1
- package/dist-versioned/chunks/chunk.VISHTUP5.js +1 -1
- package/dist-versioned/chunks/chunk.VNGVFWX6.js +1 -1
- package/dist-versioned/chunks/chunk.VPTCQBGB.js +5 -5
- package/dist-versioned/chunks/chunk.VPU4YXCW.js +2 -2
- package/dist-versioned/chunks/{chunk.W2L2LAQR.js → chunk.VSSD4EBM.js} +13 -13
- package/dist-versioned/chunks/{chunk.SLDPP5NU.js → chunk.WJAVDZC4.js} +37 -15
- package/dist-versioned/chunks/chunk.WMLESPZB.js +8 -8
- package/dist-versioned/chunks/chunk.XHOP5USY.js +1 -1
- package/dist-versioned/chunks/chunk.YGJNZUTI.js +3 -3
- package/dist-versioned/chunks/chunk.YTLWADMX.js +1 -1
- package/dist-versioned/chunks/chunk.ZSG33GER.js +6 -6
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.js +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/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 +3 -1
- package/dist-versioned/components/tab-group/tab-group.js +2 -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 +238 -238
- 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 +126 -126
- package/dist-versioned/web-types.json +154 -154
- package/package.json +1 -1
- package/cdn/chunks/chunk.JECBERJ6.js +0 -1
- package/cdn-versioned/chunks/chunk.JECBERJ6.js +0 -1
|
@@ -254,7 +254,7 @@ var SdRadioGroup = class extends SolidElement {
|
|
|
254
254
|
md: "text-base",
|
|
255
255
|
lg: "text-base"
|
|
256
256
|
}[this.size]
|
|
257
|
-
)}" role="radiogroup" aria-describedby="invalid-message">${hasLabel || hasTooltipSlot ? html`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${cx(
|
|
257
|
+
)}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${hasLabel || hasTooltipSlot ? html`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${cx(
|
|
258
258
|
"p-0 leading-normal text-black text-left",
|
|
259
259
|
hasLabel ? "inline-block" : "hidden",
|
|
260
260
|
this.boldLabel && "font-bold"
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
debounce
|
|
3
|
+
} from "./chunk.NOWCQZBS.js";
|
|
1
4
|
import {
|
|
2
5
|
scrollIntoView
|
|
3
6
|
} from "./chunk.WDWV53JP.js";
|
|
@@ -15,6 +18,7 @@ import {
|
|
|
15
18
|
|
|
16
19
|
// src/components/tab-group/tab-group.ts
|
|
17
20
|
import { css, html } from "lit";
|
|
21
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
18
22
|
import { property, query, state } from "lit/decorators.js";
|
|
19
23
|
import cx from "classix";
|
|
20
24
|
var SdTabGroup = class extends SolidElement {
|
|
@@ -25,6 +29,10 @@ var SdTabGroup = class extends SolidElement {
|
|
|
25
29
|
this.panels = [];
|
|
26
30
|
this.hasScrollControls = false;
|
|
27
31
|
this.variant = "default";
|
|
32
|
+
this.canScroll = {
|
|
33
|
+
left: false,
|
|
34
|
+
right: false
|
|
35
|
+
};
|
|
28
36
|
this.activation = "auto";
|
|
29
37
|
}
|
|
30
38
|
connectedCallback() {
|
|
@@ -49,6 +57,8 @@ var SdTabGroup = class extends SolidElement {
|
|
|
49
57
|
this.syncTabsAndPanels();
|
|
50
58
|
this.mutationObserver.observe(this, { attributes: true, childList: true, subtree: true });
|
|
51
59
|
this.resizeObserver.observe(this.nav);
|
|
60
|
+
this.handleScroll();
|
|
61
|
+
this.nav.addEventListener("scroll", () => this.handleScroll());
|
|
52
62
|
whenAllDefined.then(() => {
|
|
53
63
|
const intersectionObserver = new IntersectionObserver((entries, observer) => {
|
|
54
64
|
var _a;
|
|
@@ -148,6 +158,12 @@ var SdTabGroup = class extends SolidElement {
|
|
|
148
158
|
}
|
|
149
159
|
}
|
|
150
160
|
}
|
|
161
|
+
handleScroll() {
|
|
162
|
+
this.canScroll = {
|
|
163
|
+
left: this.nav.scrollLeft > 0,
|
|
164
|
+
right: this.nav.scrollLeft + this.nav.clientWidth < this.nav.scrollWidth - 1
|
|
165
|
+
};
|
|
166
|
+
}
|
|
151
167
|
handleScrollToStart() {
|
|
152
168
|
this.nav.scroll({
|
|
153
169
|
left: this.localize.dir() === "rtl" ? this.nav.scrollLeft + this.nav.clientWidth : this.nav.scrollLeft - this.nav.clientWidth,
|
|
@@ -234,10 +250,10 @@ var SdTabGroup = class extends SolidElement {
|
|
|
234
250
|
render() {
|
|
235
251
|
var _a;
|
|
236
252
|
const isRtl = this.localize.dir() === "rtl";
|
|
237
|
-
return html`<div part="base" class="${cx("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${cx(this.hasScrollControls && "relative py-0 px-12")}">${this.hasScrollControls ? html`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${cx(
|
|
253
|
+
return html`<div part="base" class="${cx("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${cx(this.hasScrollControls && "relative py-0 px-12")}">${this.hasScrollControls ? html`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${ifDefined(!this.canScroll.left || void 0)}" class="${cx(
|
|
238
254
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
239
255
|
this.localize.dir() === "rtl" && "left-auto right-0"
|
|
240
|
-
)}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${isRtl ? "chevron-up" : "chevron-down"}" label="previous" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>` : ""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${cx("flex flex-auto relative flex-row")}" role="tablist">${((_a = this.activeTab) == null ? void 0 : _a.variant) !== "container" ? html`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>` : ""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls ? html`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${cx(
|
|
256
|
+
)}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${isRtl ? "chevron-up" : "chevron-down"}" label="previous" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>` : ""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${cx("flex flex-auto relative flex-row")}" role="tablist">${((_a = this.activeTab) == null ? void 0 : _a.variant) !== "container" ? html`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>` : ""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls ? html`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${ifDefined(!this.canScroll.right || void 0)}" class="${cx(
|
|
241
257
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
242
258
|
this.localize.dir() === "rtl" && "right-auto left-0"
|
|
243
259
|
)}" @click="${this.handleScrollToEnd}"><sd-icon library="_internal" name="${isRtl ? "chevron-down" : "chevron-up"}" label="next" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>` : ""}</div><slot part="body" class="${cx("block auto py-8 px-6", this.variant === "container" && "border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`;
|
|
@@ -268,9 +284,15 @@ __decorateClass([
|
|
|
268
284
|
__decorateClass([
|
|
269
285
|
state()
|
|
270
286
|
], SdTabGroup.prototype, "variant", 2);
|
|
287
|
+
__decorateClass([
|
|
288
|
+
state()
|
|
289
|
+
], SdTabGroup.prototype, "canScroll", 2);
|
|
271
290
|
__decorateClass([
|
|
272
291
|
property({ type: String, reflect: true })
|
|
273
292
|
], SdTabGroup.prototype, "activation", 2);
|
|
293
|
+
__decorateClass([
|
|
294
|
+
debounce(20)
|
|
295
|
+
], SdTabGroup.prototype, "handleScroll", 1);
|
|
274
296
|
SdTabGroup = __decorateClass([
|
|
275
297
|
customElement("sd-tab-group")
|
|
276
298
|
], SdTabGroup);
|
|
@@ -15,6 +15,7 @@ export default class SdTabGroup extends SolidElement {
|
|
|
15
15
|
private tabsContainer;
|
|
16
16
|
hasScrollControls: boolean;
|
|
17
17
|
variant: string;
|
|
18
|
+
private canScroll;
|
|
18
19
|
activation: 'auto' | 'manual';
|
|
19
20
|
connectedCallback(): void;
|
|
20
21
|
disconnectedCallback(): void;
|
|
@@ -23,6 +24,7 @@ export default class SdTabGroup extends SolidElement {
|
|
|
23
24
|
private getActiveTab;
|
|
24
25
|
private handleClick;
|
|
25
26
|
private handleKeyDown;
|
|
27
|
+
private handleScroll;
|
|
26
28
|
private handleScrollToStart;
|
|
27
29
|
private handleScrollToEnd;
|
|
28
30
|
private setActiveTab;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdTabGroup
|
|
3
|
-
} from "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.WJAVDZC4.js";
|
|
4
|
+
import "../../chunks/chunk.NOWCQZBS.js";
|
|
4
5
|
import "../../chunks/chunk.WDWV53JP.js";
|
|
5
6
|
import "../../chunks/chunk.CZOZQ3VO.js";
|
|
6
7
|
import "../../chunks/chunk.IIYSG3NP.js";
|
|
@@ -20577,7 +20577,7 @@
|
|
|
20577
20577
|
"package": {
|
|
20578
20578
|
"name": "@solid-design-system/components",
|
|
20579
20579
|
"description": "Solid Design System: Components",
|
|
20580
|
-
"version": "5.13.
|
|
20580
|
+
"version": "5.13.7",
|
|
20581
20581
|
"author": "Union Investment",
|
|
20582
20582
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
20583
20583
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunks/chunk.SVC3IWAA.js";
|
|
11
11
|
import {
|
|
12
12
|
SdTabGroup
|
|
13
|
-
} from "./chunks/chunk.
|
|
13
|
+
} from "./chunks/chunk.WJAVDZC4.js";
|
|
14
14
|
import {
|
|
15
15
|
SdTabPanel
|
|
16
16
|
} from "./chunks/chunk.EQ6ES4D4.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
} from "./chunks/chunk.LJGEETGS.js";
|
|
62
62
|
import {
|
|
63
63
|
SdRadioGroup
|
|
64
|
-
} from "./chunks/chunk.
|
|
64
|
+
} from "./chunks/chunk.VSSD4EBM.js";
|
|
65
65
|
import {
|
|
66
66
|
SdRadio
|
|
67
67
|
} from "./chunks/chunk.I55X5D52.js";
|
|
@@ -2058,43 +2058,6 @@
|
|
|
2058
2058
|
}
|
|
2059
2059
|
]
|
|
2060
2060
|
},
|
|
2061
|
-
{
|
|
2062
|
-
"name": "sd-quickfact",
|
|
2063
|
-
"description": "Accordion shows a brief summary and expands to show additional content.\n---\n\n\n### **Events:**\n - **sd-show** - Emitted when the accordion opens.\n- **sd-after-show** - Emitted after the accordion opens and all animations are complete.\n- **sd-hide** - Emitted when the accordion closes.\n- **sd-after-hide** - Emitted after the accordion closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the accordion.\n- **hide()** - Hides the accordion\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - **icon** - Optional icon to show in the header. Works best with `<sd-icon>`.\n- _default_ - The accordion main content.\n- **summary** - The accordion summary. Alternatively, you can use the `summary` attribute.\n- **expand-icon** - Optional expand icon to use instead of the default. Works best with `<sd-icon>`.\n- **collapse-icon** - Optional collapse icon to use instead of the default. Works best with `<sd-icon>`.\n\n### **CSS Parts:**\n - **icon** - The container that wraps the icon.\n- **base** - The component's base wrapper.\n- **header** - The header that wraps both the summary and the expand/collapse icon.\n- **summary** - The container that wraps the summary.\n- **summary-icon** - The container that wraps the expand/collapse icons.\n- **summary-border** - The container that wraps the currently active accordions border.\n- **content** - The container that wraps the accordion content slot.\n- **content__slot** - The accordion content slot.",
|
|
2064
|
-
"attributes": [
|
|
2065
|
-
{
|
|
2066
|
-
"name": "expandable",
|
|
2067
|
-
"description": "Determines if the quickfact is not interactive. When set to `true`, the quickfact will not expand or collapse.",
|
|
2068
|
-
"values": []
|
|
2069
|
-
},
|
|
2070
|
-
{
|
|
2071
|
-
"name": "open",
|
|
2072
|
-
"description": "Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.",
|
|
2073
|
-
"values": []
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
"name": "summary",
|
|
2077
|
-
"description": "The summary to show in the header. If you need to display HTML, use the `summary` slot instead.",
|
|
2078
|
-
"values": []
|
|
2079
|
-
},
|
|
2080
|
-
{
|
|
2081
|
-
"name": "dir",
|
|
2082
|
-
"description": "The element's directionality.",
|
|
2083
|
-
"values": [{ "name": "ltr" }, { "name": "rtl" }, { "name": "auto" }]
|
|
2084
|
-
},
|
|
2085
|
-
{
|
|
2086
|
-
"name": "lang",
|
|
2087
|
-
"description": "The element's language.",
|
|
2088
|
-
"values": []
|
|
2089
|
-
}
|
|
2090
|
-
],
|
|
2091
|
-
"references": [
|
|
2092
|
-
{
|
|
2093
|
-
"name": "Documentation",
|
|
2094
|
-
"url": "https://solid-design-system.fe.union-investment.de/docs/?path=/docs/components-sd-quickfact--docs"
|
|
2095
|
-
}
|
|
2096
|
-
]
|
|
2097
|
-
},
|
|
2098
2061
|
{
|
|
2099
2062
|
"name": "sd-radio",
|
|
2100
2063
|
"description": "A radio allows to select only one value from a set of options. Clicking on an unchecked radio will deselect the other one(s).\n---\n\n\n### **Events:**\n - **sd-blur** - Emitted when the control loses focus.\n- **sd-focus** - Emitted when the control gains focus.\n\n### **Methods:**\n - **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The radio's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control--unchecked** - The radio control when the radio is unchecked.\n- **control--checked** - The radio control when the radio is checked.\n- **checked** - The dot inside the radio component when the radio is checked.\n- **label** - The container that wraps the radio's label.",
|
|
@@ -2407,6 +2370,43 @@
|
|
|
2407
2370
|
}
|
|
2408
2371
|
]
|
|
2409
2372
|
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "sd-quickfact",
|
|
2375
|
+
"description": "Accordion shows a brief summary and expands to show additional content.\n---\n\n\n### **Events:**\n - **sd-show** - Emitted when the accordion opens.\n- **sd-after-show** - Emitted after the accordion opens and all animations are complete.\n- **sd-hide** - Emitted when the accordion closes.\n- **sd-after-hide** - Emitted after the accordion closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the accordion.\n- **hide()** - Hides the accordion\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - **icon** - Optional icon to show in the header. Works best with `<sd-icon>`.\n- _default_ - The accordion main content.\n- **summary** - The accordion summary. Alternatively, you can use the `summary` attribute.\n- **expand-icon** - Optional expand icon to use instead of the default. Works best with `<sd-icon>`.\n- **collapse-icon** - Optional collapse icon to use instead of the default. Works best with `<sd-icon>`.\n\n### **CSS Parts:**\n - **icon** - The container that wraps the icon.\n- **base** - The component's base wrapper.\n- **header** - The header that wraps both the summary and the expand/collapse icon.\n- **summary** - The container that wraps the summary.\n- **summary-icon** - The container that wraps the expand/collapse icons.\n- **summary-border** - The container that wraps the currently active accordions border.\n- **content** - The container that wraps the accordion content slot.\n- **content__slot** - The accordion content slot.",
|
|
2376
|
+
"attributes": [
|
|
2377
|
+
{
|
|
2378
|
+
"name": "expandable",
|
|
2379
|
+
"description": "Determines if the quickfact is not interactive. When set to `true`, the quickfact will not expand or collapse.",
|
|
2380
|
+
"values": []
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"name": "open",
|
|
2384
|
+
"description": "Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.",
|
|
2385
|
+
"values": []
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
"name": "summary",
|
|
2389
|
+
"description": "The summary to show in the header. If you need to display HTML, use the `summary` slot instead.",
|
|
2390
|
+
"values": []
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
"name": "dir",
|
|
2394
|
+
"description": "The element's directionality.",
|
|
2395
|
+
"values": [{ "name": "ltr" }, { "name": "rtl" }, { "name": "auto" }]
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"name": "lang",
|
|
2399
|
+
"description": "The element's language.",
|
|
2400
|
+
"values": []
|
|
2401
|
+
}
|
|
2402
|
+
],
|
|
2403
|
+
"references": [
|
|
2404
|
+
{
|
|
2405
|
+
"name": "Documentation",
|
|
2406
|
+
"url": "https://solid-design-system.fe.union-investment.de/docs/?path=/docs/components-sd-quickfact--docs"
|
|
2407
|
+
}
|
|
2408
|
+
]
|
|
2409
|
+
},
|
|
2410
2410
|
{
|
|
2411
2411
|
"name": "sd-select",
|
|
2412
2412
|
"description": "Selects allow you to choose items from a menu of predefined options.\n---\n\n\n### **Events:**\n - **sd-change** - Emitted when the control's value changes.\n- **sd-clear** - Emitted when the control's value is cleared.\n- **sd-input** - Emitted when the control receives input.\n- **sd-focus** - Emitted when the control gains focus.\n- **sd-blur** - Emitted when the control loses focus.\n- **sd-show** - Emitted when the select's menu opens.\n- **sd-after-show** - Emitted after the select's menu opens and all animations are complete.\n- **sd-hide** - Emitted when the select's menu closes.\n- **sd-after-hide** - Emitted after the select's menu closes and all animations are complete.\n- **sd-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **show()** - Shows the listbox.\n- **hide()** - Hides the listbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n- **focus(options: _FocusOptions_)** - Sets focus on the control.\n- **blur()** - Removes focus from the control.\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The listbox options. Must be `<sd-option>` elements. You can use `<sd-divider>` to group items visually.\n- **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n- **expand-icon** - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n- **tooltip** - An optional tooltip that helps describe the input. Use this slot with the `sd-tooltip` component.\n\n### **CSS Properties:**\n - **--tag-max-width** - Set the maximum width of the tags and to show an ellipsis. Defaults to \"15ch\" _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The select's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **combobox** - The container the wraps the combobox, clear icon, and expand button.\n- **display-input** - The element that displays the selected option's label, an `<input>` element.\n- **listbox** - The listbox container where options are slotted.\n- **tags** - The container that houses option tags when `multiselect` is used.\n- **tag** - The individual tags that represent each multiselect option.\n- **tag__base** - The tag's base part.\n- **tag__content** - The tag's content part.\n- **tag__removable-indicator** - The tag's remove button.\n- **clear-button** - The clear button.\n- **expand-icon** - The container that wraps the expand icon.",
|
package/dist/web-types.json
CHANGED
|
@@ -44,7 +44,7 @@ var SdSelect = class extends SolidElement {
|
|
|
44
44
|
constructor() {
|
|
45
45
|
super(...arguments);
|
|
46
46
|
this.formControlController = new FormControlController(this, {
|
|
47
|
-
assumeInteractionOn: ["sd-blur", "sd-5-13-
|
|
47
|
+
assumeInteractionOn: ["sd-blur", "sd-5-13-7-input"]
|
|
48
48
|
});
|
|
49
49
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
50
50
|
this.localize = new LocalizeController(this);
|
|
@@ -77,11 +77,11 @@ var SdSelect = class extends SolidElement {
|
|
|
77
77
|
this.styleOnValid = false;
|
|
78
78
|
this.hoist = false;
|
|
79
79
|
this.getTag = (option) => {
|
|
80
|
-
return html`<sd-5-13-
|
|
80
|
+
return html`<sd-5-13-7-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
81
81
|
base:tag__base,
|
|
82
82
|
content:tag__content,
|
|
83
83
|
removable-indicator:tag__removable-indicator,
|
|
84
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-5-13-
|
|
84
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-5-13-7-tag>`;
|
|
85
85
|
};
|
|
86
86
|
this.handleDocumentFocusIn = (event) => {
|
|
87
87
|
const path = event.composedPath();
|
|
@@ -92,7 +92,7 @@ var SdSelect = class extends SolidElement {
|
|
|
92
92
|
this.handleDocumentKeyDown = (event) => {
|
|
93
93
|
const target = event.target;
|
|
94
94
|
const isClearButton = target.closest(".select__clear") !== null;
|
|
95
|
-
const isIconButton = target.closest("sd-5-13-
|
|
95
|
+
const isIconButton = target.closest("sd-5-13-7-icon-button") !== null;
|
|
96
96
|
if (isClearButton || isIconButton) {
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
@@ -227,8 +227,8 @@ var SdSelect = class extends SolidElement {
|
|
|
227
227
|
event.preventDefault();
|
|
228
228
|
event.stopPropagation();
|
|
229
229
|
const tagParent = (_a = event.currentTarget) == null ? void 0 : _a.parentElement;
|
|
230
|
-
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-5-13-
|
|
231
|
-
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-5-13-
|
|
230
|
+
const previousTag = (_b = tagParent == null ? void 0 : tagParent.previousElementSibling) == null ? void 0 : _b.querySelector("sd-5-13-7-tag");
|
|
231
|
+
const nextTag = (_c = tagParent == null ? void 0 : tagParent.nextElementSibling) == null ? void 0 : _c.querySelector("sd-5-13-7-tag");
|
|
232
232
|
this.handleTagRemove(new CustomEvent("sd-remove"), option);
|
|
233
233
|
this.updateComplete.then(() => {
|
|
234
234
|
if (nextTag) {
|
|
@@ -248,7 +248,7 @@ var SdSelect = class extends SolidElement {
|
|
|
248
248
|
this.handleTagRemove(new CustomEvent("sd-remove"), this.selectedOptions[this.selectedOptions.length - 1]);
|
|
249
249
|
this.updateComplete.then(() => {
|
|
250
250
|
var _a;
|
|
251
|
-
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-5-13-
|
|
251
|
+
const tags = (_a = this.shadowRoot) == null ? void 0 : _a.querySelectorAll("sd-5-13-7-tag");
|
|
252
252
|
if (tags && tags.length > 0) {
|
|
253
253
|
tags == null ? void 0 : tags[(tags == null ? void 0 : tags.length) - 1].focus();
|
|
254
254
|
} else {
|
|
@@ -294,7 +294,7 @@ var SdSelect = class extends SolidElement {
|
|
|
294
294
|
}
|
|
295
295
|
handleOptionClick(event) {
|
|
296
296
|
const target = event.target;
|
|
297
|
-
const option = target.closest("sd-5-13-
|
|
297
|
+
const option = target.closest("sd-5-13-7-option");
|
|
298
298
|
const oldValue = this.value;
|
|
299
299
|
if (option && !option.disabled) {
|
|
300
300
|
if (this.multiple) {
|
|
@@ -319,7 +319,7 @@ var SdSelect = class extends SolidElement {
|
|
|
319
319
|
const allOptions = this.getAllOptions();
|
|
320
320
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
321
321
|
const values = [];
|
|
322
|
-
if (customElements.get("sd-5-13-
|
|
322
|
+
if (customElements.get("sd-5-13-7-option")) {
|
|
323
323
|
allOptions.forEach((option) => {
|
|
324
324
|
if (this.multiple) {
|
|
325
325
|
option.checkbox = true;
|
|
@@ -328,7 +328,7 @@ var SdSelect = class extends SolidElement {
|
|
|
328
328
|
});
|
|
329
329
|
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
330
330
|
} else {
|
|
331
|
-
customElements.whenDefined("sd-5-13-
|
|
331
|
+
customElements.whenDefined("sd-5-13-7-option").then(() => this.handleDefaultSlotChange());
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
handleTagRemove(event, option) {
|
|
@@ -345,13 +345,13 @@ var SdSelect = class extends SolidElement {
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
// Gets an array of all <sd-5-13-
|
|
348
|
+
// Gets an array of all <sd-5-13-7-option> elements
|
|
349
349
|
getAllOptions() {
|
|
350
|
-
return [...this.querySelectorAll("sd-5-13-
|
|
350
|
+
return [...this.querySelectorAll("sd-5-13-7-option")];
|
|
351
351
|
}
|
|
352
|
-
// Gets the first <sd-5-13-
|
|
352
|
+
// Gets the first <sd-5-13-7-option> element
|
|
353
353
|
getFirstOption() {
|
|
354
|
-
return this.querySelector("sd-5-13-
|
|
354
|
+
return this.querySelector("sd-5-13-7-option");
|
|
355
355
|
}
|
|
356
356
|
// Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
357
357
|
// option may be "current" at a time.
|
|
@@ -440,11 +440,11 @@ var SdSelect = class extends SolidElement {
|
|
|
440
440
|
});
|
|
441
441
|
} else {
|
|
442
442
|
return [
|
|
443
|
-
html`<sd-5-13-
|
|
443
|
+
html`<sd-5-13-7-tag class="z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
444
444
|
base:tag__base,
|
|
445
445
|
content:tag__content,
|
|
446
446
|
removable-indicator:tag__removable-indicator,
|
|
447
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-5-13-
|
|
447
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-5-13-7-tag>`
|
|
448
448
|
];
|
|
449
449
|
}
|
|
450
450
|
}
|
|
@@ -453,7 +453,7 @@ var SdSelect = class extends SolidElement {
|
|
|
453
453
|
this.formControlController.emitInvalidEvent(event);
|
|
454
454
|
this.invalidMessage.textContent = event.target.validationMessage;
|
|
455
455
|
}
|
|
456
|
-
/** Receives incoming event detail from sd-5-13-
|
|
456
|
+
/** Receives incoming event detail from sd-5-13-7-popup and updates local state for conditional styling. */
|
|
457
457
|
handleCurrentPlacement(e) {
|
|
458
458
|
const incomingPlacement = e.detail;
|
|
459
459
|
if (incomingPlacement) {
|
|
@@ -462,7 +462,7 @@ var SdSelect = class extends SolidElement {
|
|
|
462
462
|
}
|
|
463
463
|
handleUseTagsChange() {
|
|
464
464
|
const allOptions = this.getAllOptions();
|
|
465
|
-
if (customElements.get("sd-5-13-
|
|
465
|
+
if (customElements.get("sd-5-13-7-option")) {
|
|
466
466
|
allOptions.forEach((option) => {
|
|
467
467
|
option.checkbox = this.multiple;
|
|
468
468
|
});
|
|
@@ -598,7 +598,7 @@ var SdSelect = class extends SolidElement {
|
|
|
598
598
|
default: "border-neutral-800"
|
|
599
599
|
}[selectState],
|
|
600
600
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
601
|
-
)}"></div><sd-5-13-
|
|
601
|
+
)}"></div><sd-5-13-7-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
602
602
|
"inline-flex relative w-full",
|
|
603
603
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
604
604
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
@@ -621,12 +621,12 @@ var SdSelect = class extends SolidElement {
|
|
|
621
621
|
"select__clear flex justify-center",
|
|
622
622
|
iconMarginLeft,
|
|
623
623
|
this.value.length > 0 ? "visible" : "invisible"
|
|
624
|
-
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-13-
|
|
624
|
+
)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-13-7-icon class="${cx("text-neutral-700 z-10", iconSize)}" library="_internal" name="closing-round"></sd-5-13-7-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-5-13-7-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="_internal" name="risk"></sd-5-13-7-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-5-13-7-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="_internal" name="status-check"></sd-5-13-7-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx(
|
|
625
625
|
"inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",
|
|
626
626
|
this.open ? "rotate-180" : "rotate-0",
|
|
627
627
|
this.disabled || this.visuallyDisabled ? "text-neutral-500" : "text-primary",
|
|
628
628
|
iconSize
|
|
629
|
-
)}"><sd-5-13-
|
|
629
|
+
)}"><sd-5-13-7-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-5-13-7-icon></slot></div><button part="combobox" class="${cx(
|
|
630
630
|
"relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",
|
|
631
631
|
cursorStyles,
|
|
632
632
|
this.open && "shadow transition-shadow duration-medium ease-in-out",
|
|
@@ -639,7 +639,7 @@ var SdSelect = class extends SolidElement {
|
|
|
639
639
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
|
640
640
|
this.open && "shadow transition-shadow duration-medium ease-in-out",
|
|
641
641
|
this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default"
|
|
642
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-5-13-
|
|
642
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-5-13-7-popup></div><div class="text-sm text-neutral-700 mt-2" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`;
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
/**
|
|
@@ -647,13 +647,13 @@ var SdSelect = class extends SolidElement {
|
|
|
647
647
|
*/
|
|
648
648
|
SdSelect.styles = [
|
|
649
649
|
...SolidElement.styles,
|
|
650
|
-
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-5-13-
|
|
650
|
+
css`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-5-13-7-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-5-13-7-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-5-13-7-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-5-13-7-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-5-13-7-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`
|
|
651
651
|
];
|
|
652
652
|
__decorateClass([
|
|
653
|
-
queryAssignedElements({ selector: "sd-5-13-
|
|
653
|
+
queryAssignedElements({ selector: "sd-5-13-7-option" })
|
|
654
654
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
655
655
|
__decorateClass([
|
|
656
|
-
query("sd-5-13-
|
|
656
|
+
query("sd-5-13-7-popup")
|
|
657
657
|
], SdSelect.prototype, "popup", 2);
|
|
658
658
|
__decorateClass([
|
|
659
659
|
query('[part="combobox"]')
|
|
@@ -778,7 +778,7 @@ __decorateClass([
|
|
|
778
778
|
watch("value", { waitUntilFirstUpdate: true })
|
|
779
779
|
], SdSelect.prototype, "handleValueChange", 1);
|
|
780
780
|
SdSelect = __decorateClass([
|
|
781
|
-
customElement("sd-5-13-
|
|
781
|
+
customElement("sd-5-13-7-select")
|
|
782
782
|
], SdSelect);
|
|
783
783
|
setDefaultAnimation("select.show", {
|
|
784
784
|
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
@@ -288,10 +288,10 @@ var SdAudio = class extends SolidElement {
|
|
|
288
288
|
)}" part="audio-controls"><button class="${cx(
|
|
289
289
|
"playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",
|
|
290
290
|
this.inverted && "sd-interactive--inverted"
|
|
291
|
-
)}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-13-
|
|
291
|
+
)}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-13-7-button ?inverted="${this.inverted ? true : false}" part="play-button" size="lg" @click="${!this.isPlaying ? this.playAudio : this.pauseAudio}" aria-label="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" title="${this.isPlaying ? this.localize.term("pauseAudio") : this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying ? html`<slot name="pause-icon"><sd-5-13-7-icon class="text-3xl" name="pause" library="_internal"></sd-5-13-7-icon></slot>` : html`<slot name="play-icon"><sd-5-13-7-icon class="text-3xl" name="start" library="_internal"></sd-5-13-7-icon></slot>`}</sd-5-13-7-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript") ? html`<button class="${cx(
|
|
292
292
|
"mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",
|
|
293
293
|
this.inverted && "sd-interactive--inverted"
|
|
294
|
-
)}" aria-label="${this.isTranscriptOpen ? this.localize.term("transcriptIsOpen") : this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-13-
|
|
294
|
+
)}" aria-label="${this.isTranscriptOpen ? this.localize.term("transcriptIsOpen") : this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-13-7-icon class="w-6 h-6" name="transcript" library="_internal"></sd-5-13-7-icon></button>` : null} <button class="${cx("w-6 h-6 hover:cursor-pointer sd-interactive", this.inverted && "sd-interactive--inverted")}" part="volume" aria-label="${!this.isMuted ? this.localize.term("mute") : this.localize.term("unmute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-5-13-7-icon class="w-6 h-6" name="${this.isMuted ? "mute" : "volume"}" library="_internal"></sd-5-13-7-icon></button></div></div>`;
|
|
295
295
|
const renderTimestamps = html`<div class="${cx(
|
|
296
296
|
"w-full flex justify-between",
|
|
297
297
|
this.reversedLayout ? "mb-2" : "mt-2",
|
|
@@ -301,12 +301,12 @@ var SdAudio = class extends SolidElement {
|
|
|
301
301
|
return html`<div class="${cx("w-full flex relative", this.reversedLayout ? "flex-col-reverse" : "flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated || this.animated && this.reversedLayout ? renderAudioControls : null}<div class="relative">${this.animated && !this.reversedLayout ? html`${renderAudioControls}` : null} ${this.animated ? html`<canvas class="w-full h-16"></canvas>` : null} ${!this.hideTimestamps && this.animated && this.reversedLayout ? renderTimestamps : null} <input class="${cx(
|
|
302
302
|
"progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",
|
|
303
303
|
this.inverted && "sd-interactive--inverted"
|
|
304
|
-
)}" type="range" max="100" step="0.001" value="${this.progress}" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" aria-label="${this.localize.term("seekBar")}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted ? "rgb(var(--sd-color-white, 255 255 255) / 1)" : "rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${progressPercentage}%,${this.animated ? "transparent" : this.inverted ? "rgb(var(--sd-color-primary-400, 153 171 208) / 1)" : "rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${progressPercentage}%)"></div>${this.hasSlotController.test("transcript") ? html`<sd-5-13-
|
|
304
|
+
)}" type="range" max="100" step="0.001" value="${this.progress}" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" aria-label="${this.localize.term("seekBar")}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted ? "rgb(var(--sd-color-white, 255 255 255) / 1)" : "rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${progressPercentage}%,${this.animated ? "transparent" : this.inverted ? "rgb(var(--sd-color-primary-400, 153 171 208) / 1)" : "rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${progressPercentage}%)"></div>${this.hasSlotController.test("transcript") ? html`<sd-5-13-7-drawer><slot name="transcript"></slot></sd-5-13-7-drawer>` : null} ${!this.hideTimestamps && (!this.animated || !this.reversedLayout) ? renderTimestamps : null}</div>`;
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
307
|
SdAudio.styles = [
|
|
308
308
|
...SolidElement.styles,
|
|
309
|
-
css`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-5-13-
|
|
309
|
+
css`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-5-13-7-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-5-13-7-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-5-13-7-button::part(label){align-items:center;display:flex;flex-grow:0}`
|
|
310
310
|
];
|
|
311
311
|
__decorateClass([
|
|
312
312
|
property({ type: Boolean, reflect: true, attribute: "reversed-layout" })
|
|
@@ -348,13 +348,13 @@ __decorateClass([
|
|
|
348
348
|
query('[part="audio-player"]')
|
|
349
349
|
], SdAudio.prototype, "audioPlayerContainer", 2);
|
|
350
350
|
__decorateClass([
|
|
351
|
-
query("sd-5-13-
|
|
351
|
+
query("sd-5-13-7-drawer")
|
|
352
352
|
], SdAudio.prototype, "drawer", 2);
|
|
353
353
|
__decorateClass([
|
|
354
354
|
query("canvas")
|
|
355
355
|
], SdAudio.prototype, "canvas", 2);
|
|
356
356
|
SdAudio = __decorateClass([
|
|
357
|
-
customElement("sd-5-13-
|
|
357
|
+
customElement("sd-5-13-7-audio")
|
|
358
358
|
], SdAudio);
|
|
359
359
|
|
|
360
360
|
export {
|