@solid-design-system/components 1.32.0 → 1.33.1
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/input.js +1 -1
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/es/textarea.js +1 -0
- package/dist/components/umd/solid-components.js +16 -16
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/input/input.js +2 -2
- package/dist/package/components/textarea/textarea.d.ts +67 -0
- package/dist/package/components/textarea/textarea.js +315 -0
- package/dist/package/solid-components.d.ts +1 -0
- package/dist/package/solid-components.js +6 -4
- 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-control.styles.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-group.js +1 -1
- package/dist/versioned-components/es/radio.js +1 -1
- package/dist/versioned-components/es/select.js +2 -2
- package/dist/versioned-components/es/solid-components2.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/textarea.js +1 -0
- 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 +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 +6 -6
- 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-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +14 -14
- 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/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/textarea/textarea.d.ts +67 -0
- package/dist/versioned-package/components/textarea/textarea.js +315 -0
- 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 +1 -0
- package/dist/versioned-package/solid-components.js +6 -4
- package/dist/versioned-package/styles/form-control.styles.js +1 -1
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +384 -30
- package/dist/web-types.json +445 -1
- package/package.json +6 -6
|
@@ -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-33-1-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-33-1-input");
|
|
117
117
|
}
|
|
118
118
|
handleInvalid() {
|
|
119
119
|
this.formControlController.setValidity(false);
|
|
@@ -242,7 +242,7 @@ let SdInput = class extends SolidElement {
|
|
|
242
242
|
md: "text-lg",
|
|
243
243
|
lg: "text-xl"
|
|
244
244
|
}[this.size];
|
|
245
|
-
return html`<div part="form-control" class="${cx("form-control", hasLabel && "form-control--has-label", this.disabled && "pointer-events-none")}"><label part="form-control-label" class="${cx("form-control-label mb-2", hasLabel ? "inline-block" : "hidden", textSize)}" for="input" aria-hidden="${hasLabel ? "false" : "true"}"><slot name="label">${this.label}
|
|
245
|
+
return html`<div part="form-control" class="${cx("form-control", hasLabel && "form-control--has-label", this.disabled && "pointer-events-none")}"><label part="form-control-label" id="label" class="${cx("form-control-label mb-2", hasLabel ? "has-label inline-block" : "hidden", textSize)}" for="input" aria-hidden="${hasLabel ? "false" : "true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="form-control-input relative w-full"><div part="border" class="${cx(
|
|
246
246
|
"absolute w-full h-full pointer-events-none border rounded-default transition-all",
|
|
247
247
|
borderColor
|
|
248
248
|
)}"></div><div part="base" class="${cx(
|
|
@@ -261,14 +261,14 @@ 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-33-1-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-33-1-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-33-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye"></sd-1-33-1-icon></slot>` : html`<slot name="hide-password-icon"><sd-1-33-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye-crossed-out"></sd-1-33-1-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-1-33-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="calendar"></sd-1-33-1-icon>` : ""} ${this.type === "time" ? html`<sd-1-33-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="clock"></sd-1-33-1-icon>` : ""} ${isInvalid ? html`<sd-1-33-1-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-33-1-icon>` : ""} ${isValid ? html`<sd-1-33-1-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-33-1-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 = [
|
|
268
268
|
componentStyles,
|
|
269
269
|
formControlStyles,
|
|
270
270
|
SolidElement.styles,
|
|
271
|
-
css`:host{box-sizing:border-box;position:relative;display:inline-block;text-align:left;width:100%}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}input[type=date]::-webkit-calendar-picker-indicator{display:none}input[type=datetime-local]::-webkit-calendar-picker-indicator{display:none}`
|
|
271
|
+
css`:host{box-sizing:border-box;position:relative;display:inline-block;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label.has-label::after{content:'*';margin-left:2px}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}input[type=date]::-webkit-calendar-picker-indicator{display:none}input[type=datetime-local]::-webkit-calendar-picker-indicator{display:none}`
|
|
272
272
|
];
|
|
273
273
|
__decorateClass([
|
|
274
274
|
query("#input")
|
|
@@ -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-33-1-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-33-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-1-33-1-icon){font-size:1rem}:host([size=lg][standalone]) ::slotted(sd-1-33-1-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-33-1-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-33-1-divider part="divider" class="${cx("w-full transition-all absolute -top-[1px] left-0", this.calculatePaddingX())}"></sd-1-33-1-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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-icon name="close" library="system" color="currentColor"></sd-1-33-1-icon></sd-1-33-1-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-33-1-notification")
|
|
194
194
|
], SdNotification);
|
|
195
195
|
setDefaultAnimation("notification.show", {
|
|
196
196
|
keyframes: [
|
|
@@ -95,7 +95,7 @@ let SdOption = class extends SolidElement {
|
|
|
95
95
|
)}"></span> ${this.checkbox ? html`<span id="control" part="control ${this.selected ? " control--checked" : "control--unchecked"}" class="${cx(
|
|
96
96
|
"relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4 mr-2",
|
|
97
97
|
this.disabled ? "border-neutral-500" : this.selected ? "bg-accent border-accent" : "border-neutral-800"
|
|
98
|
-
)}">${this.selected ? html`<sd-1-
|
|
98
|
+
)}">${this.selected ? html`<sd-1-33-1-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-1-33-1-icon>` : ""}</span>` : ""} ${slots["left"] ? html`<slot name="left" part="left" class="inline-flex mr-2"></slot>` : ""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${slots["right"] ? html`<slot name="right" part="right" class="inline-flex ml-2"></slot>` : ""}</div>`;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
SdOption.styles = [
|
|
@@ -138,7 +138,7 @@ __decorateClass([
|
|
|
138
138
|
watch("value")
|
|
139
139
|
], SdOption.prototype, "handleValueChange", 1);
|
|
140
140
|
SdOption = __decorateClass([
|
|
141
|
-
customElement("sd-1-
|
|
141
|
+
customElement("sd-1-33-1-option")
|
|
142
142
|
], SdOption);
|
|
143
143
|
export {
|
|
144
144
|
SdOption as default
|
|
@@ -329,7 +329,7 @@ __decorateClass([
|
|
|
329
329
|
property({ attribute: "auto-size-padding", type: Number })
|
|
330
330
|
], SdPopup.prototype, "autoSizePadding", 2);
|
|
331
331
|
SdPopup = __decorateClass([
|
|
332
|
-
customElement("sd-1-
|
|
332
|
+
customElement("sd-1-33-1-popup")
|
|
333
333
|
], SdPopup);
|
|
334
334
|
export {
|
|
335
335
|
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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-radio, sd-1-33-1-radio-button")];
|
|
76
76
|
}
|
|
77
77
|
handleRadioClick(event) {
|
|
78
|
-
const target = event.target.closest("sd-1-
|
|
78
|
+
const target = event.target.closest("sd-1-33-1-radio, sd-1-33-1-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-33-1-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-33-1-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-33-1-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-33-1-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-33-1-radio") && customElements.get("sd-1-33-1-radio-button")) {
|
|
170
170
|
this.syncRadioElements();
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
if (customElements.get("sd-1-
|
|
173
|
+
if (customElements.get("sd-1-33-1-radio")) {
|
|
174
174
|
this.syncRadioElements();
|
|
175
175
|
} else {
|
|
176
|
-
customElements.whenDefined("sd-1-
|
|
176
|
+
customElements.whenDefined("sd-1-33-1-radio").then(() => this.syncRadios());
|
|
177
177
|
}
|
|
178
|
-
if (customElements.get("sd-1-
|
|
178
|
+
if (customElements.get("sd-1-33-1-radio-button")) {
|
|
179
179
|
this.syncRadioElements();
|
|
180
180
|
} else {
|
|
181
|
-
customElements.whenDefined("sd-1-
|
|
181
|
+
customElements.whenDefined("sd-1-33-1-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-33-1-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-33-1-radio){margin-bottom:8px;display:flex}:host([orientation=vertical]) ::slotted(sd-1-33-1-radio:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-1-33-1-radio){margin-right:24px}:host([size=sm]):host([orientation=horizontal]) ::slotted(sd-1-33-1-radio){margin-right:16px}:host([orientation=horizontal]) ::slotted(sd-1-33-1-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-33-1-radio-group")
|
|
317
317
|
], SdRadioGroup);
|
|
318
318
|
export {
|
|
319
319
|
SdRadioGroup as default
|
|
@@ -7,9 +7,9 @@ import type { TemplateResult } from 'lit';
|
|
|
7
7
|
import type SdOption from '../option/option';
|
|
8
8
|
export default class SdSelect extends SolidElement implements SolidFormControl {
|
|
9
9
|
static dependencies: {
|
|
10
|
-
'sd-1-
|
|
11
|
-
'sd-1-
|
|
12
|
-
'sd-1-
|
|
10
|
+
'sd-1-33-1-icon': typeof SdIcon;
|
|
11
|
+
'sd-1-33-1-popup': typeof SdPopup;
|
|
12
|
+
'sd-1-33-1-tag': typeof SdTag;
|
|
13
13
|
};
|
|
14
14
|
private readonly formControlController;
|
|
15
15
|
private readonly hasSlotController;
|
|
@@ -96,6 +96,6 @@ export default class SdSelect extends SolidElement implements SolidFormControl {
|
|
|
96
96
|
}
|
|
97
97
|
declare global {
|
|
98
98
|
interface HTMLElementTagNameMap {
|
|
99
|
-
'sd-1-
|
|
99
|
+
'sd-1-33-1-select': SdSelect;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -33,7 +33,7 @@ let SdSelect = class extends SolidElement {
|
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
this.formControlController = new FormControlController(this, {
|
|
36
|
-
assumeInteractionOn: ["sd-blur", "sd-1-
|
|
36
|
+
assumeInteractionOn: ["sd-blur", "sd-1-33-1-input"]
|
|
37
37
|
});
|
|
38
38
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
39
39
|
this.localize = new LocalizeController(this);
|
|
@@ -63,11 +63,11 @@ let SdSelect = class extends SolidElement {
|
|
|
63
63
|
this.required = false;
|
|
64
64
|
this.hoist = false;
|
|
65
65
|
this.getTag = (option) => {
|
|
66
|
-
return html`<sd-1-
|
|
66
|
+
return html`<sd-1-33-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
67
67
|
base:tag__base,
|
|
68
68
|
content:tag__content,
|
|
69
69
|
removable-indicator:tag__removable-indicator,
|
|
70
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-1-
|
|
70
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-1-33-1-tag>`;
|
|
71
71
|
};
|
|
72
72
|
this.handleDocumentFocusIn = (event) => {
|
|
73
73
|
const path = event.composedPath();
|
|
@@ -78,7 +78,7 @@ let SdSelect = class extends SolidElement {
|
|
|
78
78
|
this.handleDocumentKeyDown = (event) => {
|
|
79
79
|
const target = event.target;
|
|
80
80
|
const isClearButton = target.closest(".select__clear") !== null;
|
|
81
|
-
const isIconButton = target.closest("sd-1-
|
|
81
|
+
const isIconButton = target.closest("sd-1-33-1-icon-button") !== null;
|
|
82
82
|
if (isClearButton || isIconButton) {
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
@@ -102,7 +102,7 @@ let SdSelect = class extends SolidElement {
|
|
|
102
102
|
this.setSelectedOptions(this.currentOption);
|
|
103
103
|
}
|
|
104
104
|
this.updateComplete.then(() => {
|
|
105
|
-
this.emit("sd-1-
|
|
105
|
+
this.emit("sd-1-33-1-input");
|
|
106
106
|
this.emit("sd-change");
|
|
107
107
|
});
|
|
108
108
|
if (!this.multiple) {
|
|
@@ -239,7 +239,7 @@ let SdSelect = class extends SolidElement {
|
|
|
239
239
|
this.displayInput.focus({ preventScroll: true });
|
|
240
240
|
this.updateComplete.then(() => {
|
|
241
241
|
this.emit("sd-clear");
|
|
242
|
-
this.emit("sd-1-
|
|
242
|
+
this.emit("sd-1-33-1-input");
|
|
243
243
|
this.emit("sd-change");
|
|
244
244
|
});
|
|
245
245
|
}
|
|
@@ -250,7 +250,7 @@ let SdSelect = class extends SolidElement {
|
|
|
250
250
|
}
|
|
251
251
|
handleOptionClick(event) {
|
|
252
252
|
const target = event.target;
|
|
253
|
-
const option = target.closest("sd-1-
|
|
253
|
+
const option = target.closest("sd-1-33-1-option");
|
|
254
254
|
const oldValue = this.value;
|
|
255
255
|
if (option && !option.disabled) {
|
|
256
256
|
if (this.multiple) {
|
|
@@ -261,7 +261,7 @@ let SdSelect = class extends SolidElement {
|
|
|
261
261
|
this.updateComplete.then(() => this.displayInput.focus({ preventScroll: true }));
|
|
262
262
|
if (this.value !== oldValue) {
|
|
263
263
|
this.updateComplete.then(() => {
|
|
264
|
-
this.emit("sd-1-
|
|
264
|
+
this.emit("sd-1-33-1-input");
|
|
265
265
|
this.emit("sd-change");
|
|
266
266
|
});
|
|
267
267
|
}
|
|
@@ -275,7 +275,7 @@ let SdSelect = class extends SolidElement {
|
|
|
275
275
|
const allOptions = this.getAllOptions();
|
|
276
276
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
277
277
|
const values = [];
|
|
278
|
-
if (customElements.get("sd-1-
|
|
278
|
+
if (customElements.get("sd-1-33-1-option")) {
|
|
279
279
|
allOptions.forEach((option) => {
|
|
280
280
|
if (this.multiple) {
|
|
281
281
|
option.checkbox = true;
|
|
@@ -284,7 +284,7 @@ let SdSelect = class extends SolidElement {
|
|
|
284
284
|
});
|
|
285
285
|
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
286
286
|
} else {
|
|
287
|
-
customElements.whenDefined("sd-1-
|
|
287
|
+
customElements.whenDefined("sd-1-33-1-option").then(() => this.handleDefaultSlotChange());
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
handleTagRemove(event, option) {
|
|
@@ -292,18 +292,18 @@ let SdSelect = class extends SolidElement {
|
|
|
292
292
|
if (!this.disabled) {
|
|
293
293
|
this.toggleOptionSelection(option, false);
|
|
294
294
|
this.updateComplete.then(() => {
|
|
295
|
-
this.emit("sd-1-
|
|
295
|
+
this.emit("sd-1-33-1-input");
|
|
296
296
|
this.emit("sd-change");
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
// Gets an array of all <sd-1-
|
|
300
|
+
// Gets an array of all <sd-1-33-1-option> elements
|
|
301
301
|
getAllOptions() {
|
|
302
|
-
return [...this.querySelectorAll("sd-1-
|
|
302
|
+
return [...this.querySelectorAll("sd-1-33-1-option")];
|
|
303
303
|
}
|
|
304
|
-
// Gets the first <sd-1-
|
|
304
|
+
// Gets the first <sd-1-33-1-option> element
|
|
305
305
|
getFirstOption() {
|
|
306
|
-
return this.querySelector("sd-1-
|
|
306
|
+
return this.querySelector("sd-1-33-1-option");
|
|
307
307
|
}
|
|
308
308
|
// Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
309
309
|
// option may be "current" at a time.
|
|
@@ -365,7 +365,7 @@ let SdSelect = class extends SolidElement {
|
|
|
365
365
|
const tag = this.getTag(option, index);
|
|
366
366
|
return html`<div @sd-remove="${(e) => this.handleTagRemove(e, option)}">${typeof tag === "string" ? unsafeHTML(tag) : tag}</div>`;
|
|
367
367
|
} else if (index === this.maxOptionsVisible) {
|
|
368
|
-
return html`<sd-1-
|
|
368
|
+
return html`<sd-1-33-1-tag size="${this.size === "sm" ? "sm" : "lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length - index}</sd-1-33-1-tag>`;
|
|
369
369
|
}
|
|
370
370
|
return html``;
|
|
371
371
|
});
|
|
@@ -380,7 +380,7 @@ let SdSelect = class extends SolidElement {
|
|
|
380
380
|
handleMouseLeave() {
|
|
381
381
|
this.hasHover = false;
|
|
382
382
|
}
|
|
383
|
-
/** Receives incoming event detail from sd-1-
|
|
383
|
+
/** Receives incoming event detail from sd-1-33-1-popup and updates local state for conditional styling. */
|
|
384
384
|
handleCurrentPlacement(e) {
|
|
385
385
|
const incomingPlacement = e.detail;
|
|
386
386
|
if (incomingPlacement) {
|
|
@@ -389,7 +389,7 @@ let SdSelect = class extends SolidElement {
|
|
|
389
389
|
}
|
|
390
390
|
handleUseTagsChange() {
|
|
391
391
|
const allOptions = this.getAllOptions();
|
|
392
|
-
if (customElements.get("sd-1-
|
|
392
|
+
if (customElements.get("sd-1-33-1-option")) {
|
|
393
393
|
allOptions.forEach((option) => {
|
|
394
394
|
option.checkbox = this.multiple;
|
|
395
395
|
});
|
|
@@ -531,7 +531,7 @@ let SdSelect = class extends SolidElement {
|
|
|
531
531
|
default: "border-neutral-800"
|
|
532
532
|
}[selectState],
|
|
533
533
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
|
534
|
-
)}"></div><sd-1-
|
|
534
|
+
)}"></div><sd-1-33-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
|
535
535
|
"inline-flex relative w-full",
|
|
536
536
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
|
537
537
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10"><div part="combobox" class="${cx(
|
|
@@ -545,28 +545,28 @@ let SdSelect = class extends SolidElement {
|
|
|
545
545
|
"appearance-none outline-none flex-grow bg-transparent",
|
|
546
546
|
cursorStyles,
|
|
547
547
|
this.multiple && this.useTags && this.value.length > 0 ? "hidden" : ""
|
|
548
|
-
)}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled ? "true" : "false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple && this.useTags ? html`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>` : ""} <input class="${cx("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10", cursorStyles)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value) ? this.value.join(", ") : this.value}" tabindex="-1" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("select__clear flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-
|
|
548
|
+
)}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled ? "true" : "false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple && this.useTags ? html`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>` : ""} <input class="${cx("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10", cursorStyles)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value) ? this.value.join(", ") : this.value}" tabindex="-1" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("select__clear flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-1-33-1-icon class="${cx("text-neutral-500", iconSize)}" library="system" name="closing-round"></sd-1-33-1-icon></slot></button>` : ""} ${this.isInvalid ? html`<sd-1-33-1-icon class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-1-33-1-icon>` : ""} ${this.isValid ? html`<sd-1-33-1-icon class="${cx("text-success", iconMarginLeft, iconSize)}" library="system" name="confirm"></sd-1-33-1-icon>` : ""}<slot name="expand-icon" part="expand-icon" class="${cx("inline-flex ml-2 transition-all", this.open ? "rotate-180" : "rotate-0", iconSize)}"><sd-1-33-1-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-1-33-1-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open ? "true" : "false"}" aria-multiselectable="${this.multiple ? "true" : "false"}" aria-labelledby="label" part="listbox" class="${cx(
|
|
549
549
|
"bg-white px-2 py-3 relative",
|
|
550
550
|
this.currentPlacement === "bottom" ? "border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default" : "border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default"
|
|
551
|
-
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-1-
|
|
551
|
+
)}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-1-33-1-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${hasHelpText ? "false" : "true"}"><slot name="help-text">${this.helpText}</slot></div></div>`;
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
554
|
SdSelect.dependencies = {
|
|
555
|
-
"sd-1-
|
|
556
|
-
"sd-1-
|
|
557
|
-
"sd-1-
|
|
555
|
+
"sd-1-33-1-icon": SdIcon,
|
|
556
|
+
"sd-1-33-1-popup": SdPopup,
|
|
557
|
+
"sd-1-33-1-tag": SdTag
|
|
558
558
|
};
|
|
559
559
|
SdSelect.styles = [
|
|
560
560
|
componentStyles,
|
|
561
561
|
formControlStyles,
|
|
562
562
|
SolidElement.styles,
|
|
563
|
-
css`:host{display:block;position:relative;width:100%}:host([required]) #label::after{content:' *'}sd-1-
|
|
563
|
+
css`:host{display:block;position:relative;width:100%}:host([required]) #label::after{content:' *'}sd-1-33-1-popup::part(popup){overflow-y:scroll}sd-1-33-1-tag::part(base){border-radius:4px;padding-left:4px;padding-right:4px}sd-1-33-1-tag[size=lg]::part(base){padding-left:8px;padding-right:8px}sd-1-33-1-tag[disabled=false]::part(base):hover{background-color:rgb(var(--sd-color-primary-100,236 240 249) / 1)}`
|
|
564
564
|
];
|
|
565
565
|
__decorateClass([
|
|
566
|
-
queryAssignedElements({ selector: "sd-1-
|
|
566
|
+
queryAssignedElements({ selector: "sd-1-33-1-option" })
|
|
567
567
|
], SdSelect.prototype, "_optionsInDefaultSlot", 2);
|
|
568
568
|
__decorateClass([
|
|
569
|
-
query("sd-1-
|
|
569
|
+
query("sd-1-33-1-popup")
|
|
570
570
|
], SdSelect.prototype, "popup", 2);
|
|
571
571
|
__decorateClass([
|
|
572
572
|
query('[part="combobox"]')
|
|
@@ -679,7 +679,7 @@ __decorateClass([
|
|
|
679
679
|
watch("value", { waitUntilFirstUpdate: true })
|
|
680
680
|
], SdSelect.prototype, "handleValueChange", 1);
|
|
681
681
|
SdSelect = __decorateClass([
|
|
682
|
-
customElement("sd-1-
|
|
682
|
+
customElement("sd-1-33-1-select")
|
|
683
683
|
], SdSelect);
|
|
684
684
|
setDefaultAnimation("select.show", {
|
|
685
685
|
keyframes: [
|