@solid-design-system/components 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/es/solid-element.js +5 -5
- package/dist/components/es/tab-group.js +1 -0
- package/dist/components/es/tab-panel.js +1 -0
- package/dist/components/es/tab.js +1 -0
- package/dist/components/umd/solid-components.js +18 -18
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/tab/tab.d.ts +22 -0
- package/dist/package/components/tab/tab.js +94 -0
- package/dist/package/components/tab-group/tab-group.d.ts +40 -0
- package/dist/package/components/tab-group/tab-group.js +249 -0
- package/dist/package/components/tab-panel/tab-panel.d.ts +16 -0
- package/dist/package/components/tab-panel/tab-panel.js +59 -0
- package/dist/package/solid-components.d.ts +3 -0
- package/dist/package/solid-components.js +18 -12
- 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/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/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/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/popup.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/select.js +3 -3
- package/dist/versioned-components/es/solid-components2.js +1 -1
- package/dist/versioned-components/es/solid-element.js +5 -5
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/switch.js +1 -1
- package/dist/versioned-components/es/tab-group.js +1 -0
- package/dist/versioned-components/es/tab-panel.js +1 -0
- package/dist/versioned-components/es/tab.js +1 -0
- 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/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 +4 -4
- 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/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 +4 -4
- 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/navigation-item/navigation-item.d.ts +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
- 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/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 +15 -15
- package/dist/versioned-package/components/select/select.d.ts +4 -4
- package/dist/versioned-package/components/select/select.js +28 -28
- 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/switch/switch.d.ts +1 -1
- package/dist/versioned-package/components/switch/switch.js +2 -2
- package/dist/versioned-package/components/tab/tab.d.ts +22 -0
- package/dist/versioned-package/components/tab/tab.js +94 -0
- package/dist/versioned-package/components/tab-group/tab-group.d.ts +40 -0
- package/dist/versioned-package/components/tab-group/tab-group.js +249 -0
- package/dist/versioned-package/components/tab-panel/tab-panel.d.ts +16 -0
- package/dist/versioned-package/components/tab-panel/tab-panel.js +59 -0
- 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 +3 -3
- 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 +1 -1
- package/dist/versioned-package/components/video/video.js +2 -2
- package/dist/versioned-package/internal/form.js +3 -3
- package/dist/versioned-package/solid-components.d.ts +3 -0
- package/dist/versioned-package/solid-components.js +18 -12
- package/dist/versioned-package/styles/headline/headline.css.js +1 -1
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +174 -34
- package/dist/web-types.json +573 -35
- package/package.json +3 -3
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { unsafeCSS, css, html } from "lit";
|
|
2
|
+
import { customElement } from "../../internal/register-custom-element.js";
|
|
3
|
+
import { LocalizeController } from "../../utilities/localize.js";
|
|
4
|
+
import { query, state, property } from "lit/decorators.js";
|
|
5
|
+
import { scrollIntoView } from "../../internal/scroll.js";
|
|
6
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
7
|
+
import cx from "classix";
|
|
8
|
+
import InteractiveStyles from "../../styles/interactive/interactive.css.js";
|
|
9
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result)
|
|
18
|
+
__defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
let SdTabGroup = class extends SolidElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.localize = new LocalizeController(this);
|
|
25
|
+
this.tabs = [];
|
|
26
|
+
this.panels = [];
|
|
27
|
+
this.hasScrollControls = false;
|
|
28
|
+
this.variant = "default";
|
|
29
|
+
this.activation = "auto";
|
|
30
|
+
}
|
|
31
|
+
connectedCallback() {
|
|
32
|
+
const whenAllDefined = Promise.all([
|
|
33
|
+
customElements.whenDefined("sd-2-6-0-tab"),
|
|
34
|
+
customElements.whenDefined("sd-2-6-0-tab-panel")
|
|
35
|
+
]);
|
|
36
|
+
super.connectedCallback();
|
|
37
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
38
|
+
this.updateScrollControls();
|
|
39
|
+
});
|
|
40
|
+
this.mutationObserver = new MutationObserver((mutations) => {
|
|
41
|
+
if (mutations.some((m) => !["aria-labelledby", "aria-controls"].includes(m.attributeName))) {
|
|
42
|
+
setTimeout(() => this.setAriaLabels());
|
|
43
|
+
}
|
|
44
|
+
if (mutations.some((m) => m.attributeName === "disabled")) {
|
|
45
|
+
this.syncTabsAndPanels();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
this.updateComplete.then(() => {
|
|
49
|
+
this.syncTabsAndPanels();
|
|
50
|
+
this.mutationObserver.observe(this, { attributes: true, childList: true, subtree: true });
|
|
51
|
+
this.resizeObserver.observe(this.nav);
|
|
52
|
+
whenAllDefined.then(() => {
|
|
53
|
+
const intersectionObserver = new IntersectionObserver((entries, observer) => {
|
|
54
|
+
if (entries[0].intersectionRatio > 0) {
|
|
55
|
+
this.setAriaLabels();
|
|
56
|
+
this.setActiveTab(this.activeTab ?? this.tabs[0], { emitEvents: false });
|
|
57
|
+
observer.unobserve(entries[0].target);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
intersectionObserver.observe(this.tabGroup);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
disconnectedCallback() {
|
|
65
|
+
this.mutationObserver.disconnect();
|
|
66
|
+
this.resizeObserver.unobserve(this.nav);
|
|
67
|
+
}
|
|
68
|
+
getAllTabs(options = { includeDisabled: true }) {
|
|
69
|
+
const slot = this.shadowRoot.querySelector('slot[name="nav"]');
|
|
70
|
+
return [...slot.assignedElements()].filter((el) => {
|
|
71
|
+
return options.includeDisabled ? el.tagName.toLowerCase() === "sd-2-6-0-tab" : el.tagName.toLowerCase() === "sd-2-6-0-tab" && !el.disabled;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
getAllPanels() {
|
|
75
|
+
return [...this.body.assignedElements()].filter((el) => el.tagName.toLowerCase() === "sd-2-6-0-tab-panel");
|
|
76
|
+
}
|
|
77
|
+
getActiveTab() {
|
|
78
|
+
return this.tabs.find((t) => t.matches(":focus"));
|
|
79
|
+
}
|
|
80
|
+
handleClick(event) {
|
|
81
|
+
const target = event.target;
|
|
82
|
+
const tab = target.closest("sd-2-6-0-tab");
|
|
83
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-2-6-0-tab-group");
|
|
84
|
+
if (tabGroup !== this) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (tab !== null) {
|
|
88
|
+
this.setActiveTab(tab, { scrollBehavior: "smooth" });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
handleKeyDown(event) {
|
|
92
|
+
const target = event.target;
|
|
93
|
+
const tab = target.closest("sd-2-6-0-tab");
|
|
94
|
+
const tabGroup = tab == null ? void 0 : tab.closest("sd-2-6-0-tab-group");
|
|
95
|
+
if (tabGroup !== this) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (["Enter", " "].includes(event.key)) {
|
|
99
|
+
if (tab !== null) {
|
|
100
|
+
this.setActiveTab(tab, { scrollBehavior: "smooth" });
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (["Tab"].includes(event.key)) {
|
|
105
|
+
const index = this.tabs.indexOf(this.getActiveTab());
|
|
106
|
+
if (tab !== null) {
|
|
107
|
+
scrollIntoView(this.tabs[index + 1], this.nav, "horizontal");
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (["Shift", "Tab"].includes(event.key)) {
|
|
111
|
+
const index = this.tabs.indexOf(this.getActiveTab());
|
|
112
|
+
if (tab !== null) {
|
|
113
|
+
scrollIntoView(this.tabs[index - 1], this.nav, "horizontal");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) {
|
|
117
|
+
const activeEl = this.tabs.find((t) => t.matches(":focus"));
|
|
118
|
+
const isRtl = this.localize.dir() === "rtl";
|
|
119
|
+
if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "sd-2-6-0-tab") {
|
|
120
|
+
let index = this.tabs.indexOf(activeEl);
|
|
121
|
+
if (event.key === "Home") {
|
|
122
|
+
index = 0;
|
|
123
|
+
} else if (event.key === "End") {
|
|
124
|
+
index = this.tabs.length - 1;
|
|
125
|
+
} else if (event.key === (isRtl ? "ArrowRight" : "ArrowLeft") || event.key === "ArrowUp") {
|
|
126
|
+
index--;
|
|
127
|
+
} else if (event.key === (isRtl ? "ArrowLeft" : "ArrowRight") || event.key === "ArrowDown") {
|
|
128
|
+
index++;
|
|
129
|
+
}
|
|
130
|
+
if (index < 0) {
|
|
131
|
+
index = this.tabs.length - 1;
|
|
132
|
+
}
|
|
133
|
+
if (index > this.tabs.length - 1) {
|
|
134
|
+
index = 0;
|
|
135
|
+
}
|
|
136
|
+
this.tabs[index].focus({ preventScroll: true });
|
|
137
|
+
if (this.activation === "auto") {
|
|
138
|
+
this.setActiveTab(this.tabs[index], { scrollBehavior: "smooth" });
|
|
139
|
+
}
|
|
140
|
+
scrollIntoView(this.tabs[index], this.nav, "horizontal");
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
handleScrollToStart() {
|
|
146
|
+
this.nav.scroll({
|
|
147
|
+
left: this.localize.dir() === "rtl" ? this.nav.scrollLeft + this.nav.clientWidth : this.nav.scrollLeft - this.nav.clientWidth,
|
|
148
|
+
behavior: "smooth"
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
handleScrollToEnd() {
|
|
152
|
+
this.nav.scroll({
|
|
153
|
+
left: this.localize.dir() === "rtl" ? this.nav.scrollLeft - this.nav.clientWidth : this.nav.scrollLeft + this.nav.clientWidth,
|
|
154
|
+
behavior: "smooth"
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/** Sets the active tab and panel. */
|
|
158
|
+
setActiveTab(tab, options) {
|
|
159
|
+
options = {
|
|
160
|
+
emitEvents: true,
|
|
161
|
+
scrollBehavior: "auto",
|
|
162
|
+
...options
|
|
163
|
+
};
|
|
164
|
+
if (tab !== this.activeTab && !tab.disabled) {
|
|
165
|
+
const previousTab = this.activeTab;
|
|
166
|
+
this.activeTab = tab;
|
|
167
|
+
this.tabs.map((el) => el.active = el === this.activeTab);
|
|
168
|
+
this.panels.map((el) => {
|
|
169
|
+
var _a;
|
|
170
|
+
return el.active = el.name === ((_a = this.activeTab) == null ? void 0 : _a.panel);
|
|
171
|
+
});
|
|
172
|
+
scrollIntoView(this.activeTab, this.nav, "horizontal", options.scrollBehavior);
|
|
173
|
+
if (options.emitEvents) {
|
|
174
|
+
if (previousTab) {
|
|
175
|
+
this.emit("sd-2-6-0-tab-hide", { detail: { name: previousTab.panel } });
|
|
176
|
+
}
|
|
177
|
+
this.emit("sd-2-6-0-tab-show", { detail: { name: this.activeTab.panel } });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
setAriaLabels() {
|
|
182
|
+
this.tabs.forEach((tab) => {
|
|
183
|
+
const panel = this.panels.find((el) => el.name === tab.panel);
|
|
184
|
+
if (panel) {
|
|
185
|
+
tab.setAttribute("aria-controls", panel.getAttribute("id"));
|
|
186
|
+
panel.setAttribute("aria-labelledby", tab.getAttribute("id"));
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
// This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.
|
|
191
|
+
syncTabsAndPanels() {
|
|
192
|
+
this.tabs = this.getAllTabs({ includeDisabled: false });
|
|
193
|
+
this.panels = this.getAllPanels();
|
|
194
|
+
this.updateComplete.then(() => this.updateScrollControls());
|
|
195
|
+
if (this.tabs.length !== 0 && this.tabs[0].variant === "container") {
|
|
196
|
+
this.variant = "container";
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
updateScrollControls() {
|
|
200
|
+
this.hasScrollControls = this.nav.scrollWidth > this.nav.clientWidth;
|
|
201
|
+
}
|
|
202
|
+
/** Shows the specified tab panel. */
|
|
203
|
+
show(panel) {
|
|
204
|
+
const tab = this.tabs.find((el) => el.panel === panel);
|
|
205
|
+
if (tab) {
|
|
206
|
+
this.setActiveTab(tab, { scrollBehavior: "smooth" });
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
render() {
|
|
210
|
+
const isRtl = this.localize.dir() === "rtl";
|
|
211
|
+
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
|
+
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
213
|
+
this.localize.dir() === "rtl" && "left-auto right-0"
|
|
214
|
+
)}" @click="${this.handleScrollToStart}"><sd-2-6-0-icon library="system" name="${isRtl ? "chevron-up" : "chevron-down"}" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-2-6-0-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 h-[1px] bg-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" class="${cx(
|
|
215
|
+
"sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",
|
|
216
|
+
this.localize.dir() === "rtl" && "right-auto left-0"
|
|
217
|
+
)}" @click="${this.handleScrollToEnd}"><sd-2-6-0-icon library="system" name="${isRtl ? "chevron-down" : "chevron-up"}" class="${cx("h-6 w-12 rotate-90 grid place-items-center")}"></sd-2-6-0-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>`;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
SdTabGroup.styles = [
|
|
221
|
+
SolidElement.styles,
|
|
222
|
+
unsafeCSS(InteractiveStyles),
|
|
223
|
+
componentStyles,
|
|
224
|
+
css`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}::slotted(sd-2-6-0-tab-panel){--padding:1rem 0}`
|
|
225
|
+
];
|
|
226
|
+
__decorateClass([
|
|
227
|
+
query("[part=base]")
|
|
228
|
+
], SdTabGroup.prototype, "tabGroup", 2);
|
|
229
|
+
__decorateClass([
|
|
230
|
+
query("[part=body]")
|
|
231
|
+
], SdTabGroup.prototype, "body", 2);
|
|
232
|
+
__decorateClass([
|
|
233
|
+
query("[part=scroll-container]")
|
|
234
|
+
], SdTabGroup.prototype, "nav", 2);
|
|
235
|
+
__decorateClass([
|
|
236
|
+
state()
|
|
237
|
+
], SdTabGroup.prototype, "hasScrollControls", 2);
|
|
238
|
+
__decorateClass([
|
|
239
|
+
state()
|
|
240
|
+
], SdTabGroup.prototype, "variant", 2);
|
|
241
|
+
__decorateClass([
|
|
242
|
+
property()
|
|
243
|
+
], SdTabGroup.prototype, "activation", 2);
|
|
244
|
+
SdTabGroup = __decorateClass([
|
|
245
|
+
customElement("sd-2-6-0-tab-group")
|
|
246
|
+
], SdTabGroup);
|
|
247
|
+
export {
|
|
248
|
+
SdTabGroup as default
|
|
249
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import SolidElement from '../../internal/solid-element';
|
|
2
|
+
export default class SdTabPanel extends SolidElement {
|
|
3
|
+
private readonly attrId;
|
|
4
|
+
private readonly componentId;
|
|
5
|
+
name: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
handleActiveChange(): void;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
static styles: import("lit").CSSResultGroup[];
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface HTMLElementTagNameMap {
|
|
14
|
+
'sd-2-6-0-tab-panel': SdTabPanel;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { css, html } from "lit";
|
|
2
|
+
import { customElement } from "../../internal/register-custom-element.js";
|
|
3
|
+
import { property } from "lit/decorators.js";
|
|
4
|
+
import { watch } from "../../internal/watch.js";
|
|
5
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
6
|
+
import cx from "classix";
|
|
7
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
let id = 0;
|
|
20
|
+
let SdTabPanel = class extends SolidElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.attrId = ++id;
|
|
24
|
+
this.componentId = `sd-2-6-0-tab-panel-${this.attrId}`;
|
|
25
|
+
this.name = "";
|
|
26
|
+
this.active = false;
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
this.id = this.id.length > 0 ? this.id : this.componentId;
|
|
31
|
+
this.setAttribute("role", "tabpanel");
|
|
32
|
+
}
|
|
33
|
+
handleActiveChange() {
|
|
34
|
+
this.setAttribute("aria-hidden", this.active ? "false" : "true");
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return html`<slot part="base" class="${cx("block", this.active && "tab-panel--active")}"></slot>`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
SdTabPanel.styles = [
|
|
41
|
+
SolidElement.styles,
|
|
42
|
+
componentStyles,
|
|
43
|
+
css`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`
|
|
44
|
+
];
|
|
45
|
+
__decorateClass([
|
|
46
|
+
property({ reflect: true })
|
|
47
|
+
], SdTabPanel.prototype, "name", 2);
|
|
48
|
+
__decorateClass([
|
|
49
|
+
property({ type: Boolean, reflect: true })
|
|
50
|
+
], SdTabPanel.prototype, "active", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
watch("active")
|
|
53
|
+
], SdTabPanel.prototype, "handleActiveChange", 1);
|
|
54
|
+
SdTabPanel = __decorateClass([
|
|
55
|
+
customElement("sd-2-6-0-tab-panel")
|
|
56
|
+
], SdTabPanel);
|
|
57
|
+
export {
|
|
58
|
+
SdTabPanel as default
|
|
59
|
+
};
|
|
@@ -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-2-
|
|
77
|
+
)}"><sd-2-6-0-icon library="system" name="close" label="remove"></sd-2-6-0-icon></slot>` : ""}</${tag}>`;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
SdTag.styles = [
|
|
@@ -106,7 +106,7 @@ __decorateClass([
|
|
|
106
106
|
property()
|
|
107
107
|
], SdTag.prototype, "download", 2);
|
|
108
108
|
SdTag = __decorateClass([
|
|
109
|
-
customElement("sd-2-
|
|
109
|
+
customElement("sd-2-6-0-tag")
|
|
110
110
|
], SdTag);
|
|
111
111
|
export {
|
|
112
112
|
SdTag as default
|
|
@@ -66,7 +66,7 @@ __decorateClass([
|
|
|
66
66
|
query('[part="base"]')
|
|
67
67
|
], SdTeaserMedia.prototype, "teaserMedia", 2);
|
|
68
68
|
SdTeaserMedia = __decorateClass([
|
|
69
|
-
customElement("sd-2-
|
|
69
|
+
customElement("sd-2-6-0-teaser-media")
|
|
70
70
|
], SdTeaserMedia);
|
|
71
71
|
export {
|
|
72
72
|
SdTeaserMedia as default
|
|
@@ -81,7 +81,7 @@ let SdTextarea = class extends SolidElement {
|
|
|
81
81
|
handleInput() {
|
|
82
82
|
this.value = this.textarea.value;
|
|
83
83
|
this.formControlController.updateValidity();
|
|
84
|
-
this.emit("sd-2-
|
|
84
|
+
this.emit("sd-2-6-0-input");
|
|
85
85
|
}
|
|
86
86
|
handleInvalid(event) {
|
|
87
87
|
this.formControlController.setValidity(false);
|
|
@@ -211,7 +211,7 @@ let SdTextarea = class extends SolidElement {
|
|
|
211
211
|
"flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",
|
|
212
212
|
this.disabled && "cursor-not-allowed",
|
|
213
213
|
textSize
|
|
214
|
-
)}" title="${this.title}" name="${ifDefined(this.name)}" .value="${live(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" 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" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-2-
|
|
214
|
+
)}" 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" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle ? html`<sd-2-6-0-icon class="${cx("text-error absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="risk" part="invalid-icon"></sd-2-6-0-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-2-6-0-icon class="${cx("text-success absolute right-4 bg-white group-hover:bg-neutral-200", iconSizeMarginLeft)}" library="system" name="confirm" part="valid-icon"></sd-2-6-0-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()}`;
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
SdTextarea.styles = [
|
|
@@ -320,7 +320,7 @@ __decorateClass([
|
|
|
320
320
|
watch("value", { waitUntilFirstUpdate: true })
|
|
321
321
|
], SdTextarea.prototype, "handleValueChange", 1);
|
|
322
322
|
SdTextarea = __decorateClass([
|
|
323
|
-
customElement("sd-2-
|
|
323
|
+
customElement("sd-2-6-0-textarea")
|
|
324
324
|
], SdTextarea);
|
|
325
325
|
export {
|
|
326
326
|
SdTextarea as default
|
|
@@ -161,16 +161,16 @@ let SdTooltip = class extends SolidElement {
|
|
|
161
161
|
render() {
|
|
162
162
|
const isStart = this.placement.endsWith("-start");
|
|
163
163
|
const isEnd = this.placement.endsWith("-end");
|
|
164
|
-
return html`<sd-2-
|
|
164
|
+
return html`<sd-2-6-0-popup part="base" exportparts="
|
|
165
165
|
popup:base__popup,
|
|
166
166
|
arrow:base__arrow
|
|
167
|
-
" 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-2-
|
|
167
|
+
" 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-2-6-0-icon library="system" name="info-circle" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-2-6-0-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open ? "polite" : "off"}">${this.content}</slot></sd-2-6-0-popup>`;
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
SdTooltip.styles = [
|
|
171
171
|
SolidElement.styles,
|
|
172
172
|
unsafeCSS(InteractiveStyles),
|
|
173
|
-
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-2-
|
|
173
|
+
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-2-6-0-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-2-6-0-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-2-6-0-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-2-6-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-2-6-0-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}`
|
|
174
174
|
];
|
|
175
175
|
__decorateClass([
|
|
176
176
|
query("slot:not([name])")
|
|
@@ -179,7 +179,7 @@ __decorateClass([
|
|
|
179
179
|
query("#tooltip")
|
|
180
180
|
], SdTooltip.prototype, "body", 2);
|
|
181
181
|
__decorateClass([
|
|
182
|
-
query("sd-2-
|
|
182
|
+
query("sd-2-6-0-popup")
|
|
183
183
|
], SdTooltip.prototype, "popup", 2);
|
|
184
184
|
__decorateClass([
|
|
185
185
|
property()
|
|
@@ -212,7 +212,7 @@ __decorateClass([
|
|
|
212
212
|
watch("disabled")
|
|
213
213
|
], SdTooltip.prototype, "handleDisabledChange", 1);
|
|
214
214
|
SdTooltip = __decorateClass([
|
|
215
|
-
customElement("sd-2-
|
|
215
|
+
customElement("sd-2-6-0-tooltip")
|
|
216
216
|
], SdTooltip);
|
|
217
217
|
setDefaultAnimation("tooltip.show", {
|
|
218
218
|
keyframes: [
|
|
@@ -87,7 +87,7 @@ let SdVideo = class extends SolidElement {
|
|
|
87
87
|
this.playing ? "opacity-0" : "opacity-100",
|
|
88
88
|
this.isBelowBreakpoint ? "w-[48px] h-[48px]" : "w-[96px] h-[96px]",
|
|
89
89
|
"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"
|
|
90
|
-
)}"><slot name="play-icon" part="play-icon" class="${cx(this.isBelowBreakpoint ? "text-[2rem]" : "text-[4rem]")}"><sd-2-
|
|
90
|
+
)}"><slot name="play-icon" part="play-icon" class="${cx(this.isBelowBreakpoint ? "text-[2rem]" : "text-[4rem]")}"><sd-2-6-0-icon id="default-play-icon" library="system" name="start"></sd-2-6-0-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(
|
|
91
91
|
this.overlay && !this.playing ? "opacity-100" : "opacity-0",
|
|
92
92
|
"bg-[rgba(0,0,0,0.65)] w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition"
|
|
93
93
|
)}"></div><slot></slot></div>`;
|
|
@@ -110,7 +110,7 @@ __decorateClass([
|
|
|
110
110
|
property({ type: Boolean })
|
|
111
111
|
], SdVideo.prototype, "isBelowBreakpoint", 2);
|
|
112
112
|
SdVideo = __decorateClass([
|
|
113
|
-
customElement("sd-2-
|
|
113
|
+
customElement("sd-2-6-0-video")
|
|
114
114
|
], SdVideo);
|
|
115
115
|
export {
|
|
116
116
|
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-2-
|
|
12
|
+
const isButton = this.host.tagName.toLowerCase() === "sd-2-6-0-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-2-
|
|
37
|
+
(element) => element.tagName.toLowerCase() === "sd-2-6-0-radio-group"
|
|
38
38
|
);
|
|
39
39
|
sdRadioGroups.forEach((radioGroup) => {
|
|
40
40
|
var _a2, _b2;
|
|
@@ -79,7 +79,7 @@ class FormControlController {
|
|
|
79
79
|
disabled: (input) => input.disabled ?? false,
|
|
80
80
|
reportValidity: (input) => typeof input.reportValidity === "function" ? input.reportValidity() : true,
|
|
81
81
|
setValue: (input, value) => input.value = value,
|
|
82
|
-
assumeInteractionOn: ["sd-2-
|
|
82
|
+
assumeInteractionOn: ["sd-2-6-0-input"],
|
|
83
83
|
...options
|
|
84
84
|
};
|
|
85
85
|
}
|
|
@@ -26,6 +26,9 @@ export { default as SdRadioGroup } from './components/radio-group/radio-group';
|
|
|
26
26
|
export { default as SdSelect } from './components/select/select';
|
|
27
27
|
export { default as SdSpinner } from './components/spinner/spinner';
|
|
28
28
|
export { default as SdSwitch } from './components/switch/switch';
|
|
29
|
+
export { default as SdTab } from './components/tab/tab';
|
|
30
|
+
export { default as SdTabGroup } from './components/tab-group/tab-group';
|
|
31
|
+
export { default as SdTabPanel } from './components/tab-panel/tab-panel';
|
|
29
32
|
export { default as SdTag } from './components/tag/tag';
|
|
30
33
|
export { default as SdTeaser } from './components/teaser/teaser';
|
|
31
34
|
export { default as SdTeaserMedia } from './components/teaser-media/teaser-media';
|
|
@@ -26,12 +26,15 @@ import { default as default26 } from "./components/radio-group/radio-group.js";
|
|
|
26
26
|
import { default as default27 } from "./components/select/select.js";
|
|
27
27
|
import { default as default28 } from "./components/spinner/spinner.js";
|
|
28
28
|
import { default as default29 } from "./components/switch/switch.js";
|
|
29
|
-
import { default as default30 } from "./components/
|
|
30
|
-
import { default as default31 } from "./components/
|
|
31
|
-
import { default as default32 } from "./components/
|
|
32
|
-
import { default as default33 } from "./components/
|
|
33
|
-
import { default as default34 } from "./components/
|
|
34
|
-
import { default as default35 } from "./components/
|
|
29
|
+
import { default as default30 } from "./components/tab/tab.js";
|
|
30
|
+
import { default as default31 } from "./components/tab-group/tab-group.js";
|
|
31
|
+
import { default as default32 } from "./components/tab-panel/tab-panel.js";
|
|
32
|
+
import { default as default33 } from "./components/tag/tag.js";
|
|
33
|
+
import { default as default34 } from "./components/teaser/teaser.js";
|
|
34
|
+
import { default as default35 } from "./components/teaser-media/teaser-media.js";
|
|
35
|
+
import { default as default36 } from "./components/textarea/textarea.js";
|
|
36
|
+
import { default as default37 } from "./components/tooltip/tooltip.js";
|
|
37
|
+
import { default as default38 } from "./components/video/video.js";
|
|
35
38
|
import { registerIconLibrary, unregisterIconLibrary } from "./components/icon/library.js";
|
|
36
39
|
import { LocalizeController } from "./utilities/localize.js";
|
|
37
40
|
export {
|
|
@@ -64,12 +67,15 @@ export {
|
|
|
64
67
|
default27 as SdSelect,
|
|
65
68
|
default28 as SdSpinner,
|
|
66
69
|
default29 as SdSwitch,
|
|
67
|
-
default30 as
|
|
68
|
-
default31 as
|
|
69
|
-
default32 as
|
|
70
|
-
default33 as
|
|
71
|
-
default34 as
|
|
72
|
-
default35 as
|
|
70
|
+
default30 as SdTab,
|
|
71
|
+
default31 as SdTabGroup,
|
|
72
|
+
default32 as SdTabPanel,
|
|
73
|
+
default33 as SdTag,
|
|
74
|
+
default34 as SdTeaser,
|
|
75
|
+
default35 as SdTeaserMedia,
|
|
76
|
+
default36 as SdTextarea,
|
|
77
|
+
default37 as SdTooltip,
|
|
78
|
+
default38 as SdVideo,
|
|
73
79
|
registerIconLibrary,
|
|
74
80
|
unregisterIconLibrary
|
|
75
81
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const HeadlineStyles = ".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-2-
|
|
1
|
+
const HeadlineStyles = ".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-2-6-0-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-2-6-0-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-2-6-0-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-2-6-0-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-2-6-0-icon,.sd-headline--size-lg sd-2-6-0-icon,.sd-headline--size-xl sd-2-6-0-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-2-6-0-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-2-6-0-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-base,.sd-headline--size-lg{line-height:var(--sd-line-height-normal,150%)}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-2-6-0-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-2-6-0-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-2-6-0-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-2-6-0-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-2-6-0-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-2-6-0-icon,.sd-headline--inline.sd-headline--size-lg sd-2-6-0-icon,.sd-headline--inline.sd-headline--size-xl sd-2-6-0-icon{margin-right:var(--sd-spacing-0-5,.125rem)}";
|
|
2
2
|
export {
|
|
3
3
|
HeadlineStyles as default
|
|
4
4
|
};
|