@solid-design-system/components 1.27.0 → 1.28.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/accordion.js +1 -1
- package/dist/components/es/solid-element.js +1 -1
- package/dist/components/umd/solid-components.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/accordion/accordion.js +6 -4
- 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/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/popup.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/solid-element.js +1 -1
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/switch.js +1 -1
- package/dist/versioned-components/es/tag.js +1 -1
- package/dist/versioned-components/es/teaser.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 +8 -6
- 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/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 +6 -6
- 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/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-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +14 -14
- 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/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/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 +2 -2
- package/dist/versioned-package/styles/form-control.styles.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 +28 -28
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
|
@@ -170,7 +170,7 @@ let SdDropdown = class extends SolidElement {
|
|
|
170
170
|
// that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,
|
|
171
171
|
// a child of the slotted element, or an element in the slotted element's shadow root.
|
|
172
172
|
//
|
|
173
|
-
// For example, the accessible trigger of an <sd-1-
|
|
173
|
+
// For example, the accessible trigger of an <sd-1-28-0-button> is a <button> located inside its shadow root.
|
|
174
174
|
//
|
|
175
175
|
// To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
176
176
|
//
|
|
@@ -180,8 +180,8 @@ let SdDropdown = class extends SolidElement {
|
|
|
180
180
|
let target;
|
|
181
181
|
if (accessibleTrigger) {
|
|
182
182
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
183
|
-
case "sd-1-
|
|
184
|
-
case "sd-1-
|
|
183
|
+
case "sd-1-28-0-button":
|
|
184
|
+
case "sd-1-28-0-icon-button":
|
|
185
185
|
target = accessibleTrigger.button;
|
|
186
186
|
break;
|
|
187
187
|
default:
|
|
@@ -257,11 +257,11 @@ let SdDropdown = class extends SolidElement {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
render() {
|
|
260
|
-
return html`<sd-1-
|
|
260
|
+
return html`<sd-1-28-0-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded && this.distance < 1 ? 1 : this.distance}" skidding="${this.skidding}" strategy="${this.hoist ? "fixed" : "absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${cx(
|
|
261
261
|
"shadow bg-white",
|
|
262
262
|
this.open ? "block pointer-events-auto" : "pointer-events-none",
|
|
263
263
|
this.rounded && "rounded-md"
|
|
264
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-1-
|
|
264
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-1-28-0-popup>`;
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
SdDropdown.styles = [
|
|
@@ -315,7 +315,7 @@ __decorateClass([
|
|
|
315
315
|
watch("open", { waitUntilFirstUpdate: true })
|
|
316
316
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
317
317
|
SdDropdown = __decorateClass([
|
|
318
|
-
customElement("sd-1-
|
|
318
|
+
customElement("sd-1-28-0-dropdown")
|
|
319
319
|
], SdDropdown);
|
|
320
320
|
setDefaultAnimation("dropdown.show", {
|
|
321
321
|
keyframes: [
|
|
@@ -64,11 +64,11 @@ let SdHeader = class extends SolidElement {
|
|
|
64
64
|
setCalculatedHeightProperty() {
|
|
65
65
|
if (this.fixed && this.refHeaderElement) {
|
|
66
66
|
document.documentElement.style.setProperty(
|
|
67
|
-
"--sd-1-
|
|
67
|
+
"--sd-1-28-0-header-calculated-height",
|
|
68
68
|
`${this.refHeaderElement.clientHeight}px`
|
|
69
69
|
);
|
|
70
70
|
} else {
|
|
71
|
-
document.documentElement.style.removeProperty("--sd-1-
|
|
71
|
+
document.documentElement.style.removeProperty("--sd-1-28-0-header-calculated-height");
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
@@ -85,7 +85,7 @@ let SdHeader = class extends SolidElement {
|
|
|
85
85
|
SdHeader.styles = [
|
|
86
86
|
SolidElement.styles,
|
|
87
87
|
componentStyles,
|
|
88
|
-
css`:host{display:block}:host([fixed]){position:fixed;top:0;left:0;width:100%}:host([fixed]) header::after{content:'';position:absolute;left:0;right:0;top:100%;height:8px;background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-1-
|
|
88
|
+
css`:host{display:block}:host([fixed]){position:fixed;top:0;left:0;width:100%}:host([fixed]) header::after{content:'';position:absolute;left:0;right:0;top:100%;height:8px;background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-1-28-0-header-inner-width);max-width:var(--sd-1-28-0-header-inner-max-width);padding:var(--sd-1-28-0-header-padding,12px 16px)}`
|
|
89
89
|
];
|
|
90
90
|
__decorateClass([
|
|
91
91
|
property({ reflect: true, type: Boolean })
|
|
@@ -94,7 +94,7 @@ __decorateClass([
|
|
|
94
94
|
debounce(100)
|
|
95
95
|
], SdHeader.prototype, "onResize", 1);
|
|
96
96
|
SdHeader = __decorateClass([
|
|
97
|
-
customElement("sd-1-
|
|
97
|
+
customElement("sd-1-28-0-header")
|
|
98
98
|
], SdHeader);
|
|
99
99
|
export {
|
|
100
100
|
SdHeader as default
|
|
@@ -101,7 +101,7 @@ let SdInput = class extends SolidElement {
|
|
|
101
101
|
handleClearClick(event) {
|
|
102
102
|
this.value = "";
|
|
103
103
|
this.emit("sd-clear");
|
|
104
|
-
this.emit("sd-1-
|
|
104
|
+
this.emit("sd-1-28-0-input");
|
|
105
105
|
this.emit("sd-change");
|
|
106
106
|
this.input.focus();
|
|
107
107
|
event.stopPropagation();
|
|
@@ -113,7 +113,7 @@ let SdInput = class extends SolidElement {
|
|
|
113
113
|
handleInput() {
|
|
114
114
|
this.value = this.input.value;
|
|
115
115
|
this.formControlController.updateValidity();
|
|
116
|
-
this.emit("sd-1-
|
|
116
|
+
this.emit("sd-1-28-0-input");
|
|
117
117
|
}
|
|
118
118
|
handleInvalid() {
|
|
119
119
|
this.formControlController.setValidity(false);
|
|
@@ -261,7 +261,7 @@ let SdInput = class extends SolidElement {
|
|
|
261
261
|
"min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",
|
|
262
262
|
this.size === "sm" ? "h-6" : "h-8",
|
|
263
263
|
textSize
|
|
264
|
-
)}" type="${this.type === "password" && this.passwordVisible ? "text" : this.type}" title="${this.title}" name="${ifDefined(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" .value="${live(this.value)}" autocapitalize="${ifDefined(this.type === "password" ? "off" : this.autocapitalize)}" autocomplete="${ifDefined(this.type === "password" ? "off" : this.autocomplete)}" autocorrect="${ifDefined(this.type === "password" ? "off" : this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center ", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-
|
|
264
|
+
)}" type="${this.type === "password" && this.passwordVisible ? "text" : this.type}" title="${this.title}" name="${ifDefined(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ifDefined(this.placeholder)}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" .value="${live(this.value)}" autocapitalize="${ifDefined(this.type === "password" ? "off" : this.autocapitalize)}" autocomplete="${ifDefined(this.type === "password" ? "off" : this.autocomplete)}" autocorrect="${ifDefined(this.type === "password" ? "off" : this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center ", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-28-0-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-28-0-icon></slot></button>` : ""} ${this.passwordToggle && this.type === "password" ? html`<button aria-label="${this.localize.term(this.passwordVisible ? "hidePassword" : "showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible ? html`<slot name="show-password-icon"><sd-1-28-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye"></sd-1-28-0-icon></slot>` : html`<slot name="hide-password-icon"><sd-1-28-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye-crossed-out"></sd-1-28-0-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-1-28-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="calendar"></sd-1-28-0-icon>` : ""} ${this.type === "time" ? html`<sd-1-28-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="clock"></sd-1-28-0-icon>` : ""} ${isInvalid ? html`<sd-1-28-0-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-28-0-icon>` : ""} ${isValid ? html`<sd-1-28-0-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-28-0-icon>` : ""} ${slots["right"] ? html`<slot name="right" part="right" class="${cx("inline-flex", iconColor, iconMarginLeft, iconSize)}"></slot>` : ""}</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>`;
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
SdInput.styles = [
|
|
@@ -383,7 +383,7 @@ __decorateClass([
|
|
|
383
383
|
watch("value", { waitUntilFirstUpdate: true })
|
|
384
384
|
], SdInput.prototype, "handleValueChange", 1);
|
|
385
385
|
SdInput = __decorateClass([
|
|
386
|
-
customElement("sd-1-
|
|
386
|
+
customElement("sd-1-28-0-input")
|
|
387
387
|
], SdInput);
|
|
388
388
|
export {
|
|
389
389
|
SdInput as default
|
|
@@ -77,7 +77,7 @@ let SdLink = class extends SolidElement {
|
|
|
77
77
|
};
|
|
78
78
|
SdLink.styles = [
|
|
79
79
|
SolidElement.styles,
|
|
80
|
-
css`::slotted(sd-1-
|
|
80
|
+
css`::slotted(sd-1-28-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-1-28-0-icon){font-size:1rem}:host([size=lg][standalone]) ::slotted(sd-1-28-0-icon){font-size:1.5rem}`
|
|
81
81
|
];
|
|
82
82
|
__decorateClass([
|
|
83
83
|
query("a")
|
|
@@ -101,7 +101,7 @@ __decorateClass([
|
|
|
101
101
|
property()
|
|
102
102
|
], SdLink.prototype, "download", 2);
|
|
103
103
|
SdLink = __decorateClass([
|
|
104
|
-
customElement("sd-1-
|
|
104
|
+
customElement("sd-1-28-0-link")
|
|
105
105
|
], SdLink);
|
|
106
106
|
export {
|
|
107
107
|
SdLink as default
|
|
@@ -105,10 +105,10 @@ let SdNavigationItem = class extends SolidElement {
|
|
|
105
105
|
isAccordion ? "grow" : "w-full",
|
|
106
106
|
slots["description"] ? "pb-1" : horizontalPaddingBottom,
|
|
107
107
|
this.calculatePaddingX()
|
|
108
|
-
)}">${this.divider && this.vertical ? html`<sd-1-
|
|
108
|
+
)}">${this.divider && this.vertical ? html`<sd-1-28-0-divider part="divider" class="${cx("w-full transition-all absolute -top-[1px] left-0", this.calculatePaddingX())}"></sd-1-28-0-divider>` : ""} <span class="inline-flex items-center flex-auto"><slot part="content" class="inline"></slot></span>${(this.chevron || slots["children"]) && this.vertical ? html`<sd-1-28-0-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${cx(
|
|
109
109
|
"h-6 w-6 ml-2 transition-all",
|
|
110
110
|
isAccordion ? this.open ? "rotate-180" : "rotate-0" : "rotate-[270deg]"
|
|
111
|
-
)}"></sd-1-
|
|
111
|
+
)}"></sd-1-28-0-icon>` : ""} </span>${slots["description"] && this.vertical ? html`<slot name="description" part="description" class="${cx(
|
|
112
112
|
"inline-block text-sm text-left text-black",
|
|
113
113
|
isAccordion ? "grow" : "w-full",
|
|
114
114
|
horizontalPaddingBottom,
|
|
@@ -159,7 +159,7 @@ __decorateClass([
|
|
|
159
159
|
property({ type: Boolean, reflect: true })
|
|
160
160
|
], SdNavigationItem.prototype, "open", 2);
|
|
161
161
|
SdNavigationItem = __decorateClass([
|
|
162
|
-
customElement("sd-1-
|
|
162
|
+
customElement("sd-1-28-0-navigation-item")
|
|
163
163
|
], SdNavigationItem);
|
|
164
164
|
export {
|
|
165
165
|
SdNavigationItem as default
|
|
@@ -129,7 +129,7 @@ let SdNotification = class extends SolidElement {
|
|
|
129
129
|
() => {
|
|
130
130
|
toastStack.removeChild(this);
|
|
131
131
|
resolve();
|
|
132
|
-
if (toastStack.querySelector("sd-1-
|
|
132
|
+
if (toastStack.querySelector("sd-1-28-0-notification") === null) {
|
|
133
133
|
toastStack.remove();
|
|
134
134
|
}
|
|
135
135
|
},
|
|
@@ -146,15 +146,15 @@ let SdNotification = class extends SolidElement {
|
|
|
146
146
|
warning: "bg-warning",
|
|
147
147
|
error: "bg-error"
|
|
148
148
|
}[this.variant]
|
|
149
|
-
)}"><sd-1-
|
|
149
|
+
)}"><sd-1-28-0-icon name="${{
|
|
150
150
|
info: "info-circle",
|
|
151
151
|
success: "confirm-circle",
|
|
152
152
|
warning: "exclamation-circle",
|
|
153
153
|
error: "warning"
|
|
154
|
-
}[this.variant] || ""}" library="system" class="h-6 w-6 text-white"></sd-1-
|
|
154
|
+
}[this.variant] || ""}" library="system" class="h-6 w-6 text-white"></sd-1-28-0-icon></slot><div part="content" class="${cx(
|
|
155
155
|
"h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white",
|
|
156
156
|
"border-solid border-[1px] border-l-0 border-neutral-400"
|
|
157
|
-
)}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable ? html`<sd-1-
|
|
157
|
+
)}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable ? html`<sd-1-28-0-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"><sd-1-28-0-icon name="close" library="system" color="currentColor"></sd-1-28-0-icon></sd-1-28-0-button>` : ""}</div>${this.durationIndicator ? html`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${cx(`absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow`)}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute bg-neutral-400"></div>` : ""}</div>`;
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
SdNotification.styles = [
|
|
@@ -190,7 +190,7 @@ __decorateClass([
|
|
|
190
190
|
watch("duration")
|
|
191
191
|
], SdNotification.prototype, "handleDurationChange", 1);
|
|
192
192
|
SdNotification = __decorateClass([
|
|
193
|
-
customElement("sd-1-
|
|
193
|
+
customElement("sd-1-28-0-notification")
|
|
194
194
|
], SdNotification);
|
|
195
195
|
setDefaultAnimation("notification.show", {
|
|
196
196
|
keyframes: [
|
|
@@ -312,7 +312,7 @@ __decorateClass([
|
|
|
312
312
|
property({ attribute: "auto-size-padding", type: Number })
|
|
313
313
|
], SdPopup.prototype, "autoSizePadding", 2);
|
|
314
314
|
SdPopup = __decorateClass([
|
|
315
|
-
customElement("sd-1-
|
|
315
|
+
customElement("sd-1-28-0-popup")
|
|
316
316
|
], SdPopup);
|
|
317
317
|
export {
|
|
318
318
|
SdPopup as default
|
|
@@ -73,7 +73,7 @@ let SdRadio = class extends SolidElement {
|
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
75
|
return html`<span part="base" class="${cx(
|
|
76
|
-
"sd-1-
|
|
76
|
+
"sd-1-28-0-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",
|
|
77
77
|
this.disabled && "hover:cursor-not-allowed",
|
|
78
78
|
{
|
|
79
79
|
/* sizes, fonts */
|
|
@@ -121,7 +121,7 @@ __decorateClass([
|
|
|
121
121
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
122
122
|
], SdRadio.prototype, "handleDisabledChange", 1);
|
|
123
123
|
SdRadio = __decorateClass([
|
|
124
|
-
customElement("sd-1-
|
|
124
|
+
customElement("sd-1-28-0-radio")
|
|
125
125
|
], SdRadio);
|
|
126
126
|
export {
|
|
127
127
|
SdRadio as default
|
|
@@ -4,7 +4,7 @@ import SolidElement from '../../internal/solid-element';
|
|
|
4
4
|
import type { SolidFormControl } from '../../internal/solid-element';
|
|
5
5
|
export default class SdRadioGroup extends SolidElement implements SolidFormControl {
|
|
6
6
|
static dependencies: {
|
|
7
|
-
'sd-1-
|
|
7
|
+
'sd-1-28-0-button-group': typeof SdButtonGroup;
|
|
8
8
|
};
|
|
9
9
|
protected readonly formControlController: FormControlController;
|
|
10
10
|
private readonly hasSlotController;
|
|
@@ -47,6 +47,6 @@ export default class SdRadioGroup extends SolidElement implements SolidFormContr
|
|
|
47
47
|
}
|
|
48
48
|
declare global {
|
|
49
49
|
interface HTMLElementTagNameMap {
|
|
50
|
-
'sd-1-
|
|
50
|
+
'sd-1-28-0-radio-group': SdRadioGroup;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -72,10 +72,10 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
72
72
|
this.formControlController.updateValidity();
|
|
73
73
|
}
|
|
74
74
|
getAllRadios() {
|
|
75
|
-
return [...this.querySelectorAll("sd-1-
|
|
75
|
+
return [...this.querySelectorAll("sd-1-28-0-radio, sd-1-28-0-radio-button")];
|
|
76
76
|
}
|
|
77
77
|
handleRadioClick(event) {
|
|
78
|
-
const target = event.target.closest("sd-1-
|
|
78
|
+
const target = event.target.closest("sd-1-28-0-radio, sd-1-28-0-radio-button");
|
|
79
79
|
const radios = this.getAllRadios();
|
|
80
80
|
const oldValue = this.value;
|
|
81
81
|
if (target.disabled) {
|
|
@@ -85,7 +85,7 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
85
85
|
radios.forEach((radio) => radio.checked = radio === target);
|
|
86
86
|
if (this.value !== oldValue) {
|
|
87
87
|
this.emit("sd-change");
|
|
88
|
-
this.emit("sd-1-
|
|
88
|
+
this.emit("sd-1-28-0-input");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
handleKeyDown(event) {
|
|
@@ -119,7 +119,7 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
119
119
|
}
|
|
120
120
|
if (this.value !== oldValue) {
|
|
121
121
|
this.emit("sd-change");
|
|
122
|
-
this.emit("sd-1-
|
|
122
|
+
this.emit("sd-1-28-0-input");
|
|
123
123
|
}
|
|
124
124
|
event.preventDefault();
|
|
125
125
|
}
|
|
@@ -147,7 +147,7 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
147
147
|
radio.invalid = this.invalid;
|
|
148
148
|
})
|
|
149
149
|
);
|
|
150
|
-
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-1-
|
|
150
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "sd-1-28-0-radio-button");
|
|
151
151
|
if (!radios.some((radio) => radio.checked)) {
|
|
152
152
|
if (this.hasButtonGroup) {
|
|
153
153
|
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
@@ -159,26 +159,26 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
if (this.hasButtonGroup) {
|
|
162
|
-
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-1-
|
|
162
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("sd-1-28-0-button-group");
|
|
163
163
|
if (buttonGroup) {
|
|
164
164
|
buttonGroup.disableRole = true;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
syncRadios() {
|
|
169
|
-
if (customElements.get("sd-1-
|
|
169
|
+
if (customElements.get("sd-1-28-0-radio") && customElements.get("sd-1-28-0-radio-button")) {
|
|
170
170
|
this.syncRadioElements();
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
if (customElements.get("sd-1-
|
|
173
|
+
if (customElements.get("sd-1-28-0-radio")) {
|
|
174
174
|
this.syncRadioElements();
|
|
175
175
|
} else {
|
|
176
|
-
customElements.whenDefined("sd-1-
|
|
176
|
+
customElements.whenDefined("sd-1-28-0-radio").then(() => this.syncRadios());
|
|
177
177
|
}
|
|
178
|
-
if (customElements.get("sd-1-
|
|
178
|
+
if (customElements.get("sd-1-28-0-radio-button")) {
|
|
179
179
|
this.syncRadioElements();
|
|
180
180
|
} else {
|
|
181
|
-
customElements.whenDefined("sd-1-
|
|
181
|
+
customElements.whenDefined("sd-1-28-0-radio-button").then(() => this.syncRadios());
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
updateCheckedRadio() {
|
|
@@ -258,11 +258,11 @@ let SdRadioGroup = class extends SolidElement {
|
|
|
258
258
|
)}"><div class="sr-only"><div id="error-message" aria-live="assertive">${this.errorText}</div><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${defaultSlot}</div></fieldset>`;
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
SdRadioGroup.dependencies = { "sd-1-
|
|
261
|
+
SdRadioGroup.dependencies = { "sd-1-28-0-button-group": SdButtonGroup };
|
|
262
262
|
SdRadioGroup.styles = [
|
|
263
263
|
componentStyles,
|
|
264
264
|
SolidElement.styles,
|
|
265
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-1-
|
|
265
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-1-28-0-radio){margin-bottom:8px;display:flex}:host([orientation=vertical]) ::slotted(sd-1-28-0-radio:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-1-28-0-radio){margin-right:24px}:host([size=sm]):host([orientation=horizontal]) ::slotted(sd-1-28-0-radio){margin-right:16px}:host([orientation=horizontal]) ::slotted(sd-1-28-0-radio:last-of-type){margin-right:0}:host([required]) #label.has-label::after{content:'*';margin-left:2px}`
|
|
266
266
|
];
|
|
267
267
|
__decorateClass([
|
|
268
268
|
query("slot:not([name])")
|
|
@@ -313,7 +313,7 @@ __decorateClass([
|
|
|
313
313
|
watch("value")
|
|
314
314
|
], SdRadioGroup.prototype, "handleValueChange", 1);
|
|
315
315
|
SdRadioGroup = __decorateClass([
|
|
316
|
-
customElement("sd-1-
|
|
316
|
+
customElement("sd-1-28-0-radio-group")
|
|
317
317
|
], SdRadioGroup);
|
|
318
318
|
export {
|
|
319
319
|
SdRadioGroup as default
|
|
@@ -50,7 +50,7 @@ let SdSwitch = class extends SolidElement {
|
|
|
50
50
|
this.emit("sd-blur");
|
|
51
51
|
}
|
|
52
52
|
handleInput() {
|
|
53
|
-
this.emit("sd-1-
|
|
53
|
+
this.emit("sd-1-28-0-input");
|
|
54
54
|
}
|
|
55
55
|
handleInvalid(event) {
|
|
56
56
|
this.formControlController.setValidity(false);
|
|
@@ -155,7 +155,7 @@ __decorateClass([
|
|
|
155
155
|
watch(["checked"], { waitUntilFirstUpdate: true })
|
|
156
156
|
], SdSwitch.prototype, "handleStateChange", 1);
|
|
157
157
|
SdSwitch = __decorateClass([
|
|
158
|
-
customElement("sd-1-
|
|
158
|
+
customElement("sd-1-28-0-switch")
|
|
159
159
|
], SdSwitch);
|
|
160
160
|
export {
|
|
161
161
|
SdSwitch as default
|
|
@@ -72,7 +72,7 @@ let SdTag = class extends SolidElement {
|
|
|
72
72
|
lg: "text-base",
|
|
73
73
|
sm: "text-[12px]"
|
|
74
74
|
}[this.size]
|
|
75
|
-
)}"><sd-1-
|
|
75
|
+
)}"><sd-1-28-0-icon library="system" name="close" label="remove"></sd-1-28-0-icon></slot></${tag}>`;
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
SdTag.styles = [
|
|
@@ -104,7 +104,7 @@ __decorateClass([
|
|
|
104
104
|
property()
|
|
105
105
|
], SdTag.prototype, "download", 2);
|
|
106
106
|
SdTag = __decorateClass([
|
|
107
|
-
customElement("sd-1-
|
|
107
|
+
customElement("sd-1-28-0-tag")
|
|
108
108
|
], SdTag);
|
|
109
109
|
export {
|
|
110
110
|
SdTag 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-1-
|
|
164
|
+
return html`<sd-1-28-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-1-
|
|
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-1-28-0-icon library="system" name="info-circle" class="${cx(this.disabled && "sd-interactive--disabled")}"></sd-1-28-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-1-28-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-1-
|
|
173
|
+
css`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-1-28-0-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-1-28-0-popup::part(popup){pointer-events:none;z-index:10;box-shadow:0 1px 3px 0 rgb(81 81 81 / 75%)}sd-1-28-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-1-28-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-1-28-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-1-
|
|
182
|
+
query("sd-1-28-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-1-
|
|
215
|
+
customElement("sd-1-28-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-1-
|
|
90
|
+
)}"><slot name="play-icon" part="play-icon" class="${cx(this.isBelowBreakpoint ? "text-[2rem]" : "text-[4rem]")}"><sd-1-28-0-icon id="default-play-icon" library="system" name="start"></sd-1-28-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-1-
|
|
113
|
+
customElement("sd-1-28-0-video")
|
|
114
114
|
], SdVideo);
|
|
115
115
|
export {
|
|
116
116
|
SdVideo as default
|