@solid-design-system/components 3.22.10 → 3.22.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/es/tab-group.js +1 -1
- package/dist/components/es/tab.js +1 -1
- package/dist/components/es/video.js +1 -1
- package/dist/components/umd/solid-components.js +11 -11
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/tab/tab.js +1 -1
- package/dist/package/components/tab-group/tab-group.js +7 -5
- package/dist/package/components/video/video.d.ts +2 -0
- package/dist/package/components/video/video.js +18 -3
- package/dist/package/styles/tailwind.css.js +1 -1
- package/dist/versioned-components/es/accordion-group.js +1 -1
- package/dist/versioned-components/es/accordion.js +1 -1
- package/dist/versioned-components/es/audio.js +1 -1
- package/dist/versioned-components/es/badge.js +1 -1
- package/dist/versioned-components/es/brandshape.js +1 -1
- package/dist/versioned-components/es/button.js +1 -1
- package/dist/versioned-components/es/carousel-item.js +1 -1
- package/dist/versioned-components/es/carousel.js +3 -3
- package/dist/versioned-components/es/checkbox-group.js +1 -1
- package/dist/versioned-components/es/checkbox.js +1 -1
- package/dist/versioned-components/es/dialog.js +1 -1
- package/dist/versioned-components/es/divider.js +1 -1
- package/dist/versioned-components/es/drawer.js +1 -1
- package/dist/versioned-components/es/dropdown.js +1 -1
- package/dist/versioned-components/es/expandable.js +1 -1
- package/dist/versioned-components/es/flipcard.js +1 -1
- package/dist/versioned-components/es/form.js +1 -1
- package/dist/versioned-components/es/header.js +1 -1
- package/dist/versioned-components/es/icon.js +1 -1
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/input.js +1 -1
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/map-marker.js +1 -1
- package/dist/versioned-components/es/navigation-item.js +1 -1
- package/dist/versioned-components/es/notification.js +1 -1
- package/dist/versioned-components/es/option.js +1 -1
- package/dist/versioned-components/es/quickfact.js +1 -1
- package/dist/versioned-components/es/radio-button.js +1 -1
- package/dist/versioned-components/es/radio-group.js +1 -1
- package/dist/versioned-components/es/radio.js +1 -1
- package/dist/versioned-components/es/scrollable.js +1 -1
- package/dist/versioned-components/es/select.js +3 -3
- package/dist/versioned-components/es/solid-components2.js +1 -1
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/step-group.js +1 -1
- package/dist/versioned-components/es/step.js +1 -1
- package/dist/versioned-components/es/switch.js +1 -1
- package/dist/versioned-components/es/tab-group.js +1 -1
- package/dist/versioned-components/es/tab-panel.js +1 -1
- package/dist/versioned-components/es/tab.js +1 -1
- package/dist/versioned-components/es/tag.js +1 -1
- package/dist/versioned-components/es/teaser-media.js +1 -1
- package/dist/versioned-components/es/teaser.js +1 -1
- package/dist/versioned-components/es/textarea.js +1 -1
- package/dist/versioned-components/es/tooltip.js +2 -2
- package/dist/versioned-components/es/video.js +1 -1
- package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
- package/dist/versioned-package/_components/button-group/button-group.js +11 -11
- package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
- package/dist/versioned-package/components/accordion/accordion.js +2 -2
- package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
- package/dist/versioned-package/components/audio/audio.d.ts +1 -1
- package/dist/versioned-package/components/audio/audio.js +6 -6
- package/dist/versioned-package/components/badge/badge.d.ts +1 -1
- package/dist/versioned-package/components/badge/badge.js +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
- package/dist/versioned-package/components/button/button.d.ts +1 -1
- package/dist/versioned-package/components/button/button.js +4 -4
- package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
- package/dist/versioned-package/components/carousel/carousel.js +6 -6
- package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.js +3 -3
- package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
- package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
- package/dist/versioned-package/components/dialog/dialog.js +2 -2
- package/dist/versioned-package/components/divider/divider.d.ts +1 -1
- package/dist/versioned-package/components/divider/divider.js +2 -2
- package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
- package/dist/versioned-package/components/drawer/drawer.js +2 -2
- package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
- package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
- package/dist/versioned-package/components/expandable/expandable.d.ts +1 -1
- package/dist/versioned-package/components/expandable/expandable.js +2 -2
- package/dist/versioned-package/components/flipcard/flipcard.d.ts +1 -1
- package/dist/versioned-package/components/flipcard/flipcard.js +1 -1
- package/dist/versioned-package/components/header/header.d.ts +1 -1
- package/dist/versioned-package/components/header/header.js +4 -4
- package/dist/versioned-package/components/icon/icon.d.ts +1 -1
- package/dist/versioned-package/components/icon/icon.js +1 -1
- package/dist/versioned-package/components/include/include.d.ts +1 -1
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/input/input.d.ts +1 -1
- package/dist/versioned-package/components/input/input.js +3 -3
- package/dist/versioned-package/components/link/link.d.ts +1 -1
- package/dist/versioned-package/components/link/link.js +2 -2
- package/dist/versioned-package/components/map-marker/map-marker.d.ts +1 -1
- package/dist/versioned-package/components/map-marker/map-marker.js +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.js +5 -5
- package/dist/versioned-package/components/notification/notification.d.ts +1 -1
- package/dist/versioned-package/components/notification/notification.js +5 -5
- package/dist/versioned-package/components/option/option.d.ts +1 -1
- package/dist/versioned-package/components/option/option.js +2 -2
- package/dist/versioned-package/components/popup/popup.d.ts +1 -1
- package/dist/versioned-package/components/popup/popup.js +1 -1
- package/dist/versioned-package/components/quickfact/quickfact.d.ts +1 -1
- package/dist/versioned-package/components/quickfact/quickfact.js +2 -2
- package/dist/versioned-package/components/radio/radio.d.ts +1 -1
- package/dist/versioned-package/components/radio/radio.js +2 -2
- package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
- package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +13 -13
- package/dist/versioned-package/components/scrollable/scrollable.d.ts +1 -1
- package/dist/versioned-package/components/scrollable/scrollable.js +3 -3
- package/dist/versioned-package/components/select/select.d.ts +4 -4
- package/dist/versioned-package/components/select/select.js +25 -25
- package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
- package/dist/versioned-package/components/spinner/spinner.js +1 -1
- package/dist/versioned-package/components/step/step.d.ts +1 -1
- package/dist/versioned-package/components/step/step.js +2 -2
- package/dist/versioned-package/components/step-group/step-group.d.ts +1 -1
- package/dist/versioned-package/components/step-group/step-group.js +2 -2
- package/dist/versioned-package/components/switch/switch.d.ts +1 -1
- package/dist/versioned-package/components/switch/switch.js +1 -1
- package/dist/versioned-package/components/tab/tab.d.ts +1 -1
- package/dist/versioned-package/components/tab/tab.js +3 -3
- package/dist/versioned-package/components/tab-group/tab-group.d.ts +1 -1
- package/dist/versioned-package/components/tab-group/tab-group.js +17 -15
- package/dist/versioned-package/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/versioned-package/components/tab-panel/tab-panel.js +2 -2
- package/dist/versioned-package/components/tag/tag.d.ts +1 -1
- package/dist/versioned-package/components/tag/tag.js +2 -2
- package/dist/versioned-package/components/teaser/teaser.js +1 -1
- package/dist/versioned-package/components/teaser-media/teaser-media.js +1 -1
- package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
- package/dist/versioned-package/components/textarea/textarea.js +2 -2
- package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
- package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
- package/dist/versioned-package/components/video/video.d.ts +3 -1
- package/dist/versioned-package/components/video/video.js +20 -5
- package/dist/versioned-package/internal/form.js +3 -3
- package/dist/versioned-package/styles/headline/headline.css.js +1 -1
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-package/utilities/autocomplete-config.js +4 -4
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +45 -45
- package/dist/web-types.json +54 -46
- package/package.json +24 -64
@@ -29,8 +29,8 @@ let SdTabGroup = class extends SolidElement {
|
|
29
29
|
}
|
30
30
|
connectedCallback() {
|
31
31
|
const whenAllDefined = Promise.all([
|
32
|
-
customElements.whenDefined("sd-3-22-
|
33
|
-
customElements.whenDefined("sd-3-22-
|
32
|
+
customElements.whenDefined("sd-3-22-12-tab"),
|
33
|
+
customElements.whenDefined("sd-3-22-12-tab-panel")
|
34
34
|
]);
|
35
35
|
super.connectedCallback();
|
36
36
|
this.resizeObserver = new ResizeObserver(() => {
|
@@ -67,19 +67,19 @@ let SdTabGroup = class extends SolidElement {
|
|
67
67
|
getAllTabs(options = { includeDisabled: true }) {
|
68
68
|
const slot = this.shadowRoot.querySelector('slot[name="nav"]');
|
69
69
|
return [...slot.assignedElements()].filter((el) => {
|
70
|
-
return options.includeDisabled ? el.tagName.toLowerCase() === "sd-3-22-
|
70
|
+
return options.includeDisabled ? el.tagName.toLowerCase() === "sd-3-22-12-tab" : el.tagName.toLowerCase() === "sd-3-22-12-tab" && !el.disabled;
|
71
71
|
});
|
72
72
|
}
|
73
73
|
getAllPanels() {
|
74
|
-
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-3-22-
|
74
|
+
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-3-22-12-tab-panel");
|
75
75
|
}
|
76
76
|
getActiveTab() {
|
77
77
|
return this.tabs.find((t) => t.matches(":focus"));
|
78
78
|
}
|
79
79
|
handleClick(event) {
|
80
80
|
const target = event.target;
|
81
|
-
const tab = target.closest("sd-3-22-
|
82
|
-
const tabGroup = tab == null ? void 0 : tab.closest("sd-3-22-
|
81
|
+
const tab = target.closest("sd-3-22-12-tab");
|
82
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-3-22-12-tab-group");
|
83
83
|
if (tabGroup !== this) {
|
84
84
|
return;
|
85
85
|
}
|
@@ -89,8 +89,8 @@ let SdTabGroup = class extends SolidElement {
|
|
89
89
|
}
|
90
90
|
handleKeyDown(event) {
|
91
91
|
const target = event.target;
|
92
|
-
const tab = target.closest("sd-3-22-
|
93
|
-
const tabGroup = tab == null ? void 0 : tab.closest("sd-3-22-
|
92
|
+
const tab = target.closest("sd-3-22-12-tab");
|
93
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-3-22-12-tab-group");
|
94
94
|
if (tabGroup !== this) {
|
95
95
|
return;
|
96
96
|
}
|
@@ -115,7 +115,7 @@ let SdTabGroup = class extends SolidElement {
|
|
115
115
|
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) {
|
116
116
|
const activeEl = this.tabs.find((t) => t.matches(":focus"));
|
117
117
|
const isRtl = this.localize.dir() === "rtl";
|
118
|
-
if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "sd-3-22-
|
118
|
+
if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "sd-3-22-12-tab") {
|
119
119
|
let index = this.tabs.indexOf(activeEl);
|
120
120
|
if (event.key === "Home") {
|
121
121
|
index = 0;
|
@@ -182,7 +182,6 @@ let SdTabGroup = class extends SolidElement {
|
|
182
182
|
const panel = this.panels.find((el) => el.name === tab.panel);
|
183
183
|
if (panel) {
|
184
184
|
tab.setAttribute("aria-controls", panel.getAttribute("id"));
|
185
|
-
panel.setAttribute("aria-labelledby", tab.getAttribute("id"));
|
186
185
|
}
|
187
186
|
});
|
188
187
|
}
|
@@ -190,6 +189,9 @@ let SdTabGroup = class extends SolidElement {
|
|
190
189
|
syncTabsAndPanels() {
|
191
190
|
this.tabs = this.getAllTabs({ includeDisabled: false });
|
192
191
|
this.panels = this.getAllPanels();
|
192
|
+
this.panels.forEach((panel) => {
|
193
|
+
panel.tabIndex = 0;
|
194
|
+
});
|
193
195
|
this.updateComplete.then(() => this.updateScrollControls());
|
194
196
|
if (this.tabs.length !== 0 && this.tabs[0].variant === "container") {
|
195
197
|
this.variant = "container";
|
@@ -207,20 +209,20 @@ let SdTabGroup = class extends SolidElement {
|
|
207
209
|
}
|
208
210
|
render() {
|
209
211
|
const isRtl = this.localize.dir() === "rtl";
|
210
|
-
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" class="${cx(
|
212
|
+
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(
|
211
213
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
212
214
|
this.localize.dir() === "rtl" && "left-auto right-0"
|
213
|
-
)}" @click="${this.handleScrollToStart}"><sd-3-22-
|
215
|
+
)}" @click="${this.handleScrollToStart}"><sd-3-22-12-icon library="system" name="${isRtl ? "chevron-up" : "chevron-down"}" label="previous" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-3-22-12-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"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></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(
|
214
216
|
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
215
217
|
this.localize.dir() === "rtl" && "right-auto left-0"
|
216
|
-
)}" @click="${this.handleScrollToEnd}"><sd-3-22-
|
218
|
+
)}" @click="${this.handleScrollToEnd}"><sd-3-22-12-icon library="system" name="${isRtl ? "chevron-down" : "chevron-up"}" label="next" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-3-22-12-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>`;
|
217
219
|
}
|
218
220
|
};
|
219
221
|
SdTabGroup.styles = [
|
220
222
|
SolidElement.styles,
|
221
223
|
unsafeCSS(InteractiveStyles),
|
222
224
|
componentStyles,
|
223
|
-
css`:host{box-
|
225
|
+
css`:host{@apply block box-border;}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{@apply w-0 h-0;}::slotted(sd-3-22-12-tab-panel){--padding:1rem 0}`
|
224
226
|
];
|
225
227
|
__decorateClass([
|
226
228
|
query("[part=base]")
|
@@ -241,7 +243,7 @@ __decorateClass([
|
|
241
243
|
property()
|
242
244
|
], SdTabGroup.prototype, "activation", 2);
|
243
245
|
SdTabGroup = __decorateClass([
|
244
|
-
customElement("sd-3-22-
|
246
|
+
customElement("sd-3-22-12-tab-group")
|
245
247
|
], SdTabGroup);
|
246
248
|
export {
|
247
249
|
SdTabGroup as default
|
@@ -20,7 +20,7 @@ let SdTabPanel = class extends SolidElement {
|
|
20
20
|
constructor() {
|
21
21
|
super(...arguments);
|
22
22
|
this.attrId = ++id;
|
23
|
-
this.componentId = `sd-3-22-
|
23
|
+
this.componentId = `sd-3-22-12-tab-panel-${this.attrId}`;
|
24
24
|
this.name = "";
|
25
25
|
this.active = false;
|
26
26
|
}
|
@@ -51,7 +51,7 @@ __decorateClass([
|
|
51
51
|
watch("active")
|
52
52
|
], SdTabPanel.prototype, "handleActiveChange", 1);
|
53
53
|
SdTabPanel = __decorateClass([
|
54
|
-
customElement("sd-3-22-
|
54
|
+
customElement("sd-3-22-12-tab-panel")
|
55
55
|
], SdTabPanel);
|
56
56
|
export {
|
57
57
|
SdTabPanel as default
|
@@ -74,7 +74,7 @@ let SdTag = class extends SolidElement {
|
|
74
74
|
lg: "text-base",
|
75
75
|
sm: "text-[12px]"
|
76
76
|
}[this.size]
|
77
|
-
)}"><sd-3-22-
|
77
|
+
)}"><sd-3-22-12-icon library="system" name="close" label="remove"></sd-3-22-12-icon></slot>` : ""}</${tag}>`;
|
78
78
|
}
|
79
79
|
};
|
80
80
|
SdTag.styles = [
|
@@ -109,7 +109,7 @@ __decorateClass([
|
|
109
109
|
property()
|
110
110
|
], SdTag.prototype, "download", 2);
|
111
111
|
SdTag = __decorateClass([
|
112
|
-
customElement("sd-3-22-
|
112
|
+
customElement("sd-3-22-12-tag")
|
113
113
|
], SdTag);
|
114
114
|
export {
|
115
115
|
SdTag as default
|
@@ -65,7 +65,7 @@ __decorateClass([
|
|
65
65
|
query('[part="base"]')
|
66
66
|
], SdTeaserMedia.prototype, "teaserMedia", 2);
|
67
67
|
SdTeaserMedia = __decorateClass([
|
68
|
-
customElement("sd-3-22-
|
68
|
+
customElement("sd-3-22-12-teaser-media")
|
69
69
|
], SdTeaserMedia);
|
70
70
|
export {
|
71
71
|
SdTeaserMedia as default
|
@@ -199,7 +199,7 @@ let SdTextarea = class extends SolidElement {
|
|
199
199
|
"flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",
|
200
200
|
this.disabled && "cursor-not-allowed",
|
201
201
|
textSize
|
202
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" 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}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-3-22-
|
202
|
+
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" 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}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-3-22-12-icon class="${cx("text-error absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="risk" part="invalid-icon"></sd-3-22-12-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-3-22-12-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-3-22-12-icon>` : ""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${cx("text-sm text-neutral-700", hasHelpText ? "block" : "hidden")}" aria-hidden="${hasHelpText ? "false" : "true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
|
203
203
|
}
|
204
204
|
};
|
205
205
|
SdTextarea.styles = [
|
@@ -308,7 +308,7 @@ __decorateClass([
|
|
308
308
|
watch("value", { waitUntilFirstUpdate: true })
|
309
309
|
], SdTextarea.prototype, "handleValueChange", 1);
|
310
310
|
SdTextarea = __decorateClass([
|
311
|
-
customElement("sd-3-22-
|
311
|
+
customElement("sd-3-22-12-textarea")
|
312
312
|
], SdTextarea);
|
313
313
|
export {
|
314
314
|
SdTextarea as default
|
@@ -166,16 +166,16 @@ let SdTooltip = class extends SolidElement {
|
|
166
166
|
render() {
|
167
167
|
const isStart = this.placement.endsWith("-start");
|
168
168
|
const isEnd = this.placement.endsWith("-end");
|
169
|
-
return html`<sd-3-22-
|
169
|
+
return html`<sd-3-22-12-popup part="base" exportparts="
|
170
170
|
popup:base__popup,
|
171
171
|
arrow:base__arrow
|
172
|
-
" 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" aria-describedby="tooltip" class="${cx(this.size === "lg" ? "text-xl" : "text-base")}"><button class="flex sd-interactive rounded-full"><sd-3-22-
|
172
|
+
" 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" aria-describedby="tooltip" class="${cx(this.size === "lg" ? "text-xl" : "text-base")}"><button class="flex sd-interactive rounded-full"><sd-3-22-12-icon library="system" name="info-circle" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-3-22-12-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-3-22-12-popup>`;
|
173
173
|
}
|
174
174
|
};
|
175
175
|
SdTooltip.styles = [
|
176
176
|
SolidElement.styles,
|
177
177
|
unsafeCSS(InteractiveStyles),
|
178
|
-
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-3-22-
|
178
|
+
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-3-22-12-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-3-22-12-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(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-3-22-12-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(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-3-22-12-popup[placement^=top]::part(popup){transform-origin:bottom}sd-3-22-12-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`
|
179
179
|
];
|
180
180
|
__decorateClass([
|
181
181
|
query("slot:not([name])")
|
@@ -184,7 +184,7 @@ __decorateClass([
|
|
184
184
|
query("#tooltip")
|
185
185
|
], SdTooltip.prototype, "body", 2);
|
186
186
|
__decorateClass([
|
187
|
-
query("sd-3-22-
|
187
|
+
query("sd-3-22-12-popup")
|
188
188
|
], SdTooltip.prototype, "popup", 2);
|
189
189
|
__decorateClass([
|
190
190
|
property()
|
@@ -217,7 +217,7 @@ __decorateClass([
|
|
217
217
|
watch("disabled")
|
218
218
|
], SdTooltip.prototype, "handleDisabledChange", 1);
|
219
219
|
SdTooltip = __decorateClass([
|
220
|
-
customElement("sd-3-22-
|
220
|
+
customElement("sd-3-22-12-tooltip")
|
221
221
|
], SdTooltip);
|
222
222
|
setDefaultAnimation("tooltip.show", {
|
223
223
|
keyframes: [
|
@@ -7,8 +7,10 @@ export default class SdVideo extends SolidElement {
|
|
7
7
|
private resizeObserver;
|
8
8
|
private readonly hasSlotController;
|
9
9
|
private get poster();
|
10
|
+
private get video();
|
10
11
|
private fadeoutPoster;
|
11
12
|
private hidePoster;
|
13
|
+
private setVideoInert;
|
12
14
|
private play;
|
13
15
|
private handleKeydown;
|
14
16
|
private handleButtonResize;
|
@@ -19,6 +21,6 @@ export default class SdVideo extends SolidElement {
|
|
19
21
|
}
|
20
22
|
declare global {
|
21
23
|
interface HTMLElementTagNameMap {
|
22
|
-
'sd-3-22-
|
24
|
+
'sd-3-22-12-video': SdVideo;
|
23
25
|
}
|
24
26
|
}
|
@@ -30,6 +30,9 @@ let SdVideo = class extends SolidElement {
|
|
30
30
|
}
|
31
31
|
return null;
|
32
32
|
}
|
33
|
+
get video() {
|
34
|
+
return this.querySelector("video");
|
35
|
+
}
|
33
36
|
/** Fade out poster after initial play. */
|
34
37
|
fadeoutPoster() {
|
35
38
|
if (this.poster instanceof HTMLImageElement) {
|
@@ -42,11 +45,22 @@ let SdVideo = class extends SolidElement {
|
|
42
45
|
this.poster.style.display = "none";
|
43
46
|
}
|
44
47
|
}
|
48
|
+
setVideoInert(inert) {
|
49
|
+
var _a, _b;
|
50
|
+
if (inert) {
|
51
|
+
(_a = this.video) == null ? void 0 : _a.setAttribute("inert", "");
|
52
|
+
} else {
|
53
|
+
(_b = this.video) == null ? void 0 : _b.removeAttribute("inert");
|
54
|
+
}
|
55
|
+
}
|
45
56
|
/** Utility function to group play behaviors. */
|
46
57
|
play() {
|
58
|
+
var _a;
|
47
59
|
this.emit("sd-play");
|
48
60
|
this.playing = true;
|
61
|
+
(_a = this.video) == null ? void 0 : _a.play();
|
49
62
|
this.fadeoutPoster();
|
63
|
+
this.setVideoInert(false);
|
50
64
|
}
|
51
65
|
/** Restrict keydown control to enter and space bar to mimic the native video tag behavior. If a KeyboardEvent is used, refocus on the native video element to give the user seamless keyboard control. */
|
52
66
|
handleKeydown(e) {
|
@@ -54,7 +68,7 @@ let SdVideo = class extends SolidElement {
|
|
54
68
|
this.play();
|
55
69
|
setTimeout(() => {
|
56
70
|
var _a;
|
57
|
-
(_a = this.
|
71
|
+
(_a = this.video) == null ? void 0 : _a.focus();
|
58
72
|
});
|
59
73
|
}
|
60
74
|
}
|
@@ -69,6 +83,7 @@ let SdVideo = class extends SolidElement {
|
|
69
83
|
}
|
70
84
|
connectedCallback() {
|
71
85
|
super.connectedCallback();
|
86
|
+
this.setVideoInert(true);
|
72
87
|
this.resizeObserver = new ResizeObserver(() => this.handleButtonResize());
|
73
88
|
this.updateComplete.then(() => {
|
74
89
|
this.resizeObserver.observe(this.hostEl);
|
@@ -81,12 +96,12 @@ let SdVideo = class extends SolidElement {
|
|
81
96
|
render() {
|
82
97
|
return html`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${cx(
|
83
98
|
this.playing && "pointer-events-none",
|
84
|
-
"w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline"
|
99
|
+
"group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline"
|
85
100
|
)}"><div part="play-button-bg" class="${cx(
|
86
101
|
this.playing ? "opacity-0" : "opacity-100",
|
87
102
|
this.isBelowBreakpoint ? "w-[48px] h-[48px]" : "w-[96px] h-[96px]",
|
88
|
-
"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition"
|
89
|
-
)}"><slot name="play-icon" part="play-icon" class="${cx(this.isBelowBreakpoint ? "text-[2rem]" : "text-[4rem]")}"><sd-3-22-
|
103
|
+
"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline"
|
104
|
+
)}"><slot name="play-icon" part="play-icon" class="${cx(this.isBelowBreakpoint ? "text-[2rem]" : "text-[4rem]")}"><sd-3-22-12-icon id="default-play-icon" library="system" name="start"></sd-3-22-12-icon></slot></div></button> ${this.hasSlotController.test("poster") ? html`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>` : null}<div part="overlay" id="overlay" role="presentation" class="${cx(
|
90
105
|
this.overlay && !this.playing ? "opacity-100" : "opacity-0",
|
91
106
|
"bg-[rgba(0,0,0,0.65)] w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition"
|
92
107
|
)}"></div><slot></slot></div>`;
|
@@ -109,7 +124,7 @@ __decorateClass([
|
|
109
124
|
property({ type: Boolean })
|
110
125
|
], SdVideo.prototype, "isBelowBreakpoint", 2);
|
111
126
|
SdVideo = __decorateClass([
|
112
|
-
customElement("sd-3-22-
|
127
|
+
customElement("sd-3-22-12-video")
|
113
128
|
], SdVideo);
|
114
129
|
export {
|
115
130
|
SdVideo as default
|
@@ -9,7 +9,7 @@ class FormControlController {
|
|
9
9
|
const disabled = this.options.disabled(this.host);
|
10
10
|
const name = this.options.name(this.host);
|
11
11
|
const value = this.options.value(this.host);
|
12
|
-
const isButton = this.host.tagName.toLowerCase() === "sd-3-22-
|
12
|
+
const isButton = this.host.tagName.toLowerCase() === "sd-3-22-12-button";
|
13
13
|
if (!disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") {
|
14
14
|
if (Array.isArray(value)) {
|
15
15
|
value.forEach((val) => {
|
@@ -34,7 +34,7 @@ class FormControlController {
|
|
34
34
|
event.stopImmediatePropagation();
|
35
35
|
const invalidElements = (_b = this.form) == null ? void 0 : _b.querySelectorAll("[data-invalid]");
|
36
36
|
const sdRadioGroups = Array.from(invalidElements).filter(
|
37
|
-
(element) => element.tagName.toLowerCase() === "sd-3-22-
|
37
|
+
(element) => element.tagName.toLowerCase() === "sd-3-22-12-radio-group"
|
38
38
|
);
|
39
39
|
sdRadioGroups.forEach((radioGroup) => {
|
40
40
|
var _a2, _b2;
|
@@ -78,7 +78,7 @@ class FormControlController {
|
|
78
78
|
disabled: (input) => input.disabled ?? false,
|
79
79
|
reportValidity: (input) => typeof input.reportValidity === "function" ? input.reportValidity() : true,
|
80
80
|
setValue: (input, value) => input.value = value,
|
81
|
-
assumeInteractionOn: ["sd-3-22-
|
81
|
+
assumeInteractionOn: ["sd-3-22-12-input"],
|
82
82
|
...options
|
83
83
|
};
|
84
84
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const HeadlineStyles = ".sd-headline,.sd-prose :is(h1,h2,h3,h4,h5){display:flex;font-weight:700;--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity))}.sd-headline sd-3-22-
|
1
|
+
const HeadlineStyles = ".sd-headline,.sd-prose :is(h1,h2,h3,h4,h5){display:flex;font-weight:700;--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity))}.sd-headline sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5) sd-3-22-12-icon{flex-shrink:0;font-size:3rem;--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity))}@media (min-width:640px){.sd-headline sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5) sd-3-22-12-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline.sd-headline,.sd-headline:is(h1):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline,.sd-prose :is(h1,h2,h3,h4,h5):is(h1):not(.sd-headline){font-size:var(--sd-font-size-3xl,2rem);gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline.sd-headline,.sd-headline:is(h1):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline,.sd-prose :is(h1,h2,h3,h4,h5):is(h1):not(.sd-headline){font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline.sd-headline sd-3-22-12-icon,.sd-headline:is(h1):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h1):not(.sd-headline) sd-3-22-12-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline.sd-headline sd-3-22-12-icon,.sd-headline:is(h1):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h1):not(.sd-headline) sd-3-22-12-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline.sd-headline--size-3xl,.sd-headline:is(h2):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-3xl,.sd-prose :is(h1,h2,h3,h4,h5):is(h2):not(.sd-headline){font-size:var(--sd-font-size-2xl,1.75rem);gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline.sd-headline--size-3xl,.sd-headline:is(h2):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-3xl,.sd-prose :is(h1,h2,h3,h4,h5):is(h2):not(.sd-headline){font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline.sd-headline--size-3xl sd-3-22-12-icon,.sd-headline:is(h2):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-3xl sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h2):not(.sd-headline) sd-3-22-12-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline.sd-headline--size-3xl sd-3-22-12-icon,.sd-headline:is(h2):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-3xl sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h2):not(.sd-headline) sd-3-22-12-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline.sd-headline--size-base,.sd-headline.sd-headline--size-lg,.sd-headline.sd-headline--size-xl,.sd-headline:is(h3,h4,h5):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-xl,.sd-prose :is(h1,h2,h3,h4,h5):is(h3,h4,h5):not(.sd-headline){gap:var(--sd-spacing-2,.5rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity))}.sd-headline.sd-headline--size-base sd-3-22-12-icon,.sd-headline.sd-headline--size-lg sd-3-22-12-icon,.sd-headline.sd-headline--size-xl sd-3-22-12-icon,.sd-headline:is(h3,h4,h5):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-xl sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h3,h4,h5):not(.sd-headline) sd-3-22-12-icon{font-size:2rem}.sd-headline.sd-headline--size-xl,.sd-headline:is(h3):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-xl,.sd-prose :is(h1,h2,h3,h4,h5):is(h3):not(.sd-headline){font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline.sd-headline--size-xl sd-3-22-12-icon,.sd-headline:is(h3):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-xl sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h3):not(.sd-headline) sd-3-22-12-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline.sd-headline--size-xl sd-3-22-12-icon,.sd-headline:is(h3):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-xl sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h3):not(.sd-headline) sd-3-22-12-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline.sd-headline--size-base,.sd-headline.sd-headline--size-lg,.sd-headline:is(h4,h5):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg,.sd-prose :is(h1,h2,h3,h4,h5):is(h4,h5):not(.sd-headline){line-height:var(--sd-line-height-normal,150%)}.sd-headline.sd-headline--size-lg,.sd-headline:is(h4),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg,.sd-prose :is(h1,h2,h3,h4,h5):is(h4){font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline.sd-headline--size-lg sd-3-22-12-icon,.sd-headline:is(h4) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h4) sd-3-22-12-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline.sd-headline--size-lg sd-3-22-12-icon,.sd-headline:is(h4) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-lg sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h4) sd-3-22-12-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline.sd-headline--size-base,.sd-headline:is(h5):not(.sd-headline),.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base,.sd-prose :is(h1,h2,h3,h4,h5):is(h5):not(.sd-headline){font-size:var(--sd-font-size-base,1rem)}.sd-headline.sd-headline--size-base sd-3-22-12-icon,.sd-headline:is(h5):not(.sd-headline) sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base sd-3-22-12-icon,.sd-prose :is(h1,h2,h3,h4,h5):is(h5):not(.sd-headline) sd-3-22-12-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline.sd-headline--size-base mark,.sd-headline:is(h5):not(.sd-headline) mark,.sd-prose :is(h1,h2,h3,h4,h5).sd-headline--size-base mark,.sd-prose :is(h1,h2,h3,h4,h5):is(h5):not(.sd-headline) mark{color:inherit}.sd-headline--inline{display:inline-block}.sd-headline--inline sd-3-22-12-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline:is(.sd-headline--size-xl,.sd-headline--size-lg,.sd-headline--size-base) sd-3-22-12-icon{margin-right:var(--sd-spacing-0-5,.125rem)}.sd-headline--inverted:not(#\\9),.sd-prose--inverted :is(h1,h2,h3,h4,h5):not(.sd-headline):not(#\\9){--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inverted:not(#\\9) sd-3-22-12-icon,.sd-prose--inverted :is(h1,h2,h3,h4,h5):not(.sd-headline):not(#\\9) sd-3-22-12-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}";
|
2
2
|
export {
|
3
3
|
HeadlineStyles as default
|
4
4
|
};
|