@solid-design-system/components 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/components/es/option.js +1 -1
  2. package/dist/components/es/solid-components2.js +1 -1
  3. package/dist/components/umd/solid-components.js +2 -2
  4. package/dist/custom-elements.json +1 -1
  5. package/dist/package/components/accordion/accordion.d.ts +2 -1
  6. package/dist/package/components/carousel/carousel.d.ts +2 -1
  7. package/dist/package/components/dialog/dialog.d.ts +2 -1
  8. package/dist/package/components/drawer/drawer.d.ts +2 -1
  9. package/dist/package/components/dropdown/dropdown.d.ts +2 -1
  10. package/dist/package/components/input/input.d.ts +2 -1
  11. package/dist/package/components/notification/notification.d.ts +2 -1
  12. package/dist/package/components/option/option.d.ts +0 -1
  13. package/dist/package/components/option/option.js +0 -2
  14. package/dist/package/components/select/select.d.ts +2 -1
  15. package/dist/package/components/spinner/spinner.d.ts +2 -1
  16. package/dist/package/components/tab-group/tab-group.d.ts +2 -1
  17. package/dist/package/components/tooltip/tooltip.d.ts +2 -1
  18. package/dist/package/utilities/localize.d.ts +10 -0
  19. package/dist/package/utilities/localize.js +45 -0
  20. package/dist/versioned-components/es/accordion-group.js +1 -1
  21. package/dist/versioned-components/es/accordion.js +1 -1
  22. package/dist/versioned-components/es/badge.js +1 -1
  23. package/dist/versioned-components/es/brandshape.js +1 -1
  24. package/dist/versioned-components/es/button.js +1 -1
  25. package/dist/versioned-components/es/carousel-item.js +1 -1
  26. package/dist/versioned-components/es/carousel.js +3 -3
  27. package/dist/versioned-components/es/checkbox-group.js +1 -1
  28. package/dist/versioned-components/es/checkbox.js +1 -1
  29. package/dist/versioned-components/es/dialog.js +1 -1
  30. package/dist/versioned-components/es/divider.js +1 -1
  31. package/dist/versioned-components/es/drawer.js +1 -1
  32. package/dist/versioned-components/es/dropdown.js +1 -1
  33. package/dist/versioned-components/es/form.js +1 -1
  34. package/dist/versioned-components/es/header.js +1 -1
  35. package/dist/versioned-components/es/icon.js +1 -1
  36. package/dist/versioned-components/es/include.js +1 -1
  37. package/dist/versioned-components/es/input.js +1 -1
  38. package/dist/versioned-components/es/link.js +1 -1
  39. package/dist/versioned-components/es/map-marker.js +1 -1
  40. package/dist/versioned-components/es/navigation-item.js +1 -1
  41. package/dist/versioned-components/es/notification.js +1 -1
  42. package/dist/versioned-components/es/option.js +1 -1
  43. package/dist/versioned-components/es/popup.js +1 -1
  44. package/dist/versioned-components/es/radio-button.js +1 -1
  45. package/dist/versioned-components/es/radio-group.js +1 -1
  46. package/dist/versioned-components/es/radio.js +1 -1
  47. package/dist/versioned-components/es/scrollable.js +1 -1
  48. package/dist/versioned-components/es/select.js +3 -3
  49. package/dist/versioned-components/es/solid-components2.js +1 -1
  50. package/dist/versioned-components/es/spinner.js +1 -1
  51. package/dist/versioned-components/es/step-group.js +1 -1
  52. package/dist/versioned-components/es/step.js +1 -1
  53. package/dist/versioned-components/es/switch.js +1 -1
  54. package/dist/versioned-components/es/tab-group.js +1 -1
  55. package/dist/versioned-components/es/tab-panel.js +1 -1
  56. package/dist/versioned-components/es/tab.js +1 -1
  57. package/dist/versioned-components/es/tag.js +1 -1
  58. package/dist/versioned-components/es/teaser-media.js +1 -1
  59. package/dist/versioned-components/es/teaser.js +1 -1
  60. package/dist/versioned-components/es/textarea.js +1 -1
  61. package/dist/versioned-components/es/tooltip.js +2 -2
  62. package/dist/versioned-components/es/video.js +1 -1
  63. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  64. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  65. package/dist/versioned-package/components/accordion/accordion.d.ts +3 -2
  66. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  67. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  68. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  69. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  70. package/dist/versioned-package/components/badge/badge.js +1 -1
  71. package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
  72. package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
  73. package/dist/versioned-package/components/button/button.d.ts +1 -1
  74. package/dist/versioned-package/components/button/button.js +4 -4
  75. package/dist/versioned-package/components/carousel/carousel.d.ts +3 -2
  76. package/dist/versioned-package/components/carousel/carousel.js +6 -6
  77. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  78. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  79. package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
  80. package/dist/versioned-package/components/checkbox/checkbox.js +3 -3
  81. package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
  82. package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
  83. package/dist/versioned-package/components/dialog/dialog.d.ts +3 -2
  84. package/dist/versioned-package/components/dialog/dialog.js +2 -2
  85. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  86. package/dist/versioned-package/components/divider/divider.js +2 -2
  87. package/dist/versioned-package/components/drawer/drawer.d.ts +3 -2
  88. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  89. package/dist/versioned-package/components/dropdown/dropdown.d.ts +3 -2
  90. package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
  91. package/dist/versioned-package/components/header/header.d.ts +1 -1
  92. package/dist/versioned-package/components/header/header.js +4 -4
  93. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  94. package/dist/versioned-package/components/icon/icon.js +1 -1
  95. package/dist/versioned-package/components/include/include.d.ts +1 -1
  96. package/dist/versioned-package/components/include/include.js +1 -1
  97. package/dist/versioned-package/components/input/input.d.ts +3 -2
  98. package/dist/versioned-package/components/input/input.js +2 -2
  99. package/dist/versioned-package/components/link/link.d.ts +1 -1
  100. package/dist/versioned-package/components/link/link.js +2 -2
  101. package/dist/versioned-package/components/map-marker/map-marker.d.ts +1 -1
  102. package/dist/versioned-package/components/map-marker/map-marker.js +1 -1
  103. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  104. package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
  105. package/dist/versioned-package/components/notification/notification.d.ts +3 -2
  106. package/dist/versioned-package/components/notification/notification.js +5 -5
  107. package/dist/versioned-package/components/option/option.d.ts +1 -2
  108. package/dist/versioned-package/components/option/option.js +2 -4
  109. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  110. package/dist/versioned-package/components/popup/popup.js +1 -1
  111. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  112. package/dist/versioned-package/components/radio/radio.js +2 -2
  113. package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
  114. package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
  115. package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
  116. package/dist/versioned-package/components/radio-group/radio-group.js +13 -13
  117. package/dist/versioned-package/components/scrollable/scrollable.d.ts +1 -1
  118. package/dist/versioned-package/components/scrollable/scrollable.js +3 -3
  119. package/dist/versioned-package/components/select/select.d.ts +6 -5
  120. package/dist/versioned-package/components/select/select.js +25 -25
  121. package/dist/versioned-package/components/spinner/spinner.d.ts +3 -2
  122. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  123. package/dist/versioned-package/components/step/step.d.ts +1 -1
  124. package/dist/versioned-package/components/step/step.js +5 -5
  125. package/dist/versioned-package/components/step-group/step-group.d.ts +1 -1
  126. package/dist/versioned-package/components/step-group/step-group.js +2 -2
  127. package/dist/versioned-package/components/switch/switch.d.ts +1 -1
  128. package/dist/versioned-package/components/switch/switch.js +1 -1
  129. package/dist/versioned-package/components/tab/tab.d.ts +1 -1
  130. package/dist/versioned-package/components/tab/tab.js +2 -2
  131. package/dist/versioned-package/components/tab-group/tab-group.d.ts +3 -2
  132. package/dist/versioned-package/components/tab-group/tab-group.js +13 -13
  133. package/dist/versioned-package/components/tab-panel/tab-panel.d.ts +1 -1
  134. package/dist/versioned-package/components/tab-panel/tab-panel.js +2 -2
  135. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  136. package/dist/versioned-package/components/tag/tag.js +2 -2
  137. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  138. package/dist/versioned-package/components/teaser-media/teaser-media.js +1 -1
  139. package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
  140. package/dist/versioned-package/components/textarea/textarea.js +2 -2
  141. package/dist/versioned-package/components/tooltip/tooltip.d.ts +3 -2
  142. package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
  143. package/dist/versioned-package/components/video/video.d.ts +1 -1
  144. package/dist/versioned-package/components/video/video.js +2 -2
  145. package/dist/versioned-package/internal/form.js +3 -3
  146. package/dist/versioned-package/styles/headline/headline.css.js +1 -1
  147. package/dist/versioned-package/utilities/autocomplete-config.js +4 -4
  148. package/dist/versioned-package/utilities/localize.d.ts +10 -0
  149. package/dist/versioned-package/utilities/localize.js +45 -0
  150. package/dist/versioned-styles/solid-styles.css +1 -1
  151. package/dist/vscode.html-custom-data.json +41 -41
  152. package/dist/web-types.json +42 -50
  153. package/package.json +1 -1
@@ -1 +1 @@
1
- import{S as t,x as e,i,n as r,c as a}from"./solid-element.js";import{H as s}from"./slot.js";import{r as o}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 a,s=r>1?void 0:r?d(e,i):e,o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r?a(e,i,s):a(s))||s);return r&&s&&h(e,i,s),s};let c=class extends t{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new s(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 t="white border-neutral-400"===this.variant||this.inset,i=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("media"),a=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),e`<div class="${l("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","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&&t&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${l(!t&&"vertical"===this._orientation&&"mb-4",!r&&"hidden","white border-neutral-400"===this.variant&&"vertical"===this._orientation&&"mx-[-1px] mt-[-1px]")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(t?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${l("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${l("gap-2 mb-4",!a&&"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=[t.styles,i`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],p([r({reflect:!0})],c.prototype,"variant",2),p([r({reflect:!0,type:Number})],c.prototype,"breakpoint",2),p([r({type:Boolean,reflect:!0})],c.prototype,"inset",2),p([n('[part="base"]')],c.prototype,"teaser",2),p([o()],c.prototype,"_orientation",2),c=p([a("sd-3-6-0-teaser")],c);export{c as default};
1
+ import{S as t,x as e,i,n as r,c as a}from"./solid-element.js";import{H as s}from"./slot.js";import{r as o}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 a,s=r>1?void 0:r?d(e,i):e,o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r?a(e,i,s):a(s))||s);return r&&s&&h(e,i,s),s};let c=class extends t{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new s(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 t="white border-neutral-400"===this.variant||this.inset,i=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("media"),a=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),e`<div class="${l("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","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&&t&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${l(!t&&"vertical"===this._orientation&&"mb-4",!r&&"hidden","white border-neutral-400"===this.variant&&"vertical"===this._orientation&&"mx-[-1px] mt-[-1px]")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(t?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${l("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${l("gap-2 mb-4",!a&&"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=[t.styles,i`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],p([r({reflect:!0})],c.prototype,"variant",2),p([r({reflect:!0,type:Number})],c.prototype,"breakpoint",2),p([r({type:Boolean,reflect:!0})],c.prototype,"inset",2),p([n('[part="base"]')],c.prototype,"teaser",2),p([o()],c.prototype,"_orientation",2),c=p([a("sd-3-7-0-teaser")],c);export{c as default};
@@ -1 +1 @@
1
- import{S as t,x as e,i as a,n as l,c as s}from"./solid-element.js";import{d as r}from"./default-value.js";import{F as i}from"./form.js";import{H as o}from"./slot.js";import{o as n}from"./if-defined.js";import{l as h}from"./live.js";import{r as d}from"./state.js";import{e as p}from"./query.js";import{w as u}from"./watch.js";import{c}from"./component.styles.js";import{t as y}from"./classix.js";var m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=(t,e,a,l)=>{for(var s,r=l>1?void 0:l?b(e,a):e,i=t.length-1;i>=0;i--)(s=t[i])&&(r=(l?s(e,a,r):s(r))||r);return l&&r&&m(e,a,r),r};let x=class extends t{constructor(){super(...arguments),this.formControlController=new i(this),this.hasSlotController=new o(this,"help-text","label"),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.title="",this.name="",this.value="",this.size="lg",this.label="",this.helpText="",this.placeholder="",this.rows=4,this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight()}))}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.textarea.scrollTop=t.top),void("number"==typeof t.left&&(this.textarea.scrollLeft=t.left))):{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,a="none"){this.textarea.setSelectionRange(t,e,a)}setRangeText(t,e,a,l){this.textarea.setRangeText(t,e,a,l),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return null==(t=this.textarea)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),a=this.hasSlotController.test("help-text"),l=!!this.label||!!t,s=!!this.helpText||!!a,r=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",i="sm"===this.size?"text-sm":"text-base",o={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return e`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${y("mb-2",l?"inline-block":"hidden",i)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${y("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${y("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[r])}"></div><div part="base" class="${y("textarea px-4 flex items-top rounded-default bg-white group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],{disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[r],this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100")}"><textarea part="textarea" id="input" class="${y("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",i)}" title="${this.title}" name="${n(this.name)}" .value="${h(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${n(this.placeholder)}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" rows="${n(this.rows)}" autocapitalize="${n(this.autocapitalize)}" autocorrect="${n(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${n(this.spellcheck)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?e`<sd-3-6-0-icon class="${y("text-error absolute right-4 bg-white group-hover:bg-neutral-200",o)}" library="system" name="risk" part="invalid-icon"></sd-3-6-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?e`<sd-3-6-0-icon class="${y("text-success absolute right-4 bg-white group-hover:bg-neutral-200",o)}" library="system" name="status-check" part="valid-icon"></sd-3-6-0-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${y("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${s?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};x.styles=[c,t.styles,a`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],v([p("#input")],x.prototype,"textarea",2),v([p("#invalid-message")],x.prototype,"invalidMessage",2),v([d()],x.prototype,"hasFocus",2),v([d()],x.prototype,"showValidStyle",2),v([d()],x.prototype,"showInvalidStyle",2),v([l()],x.prototype,"title",2),v([l()],x.prototype,"name",2),v([l()],x.prototype,"value",2),v([l({reflect:!0})],x.prototype,"size",2),v([l()],x.prototype,"label",2),v([l({attribute:"help-text"})],x.prototype,"helpText",2),v([l()],x.prototype,"placeholder",2),v([l({type:Number})],x.prototype,"rows",2),v([l({type:Boolean,reflect:!0})],x.prototype,"disabled",2),v([l({type:Boolean,reflect:!0})],x.prototype,"readonly",2),v([l({reflect:!0})],x.prototype,"form",2),v([l({type:Boolean,reflect:!0})],x.prototype,"required",2),v([l({type:Number})],x.prototype,"minlength",2),v([l({type:Number})],x.prototype,"maxlength",2),v([l()],x.prototype,"autocapitalize",2),v([l()],x.prototype,"autocorrect",2),v([l()],x.prototype,"autocomplete",2),v([l({type:Boolean})],x.prototype,"autofocus",2),v([l()],x.prototype,"enterkeyhint",2),v([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],x.prototype,"styleOnValid",2),v([l({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],x.prototype,"spellcheck",2),v([l()],x.prototype,"inputmode",2),v([r()],x.prototype,"defaultValue",2),v([u("disabled",{waitUntilFirstUpdate:!0})],x.prototype,"handleDisabledChange",1),v([u("rows",{waitUntilFirstUpdate:!0})],x.prototype,"handleRowsChange",1),v([u("value",{waitUntilFirstUpdate:!0})],x.prototype,"handleValueChange",1),x=v([s("sd-3-6-0-textarea")],x);export{x as default};
1
+ import{S as t,x as e,i as a,n as l,c as s}from"./solid-element.js";import{d as r}from"./default-value.js";import{F as i}from"./form.js";import{H as o}from"./slot.js";import{o as n}from"./if-defined.js";import{l as h}from"./live.js";import{r as d}from"./state.js";import{e as p}from"./query.js";import{w as u}from"./watch.js";import{c}from"./component.styles.js";import{t as y}from"./classix.js";var m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=(t,e,a,l)=>{for(var s,r=l>1?void 0:l?b(e,a):e,i=t.length-1;i>=0;i--)(s=t[i])&&(r=(l?s(e,a,r):s(r))||r);return l&&r&&m(e,a,r),r};let x=class extends t{constructor(){super(...arguments),this.formControlController=new i(this),this.hasSlotController=new o(this,"help-text","label"),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.title="",this.name="",this.value="",this.size="lg",this.label="",this.helpText="",this.placeholder="",this.rows=4,this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight()}))}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.textarea.scrollTop=t.top),void("number"==typeof t.left&&(this.textarea.scrollLeft=t.left))):{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,a="none"){this.textarea.setSelectionRange(t,e,a)}setRangeText(t,e,a,l){this.textarea.setRangeText(t,e,a,l),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return null==(t=this.textarea)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),a=this.hasSlotController.test("help-text"),l=!!this.label||!!t,s=!!this.helpText||!!a,r=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",i="sm"===this.size?"text-sm":"text-base",o={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return e`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${y("mb-2",l?"inline-block":"hidden",i)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${y("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${y("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[r])}"></div><div part="base" class="${y("textarea px-4 flex items-top rounded-default bg-white group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],{disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[r],this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100")}"><textarea part="textarea" id="input" class="${y("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",i)}" title="${this.title}" name="${n(this.name)}" .value="${h(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${n(this.placeholder)}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" rows="${n(this.rows)}" autocapitalize="${n(this.autocapitalize)}" autocorrect="${n(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${n(this.spellcheck)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?e`<sd-3-7-0-icon class="${y("text-error absolute right-4 bg-white group-hover:bg-neutral-200",o)}" library="system" name="risk" part="invalid-icon"></sd-3-7-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?e`<sd-3-7-0-icon class="${y("text-success absolute right-4 bg-white group-hover:bg-neutral-200",o)}" library="system" name="status-check" part="valid-icon"></sd-3-7-0-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${y("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${s?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};x.styles=[c,t.styles,a`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],v([p("#input")],x.prototype,"textarea",2),v([p("#invalid-message")],x.prototype,"invalidMessage",2),v([d()],x.prototype,"hasFocus",2),v([d()],x.prototype,"showValidStyle",2),v([d()],x.prototype,"showInvalidStyle",2),v([l()],x.prototype,"title",2),v([l()],x.prototype,"name",2),v([l()],x.prototype,"value",2),v([l({reflect:!0})],x.prototype,"size",2),v([l()],x.prototype,"label",2),v([l({attribute:"help-text"})],x.prototype,"helpText",2),v([l()],x.prototype,"placeholder",2),v([l({type:Number})],x.prototype,"rows",2),v([l({type:Boolean,reflect:!0})],x.prototype,"disabled",2),v([l({type:Boolean,reflect:!0})],x.prototype,"readonly",2),v([l({reflect:!0})],x.prototype,"form",2),v([l({type:Boolean,reflect:!0})],x.prototype,"required",2),v([l({type:Number})],x.prototype,"minlength",2),v([l({type:Number})],x.prototype,"maxlength",2),v([l()],x.prototype,"autocapitalize",2),v([l()],x.prototype,"autocorrect",2),v([l()],x.prototype,"autocomplete",2),v([l({type:Boolean})],x.prototype,"autofocus",2),v([l()],x.prototype,"enterkeyhint",2),v([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],x.prototype,"styleOnValid",2),v([l({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],x.prototype,"spellcheck",2),v([l()],x.prototype,"inputmode",2),v([r()],x.prototype,"defaultValue",2),v([u("disabled",{waitUntilFirstUpdate:!0})],x.prototype,"handleDisabledChange",1),v([u("rows",{waitUntilFirstUpdate:!0})],x.prototype,"handleRowsChange",1),v([u("value",{waitUntilFirstUpdate:!0})],x.prototype,"handleValueChange",1),x=v([s("sd-3-7-0-textarea")],x);export{x as default};
@@ -1,4 +1,4 @@
1
- import"./popup.js";import{c as t,s as e,a as s,w as o}from"./event.js";import{S as i,x as a,r as h,i as r,n as p,c as n}from"./solid-element.js";import{g as d,s as l}from"./animation-registry.js";import{L as c}from"./solid-components2.js";import{e as u}from"./query.js";import{w as m}from"./watch.js";import{t as w}from"./classix.js";import{I as y}from"./interactive.js";var v=Object.defineProperty,f=Object.getOwnPropertyDescriptor,b=(t,e,s,o)=>{for(var i,a=o>1?void 0:o?f(e,s):e,h=t.length-1;h>=0;h--)(i=t[h])&&(a=(o?i(e,s,a):i(a))||a);return o&&a&&v(e,s,a),a};let g=class extends i{constructor(){super(...arguments),this.localize=new c(this),this.content="",this.placement="top",this.size="lg",this.disabled=!1,this.open=!1,this.trigger="click focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then((()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}))}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const e=t(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),e)}}handleMouseOut(){if(this.hasTrigger("hover")){const e=t(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),e)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await e(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:o}=d(this,"tooltip.show",{dir:this.localize.dir()});await s(this.popup.popup,t,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await e(this.body);const{keyframes:t,options:o}=d(this,"tooltip.hide",{dir:this.localize.dir()});await s(this.popup.popup,t,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,o(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,o(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return a`<sd-3-6-0-popup part="base" exportparts="
1
+ import"./popup.js";import{c as t,s as e,a as s,w as o}from"./event.js";import{S as i,x as a,r as h,i as r,n as p,c as n}from"./solid-element.js";import{g as d,s as l}from"./animation-registry.js";import{L as c}from"./solid-components2.js";import{e as u}from"./query.js";import{w as m}from"./watch.js";import{t as w}from"./classix.js";import{I as y}from"./interactive.js";var v=Object.defineProperty,f=Object.getOwnPropertyDescriptor,b=(t,e,s,o)=>{for(var i,a=o>1?void 0:o?f(e,s):e,h=t.length-1;h>=0;h--)(i=t[h])&&(a=(o?i(e,s,a):i(a))||a);return o&&a&&v(e,s,a),a};let g=class extends i{constructor(){super(...arguments),this.localize=new c(this),this.content="",this.placement="top",this.size="lg",this.disabled=!1,this.open=!1,this.trigger="click focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then((()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}))}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const e=t(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),e)}}handleMouseOut(){if(this.hasTrigger("hover")){const e=t(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),e)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await e(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:o}=d(this,"tooltip.show",{dir:this.localize.dir()});await s(this.popup.popup,t,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await e(this.body);const{keyframes:t,options:o}=d(this,"tooltip.hide",{dir:this.localize.dir()});await s(this.popup.popup,t,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,o(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,o(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return a`<sd-3-7-0-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${w(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":e?"end":"default"]*("sm"===this.size?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${w("lg"===this.size?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-3-6-0-icon library="system" name="info-circle" class="${w(this.disabled&&"sd-interactive--disabled")}"></sd-3-6-0-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-3-6-0-popup>`}};g.styles=[i.styles,h(y),r`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-3-6-0-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-3-6-0-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-3-6-0-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-3-6-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-3-6-0-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],b([u("slot:not([name])")],g.prototype,"defaultSlot",2),b([u("#tooltip")],g.prototype,"body",2),b([u("sd-3-6-0-popup")],g.prototype,"popup",2),b([p()],g.prototype,"content",2),b([p({reflect:!0})],g.prototype,"placement",2),b([p()],g.prototype,"size",2),b([p({type:Boolean,reflect:!0})],g.prototype,"disabled",2),b([p({type:Boolean,reflect:!0})],g.prototype,"open",2),b([p()],g.prototype,"trigger",2),b([p({type:Boolean})],g.prototype,"hoist",2),b([m("open",{waitUntilFirstUpdate:!0})],g.prototype,"handleOpenChange",1),b([m(["content","hoist","placement"])],g.prototype,"handleOptionsChange",1),b([m("disabled")],g.prototype,"handleDisabledChange",1),g=b([n("sd-3-6-0-tooltip")],g),l("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),l("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{g as default};
4
+ " class="${w(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":e?"end":"default"]*("sm"===this.size?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${w("lg"===this.size?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-3-7-0-icon library="system" name="info-circle" class="${w(this.disabled&&"sd-interactive--disabled")}"></sd-3-7-0-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-3-7-0-popup>`}};g.styles=[i.styles,h(y),r`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-3-7-0-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-3-7-0-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-3-7-0-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-3-7-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-3-7-0-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],b([u("slot:not([name])")],g.prototype,"defaultSlot",2),b([u("#tooltip")],g.prototype,"body",2),b([u("sd-3-7-0-popup")],g.prototype,"popup",2),b([p()],g.prototype,"content",2),b([p({reflect:!0})],g.prototype,"placement",2),b([p()],g.prototype,"size",2),b([p({type:Boolean,reflect:!0})],g.prototype,"disabled",2),b([p({type:Boolean,reflect:!0})],g.prototype,"open",2),b([p()],g.prototype,"trigger",2),b([p({type:Boolean})],g.prototype,"hoist",2),b([m("open",{waitUntilFirstUpdate:!0})],g.prototype,"handleOpenChange",1),b([m(["content","hoist","placement"])],g.prototype,"handleOptionsChange",1),b([m("disabled")],g.prototype,"handleDisabledChange",1),g=b([n("sd-3-7-0-tooltip")],g),l("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),l("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{g as default};
@@ -1 +1 @@
1
- import{S as t,x as e,i as s,n as o,c as i}from"./solid-element.js";import{H as a}from"./slot.js";import{e as l}from"./query.js";import{t as r}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,y=(t,e,s,o)=>{for(var i,a=o>1?void 0:o?p(e,s):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o?i(e,s,a):i(a))||a);return o&&a&&n(e,s,a),a};let c=class extends t{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new a(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 e`<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-3-6-0-icon id="default-play-icon" library="system" name="start"></sd-3-6-0-icon></slot></div></button> ${this.hasSlotController.test("poster")?e`<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>`}};c.styles=[t.styles,s`:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){transition-property:opacity;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}::slotted([slot=poster]){position:absolute;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:10;width:100%}#default-play-icon,::slotted([slot=play-icon]){position:absolute;left:50%;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}`],y([l("[part=base]")],c.prototype,"hostEl",2),y([o({type:Boolean,reflect:!0})],c.prototype,"playing",2),y([o({type:Boolean,reflect:!0})],c.prototype,"overlay",2),y([o({type:Boolean})],c.prototype,"isBelowBreakpoint",2),c=y([i("sd-3-6-0-video")],c);export{c as default};
1
+ import{S as t,x as e,i as s,n as o,c as i}from"./solid-element.js";import{H as a}from"./slot.js";import{e as l}from"./query.js";import{t as r}from"./classix.js";var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,y=(t,e,s,o)=>{for(var i,a=o>1?void 0:o?p(e,s):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o?i(e,s,a):i(a))||a);return o&&a&&n(e,s,a),a};let c=class extends t{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new a(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 e`<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-3-7-0-icon id="default-play-icon" library="system" name="start"></sd-3-7-0-icon></slot></div></button> ${this.hasSlotController.test("poster")?e`<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>`}};c.styles=[t.styles,s`:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){transition-property:opacity;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}::slotted([slot=poster]){position:absolute;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:10;width:100%}#default-play-icon,::slotted([slot=play-icon]){position:absolute;left:50%;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}`],y([l("[part=base]")],c.prototype,"hostEl",2),y([o({type:Boolean,reflect:!0})],c.prototype,"playing",2),y([o({type:Boolean,reflect:!0})],c.prototype,"overlay",2),y([o({type:Boolean})],c.prototype,"isBelowBreakpoint",2),c=y([i("sd-3-7-0-video")],c);export{c as default};
@@ -14,6 +14,6 @@ export default class SdButtonGroup extends SolidElement {
14
14
  }
15
15
  declare global {
16
16
  interface HTMLElementTagNameMap {
17
- 'sd-3-6-0-button-group': SdButtonGroup;
17
+ 'sd-3-7-0-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-3-6-0-button-group__button--focus");
25
+ button == null ? void 0 : button.classList.add("sd-3-7-0-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-3-6-0-button-group__button--focus");
29
+ button == null ? void 0 : button.classList.remove("sd-3-7-0-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-3-6-0-button-group__button--hover");
33
+ button == null ? void 0 : button.classList.add("sd-3-7-0-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-3-6-0-button-group__button--hover");
37
+ button == null ? void 0 : button.classList.remove("sd-3-7-0-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-3-6-0-button-group__button");
46
- button.classList.toggle("sd-3-6-0-button-group__button--first", index === 0);
47
- button.classList.toggle("sd-3-6-0-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
48
- button.classList.toggle("sd-3-6-0-button-group__button--last", index === slottedElements.length - 1);
49
- button.classList.toggle("sd-3-6-0-button-group__button--radio", button.tagName.toLowerCase() === "sd-3-6-0-radio-button");
45
+ button.classList.add("sd-3-7-0-button-group__button");
46
+ button.classList.toggle("sd-3-7-0-button-group__button--first", index === 0);
47
+ button.classList.toggle("sd-3-7-0-button-group__button--inner", index > 0 && index < slottedElements.length - 1);
48
+ button.classList.toggle("sd-3-7-0-button-group__button--last", index === slottedElements.length - 1);
49
+ button.classList.toggle("sd-3-7-0-button-group__button--radio", button.tagName.toLowerCase() === "sd-3-7-0-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-3-6-0-button-group")
68
+ customElement("sd-3-7-0-button-group")
69
69
  ], SdButtonGroup);
70
70
  function findButton(el) {
71
- const selector = "sd-3-6-0-button, sd-3-6-0-radio-button";
71
+ const selector = "sd-3-7-0-button, sd-3-7-0-radio-button";
72
72
  return el.closest(selector) ?? el.querySelector(selector);
73
73
  }
74
74
  export {
@@ -1,7 +1,8 @@
1
1
  import '../icon/icon';
2
+ import { LocalizeController } from '../../utilities/localize';
2
3
  import SolidElement from '../../internal/solid-element';
3
4
  export default class SdAccordion extends SolidElement {
4
- private readonly localize;
5
+ localize: LocalizeController;
5
6
  accordion: HTMLElement;
6
7
  header: HTMLElement;
7
8
  body: HTMLElement;
@@ -18,6 +19,6 @@ export default class SdAccordion extends SolidElement {
18
19
  }
19
20
  declare global {
20
21
  interface HTMLElementTagNameMap {
21
- 'sd-3-6-0-accordion': SdAccordion;
22
+ 'sd-3-7-0-accordion': SdAccordion;
22
23
  }
23
24
  }
@@ -108,7 +108,7 @@ let SdAccordion = class extends SolidElement {
108
108
  )}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
109
109
  "flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
110
110
  this.open && "rotate-180"
111
- )}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-3-6-0-icon library="system" name="chevron-down"></sd-3-6-0-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-3-6-0-icon library="system" name="chevron-down"></sd-3-6-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>`;
111
+ )}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-3-7-0-icon library="system" name="chevron-down"></sd-3-7-0-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-3-7-0-icon library="system" name="chevron-down"></sd-3-7-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>`;
112
112
  }
113
113
  };
114
114
  SdAccordion.styles = [
@@ -134,7 +134,7 @@ __decorateClass([
134
134
  watch("open", { waitUntilFirstUpdate: true })
135
135
  ], SdAccordion.prototype, "handleOpenChange", 1);
136
136
  SdAccordion = __decorateClass([
137
- customElement("sd-3-6-0-accordion")
137
+ customElement("sd-3-7-0-accordion")
138
138
  ], SdAccordion);
139
139
  setDefaultAnimation("accordion.show", {
140
140
  keyframes: [
@@ -11,6 +11,6 @@ export default class SdAccordionGroup extends SolidElement {
11
11
  }
12
12
  declare global {
13
13
  interface HTMLElementTagNameMap {
14
- 'sd-3-6-0-accordion-group': SdAccordionGroup;
14
+ 'sd-3-7-0-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-3-6-0-accordion:not(:first-of-type)){margin-top:-1px}`
51
+ css`:host{display:block}::slotted(sd-3-7-0-accordion:not(:first-of-type)){margin-top:-1px}`
52
52
  ];
53
53
  __decorateClass([
54
- queryAssignedElements({ selector: "sd-3-6-0-accordion" })
54
+ queryAssignedElements({ selector: "sd-3-7-0-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-3-6-0-accordion-group")
60
+ customElement("sd-3-7-0-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-3-6-0-badge': SdBadge;
11
+ 'sd-3-7-0-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-3-6-0-badge")
56
+ customElement("sd-3-7-0-badge")
57
57
  ], SdBadge);
58
58
  export {
59
59
  SdBadge as default
@@ -23,7 +23,7 @@ export default class SdBrandshape extends SolidElement {
23
23
  }
24
24
  declare global {
25
25
  interface HTMLElementTagNameMap {
26
- 'sd-3-6-0-brandshape': SdBrandshape;
26
+ 'sd-3-7-0-brandshape': SdBrandshape;
27
27
  }
28
28
  }
29
29
  export {};
@@ -123,7 +123,7 @@ __decorateClass([
123
123
  state()
124
124
  ], SdBrandshape.prototype, "componentBreakpoint", 2);
125
125
  SdBrandshape = __decorateClass([
126
- customElement("sd-3-6-0-brandshape")
126
+ customElement("sd-3-7-0-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-3-6-0-button': SdButton;
50
+ 'sd-3-7-0-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-3-6-0-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-3-6-0-spinner>` : ""}</${tag}>`;
216
+ )}"></slot>${this.loading ? html`<sd-3-7-0-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-3-7-0-spinner>` : ""}</${tag}>`;
217
217
  }
218
218
  };
219
219
  SdButton.styles = [
220
220
  componentStyles,
221
221
  SolidElement.styles,
222
- css`:host{position:relative;display:inline-block;width:var(--sd-spacing-auto,auto);cursor:pointer}sd-3-6-0-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-3-6-0-badge){pointer-events:none;position:absolute;top:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-3-6-0-icon),sd-3-6-0-spinner{font-size:calc(var(--tw-varspacing)/ 2)}`
222
+ css`:host{position:relative;display:inline-block;width:var(--sd-spacing-auto,auto);cursor:pointer}sd-3-7-0-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-3-7-0-badge){pointer-events:none;position:absolute;top:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-3-7-0-icon),sd-3-7-0-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-3-6-0-icon" })
228
+ queryAssignedElements({ selector: "sd-3-7-0-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-3-6-0-button")
291
+ customElement("sd-3-7-0-button")
292
292
  ], SdButton);
293
293
  export {
294
294
  SdButton as default
@@ -1,4 +1,5 @@
1
1
  import '../icon/icon.js';
2
+ import { LocalizeController } from '../../utilities/localize.js';
2
3
  import SolidElement from '../../internal/solid-element.js';
3
4
  export default class SdCarousel extends SolidElement {
4
5
  variant: 'dot' | 'number';
@@ -17,7 +18,7 @@ export default class SdCarousel extends SolidElement {
17
18
  private readonly slides;
18
19
  private intersectionObserver;
19
20
  private readonly intersectionObserverEntries;
20
- private readonly localize;
21
+ localize: LocalizeController;
21
22
  private mutationObserver;
22
23
  connectedCallback(): void;
23
24
  disconnectedCallback(): void;
@@ -41,6 +42,6 @@ export default class SdCarousel extends SolidElement {
41
42
  }
42
43
  declare global {
43
44
  interface HTMLElementTagNameMap {
44
- 'sd-3-6-0-carousel': SdCarousel;
45
+ 'sd-3-7-0-carousel': SdCarousel;
45
46
  }
46
47
  }
@@ -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-6-0-carousel-item");
42
+ this.slides = this.getElementsByTagName("sd-3-7-0-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-3-6-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-3-6-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-3-7-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-3-7-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) => {
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,19 +296,19 @@ 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-3-6-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-3-6-0-icon></slot></button></div><button class="${cx(
299
+ } : null}"><slot name="next-icon"><sd-3-7-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-3-7-0-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-3-6-0-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-3-6-0-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-3-6-0-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-3-6-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-3-7-0-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-3-7-0-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-3-7-0-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-3-7-0-icon></slot></button></div></div>`;
305
305
  }
306
306
  };
307
307
  SdCarousel.styles = [
308
308
  SolidElement.styles,
309
309
  unsafeCSS(InteractiveStyles),
310
310
  componentStyles,
311
- 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-6-0-button::part(label){pointer-events:none;display:flex;flex:1 1 auto;align-items:center}`
311
+ 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-7-0-button::part(label){pointer-events:none;display:flex;flex:1 1 auto;align-items:center}`
312
312
  ];
313
313
  __decorateClass([
314
314
  property({ type: String, reflect: true })
@@ -360,7 +360,7 @@ __decorateClass([
360
360
  watch("autoplay")
361
361
  ], SdCarousel.prototype, "handleAutoplayChange", 1);
362
362
  SdCarousel = __decorateClass([
363
- customElement("sd-3-6-0-carousel")
363
+ customElement("sd-3-7-0-carousel")
364
364
  ], SdCarousel);
365
365
  export {
366
366
  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-3-6-0-carousel-item': SdCarouselItem;
10
+ 'sd-3-7-0-carousel-item': SdCarouselItem;
11
11
  }
12
12
  }
@@ -31,7 +31,7 @@ SdCarouselItem.styles = [
31
31
  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}`
32
32
  ];
33
33
  SdCarouselItem = __decorateClass([
34
- customElement("sd-3-6-0-carousel-item")
34
+ customElement("sd-3-7-0-carousel-item")
35
35
  ], SdCarouselItem);
36
36
  export {
37
37
  SdCarouselItem as default
@@ -37,6 +37,6 @@ export default class SdCheckbox extends SolidElement implements SolidFormControl
37
37
  }
38
38
  declare global {
39
39
  interface HTMLElementTagNameMap {
40
- 'sd-3-6-0-checkbox': SdCheckbox;
40
+ 'sd-3-7-0-checkbox': SdCheckbox;
41
41
  }
42
42
  }
@@ -110,7 +110,7 @@ let SdCheckbox = class extends SolidElement {
110
110
  render() {
111
111
  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";
112
112
  return html`<label part="base" class="${cx(
113
- "sd-3-6-0-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",
113
+ "sd-3-7-0-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",
114
114
  this.disabled && "hover:cursor-not-allowed",
115
115
  {
116
116
  /* sizes, fonts */
@@ -134,7 +134,7 @@ let SdCheckbox = class extends SolidElement {
134
134
  filled: "border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",
135
135
  default: "border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"
136
136
  }[checkboxState]
137
- )}">${this.checked ? html`<sd-3-6-0-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-6-0-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-3-6-0-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-3-6-0-icon>` : ""} </span><span part="label" id="label" class="${cx(
137
+ )}">${this.checked ? html`<sd-3-7-0-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-7-0-icon>` : ""} ${!this.checked && this.indeterminate ? html`<sd-3-7-0-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-3-7-0-icon>` : ""} </span><span part="label" id="label" class="${cx(
138
138
  "select-none inline-block ml-2",
139
139
  this.disabled ? "text-neutral-500" : this.showInvalidStyle ? "text-error" : "text-black"
140
140
  )}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`;
@@ -190,7 +190,7 @@ __decorateClass([
190
190
  watch(["checked", "indeterminate"], { waitUntilFirstUpdate: true })
191
191
  ], SdCheckbox.prototype, "handleStateChange", 1);
192
192
  SdCheckbox = __decorateClass([
193
- customElement("sd-3-6-0-checkbox")
193
+ customElement("sd-3-7-0-checkbox")
194
194
  ], SdCheckbox);
195
195
  export {
196
196
  SdCheckbox as default
@@ -15,6 +15,6 @@ export default class SdCheckboxGroup extends SolidElement {
15
15
  }
16
16
  declare global {
17
17
  interface HTMLElementTagNameMap {
18
- 'sd-3-6-0-checkbox-group': SdCheckboxGroup;
18
+ 'sd-3-7-0-checkbox-group': SdCheckboxGroup;
19
19
  }
20
20
  }
@@ -27,7 +27,7 @@ let SdCheckboxGroup = class extends SolidElement {
27
27
  this.orientation = "vertical";
28
28
  }
29
29
  getAllCheckboxes() {
30
- return [...this.querySelectorAll("sd-3-6-0-checkbox")];
30
+ return [...this.querySelectorAll("sd-3-7-0-checkbox")];
31
31
  }
32
32
  async syncCheckboxElements() {
33
33
  const checkboxes = this.getAllCheckboxes();
@@ -43,10 +43,10 @@ let SdCheckboxGroup = class extends SolidElement {
43
43
  }
44
44
  }
45
45
  syncCheckboxes() {
46
- if (customElements.get("sd-3-6-0-checkbox")) {
46
+ if (customElements.get("sd-3-7-0-checkbox")) {
47
47
  this.syncCheckboxElements();
48
48
  } else {
49
- customElements.whenDefined("sd-3-6-0-checkbox").then(() => this.syncCheckboxes());
49
+ customElements.whenDefined("sd-3-7-0-checkbox").then(() => this.syncCheckboxes());
50
50
  }
51
51
  }
52
52
  handleSizeChange() {
@@ -77,7 +77,7 @@ let SdCheckboxGroup = class extends SolidElement {
77
77
  SdCheckboxGroup.styles = [
78
78
  componentStyles,
79
79
  SolidElement.styles,
80
- css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-6-0-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-6-0-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-6-0-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-6-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-6-0-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-6-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`
80
+ css`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-7-0-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-7-0-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-7-0-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-7-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-7-0-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-7-0-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`
81
81
  ];
82
82
  __decorateClass([
83
83
  property()
@@ -95,7 +95,7 @@ __decorateClass([
95
95
  watch("invalid", { waitUntilFirstUpdate: true })
96
96
  ], SdCheckboxGroup.prototype, "handleInvalid", 1);
97
97
  SdCheckboxGroup = __decorateClass([
98
- customElement("sd-3-6-0-checkbox-group")
98
+ customElement("sd-3-7-0-checkbox-group")
99
99
  ], SdCheckboxGroup);
100
100
  export {
101
101
  SdCheckboxGroup as default
@@ -1,9 +1,10 @@
1
1
  import '../button/button';
2
2
  import '../icon/icon';
3
+ import { LocalizeController } from '../../utilities/localize';
3
4
  import SolidElement from '../../internal/solid-element';
4
5
  export default class SdDialog extends SolidElement {
5
6
  private readonly hasSlotController;
6
- private readonly localize;
7
+ localize: LocalizeController;
7
8
  private modal;
8
9
  private originalTrigger;
9
10
  dialog: HTMLElement;
@@ -27,6 +28,6 @@ export default class SdDialog extends SolidElement {
27
28
  }
28
29
  declare global {
29
30
  interface HTMLElementTagNameMap {
30
- 'sd-3-6-0-dialog': SdDialog;
31
+ 'sd-3-7-0-dialog': SdDialog;
31
32
  }
32
33
  }
@@ -158,7 +158,7 @@ let SdDialog = class extends SolidElement {
158
158
  )}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${() => this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${cx(
159
159
  "flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",
160
160
  this.open && "flex opacity-100"
161
- )}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-3-6-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-6-0-icon name="close" library="system" color="currentColor"></sd-3-6-0-icon></sd-3-6-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
+ )}" role="dialog" aria-modal="true" aria-hidden="${this.open ? "false" : "true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length > 0 ? html`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>` : html`<slot name="headline"></slot>`}</h2>${!this.noCloseButton ? html`<sd-3-7-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-7-0-icon name="close" library="system" color="currentColor"></sd-3-7-0-icon></sd-3-7-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>`;
162
162
  }
163
163
  };
164
164
  SdDialog.styles = [
@@ -189,7 +189,7 @@ __decorateClass([
189
189
  watch("open", { waitUntilFirstUpdate: true })
190
190
  ], SdDialog.prototype, "handleOpenChange", 1);
191
191
  SdDialog = __decorateClass([
192
- customElement("sd-3-6-0-dialog")
192
+ customElement("sd-3-7-0-dialog")
193
193
  ], SdDialog);
194
194
  setDefaultAnimation("dialog.show", {
195
195
  keyframes: [
@@ -8,6 +8,6 @@ export default class SdDivider extends SolidElement {
8
8
  }
9
9
  declare global {
10
10
  interface HTMLElementTagNameMap {
11
- 'sd-3-6-0-divider': SdDivider;
11
+ 'sd-3-7-0-divider': SdDivider;
12
12
  }
13
13
  }