@solid-design-system/components 1.21.0 → 1.21.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.
Files changed (71) hide show
  1. package/dist/custom-elements.json +1 -1
  2. package/dist/versioned-components/es/accordion-group.js +1 -1
  3. package/dist/versioned-components/es/accordion.js +1 -1
  4. package/dist/versioned-components/es/badge.js +1 -1
  5. package/dist/versioned-components/es/brandshape.js +1 -1
  6. package/dist/versioned-components/es/button.js +1 -1
  7. package/dist/versioned-components/es/carousel-item.js +1 -1
  8. package/dist/versioned-components/es/carousel.js +3 -3
  9. package/dist/versioned-components/es/divider.js +1 -1
  10. package/dist/versioned-components/es/drawer.js +1 -1
  11. package/dist/versioned-components/es/dropdown.js +1 -1
  12. package/dist/versioned-components/es/form.js +1 -1
  13. package/dist/versioned-components/es/icon.js +1 -1
  14. package/dist/versioned-components/es/include.js +1 -1
  15. package/dist/versioned-components/es/link.js +1 -1
  16. package/dist/versioned-components/es/navigation-item.js +1 -1
  17. package/dist/versioned-components/es/popup.js +1 -1
  18. package/dist/versioned-components/es/radio-group.js +1 -1
  19. package/dist/versioned-components/es/radio.js +1 -1
  20. package/dist/versioned-components/es/spinner.js +1 -1
  21. package/dist/versioned-components/es/tag.js +1 -1
  22. package/dist/versioned-components/es/teaser.js +1 -1
  23. package/dist/versioned-components/es/video.js +1 -1
  24. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  25. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  26. package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
  27. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  28. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  29. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  30. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  31. package/dist/versioned-package/components/badge/badge.js +1 -1
  32. package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
  33. package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
  34. package/dist/versioned-package/components/button/button.d.ts +1 -1
  35. package/dist/versioned-package/components/button/button.js +4 -4
  36. package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
  37. package/dist/versioned-package/components/carousel/carousel.js +6 -6
  38. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  39. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  40. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  41. package/dist/versioned-package/components/divider/divider.js +2 -2
  42. package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
  43. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  44. package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
  45. package/dist/versioned-package/components/dropdown/dropdown.js +6 -6
  46. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  47. package/dist/versioned-package/components/icon/icon.js +1 -1
  48. package/dist/versioned-package/components/include/include.d.ts +1 -1
  49. package/dist/versioned-package/components/include/include.js +1 -1
  50. package/dist/versioned-package/components/link/link.d.ts +1 -1
  51. package/dist/versioned-package/components/link/link.js +2 -2
  52. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  53. package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
  54. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  55. package/dist/versioned-package/components/popup/popup.js +1 -1
  56. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  57. package/dist/versioned-package/components/radio/radio.js +2 -2
  58. package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
  59. package/dist/versioned-package/components/radio-group/radio-group.js +12 -12
  60. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  61. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  62. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  63. package/dist/versioned-package/components/tag/tag.js +2 -2
  64. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  65. package/dist/versioned-package/components/video/video.d.ts +1 -1
  66. package/dist/versioned-package/components/video/video.js +2 -2
  67. package/dist/versioned-package/internal/form.js +1 -1
  68. package/dist/versioned-styles/solid-styles.css +1 -1
  69. package/dist/vscode.html-custom-data.json +21 -21
  70. package/dist/web-types.json +1 -2871
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- import{i as t,x as e}from"./lit-element.js";import{c as o}from"./register-custom-element.js";import{F as s,c as i,a as l,v as a}from"./form.js";import{H as r}from"./slot.js";import{n,S as d}from"./solid-element.js";import{r as h}from"./state.js";import{e as u}from"./query.js";import{w as c}from"./watch.js";import{c as p}from"./component.styles.js";import{t as m}from"./classix.js";const g=t`${p}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,b=(t,e,o,s)=>{for(var i,l=s>1?void 0:s?v(e,o):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(s?i(e,o,l):i(l))||l);return s&&l&&f(e,o,l),l};let y=class extends d{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=C(t.target);null==e||e.classList.add("sd-1-21-0-button-group__button--focus")}handleBlur(t){const e=C(t.target);null==e||e.classList.remove("sd-1-21-0-button-group__button--focus")}handleMouseOver(t){const e=C(t.target);null==e||e.classList.add("sd-1-21-0-button-group__button--hover")}handleMouseOut(t){const e=C(t.target);null==e||e.classList.remove("sd-1-21-0-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),s=C(e);null!==s&&(s.classList.add("sd-1-21-0-button-group__button"),s.classList.toggle("sd-1-21-0-button-group__button--first",0===o),s.classList.toggle("sd-1-21-0-button-group__button--inner",o>0&&o<t.length-1),s.classList.toggle("sd-1-21-0-button-group__button--last",o===t.length-1),s.classList.toggle("sd-1-21-0-button-group__button--radio","sd-1-21-0-radio-button"===s.tagName.toLowerCase()))}))}render(){return e`<slot part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};function C(t){const e="sd-1-21-0-button, sd-1-21-0-radio-button";return t.closest(e)??t.querySelector(e)}y.styles=g,b([u("slot")],y.prototype,"defaultSlot",2),b([h()],y.prototype,"disableRole",2),b([n()],y.prototype,"label",2),y=b([o("sd-1-21-0-button-group")],y);var x=Object.defineProperty,w=Object.getOwnPropertyDescriptor,_=(t,e,o,s)=>{for(var i,l=s>1?void 0:s?w(e,o):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(s?i(e,o,l):i(l))||l);return s&&l&&x(e,o,l),l};let R=class extends d{constructor(){super(...arguments),this.formControlController=new s(this),this.hasSlotController=new r(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.invalid=!1,this.errorText="",this.label="",this.name="option",this.value="",this.size="lg",this.form="",this.required=!1,this.orientation="vertical"}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?(this.invalid=!0,i):t?(this.invalid=!0,l):(this.invalid=!1,a)}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?(console.log("this.customValidityMessage",this.customValidityMessage),this.customValidityMessage):t?(console.log("this.validationInput.validationMessage",this.validationInput),this.validationInput.validationMessage):""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-1-21-0-radio, sd-1-21-0-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-1-21-0-radio, sd-1-21-0-radio-button"),o=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,o.forEach((t=>t.checked=t===e)),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),o=e.find((t=>t.checked))??e[0],s=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,i=this.value;let l=e.indexOf(o)+s;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}handleLabelClick(){const t=this.getAllRadios(),e=t.find((t=>t.checked))||t[0];e&&e.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncRadioElements(){var t,e;const o=this.getAllRadios();if(await Promise.all(o.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t.invalid=this.invalid}))),this.hasButtonGroup=o.some((t=>"sd-1-21-0-radio-button"===t.tagName.toLowerCase())),!o.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=o[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-1-21-0-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-1-21-0-radio")&&customElements.get("sd-1-21-0-radio-button")?this.syncRadioElements():(customElements.get("sd-1-21-0-radio")?this.syncRadioElements():customElements.whenDefined("sd-1-21-0-radio").then((()=>this.syncRadios())),customElements.get("sd-1-21-0-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-1-21-0-radio-button").then((()=>this.syncRadios())))}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value)),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){const t=this.required&&!this.value,e=""!==this.customValidityMessage;return!t&&!e||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const t=this.validity.valid;return this.errorText=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorText=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),o=this.hasSlotController.test("error-text"),s=!!this.label||!!t,i=!!this.errorText||!!o,l=e`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return e`<fieldset part="form-control" class="${m("form-control form-control--radio-group border-0 p-0 m-0",s&&"form-control--has-label",i&&"text-error",{sm:"text-sm",lg:"text-base"}[this.size])}" role="radiogroup" aria-labelledby="label" aria-errormessage="error-text"><label part="form-control-label" id="label" class="form-control__label mb-2 hidden p-0 font-bold leading-normal text-black" aria-hidden="${!s}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${m("form-control-input flex",this.invalid&&"form-control-input--invalid text-error",{vertical:"form-control-input--vertical flex-col",horizontal:"form-control-input--horizontal flex-row"}[this.orientation])}"><div class="sr-only"><div id="error-message" aria-live="assertive">${this.errorText}</div><label class="radio-group__validation"><input type="text" class="radio-group__validation-input" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${l}</div></fieldset>`}};R.dependencies={"sd-1-21-0-button-group":y},R.styles=[p,d.styles,t`:host{display:block}.form-control-input--vertical ::slotted(sd-1-21-0-radio){margin-bottom:8px;display:flex}.form-control-input--vertical ::slotted(sd-1-21-0-radio:last-of-type){margin-bottom:0}.form-control-input--horizontal ::slotted(sd-1-21-0-radio){margin-right:24px}.form-control-input--horizontal ::slotted(sd-1-21-0-radio:last-of-type){margin-right:0}.form-control--has-label .form-control__label{display:flex}:host([required]) .form-control--has-label .form-control__label::after{content:'*';margin-left:2px}`],_([u("slot:not([name])")],R.prototype,"defaultSlot",2),_([u(".radio-group__validation-input")],R.prototype,"validationInput",2),_([h()],R.prototype,"hasButtonGroup",2),_([h()],R.prototype,"defaultValue",2),_([h()],R.prototype,"invalid",2),_([h()],R.prototype,"errorText",2),_([n()],R.prototype,"label",2),_([n()],R.prototype,"name",2),_([n({reflect:!0})],R.prototype,"value",2),_([n({reflect:!0})],R.prototype,"size",2),_([n({reflect:!0})],R.prototype,"form",2),_([n({type:Boolean,reflect:!0})],R.prototype,"required",2),_([n({reflect:!0})],R.prototype,"orientation",2),_([c("size",{waitUntilFirstUpdate:!0})],R.prototype,"handleSizeChange",1),_([c("invalid",{waitUntilFirstUpdate:!0})],R.prototype,"handleInvalidChange",1),_([c("value")],R.prototype,"handleValueChange",1),R=_([o("sd-1-21-0-radio-group")],R);export{R as default};
1
+ import{i as t,x as e}from"./lit-element.js";import{c as o}from"./register-custom-element.js";import{F as s,c as i,a as l,v as a}from"./form.js";import{H as r}from"./slot.js";import{n,S as d}from"./solid-element.js";import{r as h}from"./state.js";import{e as u}from"./query.js";import{w as c}from"./watch.js";import{c as p}from"./component.styles.js";import{t as m}from"./classix.js";const g=t`${p}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,b=(t,e,o,s)=>{for(var i,l=s>1?void 0:s?v(e,o):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(s?i(e,o,l):i(l))||l);return s&&l&&f(e,o,l),l};let y=class extends d{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=C(t.target);null==e||e.classList.add("sd-1-21-1-button-group__button--focus")}handleBlur(t){const e=C(t.target);null==e||e.classList.remove("sd-1-21-1-button-group__button--focus")}handleMouseOver(t){const e=C(t.target);null==e||e.classList.add("sd-1-21-1-button-group__button--hover")}handleMouseOut(t){const e=C(t.target);null==e||e.classList.remove("sd-1-21-1-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),s=C(e);null!==s&&(s.classList.add("sd-1-21-1-button-group__button"),s.classList.toggle("sd-1-21-1-button-group__button--first",0===o),s.classList.toggle("sd-1-21-1-button-group__button--inner",o>0&&o<t.length-1),s.classList.toggle("sd-1-21-1-button-group__button--last",o===t.length-1),s.classList.toggle("sd-1-21-1-button-group__button--radio","sd-1-21-1-radio-button"===s.tagName.toLowerCase()))}))}render(){return e`<slot part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};function C(t){const e="sd-1-21-1-button, sd-1-21-1-radio-button";return t.closest(e)??t.querySelector(e)}y.styles=g,b([u("slot")],y.prototype,"defaultSlot",2),b([h()],y.prototype,"disableRole",2),b([n()],y.prototype,"label",2),y=b([o("sd-1-21-1-button-group")],y);var x=Object.defineProperty,w=Object.getOwnPropertyDescriptor,_=(t,e,o,s)=>{for(var i,l=s>1?void 0:s?w(e,o):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(s?i(e,o,l):i(l))||l);return s&&l&&x(e,o,l),l};let R=class extends d{constructor(){super(...arguments),this.formControlController=new s(this),this.hasSlotController=new r(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.invalid=!1,this.errorText="",this.label="",this.name="option",this.value="",this.size="lg",this.form="",this.required=!1,this.orientation="vertical"}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?(this.invalid=!0,i):t?(this.invalid=!0,l):(this.invalid=!1,a)}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?(console.log("this.customValidityMessage",this.customValidityMessage),this.customValidityMessage):t?(console.log("this.validationInput.validationMessage",this.validationInput),this.validationInput.validationMessage):""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-1-21-1-radio, sd-1-21-1-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-1-21-1-radio, sd-1-21-1-radio-button"),o=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,o.forEach((t=>t.checked=t===e)),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),o=e.find((t=>t.checked))??e[0],s=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,i=this.value;let l=e.indexOf(o)+s;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}handleLabelClick(){const t=this.getAllRadios(),e=t.find((t=>t.checked))||t[0];e&&e.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncRadioElements(){var t,e;const o=this.getAllRadios();if(await Promise.all(o.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t.invalid=this.invalid}))),this.hasButtonGroup=o.some((t=>"sd-1-21-1-radio-button"===t.tagName.toLowerCase())),!o.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=o[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-1-21-1-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-1-21-1-radio")&&customElements.get("sd-1-21-1-radio-button")?this.syncRadioElements():(customElements.get("sd-1-21-1-radio")?this.syncRadioElements():customElements.whenDefined("sd-1-21-1-radio").then((()=>this.syncRadios())),customElements.get("sd-1-21-1-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-1-21-1-radio-button").then((()=>this.syncRadios())))}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value)),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){const t=this.required&&!this.value,e=""!==this.customValidityMessage;return!t&&!e||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const t=this.validity.valid;return this.errorText=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorText=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),o=this.hasSlotController.test("error-text"),s=!!this.label||!!t,i=!!this.errorText||!!o,l=e`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return e`<fieldset part="form-control" class="${m("form-control form-control--radio-group border-0 p-0 m-0",s&&"form-control--has-label",i&&"text-error",{sm:"text-sm",lg:"text-base"}[this.size])}" role="radiogroup" aria-labelledby="label" aria-errormessage="error-text"><label part="form-control-label" id="label" class="form-control__label mb-2 hidden p-0 font-bold leading-normal text-black" aria-hidden="${!s}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${m("form-control-input flex",this.invalid&&"form-control-input--invalid text-error",{vertical:"form-control-input--vertical flex-col",horizontal:"form-control-input--horizontal flex-row"}[this.orientation])}"><div class="sr-only"><div id="error-message" aria-live="assertive">${this.errorText}</div><label class="radio-group__validation"><input type="text" class="radio-group__validation-input" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${l}</div></fieldset>`}};R.dependencies={"sd-1-21-1-button-group":y},R.styles=[p,d.styles,t`:host{display:block}.form-control-input--vertical ::slotted(sd-1-21-1-radio){margin-bottom:8px;display:flex}.form-control-input--vertical ::slotted(sd-1-21-1-radio:last-of-type){margin-bottom:0}.form-control-input--horizontal ::slotted(sd-1-21-1-radio){margin-right:24px}.form-control-input--horizontal ::slotted(sd-1-21-1-radio:last-of-type){margin-right:0}.form-control--has-label .form-control__label{display:flex}:host([required]) .form-control--has-label .form-control__label::after{content:'*';margin-left:2px}`],_([u("slot:not([name])")],R.prototype,"defaultSlot",2),_([u(".radio-group__validation-input")],R.prototype,"validationInput",2),_([h()],R.prototype,"hasButtonGroup",2),_([h()],R.prototype,"defaultValue",2),_([h()],R.prototype,"invalid",2),_([h()],R.prototype,"errorText",2),_([n()],R.prototype,"label",2),_([n()],R.prototype,"name",2),_([n({reflect:!0})],R.prototype,"value",2),_([n({reflect:!0})],R.prototype,"size",2),_([n({reflect:!0})],R.prototype,"form",2),_([n({type:Boolean,reflect:!0})],R.prototype,"required",2),_([n({reflect:!0})],R.prototype,"orientation",2),_([c("size",{waitUntilFirstUpdate:!0})],R.prototype,"handleSizeChange",1),_([c("invalid",{waitUntilFirstUpdate:!0})],R.prototype,"handleInvalidChange",1),_([c("value")],R.prototype,"handleValueChange",1),R=_([o("sd-1-21-1-radio-group")],R);export{R as default};
@@ -1 +1 @@
1
- import"./icon.js";import{x as e,i as t}from"./lit-element.js";import{c as s}from"./register-custom-element.js";import{S as i,n as r}from"./solid-element.js";import{r as o}from"./state.js";import{w as l}from"./watch.js";import{t as a}from"./classix.js";import"./solid-components2.js";import"./request.js";import"./request2.js";import"./component.styles.js";var n=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(e,t,s,i)=>{for(var r,o=i>1?void 0:i?h(t,s):t,l=e.length-1;l>=0;l--)(r=e[l])&&(o=(i?r(t,s,o):r(o))||o);return i&&o&&n(t,s,o),o};let c=class extends i{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.invalid=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return e`<span part="base" class="${a("sd-1-21-0-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.checked&&"radio--checked",this.disabled&&"hover:cursor-not-allowed",this.hasFocus&&"radio--focused",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${a("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",(this.disabled?"border-neutral-500":this.invalid&&"border-error hover:border-error-400 group-hover:border-error-400")||this.checked&&"border-accent hover:border-accent-550 group-hover:border-accent-550"||"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?e`<span part="checked" class="${a("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",(this.disabled?"bg-neutral-500":this.invalid&&"bg-error hover:bg-error-400 group-hover:bg-error-400")||this.checked&&"bg-accent hover:bg-accent-550 group-hover:bg-accent-550"||"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${a("label ml-2 select-none inline-block",(this.disabled?"text-neutral-500":this.invalid&&"text-error")||"text-black")}"></slot></span>`}};c.styles=[i.styles,t`:host{display:block}:host(:focus-visible){outline:0}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline:2px solid #00358e;outline-offset:2px}`],d([o()],c.prototype,"checked",2),d([o()],c.prototype,"hasFocus",2),d([r({reflect:!0})],c.prototype,"size",2),d([r({type:Boolean,reflect:!0})],c.prototype,"invalid",2),d([r({type:Boolean,reflect:!0})],c.prototype,"disabled",2),d([r()],c.prototype,"value",2),d([l("checked")],c.prototype,"handleCheckedChange",1),d([l("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",1),c=d([s("sd-1-21-0-radio")],c);export{c as default};
1
+ import"./icon.js";import{x as e,i as t}from"./lit-element.js";import{c as s}from"./register-custom-element.js";import{S as i,n as r}from"./solid-element.js";import{r as o}from"./state.js";import{w as l}from"./watch.js";import{t as a}from"./classix.js";import"./solid-components2.js";import"./request.js";import"./request2.js";import"./component.styles.js";var n=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(e,t,s,i)=>{for(var r,o=i>1?void 0:i?h(t,s):t,l=e.length-1;l>=0;l--)(r=e[l])&&(o=(i?r(t,s,o):r(o))||o);return i&&o&&n(t,s,o),o};let c=class extends i{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.invalid=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return e`<span part="base" class="${a("sd-1-21-1-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.checked&&"radio--checked",this.disabled&&"hover:cursor-not-allowed",this.hasFocus&&"radio--focused",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${a("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",(this.disabled?"border-neutral-500":this.invalid&&"border-error hover:border-error-400 group-hover:border-error-400")||this.checked&&"border-accent hover:border-accent-550 group-hover:border-accent-550"||"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?e`<span part="checked" class="${a("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",(this.disabled?"bg-neutral-500":this.invalid&&"bg-error hover:bg-error-400 group-hover:bg-error-400")||this.checked&&"bg-accent hover:bg-accent-550 group-hover:bg-accent-550"||"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${a("label ml-2 select-none inline-block",(this.disabled?"text-neutral-500":this.invalid&&"text-error")||"text-black")}"></slot></span>`}};c.styles=[i.styles,t`:host{display:block}:host(:focus-visible){outline:0}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline:2px solid #00358e;outline-offset:2px}`],d([o()],c.prototype,"checked",2),d([o()],c.prototype,"hasFocus",2),d([r({reflect:!0})],c.prototype,"size",2),d([r({type:Boolean,reflect:!0})],c.prototype,"invalid",2),d([r({type:Boolean,reflect:!0})],c.prototype,"disabled",2),d([r()],c.prototype,"value",2),d([l("checked")],c.prototype,"handleCheckedChange",1),d([l("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",1),c=d([s("sd-1-21-1-radio")],c);export{c as default};
@@ -1 +1 @@
1
- import{x as e,i as r}from"./lit-element.js";import{c as t}from"./register-custom-element.js";import{L as s}from"./solid-components2.js";import{S as l,n as o}from"./solid-element.js";import{t as i}from"./classix.js";var a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,c=(e,r,t,s)=>{for(var l,o=s>1?void 0:s?n(r,t):r,i=e.length-1;i>=0;i--)(l=e[i])&&(o=(s?l(r,t,o):l(o))||o);return s&&o&&a(r,t,o),o};let m=class extends l{constructor(){super(...arguments),this.color="currentColor",this.localize=new s(this)}render(){return e`<svg role="progressbar" viewBox="0 0 24 24" class="${i("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};m.styles=[l.styles,r`:host{display:inline-block;width:1em;height:1em}`],c([o({reflect:!0})],m.prototype,"color",2),m=c([t("sd-1-21-0-spinner")],m);export{m as default};
1
+ import{x as e,i as r}from"./lit-element.js";import{c as t}from"./register-custom-element.js";import{L as s}from"./solid-components2.js";import{S as l,n as o}from"./solid-element.js";import{t as i}from"./classix.js";var a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,c=(e,r,t,s)=>{for(var l,o=s>1?void 0:s?n(r,t):r,i=e.length-1;i>=0;i--)(l=e[i])&&(o=(s?l(r,t,o):l(o))||o);return s&&o&&a(r,t,o),o};let m=class extends l{constructor(){super(...arguments),this.color="currentColor",this.localize=new s(this)}render(){return e`<svg role="progressbar" viewBox="0 0 24 24" class="${i("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};m.styles=[l.styles,r`:host{display:inline-block;width:1em;height:1em}`],c([o({reflect:!0})],m.prototype,"color",2),m=c([t("sd-1-21-1-spinner")],m);export{m as default};
@@ -1 +1 @@
1
- import{i as e}from"./lit-element.js";import{c as t}from"./register-custom-element.js";import{s as r,n as s}from"./static.js";import{o}from"./if-defined.js";import{S as i,n as a}from"./solid-element.js";import{e as l}from"./query.js";import{t as d}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h=(e,t,r,s)=>{for(var o,i=s>1?void 0:s?p(t,r):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s?o(t,r,i):o(i))||i);return s&&i&&n(t,r,i),i};let b=class extends i{constructor(){super(...arguments),this.size="lg",this.selected=!1,this.removable=!1,this.disabled=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}click(){this.tag.click()}focus(e){this.tag.focus(e)}blur(){this.tag.blur()}render(){const e=this.isLink(),t=e?r`a`:r`button`;return s`<${t} part="base" type="${o(e?void 0:"button")}" href="${o(e?this.href:void 0)}" rel="${o(e&&this.target?"noreferrer noopener":void 0)}" target="${o(e?this.target:void 0)}" download="${o(e?this.download:void 0)}" ?disabled="${o(e?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${d("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!e&&"cursor-not-allowed")}"><slot part="content"></slot><slot part="removable-indicator" name="removable-indicator" class="${d(!this.removable&&"hidden",{lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-1-21-0-icon library="system" name="close" label="remove"></sd-1-21-0-icon></slot></${t}>`}};b.styles=[i.styles,e`:host{display:inline-block}`],h([l("a, button")],b.prototype,"tag",2),h([a({reflect:!0})],b.prototype,"size",2),h([a({type:Boolean,reflect:!0})],b.prototype,"selected",2),h([a({type:Boolean,reflect:!0})],b.prototype,"removable",2),h([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2),h([a()],b.prototype,"href",2),h([a()],b.prototype,"target",2),h([a()],b.prototype,"download",2),b=h([t("sd-1-21-0-tag")],b);export{b as default};
1
+ import{i as e}from"./lit-element.js";import{c as t}from"./register-custom-element.js";import{s as r,n as s}from"./static.js";import{o}from"./if-defined.js";import{S as i,n as a}from"./solid-element.js";import{e as l}from"./query.js";import{t as d}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h=(e,t,r,s)=>{for(var o,i=s>1?void 0:s?p(t,r):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s?o(t,r,i):o(i))||i);return s&&i&&n(t,r,i),i};let b=class extends i{constructor(){super(...arguments),this.size="lg",this.selected=!1,this.removable=!1,this.disabled=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}click(){this.tag.click()}focus(e){this.tag.focus(e)}blur(){this.tag.blur()}render(){const e=this.isLink(),t=e?r`a`:r`button`;return s`<${t} part="base" type="${o(e?void 0:"button")}" href="${o(e?this.href:void 0)}" rel="${o(e&&this.target?"noreferrer noopener":void 0)}" target="${o(e?this.target:void 0)}" download="${o(e?this.download:void 0)}" ?disabled="${o(e?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${d("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!e&&"cursor-not-allowed")}"><slot part="content"></slot><slot part="removable-indicator" name="removable-indicator" class="${d(!this.removable&&"hidden",{lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-1-21-1-icon library="system" name="close" label="remove"></sd-1-21-1-icon></slot></${t}>`}};b.styles=[i.styles,e`:host{display:inline-block}`],h([l("a, button")],b.prototype,"tag",2),h([a({reflect:!0})],b.prototype,"size",2),h([a({type:Boolean,reflect:!0})],b.prototype,"selected",2),h([a({type:Boolean,reflect:!0})],b.prototype,"removable",2),h([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2),h([a()],b.prototype,"href",2),h([a()],b.prototype,"target",2),h([a()],b.prototype,"download",2),b=h([t("sd-1-21-1-tag")],b);export{b as default};
@@ -1 +1 @@
1
- import{x as t,i as e}from"./lit-element.js";import{c as i}from"./register-custom-element.js";import{H as r}from"./slot.js";import{S as o,n as s}from"./solid-element.js";import{r as a}from"./state.js";import{e as n}from"./query.js";import{t as l}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,i,r)=>{for(var o,s=r>1?void 0:r?d(e,i):e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r?o(e,i,s):o(s))||s);return r&&s&&h(e,i,s),s};let c=class extends o{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new r(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),0===this.breakpoint?this._orientation="horizontal":9999===this.breakpoint?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateOrientation())),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){const e="white border-neutral-300"===this.variant||this.inset,i=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),t`<div class="${l("flex",{white:"bg-white","white border-neutral-300":"bg-white border border-neutral-300","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],"vertical"===this._orientation&&"flex-col","horizontal"===this._orientation&&"flex-row gap-8","horizontal"===this._orientation&&e&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${l(!e&&"vertical"===this._orientation&&"mb-4",!r&&"hidden")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(e?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${l("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&e&&"m-4")}" part="content"><div part="meta" class="${l("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${l("text-lg font-bold m-0","primary"===this.variant?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="main" class="${l(!i&&"hidden")}"><slot></slot></div></div></div>`}};c.styles=[o.styles,e`:host{display:block}::slotted(*){margin:0}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:0!important}`],p([s({reflect:!0})],c.prototype,"variant",2),p([s({reflect:!0,type:Number})],c.prototype,"breakpoint",2),p([s({type:Boolean,reflect:!0})],c.prototype,"inset",2),p([n('[part="base"]')],c.prototype,"teaser",2),p([a()],c.prototype,"_orientation",2),c=p([i("sd-1-21-0-teaser")],c);export{c as default};
1
+ import{x as t,i as e}from"./lit-element.js";import{c as i}from"./register-custom-element.js";import{H as r}from"./slot.js";import{S as o,n as s}from"./solid-element.js";import{r as a}from"./state.js";import{e as n}from"./query.js";import{t as l}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,i,r)=>{for(var o,s=r>1?void 0:r?d(e,i):e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r?o(e,i,s):o(s))||s);return r&&s&&h(e,i,s),s};let c=class extends o{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new r(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),0===this.breakpoint?this._orientation="horizontal":9999===this.breakpoint?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateOrientation())),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){const e="white border-neutral-300"===this.variant||this.inset,i=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),t`<div class="${l("flex",{white:"bg-white","white border-neutral-300":"bg-white border border-neutral-300","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],"vertical"===this._orientation&&"flex-col","horizontal"===this._orientation&&"flex-row gap-8","horizontal"===this._orientation&&e&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${l(!e&&"vertical"===this._orientation&&"mb-4",!r&&"hidden")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(e?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${l("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&e&&"m-4")}" part="content"><div part="meta" class="${l("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${l("text-lg font-bold m-0","primary"===this.variant?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="main" class="${l(!i&&"hidden")}"><slot></slot></div></div></div>`}};c.styles=[o.styles,e`:host{display:block}::slotted(*){margin:0}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:0!important}`],p([s({reflect:!0})],c.prototype,"variant",2),p([s({reflect:!0,type:Number})],c.prototype,"breakpoint",2),p([s({type:Boolean,reflect:!0})],c.prototype,"inset",2),p([n('[part="base"]')],c.prototype,"teaser",2),p([a()],c.prototype,"_orientation",2),c=p([i("sd-1-21-1-teaser")],c);export{c as default};
@@ -1 +1 @@
1
- import{x as t,i as e}from"./lit-element.js";import{c as s}from"./register-custom-element.js";import{H as o}from"./slot.js";import{S as i,n as l}from"./solid-element.js";import{e as a}from"./query.js";import{t as r}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h=(t,e,s,o)=>{for(var i,l=o>1?void 0:o?p(e,s):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(o?i(e,s,l):i(l))||l);return o&&l&&n(e,s,l),l};let d=class extends i{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new o(this,"[default]","play-icon","poster")}get poster(){const t=this.shadowRoot.querySelector("slot[name=poster]");return(null==t?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}play(){this.emit("sd-play"),this.playing=!0,this.fadeoutPoster()}handleKeydown(t){t instanceof KeyboardEvent&&("Enter"===t.key||" "===t.key)&&(this.play(),setTimeout((()=>{var t;null==(t=this.querySelector("video"))||t.focus()})))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.handleButtonResize())),this.updateComplete.then((()=>{this.resizeObserver.observe(this.hostEl)}))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return t`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${r(this.playing&&"pointer-events-none","w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${r(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition")}"><slot name="play-icon" part="play-icon" class="${r(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-1-21-0-icon id="default-play-icon" library="system" name="start"></sd-1-21-0-icon></slot></div></button> ${this.hasSlotController.test("poster")?t`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<div part="overlay" id="overlay" role="presentation" class="${r(this.overlay&&!this.playing?"opacity-100":"opacity-0","bg-[rgba(0,0,0,0.65)] w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition")}"></div><slot></slot></div>`}};d.styles=[i.styles,e`:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){transition:opacity .3s}::slotted([slot=poster]){position:absolute;left:0;top:0;width:100%;z-index:10}#default-play-icon,::slotted([slot=play-icon]){position:absolute;left:50%;top:50%;translate:-50% -50%}`],h([a("[part=base]")],d.prototype,"hostEl",2),h([l({type:Boolean,reflect:!0})],d.prototype,"playing",2),h([l({type:Boolean,reflect:!0})],d.prototype,"overlay",2),h([l({type:Boolean})],d.prototype,"isBelowBreakpoint",2),d=h([s("sd-1-21-0-video")],d);export{d as default};
1
+ import{x as t,i as e}from"./lit-element.js";import{c as s}from"./register-custom-element.js";import{H as o}from"./slot.js";import{S as i,n as l}from"./solid-element.js";import{e as a}from"./query.js";import{t as r}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h=(t,e,s,o)=>{for(var i,l=o>1?void 0:o?p(e,s):e,a=t.length-1;a>=0;a--)(i=t[a])&&(l=(o?i(e,s,l):i(l))||l);return o&&l&&n(e,s,l),l};let d=class extends i{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new o(this,"[default]","play-icon","poster")}get poster(){const t=this.shadowRoot.querySelector("slot[name=poster]");return(null==t?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}play(){this.emit("sd-play"),this.playing=!0,this.fadeoutPoster()}handleKeydown(t){t instanceof KeyboardEvent&&("Enter"===t.key||" "===t.key)&&(this.play(),setTimeout((()=>{var t;null==(t=this.querySelector("video"))||t.focus()})))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.handleButtonResize())),this.updateComplete.then((()=>{this.resizeObserver.observe(this.hostEl)}))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return t`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${r(this.playing&&"pointer-events-none","w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${r(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition")}"><slot name="play-icon" part="play-icon" class="${r(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-1-21-1-icon id="default-play-icon" library="system" name="start"></sd-1-21-1-icon></slot></div></button> ${this.hasSlotController.test("poster")?t`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<div part="overlay" id="overlay" role="presentation" class="${r(this.overlay&&!this.playing?"opacity-100":"opacity-0","bg-[rgba(0,0,0,0.65)] w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition")}"></div><slot></slot></div>`}};d.styles=[i.styles,e`:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){transition:opacity .3s}::slotted([slot=poster]){position:absolute;left:0;top:0;width:100%;z-index:10}#default-play-icon,::slotted([slot=play-icon]){position:absolute;left:50%;top:50%;translate:-50% -50%}`],h([a("[part=base]")],d.prototype,"hostEl",2),h([l({type:Boolean,reflect:!0})],d.prototype,"playing",2),h([l({type:Boolean,reflect:!0})],d.prototype,"overlay",2),h([l({type:Boolean})],d.prototype,"isBelowBreakpoint",2),d=h([s("sd-1-21-1-video")],d);export{d as default};
@@ -14,6 +14,6 @@ export default class SdButtonGroup extends SolidElement {
14
14
  }
15
15
  declare global {
16
16
  interface HTMLElementTagNameMap {
17
- 'sd-1-21-0-button-group': SdButtonGroup;
17
+ 'sd-1-21-1-button-group': SdButtonGroup;
18
18
  }
19
19
  }
@@ -22,19 +22,19 @@ let SdButtonGroup = class extends SolidElement {
22
22
  }
23
23
  handleFocus(event) {
24
24
  const button = findButton(event.target);
25
- button == null ? void 0 : button.classList.add("sd-1-21-0-button-group__button--focus");
25
+ button == null ? void 0 : button.classList.add("sd-1-21-1-button-group__button--focus");
26
26
  }
27
27
  handleBlur(event) {
28
28
  const button = findButton(event.target);
29
- button == null ? void 0 : button.classList.remove("sd-1-21-0-button-group__button--focus");
29
+ button == null ? void 0 : button.classList.remove("sd-1-21-1-button-group__button--focus");
30
30
  }
31
31
  handleMouseOver(event) {
32
32
  const button = findButton(event.target);
33
- button == null ? void 0 : button.classList.add("sd-1-21-0-button-group__button--hover");
33
+ button == null ? void 0 : button.classList.add("sd-1-21-1-button-group__button--hover");
34
34
  }
35
35
  handleMouseOut(event) {
36
36
  const button = findButton(event.target);
37
- button == null ? void 0 : button.classList.remove("sd-1-21-0-button-group__button--hover");
37
+ button == null ? void 0 : button.classList.remove("sd-1-21-1-button-group__button--hover");
38
38
  }
39
39
  handleSlotChange() {
40
40
  const slottedElements = [...this.defaultSlot.assignedElements({ flatten: true })];
@@ -42,11 +42,11 @@ let SdButtonGroup = class extends SolidElement {
42
42
  const index = slottedElements.indexOf(el);
43
43
  const button = findButton(el);
44
44
  if (button !== null) {
45
- button.classList.add("sd-1-21-0-button-group__button");
46
- button.classList.toggle("sd-1-21-0-button-group__button--first", index === 0);
47
- button.classList.toggle("sd-1-21-0-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
48
- button.classList.toggle("sd-1-21-0-button-group__button--last", index === slottedElements.length - 1);
49
- button.classList.toggle("sd-1-21-0-button-group__button--radio", button.tagName.toLowerCase() === "sd-1-21-0-radio-button");
45
+ button.classList.add("sd-1-21-1-button-group__button");
46
+ button.classList.toggle("sd-1-21-1-button-group__button--first", index === 0);
47
+ button.classList.toggle("sd-1-21-1-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
48
+ button.classList.toggle("sd-1-21-1-button-group__button--last", index === slottedElements.length - 1);
49
+ button.classList.toggle("sd-1-21-1-button-group__button--radio", button.tagName.toLowerCase() === "sd-1-21-1-radio-button");
50
50
  }
51
51
  });
52
52
  }
@@ -65,10 +65,10 @@ __decorateClass([
65
65
  property()
66
66
  ], SdButtonGroup.prototype, "label", 2);
67
67
  SdButtonGroup = __decorateClass([
68
- customElement("sd-1-21-0-button-group")
68
+ customElement("sd-1-21-1-button-group")
69
69
  ], SdButtonGroup);
70
70
  function findButton(el) {
71
- const selector = "sd-1-21-0-button, sd-1-21-0-radio-button";
71
+ const selector = "sd-1-21-1-button, sd-1-21-1-radio-button";
72
72
  return el.closest(selector) ?? el.querySelector(selector);
73
73
  }
74
74
  export {
@@ -18,6 +18,6 @@ export default class SdAccordion extends SolidElement {
18
18
  }
19
19
  declare global {
20
20
  interface HTMLElementTagNameMap {
21
- 'sd-1-21-0-accordion': SdAccordion;
21
+ 'sd-1-21-1-accordion': SdAccordion;
22
22
  }
23
23
  }
@@ -106,7 +106,7 @@ let SdAccordion = class extends SolidElement {
106
106
  )}" role="button" aria-expanded="${this.open ? "true" : "false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
107
107
  "flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
108
108
  this.open && "rotate-180"
109
- )}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-1-21-0-icon library="system" name="chevron-down"></sd-1-21-0-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-1-21-0-icon library="system" name="chevron-down"></sd-1-21-0-icon></slot></span></header><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></div>`;
109
+ )}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-1-21-1-icon library="system" name="chevron-down"></sd-1-21-1-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-1-21-1-icon library="system" name="chevron-down"></sd-1-21-1-icon></slot></span></header><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></div>`;
110
110
  }
111
111
  };
112
112
  SdAccordion.styles = [
@@ -132,7 +132,7 @@ __decorateClass([
132
132
  watch("open", { waitUntilFirstUpdate: true })
133
133
  ], SdAccordion.prototype, "handleOpenChange", 1);
134
134
  SdAccordion = __decorateClass([
135
- customElement("sd-1-21-0-accordion")
135
+ customElement("sd-1-21-1-accordion")
136
136
  ], SdAccordion);
137
137
  setDefaultAnimation("accordion.show", {
138
138
  keyframes: [
@@ -11,6 +11,6 @@ export default class SdAccordionGroup extends SolidElement {
11
11
  }
12
12
  declare global {
13
13
  interface HTMLElementTagNameMap {
14
- 'sd-1-21-0-accordion-group': SdAccordionGroup;
14
+ 'sd-1-21-1-accordion-group': SdAccordionGroup;
15
15
  }
16
16
  }
@@ -48,16 +48,16 @@ let SdAccordionGroup = class extends SolidElement {
48
48
  SdAccordionGroup.styles = [
49
49
  componentStyles,
50
50
  SolidElement.styles,
51
- css`:host{display:block}::slotted(sd-1-21-0-accordion:not(:first-of-type)){margin-top:-1px}`
51
+ css`:host{display:block}::slotted(sd-1-21-1-accordion:not(:first-of-type)){margin-top:-1px}`
52
52
  ];
53
53
  __decorateClass([
54
- queryAssignedElements({ selector: "sd-1-21-0-accordion" })
54
+ queryAssignedElements({ selector: "sd-1-21-1-accordion" })
55
55
  ], SdAccordionGroup.prototype, "_accordionsInDefaultSlot", 2);
56
56
  __decorateClass([
57
57
  property({ attribute: "close-others", type: Boolean })
58
58
  ], SdAccordionGroup.prototype, "closeOthers", 2);
59
59
  SdAccordionGroup = __decorateClass([
60
- customElement("sd-1-21-0-accordion-group")
60
+ customElement("sd-1-21-1-accordion-group")
61
61
  ], SdAccordionGroup);
62
62
  export {
63
63
  SdAccordionGroup as default
@@ -8,6 +8,6 @@ export default class SdBadge extends SolidElement {
8
8
  }
9
9
  declare global {
10
10
  interface HTMLElementTagNameMap {
11
- 'sd-1-21-0-badge': SdBadge;
11
+ 'sd-1-21-1-badge': SdBadge;
12
12
  }
13
13
  }
@@ -53,7 +53,7 @@ __decorateClass([
53
53
  property({ type: Boolean, reflect: true })
54
54
  ], SdBadge.prototype, "inverted", 2);
55
55
  SdBadge = __decorateClass([
56
- customElement("sd-1-21-0-badge")
56
+ customElement("sd-1-21-1-badge")
57
57
  ], SdBadge);
58
58
  export {
59
59
  SdBadge as default
@@ -22,6 +22,6 @@ export default class SdBrandshape extends SolidElement {
22
22
  }
23
23
  declare global {
24
24
  interface HTMLElementTagNameMap {
25
- 'sd-1-21-0-brandshape': SdBrandshape;
25
+ 'sd-1-21-1-brandshape': SdBrandshape;
26
26
  }
27
27
  }
@@ -123,7 +123,7 @@ __decorateClass([
123
123
  state()
124
124
  ], SdBrandshape.prototype, "componentBreakpoint", 2);
125
125
  SdBrandshape = __decorateClass([
126
- customElement("sd-1-21-0-brandshape")
126
+ customElement("sd-1-21-1-brandshape")
127
127
  ], SdBrandshape);
128
128
  export {
129
129
  SdBrandshape as default
@@ -47,6 +47,6 @@ export default class SdButton extends SolidElement implements SolidFormControl {
47
47
  }
48
48
  declare global {
49
49
  interface HTMLElementTagNameMap {
50
- 'sd-1-21-0-button': SdButton;
50
+ 'sd-1-21-1-button': SdButton;
51
51
  }
52
52
  }
@@ -213,19 +213,19 @@ let SdButton = class extends SolidElement {
213
213
  md: "ml-2",
214
214
  lg: "ml-2"
215
215
  }[this.size]
216
- )}"></slot>${this.loading ? html`<sd-1-21-0-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-1-21-0-spinner>` : ""}</${tag}>`;
216
+ )}"></slot>${this.loading ? html`<sd-1-21-1-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-1-21-1-spinner>` : ""}</${tag}>`;
217
217
  }
218
218
  };
219
219
  SdButton.styles = [
220
220
  componentStyles,
221
221
  SolidElement.styles,
222
- css`:host{display:inline-block;position:relative;width:auto;cursor:pointer}sd-1-21-0-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-1-21-0-badge){position:absolute;top:0;right:0;translate:50% -50%;pointer-events:none}::slotted(sd-1-21-0-icon),sd-1-21-0-spinner{font-size:calc(var(--tw-varspacing)/ 2)}`
222
+ css`:host{display:inline-block;position:relative;width:auto;cursor:pointer}sd-1-21-1-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-1-21-1-badge){position:absolute;top:0;right:0;translate:50% -50%;pointer-events:none}::slotted(sd-1-21-1-icon),sd-1-21-1-spinner{font-size:calc(var(--tw-varspacing)/ 2)}`
223
223
  ];
224
224
  __decorateClass([
225
225
  query("a, button")
226
226
  ], SdButton.prototype, "button", 2);
227
227
  __decorateClass([
228
- queryAssignedElements({ selector: "sd-1-21-0-icon" })
228
+ queryAssignedElements({ selector: "sd-1-21-1-icon" })
229
229
  ], SdButton.prototype, "_iconsInDefaultSlot", 2);
230
230
  __decorateClass([
231
231
  state()
@@ -288,7 +288,7 @@ __decorateClass([
288
288
  watch("disabled", { waitUntilFirstUpdate: true })
289
289
  ], SdButton.prototype, "handleDisabledChange", 1);
290
290
  SdButton = __decorateClass([
291
- customElement("sd-1-21-0-button")
291
+ customElement("sd-1-21-1-button")
292
292
  ], SdButton);
293
293
  export {
294
294
  SdButton as default
@@ -41,6 +41,6 @@ export default class SdCarousel extends SolidElement {
41
41
  }
42
42
  declare global {
43
43
  interface HTMLElementTagNameMap {
44
- 'sd-1-21-0-carousel': SdCarousel;
44
+ 'sd-1-21-1-carousel': SdCarousel;
45
45
  }
46
46
  }
@@ -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-1-21-0-carousel-item");
42
+ this.slides = this.getElementsByTagName("sd-1-21-1-carousel-item");
43
43
  this.intersectionObserverEntries = /* @__PURE__ */ new Map();
44
44
  this.localize = new LocalizeController(this);
45
45
  this.handleSlotChange = (mutations) => {
@@ -276,7 +276,7 @@ let SdCarousel = class extends SolidElement {
276
276
  "!mr-6 !rounded-sm sd-interactive",
277
277
  !prevEnabled && "sd-interactive--disabled",
278
278
  this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset"
279
- )}" 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-1-21-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-1-21-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) => {
279
+ )}" 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-1-21-1-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-1-21-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) => {
280
280
  const isActive = index === currentPage;
281
281
  return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
282
282
  "carousel__pagination-item",
@@ -296,18 +296,18 @@ let SdCarousel = class extends SolidElement {
296
296
  )}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @click="${nextEnabled ? () => {
297
297
  console.log("click-next");
298
298
  this.next();
299
- } : null}"><slot name="next-icon"><sd-1-21-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-1-21-0-icon></slot></button></div><button class="${cx(
299
+ } : null}"><slot name="next-icon"><sd-1-21-1-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-1-21-1-icon></slot></button></div><button class="${cx(
300
300
  "ml-6 !rounded-sm",
301
301
  "!absolute !right-0 sd-interactive",
302
302
  this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
303
303
  !this.autoplay && "!hidden"
304
- )}" part="autoplay-controls" @click="${() => this.pausedAutoplay = !this.pausedAutoplay}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-1-21-0-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-1-21-0-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-1-21-0-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-1-21-0-icon></slot></button></div></div>`;
304
+ )}" part="autoplay-controls" @click="${() => this.pausedAutoplay = !this.pausedAutoplay}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-1-21-1-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-1-21-1-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-1-21-1-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-1-21-1-icon></slot></button></div></div>`;
305
305
  }
306
306
  };
307
307
  SdCarousel.styles = [
308
308
  SolidElement.styles,
309
309
  unsafeCSS(InteractiveStyles),
310
- css`${componentStyles}: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);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__slides--dragging,.carousel__slides--dropping{scroll-snap-type:unset}.carousel__slides::-webkit-scrollbar{display:none}.carousel__navigation{grid-area:navigation}sd-1-21-0-button::part(label){display:flex;flex:1 1 auto;align-items:center;pointer-events:none}`
310
+ css`${componentStyles}: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);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__slides--dragging,.carousel__slides--dropping{scroll-snap-type:unset}.carousel__slides::-webkit-scrollbar{display:none}.carousel__navigation{grid-area:navigation}sd-1-21-1-button::part(label){display:flex;flex:1 1 auto;align-items:center;pointer-events:none}`
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-1-21-0-carousel")
362
+ customElement("sd-1-21-1-carousel")
363
363
  ], SdCarousel);
364
364
  export {
365
365
  SdCarousel as default
@@ -7,6 +7,6 @@ export default class SdCarouselItem extends SolidElement {
7
7
  }
8
8
  declare global {
9
9
  interface HTMLElementTagNameMap {
10
- 'sd-1-21-0-carousel-item': SdCarouselItem;
10
+ 'sd-1-21-1-carousel-item': SdCarouselItem;
11
11
  }
12
12
  }
@@ -30,7 +30,7 @@ SdCarouselItem.styles = [
30
30
  css`${componentStyles}:host{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always}::slotted(img){width:100%;height:100%;object-fit:cover}`
31
31
  ];
32
32
  SdCarouselItem = __decorateClass([
33
- customElement("sd-1-21-0-carousel-item")
33
+ customElement("sd-1-21-1-carousel-item")
34
34
  ], SdCarouselItem);
35
35
  export {
36
36
  SdCarouselItem as default
@@ -8,6 +8,6 @@ export default class SdDivider extends SolidElement {
8
8
  }
9
9
  declare global {
10
10
  interface HTMLElementTagNameMap {
11
- 'sd-1-21-0-divider': SdDivider;
11
+ 'sd-1-21-1-divider': SdDivider;
12
12
  }
13
13
  }
@@ -35,7 +35,7 @@ let SdDivider = class extends SolidElement {
35
35
  SdDivider.styles = [
36
36
  componentStyles,
37
37
  SolidElement.styles,
38
- css`:host{margin:0}:host(sd-1-21-0-divider[orientation=horizontal]){display:block}:host(sd-1-21-0-divider[orientation=vertical]){display:inline-block}`
38
+ css`:host{margin:0}:host(sd-1-21-1-divider[orientation=horizontal]){display:block}:host(sd-1-21-1-divider[orientation=vertical]){display:inline-block}`
39
39
  ];
40
40
  __decorateClass([
41
41
  property({ reflect: true })
@@ -44,7 +44,7 @@ __decorateClass([
44
44
  property({ type: Boolean, reflect: true })
45
45
  ], SdDivider.prototype, "inverted", 2);
46
46
  SdDivider = __decorateClass([
47
- customElement("sd-1-21-0-divider")
47
+ customElement("sd-1-21-1-divider")
48
48
  ], SdDivider);
49
49
  export {
50
50
  SdDivider as default
@@ -29,6 +29,6 @@ export default class SdDrawer extends SolidElement {
29
29
  }
30
30
  declare global {
31
31
  interface HTMLElementTagNameMap {
32
- 'sd-1-21-0-drawer': SdDrawer;
32
+ 'sd-1-21-1-drawer': SdDrawer;
33
33
  }
34
34
  }
@@ -183,7 +183,7 @@ let SdDrawer = class extends SolidElement {
183
183
  end: "top-0 end-0 bottom-auto start-auto w-[--width] h-full",
184
184
  start: "top-0 end-auto bottom-auto start-0 w-[--width] h-full"
185
185
  }[this.placement]
186
- )}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.label}" aria-labelledby="${ifDefined(!this.noHeader ? "title" : void 0)}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-1-21-0-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-1-21-0-icon name="close" library="system"></sd-1-21-0-icon></sd-1-21-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>`;
186
+ )}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.label}" aria-labelledby="${ifDefined(!this.noHeader ? "title" : void 0)}" tabindex="0">${!this.noHeader ? html`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-1-21-1-button variant="tertiary" size="lg" part="close-button" @click="${() => this.requestClose("close-button")}"><sd-1-21-1-icon name="close" library="system"></sd-1-21-1-icon></sd-1-21-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>`;
187
187
  }
188
188
  };
189
189
  SdDrawer.styles = [
@@ -221,7 +221,7 @@ __decorateClass([
221
221
  watch("contained", { waitUntilFirstUpdate: true })
222
222
  ], SdDrawer.prototype, "handleNoModalChange", 1);
223
223
  SdDrawer = __decorateClass([
224
- customElement("sd-1-21-0-drawer")
224
+ customElement("sd-1-21-1-drawer")
225
225
  ], SdDrawer);
226
226
  setDefaultAnimation("drawer.showStart", {
227
227
  keyframes: [
@@ -44,6 +44,6 @@ export default class SdDropdown extends SolidElement {
44
44
  }
45
45
  declare global {
46
46
  interface HTMLElementTagNameMap {
47
- 'sd-1-21-0-dropdown': SdDropdown;
47
+ 'sd-1-21-1-dropdown': SdDropdown;
48
48
  }
49
49
  }
@@ -170,7 +170,7 @@ let SdDropdown = class extends SolidElement {
170
170
  // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,
171
171
  // a child of the slotted element, or an element in the slotted element's shadow root.
172
172
  //
173
- // For example, the accessible trigger of an <sd-1-21-0-button> is a <button> located inside its shadow root.
173
+ // For example, the accessible trigger of an <sd-1-21-1-button> is a <button> located inside its shadow root.
174
174
  //
175
175
  // To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
176
176
  //
@@ -180,8 +180,8 @@ let SdDropdown = class extends SolidElement {
180
180
  let target;
181
181
  if (accessibleTrigger) {
182
182
  switch (accessibleTrigger.tagName.toLowerCase()) {
183
- case "sd-1-21-0-button":
184
- case "sd-1-21-0-icon-button":
183
+ case "sd-1-21-1-button":
184
+ case "sd-1-21-1-icon-button":
185
185
  target = accessibleTrigger.button;
186
186
  break;
187
187
  default:
@@ -257,11 +257,11 @@ let SdDropdown = class extends SolidElement {
257
257
  }
258
258
  }
259
259
  render() {
260
- return html`<sd-1-21-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(
260
+ return html`<sd-1-21-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(
261
261
  "shadow bg-white",
262
262
  this.open ? "block pointer-events-auto" : "pointer-events-none",
263
263
  this.rounded && "rounded-md"
264
- )}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-1-21-0-popup>`;
264
+ )}" aria-hidden="${this.open ? "false" : "true"}" aria-labelledby="dropdown"></slot></sd-1-21-1-popup>`;
265
265
  }
266
266
  };
267
267
  SdDropdown.styles = [
@@ -315,7 +315,7 @@ __decorateClass([
315
315
  watch("open", { waitUntilFirstUpdate: true })
316
316
  ], SdDropdown.prototype, "handleOpenChange", 1);
317
317
  SdDropdown = __decorateClass([
318
- customElement("sd-1-21-0-dropdown")
318
+ customElement("sd-1-21-1-dropdown")
319
319
  ], SdDropdown);
320
320
  setDefaultAnimation("dropdown.show", {
321
321
  keyframes: [
@@ -17,6 +17,6 @@ export default class SdIcon extends SolidElement {
17
17
  }
18
18
  declare global {
19
19
  interface HTMLElementTagNameMap {
20
- 'sd-1-21-0-icon': SdIcon;
20
+ 'sd-1-21-1-icon': SdIcon;
21
21
  }
22
22
  }
@@ -123,7 +123,7 @@ __decorateClass([
123
123
  watch(["name", "src", "library"])
124
124
  ], SdIcon.prototype, "setIcon", 1);
125
125
  SdIcon = __decorateClass([
126
- customElement("sd-1-21-0-icon")
126
+ customElement("sd-1-21-1-icon")
127
127
  ], SdIcon);
128
128
  export {
129
129
  SdIcon as default
@@ -11,6 +11,6 @@ export default class SdInclude extends SolidElement {
11
11
  }
12
12
  declare global {
13
13
  interface HTMLElementTagNameMap {
14
- 'sd-1-21-0-include': SdInclude;
14
+ 'sd-1-21-1-include': SdInclude;
15
15
  }
16
16
  }
@@ -66,7 +66,7 @@ __decorateClass([
66
66
  watch("src")
67
67
  ], SdInclude.prototype, "handleSrcChange", 1);
68
68
  SdInclude = __decorateClass([
69
- customElement("sd-1-21-0-include")
69
+ customElement("sd-1-21-1-include")
70
70
  ], SdInclude);
71
71
  export {
72
72
  SdInclude as default