@solid-design-system/components 3.10.3 → 3.11.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/accordion.js +1 -1
- package/dist/components/es/animate.js +1 -0
- package/dist/components/es/carousel.js +1 -1
- package/dist/components/es/dialog.js +1 -1
- package/dist/components/es/drawer.js +1 -1
- package/dist/components/es/dropdown.js +1 -1
- package/dist/components/es/event.js +1 -1
- package/dist/components/es/expandable.js +1 -0
- package/dist/components/es/link.js +1 -1
- package/dist/components/es/notification.js +1 -1
- package/dist/components/es/scroll-controller.js +1 -1
- package/dist/components/es/select.js +3 -3
- package/dist/components/es/solid-components2.js +6 -6
- package/dist/components/es/tooltip.js +2 -2
- package/dist/components/umd/solid-components.js +5 -5
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/expandable/expandable.d.ts +23 -0
- package/dist/package/components/expandable/expandable.js +116 -0
- package/dist/package/components/link/link.js +1 -1
- package/dist/package/solid-components.d.ts +1 -0
- package/dist/package/solid-components.js +60 -58
- package/dist/package/styles/tailwind.css.js +1 -1
- package/dist/package/translations/de.js +3 -1
- package/dist/package/translations/en.js +3 -1
- package/dist/package/utilities/localize.d.ts +2 -0
- package/dist/versioned-components/es/accordion-group.js +1 -1
- package/dist/versioned-components/es/accordion.js +1 -1
- package/dist/versioned-components/es/animate.js +1 -0
- package/dist/versioned-components/es/badge.js +1 -1
- package/dist/versioned-components/es/brandshape.js +1 -1
- package/dist/versioned-components/es/button.js +1 -1
- package/dist/versioned-components/es/carousel-item.js +1 -1
- package/dist/versioned-components/es/carousel.js +3 -3
- package/dist/versioned-components/es/checkbox-group.js +1 -1
- package/dist/versioned-components/es/checkbox.js +1 -1
- package/dist/versioned-components/es/dialog.js +1 -1
- package/dist/versioned-components/es/divider.js +1 -1
- package/dist/versioned-components/es/drawer.js +1 -1
- package/dist/versioned-components/es/dropdown.js +1 -1
- package/dist/versioned-components/es/event.js +1 -1
- package/dist/versioned-components/es/expandable.js +1 -0
- package/dist/versioned-components/es/flipcard.js +1 -1
- package/dist/versioned-components/es/form.js +1 -1
- package/dist/versioned-components/es/header.js +1 -1
- package/dist/versioned-components/es/icon.js +1 -1
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/input.js +1 -1
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/map-marker.js +1 -1
- package/dist/versioned-components/es/navigation-item.js +1 -1
- package/dist/versioned-components/es/notification.js +1 -1
- package/dist/versioned-components/es/option.js +1 -1
- package/dist/versioned-components/es/radio-button.js +1 -1
- package/dist/versioned-components/es/radio-group.js +1 -1
- package/dist/versioned-components/es/radio.js +1 -1
- package/dist/versioned-components/es/scroll-controller.js +1 -1
- package/dist/versioned-components/es/scrollable.js +1 -1
- package/dist/versioned-components/es/select.js +3 -3
- package/dist/versioned-components/es/solid-components2.js +6 -6
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/step-group.js +1 -1
- package/dist/versioned-components/es/step.js +1 -1
- package/dist/versioned-components/es/switch.js +1 -1
- package/dist/versioned-components/es/tab-group.js +1 -1
- package/dist/versioned-components/es/tab-panel.js +1 -1
- package/dist/versioned-components/es/tab.js +1 -1
- package/dist/versioned-components/es/tag.js +1 -1
- package/dist/versioned-components/es/teaser-media.js +1 -1
- package/dist/versioned-components/es/teaser.js +1 -1
- package/dist/versioned-components/es/textarea.js +1 -1
- package/dist/versioned-components/es/tooltip.js +2 -2
- package/dist/versioned-components/es/video.js +1 -1
- package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
- package/dist/versioned-package/_components/button-group/button-group.js +11 -11
- package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
- package/dist/versioned-package/components/accordion/accordion.js +2 -2
- package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
- package/dist/versioned-package/components/badge/badge.d.ts +1 -1
- package/dist/versioned-package/components/badge/badge.js +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
- package/dist/versioned-package/components/button/button.d.ts +1 -1
- package/dist/versioned-package/components/button/button.js +4 -4
- package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
- package/dist/versioned-package/components/carousel/carousel.js +6 -6
- package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.js +3 -3
- package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
- package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
- package/dist/versioned-package/components/dialog/dialog.js +2 -2
- package/dist/versioned-package/components/divider/divider.d.ts +1 -1
- package/dist/versioned-package/components/divider/divider.js +2 -2
- package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
- package/dist/versioned-package/components/drawer/drawer.js +2 -2
- package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
- package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
- package/dist/versioned-package/components/expandable/expandable.d.ts +23 -0
- package/dist/versioned-package/components/expandable/expandable.js +116 -0
- package/dist/versioned-package/components/flipcard/flipcard.d.ts +1 -1
- package/dist/versioned-package/components/flipcard/flipcard.js +1 -1
- package/dist/versioned-package/components/header/header.d.ts +1 -1
- package/dist/versioned-package/components/header/header.js +4 -4
- package/dist/versioned-package/components/icon/icon.d.ts +1 -1
- package/dist/versioned-package/components/icon/icon.js +1 -1
- package/dist/versioned-package/components/include/include.d.ts +1 -1
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/input/input.d.ts +1 -1
- package/dist/versioned-package/components/input/input.js +2 -2
- package/dist/versioned-package/components/link/link.d.ts +1 -1
- package/dist/versioned-package/components/link/link.js +3 -3
- package/dist/versioned-package/components/map-marker/map-marker.d.ts +1 -1
- package/dist/versioned-package/components/map-marker/map-marker.js +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
- package/dist/versioned-package/components/notification/notification.d.ts +1 -1
- package/dist/versioned-package/components/notification/notification.js +5 -5
- package/dist/versioned-package/components/option/option.d.ts +1 -1
- package/dist/versioned-package/components/option/option.js +2 -2
- package/dist/versioned-package/components/popup/popup.d.ts +1 -1
- package/dist/versioned-package/components/popup/popup.js +1 -1
- package/dist/versioned-package/components/radio/radio.d.ts +1 -1
- package/dist/versioned-package/components/radio/radio.js +2 -2
- package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
- package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +13 -13
- package/dist/versioned-package/components/scrollable/scrollable.d.ts +1 -1
- package/dist/versioned-package/components/scrollable/scrollable.js +3 -3
- package/dist/versioned-package/components/select/select.d.ts +4 -4
- package/dist/versioned-package/components/select/select.js +25 -25
- package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
- package/dist/versioned-package/components/spinner/spinner.js +1 -1
- package/dist/versioned-package/components/step/step.d.ts +1 -1
- package/dist/versioned-package/components/step/step.js +5 -5
- package/dist/versioned-package/components/step-group/step-group.d.ts +1 -1
- package/dist/versioned-package/components/step-group/step-group.js +2 -2
- package/dist/versioned-package/components/switch/switch.d.ts +1 -1
- package/dist/versioned-package/components/switch/switch.js +1 -1
- package/dist/versioned-package/components/tab/tab.d.ts +1 -1
- package/dist/versioned-package/components/tab/tab.js +2 -2
- package/dist/versioned-package/components/tab-group/tab-group.d.ts +1 -1
- package/dist/versioned-package/components/tab-group/tab-group.js +13 -13
- package/dist/versioned-package/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/versioned-package/components/tab-panel/tab-panel.js +2 -2
- package/dist/versioned-package/components/tag/tag.d.ts +1 -1
- package/dist/versioned-package/components/tag/tag.js +2 -2
- package/dist/versioned-package/components/teaser/teaser.js +1 -1
- package/dist/versioned-package/components/teaser-media/teaser-media.js +1 -1
- package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
- package/dist/versioned-package/components/textarea/textarea.js +2 -2
- package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
- package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
- package/dist/versioned-package/components/video/video.d.ts +1 -1
- package/dist/versioned-package/components/video/video.js +2 -2
- package/dist/versioned-package/internal/form.js +3 -3
- package/dist/versioned-package/solid-components.d.ts +1 -0
- package/dist/versioned-package/solid-components.js +60 -58
- package/dist/versioned-package/styles/headline/headline.css.js +1 -1
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-package/translations/de.js +3 -1
- package/dist/versioned-package/translations/en.js +3 -1
- package/dist/versioned-package/utilities/autocomplete-config.js +4 -4
- package/dist/versioned-package/utilities/localize.d.ts +2 -0
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +76 -42
- package/dist/web-types.json +217 -43
- package/package.json +3 -3
|
@@ -38,7 +38,7 @@ let SdCarousel = class extends SolidElement {
|
|
|
38
38
|
this.pausedAutoplay = false;
|
|
39
39
|
this.autoplayController = new AutoplayController(this, () => this.next());
|
|
40
40
|
this.scrollController = new ScrollController(this);
|
|
41
|
-
this.slides = this.getElementsByTagName("sd-3-
|
|
41
|
+
this.slides = this.getElementsByTagName("sd-3-11-1-carousel-item");
|
|
42
42
|
this.intersectionObserverEntries = /* @__PURE__ */ new Map();
|
|
43
43
|
this.localize = new LocalizeController(this);
|
|
44
44
|
this.handleSlotChange = (mutations) => {
|
|
@@ -275,7 +275,7 @@ let SdCarousel = class extends SolidElement {
|
|
|
275
275
|
"!mr-6 !rounded-sm sd-interactive",
|
|
276
276
|
!prevEnabled && "sd-interactive--disabled",
|
|
277
277
|
this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset"
|
|
278
|
-
)}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @click="${prevEnabled ? () => this.previous() : null}"><slot name="previous-icon"><sd-3-
|
|
278
|
+
)}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @click="${prevEnabled ? () => this.previous() : null}"><slot name="previous-icon"><sd-3-11-1-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-3-11-1-icon></slot></button> ${this.variant === "dot" ? html`<div part="pagination-dot" role="tablist" class="${cx("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${map(range(pagesCount), (index) => {
|
|
279
279
|
const isActive = index === currentPage;
|
|
280
280
|
return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
|
|
281
281
|
"carousel__pagination-item",
|
|
@@ -295,19 +295,19 @@ let SdCarousel = class extends SolidElement {
|
|
|
295
295
|
)}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @click="${nextEnabled ? () => {
|
|
296
296
|
console.log("click-next");
|
|
297
297
|
this.next();
|
|
298
|
-
} : null}"><slot name="next-icon"><sd-3-
|
|
298
|
+
} : null}"><slot name="next-icon"><sd-3-11-1-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-3-11-1-icon></slot></button></div><button class="${cx(
|
|
299
299
|
"ml-6 !rounded-sm",
|
|
300
300
|
"!absolute !right-0 sd-interactive",
|
|
301
301
|
this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
|
|
302
302
|
!this.autoplay && "!hidden"
|
|
303
|
-
)}" part="autoplay-controls" @click="${() => this.pausedAutoplay = !this.pausedAutoplay}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-3-
|
|
303
|
+
)}" part="autoplay-controls" @click="${() => this.pausedAutoplay = !this.pausedAutoplay}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-3-11-1-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-3-11-1-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-3-11-1-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-3-11-1-icon></slot></button></div></div>`;
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
SdCarousel.styles = [
|
|
307
307
|
SolidElement.styles,
|
|
308
308
|
unsafeCSS(InteractiveStyles),
|
|
309
309
|
componentStyles,
|
|
310
|
-
css`:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-3-
|
|
310
|
+
css`:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-3-11-1-button::part(label){pointer-events:none;display:flex;flex:1 1 auto;align-items:center}`
|
|
311
311
|
];
|
|
312
312
|
__decorateClass([
|
|
313
313
|
property({ type: String, reflect: true })
|
|
@@ -359,7 +359,7 @@ __decorateClass([
|
|
|
359
359
|
watch("autoplay")
|
|
360
360
|
], SdCarousel.prototype, "handleAutoplayChange", 1);
|
|
361
361
|
SdCarousel = __decorateClass([
|
|
362
|
-
customElement("sd-3-
|
|
362
|
+
customElement("sd-3-11-1-carousel")
|
|
363
363
|
], SdCarousel);
|
|
364
364
|
export {
|
|
365
365
|
SdCarousel as default
|
|
@@ -30,7 +30,7 @@ SdCarouselItem.styles = [
|
|
|
30
30
|
css`:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`
|
|
31
31
|
];
|
|
32
32
|
SdCarouselItem = __decorateClass([
|
|
33
|
-
customElement("sd-3-
|
|
33
|
+
customElement("sd-3-11-1-carousel-item")
|
|
34
34
|
], SdCarouselItem);
|
|
35
35
|
export {
|
|
36
36
|
SdCarouselItem as default
|
|
@@ -109,7 +109,7 @@ let SdCheckbox = class extends SolidElement {
|
|
|
109
109
|
render() {
|
|
110
110
|
const checkboxState = this.disabled && this.indeterminate ? "disabledIndeterminate" : this.disabled && this.checked ? "disabledChecked" : this.disabled ? "disabled" : this.showInvalidStyle && this.indeterminate ? "invalidIndeterminate" : this.showInvalidStyle ? "invalid" : this.checked || this.indeterminate ? "filled" : "default";
|
|
111
111
|
return html`<label part="base" class="${cx(
|
|
112
|
-
"sd-3-
|
|
112
|
+
"sd-3-11-1-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",
|
|
113
113
|
this.disabled && "hover:cursor-not-allowed",
|
|
114
114
|
{
|
|
115
115
|
/* sizes, fonts */
|
|
@@ -133,7 +133,7 @@ let SdCheckbox = class extends SolidElement {
|
|
|
133
133
|
filled: "border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",
|
|
134
134
|
default: "border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"
|
|
135
135
|
}[checkboxState]
|
|
136
|
-
)}">${this.checked ? html`<sd-3-
|
|
136
|
+
)}">${this.checked ? html`<sd-3-11-1-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-11-1-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-3-11-1-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-3-11-1-icon>` : ""} </span><span part="label" id="label" class="${cx(
|
|
137
137
|
"select-none inline-block ml-2",
|
|
138
138
|
this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "text-black"
|
|
139
139
|
)}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`;
|
|
@@ -189,7 +189,7 @@ __decorateClass([
|
|
|
189
189
|
watch(["checked", "indeterminate"], { waitUntilFirstUpdate: true })
|
|
190
190
|
], SdCheckbox.prototype, "handleStateChange", 1);
|
|
191
191
|
SdCheckbox = __decorateClass([
|
|
192
|
-
customElement("sd-3-
|
|
192
|
+
customElement("sd-3-11-1-checkbox")
|
|
193
193
|
], SdCheckbox);
|
|
194
194
|
export {
|
|
195
195
|
SdCheckbox as default
|
|
@@ -26,7 +26,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
26
26
|
this.orientation = "vertical";
|
|
27
27
|
}
|
|
28
28
|
getAllCheckboxes() {
|
|
29
|
-
return [...this.querySelectorAll("sd-3-
|
|
29
|
+
return [...this.querySelectorAll("sd-3-11-1-checkbox")];
|
|
30
30
|
}
|
|
31
31
|
async syncCheckboxElements() {
|
|
32
32
|
const checkboxes = this.getAllCheckboxes();
|
|
@@ -42,10 +42,10 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
syncCheckboxes() {
|
|
45
|
-
if (customElements.get("sd-3-
|
|
45
|
+
if (customElements.get("sd-3-11-1-checkbox")) {
|
|
46
46
|
this.syncCheckboxElements();
|
|
47
47
|
} else {
|
|
48
|
-
customElements.whenDefined("sd-3-
|
|
48
|
+
customElements.whenDefined("sd-3-11-1-checkbox").then(() => this.syncCheckboxes());
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
handleSizeChange() {
|
|
@@ -76,7 +76,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
|
76
76
|
SdCheckboxGroup.styles = [
|
|
77
77
|
componentStyles,
|
|
78
78
|
SolidElement.styles,
|
|
79
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-
|
|
79
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-11-1-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-11-1-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-11-1-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-11-1-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-11-1-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-11-1-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`
|
|
80
80
|
];
|
|
81
81
|
__decorateClass([
|
|
82
82
|
property()
|
|
@@ -94,7 +94,7 @@ __decorateClass([
|
|
|
94
94
|
watch("invalid", { waitUntilFirstUpdate: true })
|
|
95
95
|
], SdCheckboxGroup.prototype, "handleInvalid", 1);
|
|
96
96
|
SdCheckboxGroup = __decorateClass([
|
|
97
|
-
customElement("sd-3-
|
|
97
|
+
customElement("sd-3-11-1-checkbox-group")
|
|
98
98
|
], SdCheckboxGroup);
|
|
99
99
|
export {
|
|
100
100
|
SdCheckboxGroup as default
|
|
@@ -157,7 +157,7 @@ let SdDialog = class extends SolidElement {
|
|
|
157
157
|
)}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
|
|
158
158
|
"flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",
|
|
159
159
|
this.open && "flex opacity-100"
|
|
160
|
-
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-3-
|
|
160
|
+
)}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-3-11-1-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${cx("absolute top-2 right-2")}" name="x-lg" @click="${() => this.requestClose("close-button")}" type="button"><sd-3-11-1-icon name="close" library="system" color="currentColor"></sd-3-11-1-icon></sd-3-11-1-button>` : ""}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`;
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
SdDialog.styles = [
|
|
@@ -188,7 +188,7 @@ __decorateClass([
|
|
|
188
188
|
watch("open", { waitUntilFirstUpdate: true })
|
|
189
189
|
], SdDialog.prototype, "handleOpenChange", 1);
|
|
190
190
|
SdDialog = __decorateClass([
|
|
191
|
-
customElement("sd-3-
|
|
191
|
+
customElement("sd-3-11-1-dialog")
|
|
192
192
|
], SdDialog);
|
|
193
193
|
setDefaultAnimation("dialog.show", {
|
|
194
194
|
keyframes: [
|
|
@@ -34,7 +34,7 @@ let SdDivider = class extends SolidElement {
|
|
|
34
34
|
SdDivider.styles = [
|
|
35
35
|
componentStyles,
|
|
36
36
|
SolidElement.styles,
|
|
37
|
-
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-3-
|
|
37
|
+
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-3-11-1-divider[orientation=horizontal]){display:block}:host(sd-3-11-1-divider[orientation=vertical]){display:inline-block}`
|
|
38
38
|
];
|
|
39
39
|
__decorateClass([
|
|
40
40
|
property({ reflect: true })
|
|
@@ -43,7 +43,7 @@ __decorateClass([
|
|
|
43
43
|
property({ type: Boolean, reflect: true })
|
|
44
44
|
], SdDivider.prototype, "inverted", 2);
|
|
45
45
|
SdDivider = __decorateClass([
|
|
46
|
-
customElement("sd-3-
|
|
46
|
+
customElement("sd-3-11-1-divider")
|
|
47
47
|
], SdDivider);
|
|
48
48
|
export {
|
|
49
49
|
SdDivider as default
|
|
@@ -182,7 +182,7 @@ let SdDrawer = class extends SolidElement {
|
|
|
182
182
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
|
183
183
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
|
184
184
|
}[this.placement]
|
|
185
|
-
)}" 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-3-
|
|
185
|
+
)}" 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-3-11-1-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-3-11-1-icon name="close" library="system"></sd-3-11-1-icon></sd-3-11-1-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>`;
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
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-3-
|
|
224
|
+
customElement("sd-3-11-1-drawer")
|
|
225
225
|
], SdDrawer);
|
|
226
226
|
setDefaultAnimation("drawer.showStart", {
|
|
227
227
|
keyframes: [
|
|
@@ -169,7 +169,7 @@ let SdDropdown = class extends SolidElement {
|
|
|
169
169
|
// that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,
|
|
170
170
|
// a child of the slotted element, or an element in the slotted element's shadow root.
|
|
171
171
|
//
|
|
172
|
-
// For example, the accessible trigger of an <sd-3-
|
|
172
|
+
// For example, the accessible trigger of an <sd-3-11-1-button> is a <button> located inside its shadow root.
|
|
173
173
|
//
|
|
174
174
|
// To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
175
175
|
//
|
|
@@ -179,8 +179,8 @@ let SdDropdown = class extends SolidElement {
|
|
|
179
179
|
let target;
|
|
180
180
|
if (accessibleTrigger) {
|
|
181
181
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
|
182
|
-
case "sd-3-
|
|
183
|
-
case "sd-3-
|
|
182
|
+
case "sd-3-11-1-button":
|
|
183
|
+
case "sd-3-11-1-icon-button":
|
|
184
184
|
target = accessibleTrigger.button;
|
|
185
185
|
break;
|
|
186
186
|
default:
|
|
@@ -215,7 +215,7 @@ let SdDropdown = class extends SolidElement {
|
|
|
215
215
|
}
|
|
216
216
|
addOpenListeners() {
|
|
217
217
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
|
218
|
-
this.panel.addEventListener("sd-3-
|
|
218
|
+
this.panel.addEventListener("sd-3-11-1-select", this.handlePanelSelect);
|
|
219
219
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
|
220
220
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
221
221
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
@@ -223,7 +223,7 @@ let SdDropdown = class extends SolidElement {
|
|
|
223
223
|
removeOpenListeners() {
|
|
224
224
|
if (this.panel) {
|
|
225
225
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
|
226
|
-
this.panel.removeEventListener("sd-3-
|
|
226
|
+
this.panel.removeEventListener("sd-3-11-1-select", this.handlePanelSelect);
|
|
227
227
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
|
228
228
|
}
|
|
229
229
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -256,11 +256,11 @@ let SdDropdown = class extends SolidElement {
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
render() {
|
|
259
|
-
return html`<sd-3-
|
|
259
|
+
return html`<sd-3-11-1-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(
|
|
260
260
|
"shadow bg-white",
|
|
261
261
|
this.open ? "block pointer-events-auto" : "pointer-events-none",
|
|
262
262
|
this.rounded && "rounded-md"
|
|
263
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-3-
|
|
263
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-3-11-1-popup>`;
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
SdDropdown.styles = [
|
|
@@ -314,7 +314,7 @@ __decorateClass([
|
|
|
314
314
|
watch("open", { waitUntilFirstUpdate: true })
|
|
315
315
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
|
316
316
|
SdDropdown = __decorateClass([
|
|
317
|
-
customElement("sd-3-
|
|
317
|
+
customElement("sd-3-11-1-dropdown")
|
|
318
318
|
], SdDropdown);
|
|
319
319
|
setDefaultAnimation("dropdown.show", {
|
|
320
320
|
keyframes: [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LocalizeController } from '../../utilities/localize.js';
|
|
2
|
+
import SolidElement from '../../internal/solid-element';
|
|
3
|
+
export default class SdExpandable extends SolidElement {
|
|
4
|
+
contentPreview: HTMLElement;
|
|
5
|
+
details: HTMLDetailsElement;
|
|
6
|
+
open: boolean;
|
|
7
|
+
inverted: boolean;
|
|
8
|
+
localize: LocalizeController;
|
|
9
|
+
private updateMaxHeight;
|
|
10
|
+
private onToggleClick;
|
|
11
|
+
onOpenChange(): void;
|
|
12
|
+
show(): Promise<void>;
|
|
13
|
+
hide(): Promise<void>;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
firstUpdated(): void;
|
|
16
|
+
cloneContentToLightDOM(): void;
|
|
17
|
+
static styles: import("lit").CSSResultGroup[];
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'sd-3-11-1-expandable': SdExpandable;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { unsafeCSS, css, html } from "lit";
|
|
2
|
+
import { customElement } from "../../internal/register-custom-element.js";
|
|
3
|
+
import { LocalizeController } from "../../utilities/localize.js";
|
|
4
|
+
import { query, property } from "lit/decorators.js";
|
|
5
|
+
import { waitForEvent } from "../../internal/event.js";
|
|
6
|
+
import { watch } from "../../internal/watch.js";
|
|
7
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
8
|
+
import cx from "classix";
|
|
9
|
+
import InteractiveStyles from "../../styles/interactive/interactive.css.js";
|
|
10
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result) __defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
let SdExpandable = class extends SolidElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.open = false;
|
|
25
|
+
this.inverted = false;
|
|
26
|
+
this.localize = new LocalizeController(this);
|
|
27
|
+
}
|
|
28
|
+
updateMaxHeight() {
|
|
29
|
+
var _a;
|
|
30
|
+
const scrollHeight = (_a = this.contentPreview) == null ? void 0 : _a.scrollHeight.toString();
|
|
31
|
+
this.style.setProperty("--max-height-pixel", `${scrollHeight}px`);
|
|
32
|
+
this.style.setProperty("--max-height", scrollHeight);
|
|
33
|
+
}
|
|
34
|
+
onToggleClick() {
|
|
35
|
+
this.updateMaxHeight();
|
|
36
|
+
this.open = !this.open;
|
|
37
|
+
}
|
|
38
|
+
onOpenChange() {
|
|
39
|
+
if (this.open) {
|
|
40
|
+
this.emit("sd-show");
|
|
41
|
+
this.updateComplete.then(() => {
|
|
42
|
+
this.emit("sd-after-show");
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
this.emit("sd-hide");
|
|
46
|
+
this.updateComplete.then(() => {
|
|
47
|
+
this.emit("sd-after-hide");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
this.details.setAttribute("open", this.open.toString());
|
|
51
|
+
}
|
|
52
|
+
/** Opens the expandable */
|
|
53
|
+
async show() {
|
|
54
|
+
if (this.open) {
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
this.onToggleClick();
|
|
58
|
+
return waitForEvent(this, "sd-after-show");
|
|
59
|
+
}
|
|
60
|
+
/** Closes the expandable */
|
|
61
|
+
async hide() {
|
|
62
|
+
if (!this.open) {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
this.onToggleClick();
|
|
66
|
+
return waitForEvent(this, "sd-after-hide");
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return html`<details part="details"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details><button part="toggle" class="${cx(
|
|
70
|
+
"sd-interactive sd-interactive--reset !h-full !justify-center !w-full !text-base !flex !items-center !underline !underline-offset-2 !toggle",
|
|
71
|
+
this.inverted && "sd-interactive--inverted",
|
|
72
|
+
!this.inverted ? "!focus-visible:focus-outline" : "!focus-visible:focus-outline-inverted"
|
|
73
|
+
)}" @click="${this.onToggleClick}">${this.open ? html`<slot name="toggle-open"><sd-3-11-1-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-3-11-1-icon>${this.localize.term("showLess")}</slot>` : html`<slot name="toggle-closed"><sd-3-11-1-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-3-11-1-icon>${this.localize.term("showMore")}</slot>`}</button>`;
|
|
74
|
+
}
|
|
75
|
+
firstUpdated() {
|
|
76
|
+
this.cloneContentToLightDOM();
|
|
77
|
+
this.details.setAttribute("open", this.open.toString());
|
|
78
|
+
}
|
|
79
|
+
cloneContentToLightDOM() {
|
|
80
|
+
const slot = document.createElement("div");
|
|
81
|
+
slot.setAttribute("slot", "clone");
|
|
82
|
+
const nodes = Array.from(this.childNodes);
|
|
83
|
+
nodes.forEach((node) => {
|
|
84
|
+
const clone = node.cloneNode(true);
|
|
85
|
+
slot.appendChild(clone);
|
|
86
|
+
});
|
|
87
|
+
this.appendChild(slot);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
SdExpandable.styles = [
|
|
91
|
+
SolidElement.styles,
|
|
92
|
+
unsafeCSS(InteractiveStyles),
|
|
93
|
+
componentStyles,
|
|
94
|
+
css`:host{--gradient-color-start:rgba(255, 255, 255, 0);--gradient-color-end:rgba(255, 255, 255, 1);--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;position:relative;display:inline-block;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content::after{position:absolute;bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);display:block;width:100%;content:' ';height:var(--gradient-height);background:linear-gradient(180deg,var(--gradient))}:host([inverted]:not([open])) .content::after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`
|
|
95
|
+
];
|
|
96
|
+
__decorateClass([
|
|
97
|
+
query(".content-preview")
|
|
98
|
+
], SdExpandable.prototype, "contentPreview", 2);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
query("details")
|
|
101
|
+
], SdExpandable.prototype, "details", 2);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
property({ type: Boolean, reflect: true })
|
|
104
|
+
], SdExpandable.prototype, "open", 2);
|
|
105
|
+
__decorateClass([
|
|
106
|
+
property({ type: Boolean, reflect: true })
|
|
107
|
+
], SdExpandable.prototype, "inverted", 2);
|
|
108
|
+
__decorateClass([
|
|
109
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
110
|
+
], SdExpandable.prototype, "onOpenChange", 1);
|
|
111
|
+
SdExpandable = __decorateClass([
|
|
112
|
+
customElement("sd-3-11-1-expandable")
|
|
113
|
+
], SdExpandable);
|
|
114
|
+
export {
|
|
115
|
+
SdExpandable as default
|
|
116
|
+
};
|
|
@@ -173,7 +173,7 @@ __decorateClass([
|
|
|
173
173
|
property({ type: String, reflect: true, attribute: "back-variant" })
|
|
174
174
|
], SdFlipcard.prototype, "backVariant", 2);
|
|
175
175
|
SdFlipcard = __decorateClass([
|
|
176
|
-
customElement("sd-3-
|
|
176
|
+
customElement("sd-3-11-1-flipcard")
|
|
177
177
|
], SdFlipcard);
|
|
178
178
|
export {
|
|
179
179
|
SdFlipcard as default
|
|
@@ -63,11 +63,11 @@ let SdHeader = class extends SolidElement {
|
|
|
63
63
|
setCalculatedHeightProperty() {
|
|
64
64
|
if (this.fixed && this.refHeaderElement) {
|
|
65
65
|
document.documentElement.style.setProperty(
|
|
66
|
-
"--sd-3-
|
|
66
|
+
"--sd-3-11-1-header-calculated-height",
|
|
67
67
|
`${this.refHeaderElement.clientHeight}px`
|
|
68
68
|
);
|
|
69
69
|
} else {
|
|
70
|
-
document.documentElement.style.removeProperty("--sd-3-
|
|
70
|
+
document.documentElement.style.removeProperty("--sd-3-11-1-header-calculated-height");
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
@@ -84,7 +84,7 @@ let SdHeader = class extends SolidElement {
|
|
|
84
84
|
SdHeader.styles = [
|
|
85
85
|
SolidElement.styles,
|
|
86
86
|
componentStyles,
|
|
87
|
-
css`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-3-
|
|
87
|
+
css`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-3-11-1-header-inner-width);max-width:var(--sd-3-11-1-header-inner-max-width);padding:var(--sd-3-11-1-header-padding,12px 16px)}`
|
|
88
88
|
];
|
|
89
89
|
__decorateClass([
|
|
90
90
|
property({ reflect: true, type: Boolean })
|
|
@@ -93,7 +93,7 @@ __decorateClass([
|
|
|
93
93
|
debounce(100)
|
|
94
94
|
], SdHeader.prototype, "onResize", 1);
|
|
95
95
|
SdHeader = __decorateClass([
|
|
96
|
-
customElement("sd-3-
|
|
96
|
+
customElement("sd-3-11-1-header")
|
|
97
97
|
], SdHeader);
|
|
98
98
|
export {
|
|
99
99
|
SdHeader as default
|
|
@@ -255,7 +255,7 @@ let SdInput = class extends SolidElement {
|
|
|
255
255
|
"min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",
|
|
256
256
|
this.size === "sm" ? "h-6" : "h-8",
|
|
257
257
|
textSize
|
|
258
|
-
)}" 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-3-
|
|
258
|
+
)}" 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-3-11-1-icon class="${cx("icon-fill-neutral-800", iconSize)}" library="system" name="closing-round"></sd-3-11-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-3-11-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye"></sd-3-11-1-icon></slot>` : html`<slot name="hide-password-icon"><sd-3-11-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="eye-crossed-out"></sd-3-11-1-icon></slot>`}</button>` : ""} ${(this.type === "date" || this.type === "datetime-local") && !isFirefox ? html`<sd-3-11-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="calendar"></sd-3-11-1-icon>` : ""} ${this.type === "time" ? html`<sd-3-11-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="clock"></sd-3-11-1-icon>` : ""} ${this.type === "search" ? html`<button class="flex items-center" type="button" tabindex="-1"><sd-3-11-1-icon class="${cx(iconColor, iconMarginLeft, iconSize)}" library="system" name="magnifying-glass"></sd-3-11-1-icon></button>` : ""} ${this.showInvalidStyle ? html`<sd-3-11-1-icon part="invalid-icon" class="${cx("text-error", iconMarginLeft, iconSize)}" library="system" name="risk"></sd-3-11-1-icon>` : ""} ${this.showValidStyle && this.styleOnValid ? html`<sd-3-11-1-icon class="${cx("text-success flex-shrink-0", iconMarginLeft, iconSize)}" library="system" name="status-check" part="valid-icon"></sd-3-11-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}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`;
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
SdInput.styles = [
|
|
@@ -388,7 +388,7 @@ __decorateClass([
|
|
|
388
388
|
watch("value", { waitUntilFirstUpdate: true })
|
|
389
389
|
], SdInput.prototype, "handleValueChange", 1);
|
|
390
390
|
SdInput = __decorateClass([
|
|
391
|
-
customElement("sd-3-
|
|
391
|
+
customElement("sd-3-11-1-input")
|
|
392
392
|
], SdInput);
|
|
393
393
|
export {
|
|
394
394
|
SdInput as default
|