@solid-design-system/components 1.25.0 → 1.27.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-group.js +1 -1
- package/dist/components/es/accordion.js +1 -1
- package/dist/components/es/carousel.js +1 -1
- package/dist/components/es/checkbox-group.js +1 -1
- package/dist/components/es/checkbox.js +1 -1
- package/dist/components/es/directive.js +6 -0
- package/dist/components/es/drawer.js +1 -1
- package/dist/components/es/icon.js +3 -8
- package/dist/components/es/input.js +1 -1
- package/dist/components/es/live.js +1 -1
- package/dist/components/es/notification.js +1 -0
- package/dist/components/es/radio.js +1 -1
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/es/solid-element.js +1 -1
- package/dist/components/es/switch.js +1 -0
- package/dist/components/umd/solid-components.js +15 -15
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/icon/library.system.d.ts +3 -0
- package/dist/package/components/icon/library.system.js +7 -1
- package/dist/package/components/notification/notification.d.ts +31 -0
- package/dist/package/components/notification/notification.js +211 -0
- package/dist/package/components/switch/switch.d.ts +37 -0
- package/dist/package/components/switch/switch.js +162 -0
- package/dist/package/solid-components.d.ts +2 -0
- package/dist/package/solid-components.js +20 -16
- package/dist/package/styles/tailwind.css.js +1 -1
- package/dist/styles/solid-styles.css +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/directive.js +6 -0
- 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 +3 -8
- 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/live.js +1 -1
- package/dist/versioned-components/es/navigation-item.js +1 -1
- package/dist/versioned-components/es/notification.js +1 -0
- 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-components2.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 -0
- 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 +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/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/icon/library.system.d.ts +3 -0
- package/dist/versioned-package/components/icon/library.system.js +7 -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 +31 -0
- package/dist/versioned-package/components/notification/notification.js +211 -0
- 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 +37 -0
- package/dist/versioned-package/components/switch/switch.js +162 -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/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/solid-components.d.ts +2 -0
- package/dist/versioned-package/solid-components.js +20 -16
- 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 +224 -26
- package/dist/web-types.json +373 -1
- package/package.json +3 -3
|
@@ -54,7 +54,7 @@ let SdCheckbox = class extends SolidElement {
|
|
|
54
54
|
this.emit("sd-blur");
|
|
55
55
|
}
|
|
56
56
|
handleInput() {
|
|
57
|
-
this.emit("sd-1-
|
|
57
|
+
this.emit("sd-1-27-0-input");
|
|
58
58
|
}
|
|
59
59
|
handleInvalid(event) {
|
|
60
60
|
this.formControlController.setValidity(false);
|
|
@@ -106,7 +106,7 @@ let SdCheckbox = class extends SolidElement {
|
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
108
|
return html`<label part="base" class="${cx(
|
|
109
|
-
"sd-1-
|
|
109
|
+
"sd-1-27-0-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",
|
|
110
110
|
this.disabled && "hover:cursor-not-allowed",
|
|
111
111
|
{
|
|
112
112
|
/* sizes, fonts */
|
|
@@ -122,7 +122,7 @@ let SdCheckbox = class extends SolidElement {
|
|
|
122
122
|
lg: "mt-[3px]"
|
|
123
123
|
}[this.size],
|
|
124
124
|
this.disabled && this.indeterminate && "border-neutral-500 bg-neutral-500" || this.disabled && this.checked && "border-neutral-500 bg-neutral-500" || this.disabled && "border-neutral-500" || (this.checked || this.indeterminate) && "border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550" || "border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"
|
|
125
|
-
)}">${this.checked ? html`<sd-1-
|
|
125
|
+
)}">${this.checked ? html`<sd-1-27-0-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-1-27-0-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-1-27-0-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-1-27-0-icon>` : ""} </span><span part="label" id="label" class="${cx(
|
|
126
126
|
"select-none inline-block ml-2 text-black",
|
|
127
127
|
this.disabled && "text-neutral-500" || "text-neutral-800"
|
|
128
128
|
)}"><slot></slot></span></label>`;
|
|
@@ -172,7 +172,7 @@ __decorateClass([
|
|
|
172
172
|
watch(["checked", "indeterminate"], { waitUntilFirstUpdate: true })
|
|
173
173
|
], SdCheckbox.prototype, "handleStateChange", 1);
|
|
174
174
|
SdCheckbox = __decorateClass([
|
|
175
|
-
customElement("sd-1-
|
|
175
|
+
customElement("sd-1-27-0-checkbox")
|
|
176
176
|
], SdCheckbox);
|
|
177
177
|
export {
|
|
178
178
|
SdCheckbox as default
|
|
@@ -27,7 +27,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
27
27
|
this.orientation = "vertical";
|
|
28
28
|
}
|
|
29
29
|
getAllCheckboxes() {
|
|
30
|
-
return [...this.querySelectorAll("sd-1-
|
|
30
|
+
return [...this.querySelectorAll("sd-1-27-0-checkbox")];
|
|
31
31
|
}
|
|
32
32
|
async syncCheckboxElements() {
|
|
33
33
|
const checkboxes = this.getAllCheckboxes();
|
|
@@ -43,10 +43,10 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
syncCheckboxes() {
|
|
46
|
-
if (customElements.get("sd-1-
|
|
46
|
+
if (customElements.get("sd-1-27-0-checkbox")) {
|
|
47
47
|
this.syncCheckboxElements();
|
|
48
48
|
} else {
|
|
49
|
-
customElements.whenDefined("sd-1-
|
|
49
|
+
customElements.whenDefined("sd-1-27-0-checkbox").then(() => this.syncCheckboxes());
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
handleSizeChange() {
|
|
@@ -77,7 +77,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
77
77
|
SdCheckboxGroup.styles = [
|
|
78
78
|
componentStyles,
|
|
79
79
|
SolidElement.styles,
|
|
80
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-1-
|
|
80
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-1-27-0-checkbox){margin-bottom:8px;display:flex}:host([orientation=vertical]) ::slotted(sd-1-27-0-checkbox:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-1-27-0-checkbox){margin-right:24px}:host([size=sm]):host([orientation=horizontal]) ::slotted(sd-1-27-0-checkbox){margin-right:16px}:host([orientation=horizontal]) ::slotted(sd-1-27-0-checkbox:last-of-type){margin-right:0}`
|
|
81
81
|
];
|
|
82
82
|
__decorateClass([
|
|
83
83
|
property()
|
|
@@ -95,7 +95,7 @@ __decorateClass([
|
|
|
95
95
|
watch("invalid", { waitUntilFirstUpdate: true })
|
|
96
96
|
], SdCheckboxGroup.prototype, "handleInvalid", 1);
|
|
97
97
|
SdCheckboxGroup = __decorateClass([
|
|
98
|
-
customElement("sd-1-
|
|
98
|
+
customElement("sd-1-27-0-checkbox-group")
|
|
99
99
|
], SdCheckboxGroup);
|
|
100
100
|
export {
|
|
101
101
|
SdCheckboxGroup as default
|
|
@@ -35,7 +35,7 @@ let SdDivider = class extends SolidElement {
|
|
|
35
35
|
SdDivider.styles = [
|
|
36
36
|
componentStyles,
|
|
37
37
|
SolidElement.styles,
|
|
38
|
-
css`:host{margin:0}:host(sd-1-
|
|
38
|
+
css`:host{margin:0}:host(sd-1-27-0-divider[orientation=horizontal]){display:block}:host(sd-1-27-0-divider[orientation=vertical]){display:inline-block}`
|
|
39
39
|
];
|
|
40
40
|
__decorateClass([
|
|
41
41
|
property({ reflect: true })
|
|
@@ -44,7 +44,7 @@ __decorateClass([
|
|
|
44
44
|
property({ type: Boolean, reflect: true })
|
|
45
45
|
], SdDivider.prototype, "inverted", 2);
|
|
46
46
|
SdDivider = __decorateClass([
|
|
47
|
-
customElement("sd-1-
|
|
47
|
+
customElement("sd-1-27-0-divider")
|
|
48
48
|
], SdDivider);
|
|
49
49
|
export {
|
|
50
50
|
SdDivider as default
|
|
@@ -183,7 +183,7 @@ let SdDrawer = class extends SolidElement {
|
|
|
183
183
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
184
184
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
185
185
|
}[this.placement]
|
|
186
|
-
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.label}" aria-labelledby="${ifDefined(!this.noHeader ? "title" : void 0)}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-1-
|
|
186
|
+
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.label}" aria-labelledby="${ifDefined(!this.noHeader ? "title" : void 0)}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-1-27-0-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-1-27-0-icon name="close" library="system"></sd-1-27-0-icon></sd-1-27-0-button></div></header>` : ""}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${cx(this.hasSlotController.test("footer") ? "text-left p-4" : "hidden")}"><slot name="footer"></slot></footer></div></div>`;
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
SdDrawer.styles = [
|
|
@@ -221,7 +221,7 @@ __decorateClass([
|
|
|
221
221
|
watch("contained", { waitUntilFirstUpdate: true })
|
|
222
222
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
|
223
223
|
SdDrawer = __decorateClass([
|
|
224
|
-
customElement("sd-1-
|
|
224
|
+
customElement("sd-1-27-0-drawer")
|
|
225
225
|
], SdDrawer);
|
|
226
226
|
setDefaultAnimation("drawer.showStart", {
|
|
227
227
|
keyframes: [
|
|
@@ -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-27-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-27-0-button":
|
|
184
|
+
case "sd-1-27-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-27-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-27-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-27-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-27-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-27-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-27-0-header-inner-width);max-width:var(--sd-1-27-0-header-inner-max-width);padding:var(--sd-1-27-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-27-0-header")
|
|
98
98
|
], SdHeader);
|
|
99
99
|
export {
|
|
100
100
|
SdHeader as default
|
|
@@ -75,7 +75,13 @@ const icons = {
|
|
|
75
75
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
76
76
|
<path d="m57.44 29.76-37.333-24A2.667 2.667 0 0 0 16 8v48a2.668 2.668 0 0 0 2.667 2.666 2.672 2.672 0 0 0 1.45-.431l-.01.005 37.333-24a2.67 2.67 0 0 0 1.192-2.221c0-.923-.47-1.74-1.184-2.216l-.01-.006.002-.037ZM21.333 51.112V12.89l29.734 19.112-29.734 19.11Z"/>
|
|
77
77
|
</svg>
|
|
78
|
-
|
|
78
|
+
`,
|
|
79
|
+
"confirm-circle": `
|
|
80
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/><path d="M15.843 7.473a.999.999 0 0 0-1.367.329l-.002.004-3.667 6.223-1.757-1.753a1 1 0 0 0-1.413 1.414l-.001-.001 2.667 2.667a.997.997 0 0 0 .695.31h.128c.314-.042.578-.223.731-.479l.003-.005 4.333-7.333a1 1 0 0 0-.345-1.374l-.005-.003v.001Z"/></svg>`,
|
|
81
|
+
warning: `
|
|
82
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.893 2.55295C12.725 2.22395 12.388 2.00195 12 2.00195C11.612 2.00195 11.275 2.22295 11.109 2.54695L2.10598 20.553C2.03998 20.683 2.00098 20.837 2.00098 21C2.00098 21.552 2.44798 21.999 2.99998 22H21C21.552 21.999 21.999 21.552 21.999 21C21.999 20.837 21.96 20.683 21.891 20.548L21.894 20.554L12.893 2.55295ZM4.61698 20L12 5.23695L19.383 20H4.61698Z"/><path d="M11 10.667V15C11 15.552 11.448 16 12 16C12.552 16 13 15.552 13 15V10.667C13 10.115 12.552 9.66695 12 9.66695C11.448 9.66695 11 10.115 11 10.667Z"/><path d="M13 18C13 18.552 12.552 19 12 19C11.448 19 11 18.552 11 18C11 17.448 11.448 17 12 17C12.552 17 13 17.448 13 18Z"/></svg>`,
|
|
83
|
+
"exclamation-circle": `
|
|
84
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 17C13 17.552 12.552 18 12 18C11.448 18 11 17.552 11 17C11 16.448 11.448 16 12 16C12.552 16 13 16.448 13 17Z"/><path d="M12 6C11.448 6 11 6.448 11 7V13C11 13.552 11.448 14 12 14C12.552 14 13 13.552 13 13V7C13 6.448 12.552 6 12 6Z"/><path d="M12 2C6.477 2 2 6.477 2 12C2 17.523 6.477 22 12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2ZM12 20C7.582 20 4 16.418 4 12C4 7.582 7.582 4 12 4C16.418 4 20 7.582 20 12C20 16.418 16.418 20 12 20Z"/></svg>`
|
|
79
85
|
};
|
|
80
86
|
const systemLibrary = {
|
|
81
87
|
name: "system",
|
|
@@ -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-27-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-27-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-27-0-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-27-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-27-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye"></sd-1-27-0-icon></slot>` : html`<slot name="hide-password-icon"><sd-1-27-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye-crossed-out"></sd-1-27-0-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-1-27-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="calendar"></sd-1-27-0-icon>` : ""} ${this.type === "time" ? html`<sd-1-27-0-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="clock"></sd-1-27-0-icon>` : ""} ${isInvalid ? html`<sd-1-27-0-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-27-0-icon>` : ""} ${isValid ? html`<sd-1-27-0-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-27-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-27-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-27-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-1-27-0-icon){font-size:1rem}:host([size=lg][standalone]) ::slotted(sd-1-27-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-27-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-27-0-divider part="divider" class="${cx("w-full transition-all absolute -top-[1px] left-0", this.calculatePaddingX())}"></sd-1-27-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-27-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-27-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-27-0-navigation-item")
|
|
163
163
|
], SdNavigationItem);
|
|
164
164
|
export {
|
|
165
165
|
SdNavigationItem as default
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import SolidElement from '../../internal/solid-element.js';
|
|
2
|
+
export default class SdNotification extends SolidElement {
|
|
3
|
+
private autoHideTimeout;
|
|
4
|
+
private readonly localize;
|
|
5
|
+
base: HTMLElement;
|
|
6
|
+
open: boolean;
|
|
7
|
+
closable: boolean;
|
|
8
|
+
variant: 'info' | 'success' | 'error' | 'warning';
|
|
9
|
+
toastStack: 'top-right' | 'bottom-center';
|
|
10
|
+
duration: number;
|
|
11
|
+
durationIndicator: boolean;
|
|
12
|
+
private remainingDuration;
|
|
13
|
+
private startTime;
|
|
14
|
+
firstUpdated(): void;
|
|
15
|
+
private startAutoHide;
|
|
16
|
+
private onHover;
|
|
17
|
+
private onHoverEnd;
|
|
18
|
+
private handleCloseClick;
|
|
19
|
+
handleOpenChange(): Promise<void>;
|
|
20
|
+
handleDurationChange(): void;
|
|
21
|
+
show(): Promise<void>;
|
|
22
|
+
hide(): Promise<void>;
|
|
23
|
+
toast(): Promise<void>;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
static styles: import("lit").CSSResultGroup[];
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'sd-1-27-0-notification': SdNotification;
|
|
30
|
+
}
|
|
31
|
+
}
|