@solid-design-system/components 3.23.4 → 3.24.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/umd/solid-components.js +1 -1
- package/dist/custom-elements.json +1 -1
- 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/audio.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/combobox.js +4 -4
- 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/expandable.js +1 -1
- 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/optgroup.js +1 -1
- package/dist/versioned-components/es/option.js +1 -1
- package/dist/versioned-components/es/quickfact.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/scrollable.js +1 -1
- package/dist/versioned-components/es/select.js +4 -4
- package/dist/versioned-components/es/solid-components2.js +1 -1
- 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/utils.js +1 -1
- 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/audio/audio.d.ts +1 -1
- package/dist/versioned-package/components/audio/audio.js +6 -6
- 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/combobox/combobox.d.ts +4 -4
- package/dist/versioned-package/components/combobox/combobox.js +26 -26
- package/dist/versioned-package/components/combobox/utils.js +2 -2
- 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 +9 -9
- package/dist/versioned-package/components/expandable/expandable.d.ts +1 -1
- package/dist/versioned-package/components/expandable/expandable.js +2 -2
- 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 +3 -3
- 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/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 +5 -5
- 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/optgroup/optgroup.d.ts +2 -2
- package/dist/versioned-package/components/optgroup/optgroup.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/quickfact/quickfact.d.ts +1 -1
- package/dist/versioned-package/components/quickfact/quickfact.js +2 -2
- 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 +29 -29
- 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 +2 -2
- 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/styles/headline/headline.css.js +1 -1
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-package/utilities/autocomplete-config.js +4 -4
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +47 -47
- package/dist/web-types.json +48 -48
- package/package.json +1 -1
@@ -39,7 +39,7 @@ let SdCarousel = class extends SolidElement {
|
|
39
39
|
this.pausedAutoplay = false;
|
40
40
|
this.autoplayController = new AutoplayController(this, () => this.next());
|
41
41
|
this.scrollController = new ScrollController(this);
|
42
|
-
this.slides = this.getElementsByTagName("sd-3-
|
42
|
+
this.slides = this.getElementsByTagName("sd-3-24-0-carousel-item");
|
43
43
|
this.intersectionObserverEntries = /* @__PURE__ */ new Map();
|
44
44
|
this.localize = new LocalizeController(this);
|
45
45
|
this.handleSlotChange = (mutations) => {
|
@@ -348,7 +348,7 @@ let SdCarousel = class extends SolidElement {
|
|
348
348
|
)}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @click="${prevEnabled ? (e) => {
|
349
349
|
this.previous();
|
350
350
|
this.unblockAutoplay(e, this.previousButton);
|
351
|
-
} : null}"><slot name="previous-icon"><sd-3-
|
351
|
+
} : null}"><slot name="previous-icon"><sd-3-24-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-3-24-0-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) => {
|
352
352
|
const isActive = index + 1 === currentPage;
|
353
353
|
return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
|
354
354
|
"carousel__pagination-item",
|
@@ -371,7 +371,7 @@ let SdCarousel = class extends SolidElement {
|
|
371
371
|
)}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @click="${nextEnabled ? (e) => {
|
372
372
|
this.next();
|
373
373
|
this.unblockAutoplay(e, this.nextButton);
|
374
|
-
} : null}"><slot name="next-icon"><sd-3-
|
374
|
+
} : null}"><slot name="next-icon"><sd-3-24-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-3-24-0-icon></slot></button></div><button class="${cx(
|
375
375
|
"ml-6 !rounded-sm",
|
376
376
|
"!absolute !right-0 sd-interactive",
|
377
377
|
this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
|
@@ -381,14 +381,14 @@ let SdCarousel = class extends SolidElement {
|
|
381
381
|
if (e.detail) {
|
382
382
|
this.autoplayControls.blur();
|
383
383
|
}
|
384
|
-
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-3-
|
384
|
+
}}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-3-24-0-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-3-24-0-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-3-24-0-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-3-24-0-icon></slot></button></div></div>`;
|
385
385
|
}
|
386
386
|
};
|
387
387
|
SdCarousel.styles = [
|
388
388
|
SolidElement.styles,
|
389
389
|
unsafeCSS(InteractiveStyles),
|
390
390
|
componentStyles,
|
391
|
-
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-
|
391
|
+
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-24-0-button::part(label){pointer-events:none;display:flex;flex:1 1 auto;align-items:center}`
|
392
392
|
];
|
393
393
|
__decorateClass([
|
394
394
|
query('[part~="autoplay-controls"]')
|
@@ -455,7 +455,7 @@ __decorateClass([
|
|
455
455
|
watch("autoplay")
|
456
456
|
], SdCarousel.prototype, "handleAutoplayChange", 1);
|
457
457
|
SdCarousel = __decorateClass([
|
458
|
-
customElement("sd-3-
|
458
|
+
customElement("sd-3-24-0-carousel")
|
459
459
|
], SdCarousel);
|
460
460
|
export {
|
461
461
|
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-24-0-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-24-0-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 */
|
@@ -135,7 +135,7 @@ let SdCheckbox = class extends SolidElement {
|
|
135
135
|
filled: "border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",
|
136
136
|
default: "border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"
|
137
137
|
}[checkboxState]
|
138
|
-
)}">${this.checked ? html`<sd-3-
|
138
|
+
)}">${this.checked ? html`<sd-3-24-0-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-24-0-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-3-24-0-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-3-24-0-icon>` : ""} </span><span part="label" id="label" class="${cx(
|
139
139
|
"select-none inline-block ml-2",
|
140
140
|
this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "text-black"
|
141
141
|
)}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`;
|
@@ -191,7 +191,7 @@ __decorateClass([
|
|
191
191
|
watch(["checked", "indeterminate"], { waitUntilFirstUpdate: true })
|
192
192
|
], SdCheckbox.prototype, "handleStateChange", 1);
|
193
193
|
SdCheckbox = __decorateClass([
|
194
|
-
customElement("sd-3-
|
194
|
+
customElement("sd-3-24-0-checkbox")
|
195
195
|
], SdCheckbox);
|
196
196
|
export {
|
197
197
|
SdCheckbox as default
|
@@ -26,7 +26,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
26
26
|
this.label = "";
|
27
27
|
}
|
28
28
|
getAllCheckboxes() {
|
29
|
-
return [...this.querySelectorAll("sd-3-
|
29
|
+
return [...this.querySelectorAll("sd-3-24-0-checkbox")];
|
30
30
|
}
|
31
31
|
async syncCheckboxElements() {
|
32
32
|
const checkboxes = this.getAllCheckboxes();
|
@@ -39,10 +39,10 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
39
39
|
);
|
40
40
|
}
|
41
41
|
syncCheckboxes() {
|
42
|
-
if (customElements.get("sd-3-
|
42
|
+
if (customElements.get("sd-3-24-0-checkbox")) {
|
43
43
|
this.syncCheckboxElements();
|
44
44
|
} else {
|
45
|
-
customElements.whenDefined("sd-3-
|
45
|
+
customElements.whenDefined("sd-3-24-0-checkbox").then(() => this.syncCheckboxes());
|
46
46
|
}
|
47
47
|
}
|
48
48
|
handleSizeChange() {
|
@@ -74,7 +74,7 @@ let SdCheckboxGroup = class extends SolidElement {
|
|
74
74
|
SdCheckboxGroup.styles = [
|
75
75
|
componentStyles,
|
76
76
|
SolidElement.styles,
|
77
|
-
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-
|
77
|
+
css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-24-0-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-24-0-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-24-0-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-24-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-24-0-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-24-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`
|
78
78
|
];
|
79
79
|
__decorateClass([
|
80
80
|
property({ reflect: true })
|
@@ -92,7 +92,7 @@ __decorateClass([
|
|
92
92
|
watch("invalid", { waitUntilFirstUpdate: true })
|
93
93
|
], SdCheckboxGroup.prototype, "handleInvalid", 1);
|
94
94
|
SdCheckboxGroup = __decorateClass([
|
95
|
-
customElement("sd-3-
|
95
|
+
customElement("sd-3-24-0-checkbox-group")
|
96
96
|
], SdCheckboxGroup);
|
97
97
|
export {
|
98
98
|
SdCheckboxGroup as default
|
@@ -9,9 +9,9 @@ import type SdOptgroup from '../optgroup/optgroup.js';
|
|
9
9
|
import type SdOption from '../option/option';
|
10
10
|
export default class SdCombobox extends SolidElement implements SolidFormControl {
|
11
11
|
static dependencies: {
|
12
|
-
'sd-3-
|
13
|
-
'sd-3-
|
14
|
-
'sd-3-
|
12
|
+
'sd-3-24-0-icon': typeof SdIcon;
|
13
|
+
'sd-3-24-0-popup': typeof SdPopup;
|
14
|
+
'sd-3-24-0-tag': typeof SdTag;
|
15
15
|
};
|
16
16
|
private readonly formControlController;
|
17
17
|
private readonly hasSlotController;
|
@@ -124,6 +124,6 @@ export default class SdCombobox extends SolidElement implements SolidFormControl
|
|
124
124
|
}
|
125
125
|
declare global {
|
126
126
|
interface HTMLElementTagNameMap {
|
127
|
-
'sd-3-
|
127
|
+
'sd-3-24-0-combobox': SdCombobox;
|
128
128
|
}
|
129
129
|
}
|
@@ -33,7 +33,7 @@ let SdCombobox = class extends SolidElement {
|
|
33
33
|
constructor() {
|
34
34
|
super(...arguments);
|
35
35
|
this.formControlController = new FormControlController(this, {
|
36
|
-
assumeInteractionOn: ["sd-blur", "sd-3-
|
36
|
+
assumeInteractionOn: ["sd-blur", "sd-3-24-0-input"]
|
37
37
|
});
|
38
38
|
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
39
39
|
this.localize = new LocalizeController(this);
|
@@ -73,11 +73,11 @@ let SdCombobox = class extends SolidElement {
|
|
73
73
|
return normalizedOption.includes(normalizedQuery) || normalizedOptionLabel.includes(normalizedQuery);
|
74
74
|
};
|
75
75
|
this.getTag = (option) => {
|
76
|
-
return html`<sd-3-
|
76
|
+
return html`<sd-3-24-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
77
77
|
base:tag__base,
|
78
78
|
content:tag__content,
|
79
79
|
removable-indicator:tag__removable-indicator,
|
80
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-3-
|
80
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagKeyDown(event, option)}" @sd-remove="${(event) => this.handleTagRemove(event, option)}">${option.getTextLabel()}</sd-3-24-0-tag>`;
|
81
81
|
};
|
82
82
|
this.handleDocumentFocusIn = (event) => {
|
83
83
|
const path = event.composedPath();
|
@@ -200,9 +200,9 @@ let SdCombobox = class extends SolidElement {
|
|
200
200
|
return html`${typeof optionHtml === "string" ? unsafeHTML(optionHtml) : optionHtml}`;
|
201
201
|
};
|
202
202
|
return this.filteredOptions.map((item) => {
|
203
|
-
if (item.tagName.toLowerCase() === "sd-3-
|
203
|
+
if (item.tagName.toLowerCase() === "sd-3-24-0-optgroup") {
|
204
204
|
Array.from(item.children).forEach((option) => {
|
205
|
-
if (option.tagName.toLowerCase() === "sd-3-
|
205
|
+
if (option.tagName.toLowerCase() === "sd-3-24-0-option") {
|
206
206
|
renderOption(option);
|
207
207
|
}
|
208
208
|
});
|
@@ -222,11 +222,11 @@ let SdCombobox = class extends SolidElement {
|
|
222
222
|
});
|
223
223
|
} else {
|
224
224
|
return [
|
225
|
-
html`<sd-3-
|
225
|
+
html`<sd-3-24-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
226
226
|
base:tag__base,
|
227
227
|
content:tag__content,
|
228
228
|
removable-indicator:tag__removable-indicator,
|
229
|
-
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-3-
|
229
|
+
" size="${this.size === "sm" ? "sm" : "lg"}" removable @keydown="${(event) => this.handleTagMaxOptionsKeyDown(event)}" @sd-remove="${(event) => this.handleTagRemove(event)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-3-24-0-tag>`
|
230
230
|
];
|
231
231
|
}
|
232
232
|
}
|
@@ -335,7 +335,7 @@ let SdCombobox = class extends SolidElement {
|
|
335
335
|
/* eslint-disable @typescript-eslint/no-floating-promises */
|
336
336
|
handleOptionClick(event) {
|
337
337
|
const target = event.target;
|
338
|
-
const option = target.closest("sd-3-
|
338
|
+
const option = target.closest("sd-3-24-0-option");
|
339
339
|
const oldValue = this.value;
|
340
340
|
if (option && !option.disabled) {
|
341
341
|
if (this.multiple) {
|
@@ -388,7 +388,7 @@ let SdCombobox = class extends SolidElement {
|
|
388
388
|
scrollIntoView(this.getCurrentOption(), this.listbox, "vertical", "auto");
|
389
389
|
}
|
390
390
|
getAllFilteredOptions() {
|
391
|
-
return [...this.filteredWrapper.querySelectorAll("sd-3-
|
391
|
+
return [...this.filteredWrapper.querySelectorAll("sd-3-24-0-option")];
|
392
392
|
}
|
393
393
|
getCurrentOption() {
|
394
394
|
return this.getAllFilteredOptions().find((option) => option.current);
|
@@ -512,7 +512,7 @@ let SdCombobox = class extends SolidElement {
|
|
512
512
|
const clonedOption = option.cloneNode(true);
|
513
513
|
clonedOption.current = clonedOption.value === ((_a = this.lastOption) == null ? void 0 : _a.value);
|
514
514
|
clonedOption.selected = option.selected;
|
515
|
-
const hasOptgroup = ((_b = option.parentElement) == null ? void 0 : _b.tagName.toLowerCase()) === "sd-3-
|
515
|
+
const hasOptgroup = ((_b = option.parentElement) == null ? void 0 : _b.tagName.toLowerCase()) === "sd-3-24-0-optgroup";
|
516
516
|
if (!hasOptgroup) {
|
517
517
|
return clonedOption;
|
518
518
|
}
|
@@ -542,7 +542,7 @@ let SdCombobox = class extends SolidElement {
|
|
542
542
|
handleMouseLeave() {
|
543
543
|
this.hasHover = false;
|
544
544
|
}
|
545
|
-
/** Receives incoming event detail from sd-3-
|
545
|
+
/** Receives incoming event detail from sd-3-24-0-popup and updates local state for conditional styling. */
|
546
546
|
handleCurrentPlacement(e) {
|
547
547
|
const incomingPlacement = e.detail;
|
548
548
|
if (incomingPlacement) {
|
@@ -554,7 +554,7 @@ let SdCombobox = class extends SolidElement {
|
|
554
554
|
}
|
555
555
|
handleUseTagsChange() {
|
556
556
|
const allOptions = this.getAllFilteredOptions();
|
557
|
-
if (customElements.get("sd-3-
|
557
|
+
if (customElements.get("sd-3-24-0-option")) {
|
558
558
|
allOptions.forEach((option) => {
|
559
559
|
option.checkbox = this.multiple;
|
560
560
|
});
|
@@ -681,8 +681,8 @@ let SdCombobox = class extends SolidElement {
|
|
681
681
|
}
|
682
682
|
/* eslint-disable no-param-reassign, @typescript-eslint/no-floating-promises */
|
683
683
|
async handleDefaultSlotChange() {
|
684
|
-
if (!customElements.get("sd-3-
|
685
|
-
customElements.whenDefined("sd-3-
|
684
|
+
if (!customElements.get("sd-3-24-0-option")) {
|
685
|
+
customElements.whenDefined("sd-3-24-0-option").then(() => this.handleDefaultSlotChange());
|
686
686
|
return;
|
687
687
|
}
|
688
688
|
const slottedOptions = this.getSlottedOptions();
|
@@ -691,10 +691,10 @@ let SdCombobox = class extends SolidElement {
|
|
691
691
|
if (this.multiple) {
|
692
692
|
option.checkbox = true;
|
693
693
|
}
|
694
|
-
option.id = option.id || `sd-3-
|
694
|
+
option.id = option.id || `sd-3-24-0-combobox-option-${index}`;
|
695
695
|
});
|
696
696
|
slottedOptgroups.forEach((optgroup, index) => {
|
697
|
-
optgroup.id = optgroup.id || `sd-3-
|
697
|
+
optgroup.id = optgroup.id || `sd-3-24-0-combobox-optgroup-${index}`;
|
698
698
|
});
|
699
699
|
await this.syncSelectedOptionsAndValue();
|
700
700
|
if (this.multiple) {
|
@@ -748,7 +748,7 @@ let SdCombobox = class extends SolidElement {
|
|
748
748
|
default: "border-neutral-800"
|
749
749
|
}[selectState],
|
750
750
|
this.open && (this.currentPlacement === "bottom" ? "rounded-bl-none rounded-br-none" : "rounded-tl-none rounded-tr-none")
|
751
|
-
)}"></div><sd-3-
|
751
|
+
)}"></div><sd-3-24-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${cx(
|
752
752
|
"inline-flex relative w-full",
|
753
753
|
this.currentPlacement === "bottom" ? "origin-top" : "origin-bottom"
|
754
754
|
)}" placement="${this.placement}" strategy="${this.hoist ? "fixed" : "absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
@@ -765,30 +765,30 @@ let SdCombobox = class extends SolidElement {
|
|
765
765
|
"appearance-none outline-none bg-transparent flex-auto min-w-0",
|
766
766
|
cursorStyles,
|
767
767
|
this.selectedTextLabel && !this.multiple ? "placeholder-black" : "placeholder-neutral-700"
|
768
|
-
)}" type="text" placeholder="${this.selectedTextLabel && !this.multiple ? this.selectedTextLabel : this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map((option) => option == null ? void 0 : option.getTextLabel()).join(", ")}</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-controls="control-value" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-3-
|
768
|
+
)}" type="text" placeholder="${this.selectedTextLabel && !this.multiple ? this.selectedTextLabel : this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map((option) => option == null ? void 0 : option.getTextLabel()).join(", ")}</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-controls="control-value" aria-hidden="true" @focus="${() => this.focus()}" @invalid="${this.handleInvalid}"> ${hasClearIcon ? html`<button part="clear-button" class="${cx("flex justify-center", iconMarginLeft)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-3-24-0-icon class="${cx("text-icon-fill-neutral-800", iconSize)}" name="closing-round" library="system"></sd-3-24-0-icon></slot></button>` : ""} ${this.showInvalidStyle ? html`<sd-3-24-0-icon part="invalid-icon" class="${cx(iconMarginLeft, iconSize, "text-error")}" library="system" name="risk"></sd-3-24-0-icon>` : ""} ${this.styleOnValid && this.showValidStyle ? html`<sd-3-24-0-icon part="valid-icon" class="${cx("flex-shrink-0 text-success", iconMarginLeft, iconSize)}" library="system" name="status-check"></sd-3-24-0-icon>` : ""}<slot name="right" part="right" class="${cx(
|
769
769
|
"inline-flex ml-2 leading-[0]",
|
770
770
|
this.disabled ? "text-neutral-500" : "text-primary",
|
771
771
|
iconSize
|
772
|
-
)}"><sd-3-
|
772
|
+
)}"><sd-3-24-0-icon class="${cx("transition-all", this.open ? "rotate-180" : "rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-3-24-0-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${cx(
|
773
773
|
"bg-white px-2 py-3 relative border-primary overflow-y-auto",
|
774
774
|
this.open && "shadow",
|
775
775
|
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"
|
776
|
-
)}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length === 0 ? html`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>` : this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-3-
|
776
|
+
)}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length === 0 ? html`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>` : this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-3-24-0-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!hasHelpText}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`;
|
777
777
|
}
|
778
778
|
/* eslint-enable @typescript-eslint/unbound-method */
|
779
779
|
};
|
780
780
|
SdCombobox.dependencies = {
|
781
|
-
"sd-3-
|
782
|
-
"sd-3-
|
783
|
-
"sd-3-
|
781
|
+
"sd-3-24-0-icon": SdIcon,
|
782
|
+
"sd-3-24-0-popup": SdPopup,
|
783
|
+
"sd-3-24-0-tag": SdTag
|
784
784
|
};
|
785
785
|
SdCombobox.styles = [
|
786
786
|
componentStyles,
|
787
787
|
SolidElement.styles,
|
788
|
-
css`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-3-
|
788
|
+
css`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-3-24-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-3-24-0-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-3-24-0-tag::part(content){max-width:var(--tag-max-width,15ch);overflow:hidden;white-space:nowrap;display:inline-block;text-overflow:ellipsis}sd-3-24-0-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-3-24-0-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}[part=filtered-listbox] sd-3-24-0-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;font-weight:700;color:inherit}`
|
789
789
|
];
|
790
790
|
__decorateClass([
|
791
|
-
query("sd-3-
|
791
|
+
query("sd-3-24-0-popup")
|
792
792
|
], SdCombobox.prototype, "popup", 2);
|
793
793
|
__decorateClass([
|
794
794
|
query('[part="combobox"]')
|
@@ -937,7 +937,7 @@ __decorateClass([
|
|
937
937
|
watch("open", { waitUntilFirstUpdate: true })
|
938
938
|
], SdCombobox.prototype, "handleOpenChange", 1);
|
939
939
|
SdCombobox = __decorateClass([
|
940
|
-
customElement("sd-3-
|
940
|
+
customElement("sd-3-24-0-combobox")
|
941
941
|
], SdCombobox);
|
942
942
|
setDefaultAnimation("combobox.show", {
|
943
943
|
keyframes: [
|
@@ -1,6 +1,6 @@
|
|
1
1
|
const getAssignedElementsForSlot = (slot) => Array.from(slot.assignedElements({ flatten: true }));
|
2
|
-
const getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-3-
|
3
|
-
const isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-3-
|
2
|
+
const getOptionOrNestedOptions = (item) => item.tagName.toLocaleLowerCase() === "sd-3-24-0-option" ? item : Array.from(item.querySelectorAll(":scope > sd-3-24-0-option"));
|
3
|
+
const isOptgroup = (item) => item.tagName.toLocaleLowerCase() === "sd-3-24-0-optgroup";
|
4
4
|
const getAllOptions = (items) => items.map(getOptionOrNestedOptions);
|
5
5
|
const filterOnlyOptgroups = (items) => items.filter(isOptgroup);
|
6
6
|
const normalizeString = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
@@ -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 py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",
|
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`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : 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`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-3-24-0-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-24-0-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-3-24-0-icon></sd-3-24-0-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-24-0-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-24-0-divider[orientation=horizontal]){display:block}:host(sd-3-24-0-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-24-0-divider")
|
47
47
|
], SdDivider);
|
48
48
|
export {
|
49
49
|
SdDivider as default
|
@@ -187,7 +187,7 @@ let SdDrawer = class extends SolidElement {
|
|
187
187
|
end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
|
188
188
|
start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
|
189
189
|
}[this.placement]
|
190
|
-
)}" 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-
|
190
|
+
)}" 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-24-0-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-3-24-0-icon label="${this.localize.term("close")}" name="close" library="system"></sd-3-24-0-icon></sd-3-24-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>`;
|
191
191
|
}
|
192
192
|
};
|
193
193
|
SdDrawer.styles = [
|
@@ -229,7 +229,7 @@ __decorateClass([
|
|
229
229
|
watch("contained", { waitUntilFirstUpdate: true })
|
230
230
|
], SdDrawer.prototype, "handleNoModalChange", 1);
|
231
231
|
SdDrawer = __decorateClass([
|
232
|
-
customElement("sd-3-
|
232
|
+
customElement("sd-3-24-0-drawer")
|
233
233
|
], SdDrawer);
|
234
234
|
setDefaultAnimation("drawer.showStart", {
|
235
235
|
keyframes: [
|
@@ -65,7 +65,7 @@ let SdDropdown = class extends SolidElement {
|
|
65
65
|
* within the slotted trigger. This could be the slotted element itself, a child of the slotted element,
|
66
66
|
* or an element within the slotted elements shadow root.
|
67
67
|
*
|
68
|
-
* e.g. the accessible trigger of an <sd-3-
|
68
|
+
* e.g. the accessible trigger of an <sd-3-24-0-button> is a <button> located inside its shadow root.
|
69
69
|
*
|
70
70
|
* To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
71
71
|
* */
|
@@ -75,11 +75,11 @@ let SdDropdown = class extends SolidElement {
|
|
75
75
|
let target = null;
|
76
76
|
if (accessibleTrigger) {
|
77
77
|
switch (accessibleTrigger.tagName.toLowerCase()) {
|
78
|
-
case "sd-3-
|
79
|
-
case "sd-3-
|
78
|
+
case "sd-3-24-0-button":
|
79
|
+
case "sd-3-24-0-icon-button":
|
80
80
|
target = accessibleTrigger.button;
|
81
81
|
break;
|
82
|
-
case "sd-3-
|
82
|
+
case "sd-3-24-0-navigation-item":
|
83
83
|
target = accessibleTrigger.button;
|
84
84
|
break;
|
85
85
|
default:
|
@@ -224,7 +224,7 @@ let SdDropdown = class extends SolidElement {
|
|
224
224
|
}
|
225
225
|
addOpenListeners() {
|
226
226
|
this.panel.addEventListener("sd-activate", this.handleMenuItemActivate);
|
227
|
-
this.panel.addEventListener("sd-3-
|
227
|
+
this.panel.addEventListener("sd-3-24-0-select", this.handlePanelSelect);
|
228
228
|
this.panel.addEventListener("keydown", this.handleKeyDown);
|
229
229
|
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
230
230
|
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
@@ -232,7 +232,7 @@ let SdDropdown = class extends SolidElement {
|
|
232
232
|
removeOpenListeners() {
|
233
233
|
if (this.panel) {
|
234
234
|
this.panel.removeEventListener("sd-activate", this.handleMenuItemActivate);
|
235
|
-
this.panel.removeEventListener("sd-3-
|
235
|
+
this.panel.removeEventListener("sd-3-24-0-select", this.handlePanelSelect);
|
236
236
|
this.panel.removeEventListener("keydown", this.handleKeyDown);
|
237
237
|
}
|
238
238
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
@@ -265,11 +265,11 @@ let SdDropdown = class extends SolidElement {
|
|
265
265
|
}
|
266
266
|
}
|
267
267
|
render() {
|
268
|
-
return html`<sd-3-
|
268
|
+
return html`<sd-3-24-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(
|
269
269
|
"shadow bg-white",
|
270
270
|
this.open ? "block pointer-events-auto" : "pointer-events-none",
|
271
271
|
this.rounded && "rounded-md"
|
272
|
-
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-3-
|
272
|
+
)}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-3-24-0-popup>`;
|
273
273
|
}
|
274
274
|
};
|
275
275
|
SdDropdown.styles = [
|
@@ -323,7 +323,7 @@ __decorateClass([
|
|
323
323
|
watch("open", { waitUntilFirstUpdate: true })
|
324
324
|
], SdDropdown.prototype, "handleOpenChange", 1);
|
325
325
|
SdDropdown = __decorateClass([
|
326
|
-
customElement("sd-3-
|
326
|
+
customElement("sd-3-24-0-dropdown")
|
327
327
|
], SdDropdown);
|
328
328
|
setDefaultAnimation("dropdown.show", {
|
329
329
|
keyframes: [
|
@@ -70,7 +70,7 @@ let SdExpandable = class extends SolidElement {
|
|
70
70
|
"sd-interactive sd-interactive--reset !h-full !justify-center !w-full !text-base !flex !items-center !underline !underline-offset-2 !toggle",
|
71
71
|
this.inverted && "sd-interactive--inverted",
|
72
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-
|
73
|
+
)}" @click="${this.onToggleClick}">${this.open ? html`<slot name="toggle-open"><sd-3-24-0-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-3-24-0-icon>${this.localize.term("showLess")}</slot>` : html`<slot name="toggle-closed"><sd-3-24-0-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-3-24-0-icon>${this.localize.term("showMore")}</slot>`}</button>`;
|
74
74
|
}
|
75
75
|
firstUpdated() {
|
76
76
|
this.cloneContentToLightDOM();
|
@@ -109,7 +109,7 @@ __decorateClass([
|
|
109
109
|
watch("open", { waitUntilFirstUpdate: true })
|
110
110
|
], SdExpandable.prototype, "onOpenChange", 1);
|
111
111
|
SdExpandable = __decorateClass([
|
112
|
-
customElement("sd-3-
|
112
|
+
customElement("sd-3-24-0-expandable")
|
113
113
|
], SdExpandable);
|
114
114
|
export {
|
115
115
|
SdExpandable as default
|
@@ -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-24-0-flipcard")
|
177
177
|
], SdFlipcard);
|
178
178
|
export {
|
179
179
|
SdFlipcard as default
|