@solid-design-system/components 2.2.0 → 2.3.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 (121) hide show
  1. package/README.md +3 -0
  2. package/dist/components/es/select.js +2 -2
  3. package/dist/components/umd/solid-components.js +2 -2
  4. package/dist/custom-elements.json +1 -1
  5. package/dist/package/components/brandshape/brandshape.d.ts +3 -1
  6. package/dist/package/components/icon/icon.d.ts +1 -1
  7. package/dist/package/components/input/input.d.ts +1 -1
  8. package/dist/package/components/radio-group/radio-group.d.ts +1 -1
  9. package/dist/package/components/select/select.d.ts +4 -4
  10. package/dist/package/components/select/select.js +4 -4
  11. package/dist/package/components/teaser/teaser.d.ts +1 -1
  12. package/dist/package/components/textarea/textarea.d.ts +1 -1
  13. package/dist/styles/solid-styles.css +1 -1
  14. package/dist/versioned-components/es/accordion-group.js +1 -1
  15. package/dist/versioned-components/es/accordion.js +1 -1
  16. package/dist/versioned-components/es/badge.js +1 -1
  17. package/dist/versioned-components/es/brandshape.js +1 -1
  18. package/dist/versioned-components/es/button.js +1 -1
  19. package/dist/versioned-components/es/carousel-item.js +1 -1
  20. package/dist/versioned-components/es/carousel.js +3 -3
  21. package/dist/versioned-components/es/checkbox-group.js +1 -1
  22. package/dist/versioned-components/es/checkbox.js +1 -1
  23. package/dist/versioned-components/es/dialog.js +1 -1
  24. package/dist/versioned-components/es/divider.js +1 -1
  25. package/dist/versioned-components/es/drawer.js +1 -1
  26. package/dist/versioned-components/es/dropdown.js +1 -1
  27. package/dist/versioned-components/es/form.js +1 -1
  28. package/dist/versioned-components/es/header.js +1 -1
  29. package/dist/versioned-components/es/icon.js +1 -1
  30. package/dist/versioned-components/es/include.js +1 -1
  31. package/dist/versioned-components/es/input.js +1 -1
  32. package/dist/versioned-components/es/link.js +1 -1
  33. package/dist/versioned-components/es/navigation-item.js +1 -1
  34. package/dist/versioned-components/es/notification.js +1 -1
  35. package/dist/versioned-components/es/option.js +1 -1
  36. package/dist/versioned-components/es/popup.js +1 -1
  37. package/dist/versioned-components/es/radio-button.js +1 -1
  38. package/dist/versioned-components/es/radio-group.js +1 -1
  39. package/dist/versioned-components/es/radio.js +1 -1
  40. package/dist/versioned-components/es/select.js +3 -3
  41. package/dist/versioned-components/es/spinner.js +1 -1
  42. package/dist/versioned-components/es/switch.js +1 -1
  43. package/dist/versioned-components/es/tag.js +1 -1
  44. package/dist/versioned-components/es/teaser.js +1 -1
  45. package/dist/versioned-components/es/textarea.js +1 -1
  46. package/dist/versioned-components/es/tooltip.js +2 -2
  47. package/dist/versioned-components/es/video.js +1 -1
  48. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  49. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  50. package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
  51. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  52. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  53. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  54. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  55. package/dist/versioned-package/components/badge/badge.js +1 -1
  56. package/dist/versioned-package/components/brandshape/brandshape.d.ts +4 -2
  57. package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
  58. package/dist/versioned-package/components/button/button.d.ts +1 -1
  59. package/dist/versioned-package/components/button/button.js +4 -4
  60. package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
  61. package/dist/versioned-package/components/carousel/carousel.js +6 -6
  62. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  63. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  64. package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
  65. package/dist/versioned-package/components/checkbox/checkbox.js +4 -4
  66. package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
  67. package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
  68. package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
  69. package/dist/versioned-package/components/dialog/dialog.js +2 -2
  70. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  71. package/dist/versioned-package/components/divider/divider.js +2 -2
  72. package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
  73. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  74. package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
  75. package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
  76. package/dist/versioned-package/components/header/header.d.ts +1 -1
  77. package/dist/versioned-package/components/header/header.js +4 -4
  78. package/dist/versioned-package/components/icon/icon.d.ts +2 -2
  79. package/dist/versioned-package/components/icon/icon.js +1 -1
  80. package/dist/versioned-package/components/include/include.d.ts +1 -1
  81. package/dist/versioned-package/components/include/include.js +1 -1
  82. package/dist/versioned-package/components/input/input.d.ts +2 -2
  83. package/dist/versioned-package/components/input/input.js +4 -4
  84. package/dist/versioned-package/components/link/link.d.ts +1 -1
  85. package/dist/versioned-package/components/link/link.js +2 -2
  86. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  87. package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
  88. package/dist/versioned-package/components/notification/notification.d.ts +1 -1
  89. package/dist/versioned-package/components/notification/notification.js +5 -5
  90. package/dist/versioned-package/components/option/option.d.ts +1 -1
  91. package/dist/versioned-package/components/option/option.js +2 -2
  92. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  93. package/dist/versioned-package/components/popup/popup.js +1 -1
  94. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  95. package/dist/versioned-package/components/radio/radio.js +2 -2
  96. package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
  97. package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
  98. package/dist/versioned-package/components/radio-group/radio-group.d.ts +3 -3
  99. package/dist/versioned-package/components/radio-group/radio-group.js +15 -15
  100. package/dist/versioned-package/components/select/select.d.ts +8 -8
  101. package/dist/versioned-package/components/select/select.js +32 -32
  102. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  103. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  104. package/dist/versioned-package/components/switch/switch.d.ts +1 -1
  105. package/dist/versioned-package/components/switch/switch.js +2 -2
  106. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  107. package/dist/versioned-package/components/tag/tag.js +2 -2
  108. package/dist/versioned-package/components/teaser/teaser.d.ts +1 -1
  109. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  110. package/dist/versioned-package/components/textarea/textarea.d.ts +2 -2
  111. package/dist/versioned-package/components/textarea/textarea.js +3 -3
  112. package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
  113. package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
  114. package/dist/versioned-package/components/video/video.d.ts +1 -1
  115. package/dist/versioned-package/components/video/video.js +2 -2
  116. package/dist/versioned-package/internal/form.js +3 -3
  117. package/dist/versioned-package/styles/headline/headline.css.js +1 -1
  118. package/dist/versioned-styles/solid-styles.css +1 -1
  119. package/dist/vscode.html-custom-data.json +33 -33
  120. package/dist/web-types.json +34 -396
  121. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
2
+ ![NPM Version](https://img.shields.io/npm/v/%40solid-design-system%2Fcomponents)
3
+
1
4
  # Solid
2
5
 
3
6
  Solid Components provide a robust foundation for Union Investment's digital interfaces. Built with three core principles:
@@ -1,7 +1,7 @@
1
- import{s as t,a as e,w as s}from"./event.js";import{S as i,x as o,i as l,n as a}from"./solid-element.js";import{c as n}from"./register-custom-element.js";import{d as r}from"./default-value.js";import{F as p}from"./form.js";import{g as h,s as d}from"./animation-registry.js";import{H as c}from"./slot.js";import{L as u}from"./solid-components2.js";import{r as m}from"./state.js";import{e as y}from"./query.js";import{o as b}from"./query-assigned-elements.js";import{s as v}from"./scroll.js";import{o as f,S as g}from"./icon.js";import{w as x}from"./watch.js";import{c as w}from"./component.styles.js";import{t as O}from"./classix.js";import C from"./popup.js";import S from"./tag.js";import"./request.js";import"./request2.js";import"./directive.js";import"./static.js";import"./if-defined.js";var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=(t,e,s,i)=>{for(var o,l=i>1?void 0:i?k(e,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(l=(i?o(e,s,l):o(l))||l);return i&&l&&$(e,s,l),l};let I=class extends i{constructor(){super(...arguments),this.formControlController=new p(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new c(this,"help-text","label"),this.localize=new u(this),this.typeToSelectString="",this.hasFocus=!1,this.hasHover=!1,this.displayLabel="",this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>o`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{s as t,a as e,w as s}from"./event.js";import{S as i,x as o,i as l,n as a}from"./solid-element.js";import{c as n}from"./register-custom-element.js";import{d as r}from"./default-value.js";import{F as p}from"./form.js";import{g as h,s as d}from"./animation-registry.js";import{H as c}from"./slot.js";import{L as u}from"./solid-components2.js";import{r as m}from"./state.js";import{e as y}from"./query.js";import{o as b}from"./query-assigned-elements.js";import{s as v}from"./scroll.js";import{o as f,S as g}from"./icon.js";import{w as x}from"./watch.js";import{c as w}from"./component.styles.js";import{t as O}from"./classix.js";import C from"./popup.js";import S from"./tag.js";import"./request.js";import"./request2.js";import"./directive.js";import"./static.js";import"./if-defined.js";var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=(t,e,s,i)=>{for(var o,l=i>1?void 0:i?k(e,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(l=(i?o(e,s,l):o(l))||l);return i&&l&&$(e,s,l),l};let I=class extends i{constructor(){super(...arguments),this.formControlController=new p(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new c(this,"help-text","label"),this.localize=new u(this),this.typeToSelectString="",this.hasHover=!1,this.displayLabel="",this.hasFocus=!1,this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>o`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
2
2
  base:tag__base,
3
3
  content:tag__content,
4
4
  removable-indicator:tag__removable-indicator,
5
5
  " size="${"sm"===this.size?"sm":"lg"}" removable @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`,this.handleDocumentFocusIn=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()},this.handleDocumentKeyDown=t=>{const e=t.target,s=null!==e.closest(".select__clear"),i=null!==e.closest("sd-icon-button");if(!s&&!i){if("Escape"===t.key&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===t.key||" "===t.key&&""===this.typeToSelectString)return t.preventDefault(),t.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getAllOptions(),s=e.indexOf(this.currentOption);let i=Math.max(0,s);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===t.key?(i=s+1,i>e.length-1&&(i=0)):"ArrowUp"===t.key?(i=s-1,i<0&&(i=e.length-1)):"Home"===t.key?i=0:"End"===t.key&&(i=e.length-1),this.setCurrentOption(e[i])}if(1===t.key.length||"Backspace"===t.key){const e=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if("Backspace"===t.key)return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===t.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(const t of e)if(t.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(t);break}}}},this.handleDocumentMouseDown=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.applySizeToOptions(),this.open=!1}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(t){const e=t.composedPath().some((t=>t instanceof HTMLSlotElement&&"removable-indicator"===t.name));this.disabled||e||(t.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})))}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){const e=t.target.closest("sd-option"),s=this.value;e&&!e.disabled&&(this.multiple?this.toggleOptionSelection(e):this.setSelectedOptions(e),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==s&&this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],s=[];customElements.get("sd-option")?(t.forEach((t=>{this.multiple&&(t.checkbox=!0),s.push(t.value)})),this.setSelectedOptions(t.filter((t=>e.includes(t.value))))):customElements.whenDefined("sd-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(t,e){t.stopPropagation(),this.disabled||(this.toggleOptionSelection(e,!1),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t){this.getAllOptions().forEach((t=>{t.current=!1,t.tabIndex=-1})),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus())}setSelectedOptions(t){const e=this.getAllOptions(),s=Array.isArray(t)?t:[t];e.forEach((t=>t.selected=!1)),s.length&&s.forEach((t=>t.selected=!0)),this.selectionChanged()}toggleOptionSelection(t,e){t.selected=!0===e||!1===e?e:!t.selected,this.selectionChanged()}selectionChanged(){var t,e;this.selectedOptions=this.getAllOptions().filter((t=>t.selected)),this.multiple?(this.value=this.selectedOptions.map((t=>t.value)),this.useTags||0===this.value.length?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(null==(t=this.selectedOptions[0])?void 0:t.value)??"",this.displayLabel=(null==(e=this.selectedOptions[0])?void 0:e.getTextLabel())??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}get tags(){return this.selectedOptions.map(((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){const s=this.getTag(t,e);return o`<div @sd-remove="${e=>this.handleTagRemove(e,t)}">${"string"==typeof s?f(s):s}</div>`}return e===this.maxOptionsVisible?o`<sd-tag size="${"sm"===this.size?"sm":"lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length-e}</sd-tag>`:o``}))}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){const e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){const t=this.getAllOptions();customElements.get("sd-option")&&t.forEach((t=>{t.checkbox=this.multiple}))}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await t(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:s,options:i}=h(this,"select.show",{dir:this.localize.dir()});await e(this.popup.popup,s,i),this.currentOption&&v(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await t(this);const{keyframes:s,options:i}=h(this,"select.hide",{dir:this.localize.dir()});await e(this.popup.popup,s,i),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach((t=>{t.size=this.size}))}handleValueChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter((t=>e.includes(t.value))))}async show(){if(!this.open&&!this.disabled)return this.open=!0,s(this,"sd-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,s(this,"sd-after-hide");this.open=!1}checkValidity(){var t;return null==(t=this.valueInput)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}render(){this.hasSlotController.test("[default]");const t=this.hasSlotController.test("label"),e=(this.hasSlotController.test("clear-icon"),this.hasSlotController.test("expand-icon"),this.hasSlotController.test("help-text")),s=!!this.label||!!t,i=!!this.helpText||!!e,l=this.clearable&&!this.disabled&&this.value.length>0,a=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",n=this.disabled?"cursor-not-allowed":"cursor-pointer",r={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],p={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return o`<div part="form-control" class="${O("relative text-left",n,"sm"===this.size?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${s&&"inline-block mb-2"}" aria-hidden="${s?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${O("relative w-full bg-white",{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"}[a])}"><div part="border" class="${O("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{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"}[a],this.open&&("bottom"===this.currentPlacement?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${O("inline-flex relative w-full","bottom"===this.currentPlacement?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
6
6
  popup:popup__content,
7
- "><div part="combobox" class="${O("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${O("appearance-none outline-none flex-grow bg-transparent",n,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?o`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${O("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",n)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?o`<button part="clear-button" class="${O("select__clear flex justify-center",r)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${O("text-neutral-500",p)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?o`<sd-icon part="invalid-icon" class="${O("text-error",r,p)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-icon part="valid-icon" class="${O("text-success",r,p)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${O("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",p)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${O("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${i?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};I.dependencies={"sd-icon":g,"sd-popup":C,"sd-tag":S},I.styles=[w,i.styles,l`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],D([b({selector:"sd-option"})],I.prototype,"_optionsInDefaultSlot",2),D([y("sd-popup")],I.prototype,"popup",2),D([y('[part="combobox"]')],I.prototype,"combobox",2),D([y('[part="display-input"]')],I.prototype,"displayInput",2),D([y(".value-input")],I.prototype,"valueInput",2),D([y('[part="listbox"]')],I.prototype,"listbox",2),D([y("#invalid-message")],I.prototype,"invalidMessage",2),D([m()],I.prototype,"hasFocus",2),D([m()],I.prototype,"hasHover",2),D([m()],I.prototype,"displayLabel",2),D([m()],I.prototype,"currentOption",2),D([m()],I.prototype,"selectedOptions",2),D([m()],I.prototype,"showValidStyle",2),D([m()],I.prototype,"showInvalidStyle",2),D([r()],I.prototype,"defaultValue",2),D([a({type:Boolean,reflect:!0})],I.prototype,"open",2),D([a({reflect:!0})],I.prototype,"size",2),D([a()],I.prototype,"label",2),D([a()],I.prototype,"placeholder",2),D([a({attribute:"help-text"})],I.prototype,"helpText",2),D([a({reflect:!0})],I.prototype,"placement",2),D([m()],I.prototype,"currentPlacement",2),D([a({type:Boolean})],I.prototype,"clearable",2),D([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2),D([a({type:Boolean,reflect:!0})],I.prototype,"multiple",2),D([a({type:Boolean,reflect:!0})],I.prototype,"useTags",2),D([a({attribute:"max-options-visible",type:Number})],I.prototype,"maxOptionsVisible",2),D([a({reflect:!0})],I.prototype,"form",2),D([a()],I.prototype,"name",2),D([a({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],I.prototype,"value",2),D([a({type:Boolean,reflect:!0})],I.prototype,"required",2),D([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],I.prototype,"styleOnValid",2),D([a({type:Boolean})],I.prototype,"hoist",2),D([a()],I.prototype,"getTag",2),D([x("useTags",{waitUntilFirstUpdate:!0})],I.prototype,"handleUseTagsChange",1),D([x("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"handleDisabledChange",1),D([x("open",{waitUntilFirstUpdate:!0})],I.prototype,"handleOpenChange",1),D([x("size",{waitUntilFirstUpdate:!0})],I.prototype,"applySizeToOptions",1),D([x("value",{waitUntilFirstUpdate:!0})],I.prototype,"handleValueChange",1),I=D([n("sd-select")],I),d("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),d("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{I as default};
7
+ "><div part="combobox" class="${O("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${O("appearance-none outline-none flex-grow bg-transparent",n,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?o`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${O("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",n)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?o`<button part="clear-button" class="${O("select__clear flex justify-center",r)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${O("text-neutral-500",p)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?o`<sd-icon part="invalid-icon" class="${O("text-error",r,p)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-icon part="valid-icon" class="${O("text-success",r,p)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${O("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",p)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${O("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${i?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};I.dependencies={"sd-icon":g,"sd-popup":C,"sd-tag":S},I.styles=[w,i.styles,l`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],D([b({selector:"sd-option"})],I.prototype,"_optionsInDefaultSlot",2),D([y("sd-popup")],I.prototype,"popup",2),D([y('[part="combobox"]')],I.prototype,"combobox",2),D([y('[part="display-input"]')],I.prototype,"displayInput",2),D([y(".value-input")],I.prototype,"valueInput",2),D([y('[part="listbox"]')],I.prototype,"listbox",2),D([y("#invalid-message")],I.prototype,"invalidMessage",2),D([m()],I.prototype,"hasHover",2),D([m()],I.prototype,"displayLabel",2),D([m()],I.prototype,"hasFocus",2),D([m()],I.prototype,"currentOption",2),D([m()],I.prototype,"selectedOptions",2),D([m()],I.prototype,"showValidStyle",2),D([m()],I.prototype,"showInvalidStyle",2),D([r()],I.prototype,"defaultValue",2),D([a({type:Boolean,reflect:!0})],I.prototype,"open",2),D([a({reflect:!0})],I.prototype,"size",2),D([a()],I.prototype,"label",2),D([a()],I.prototype,"placeholder",2),D([a({attribute:"help-text"})],I.prototype,"helpText",2),D([a({reflect:!0})],I.prototype,"placement",2),D([m()],I.prototype,"currentPlacement",2),D([a({type:Boolean})],I.prototype,"clearable",2),D([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2),D([a({type:Boolean,reflect:!0})],I.prototype,"multiple",2),D([a({type:Boolean,reflect:!0})],I.prototype,"useTags",2),D([a({attribute:"max-options-visible",type:Number})],I.prototype,"maxOptionsVisible",2),D([a({reflect:!0})],I.prototype,"form",2),D([a()],I.prototype,"name",2),D([a({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],I.prototype,"value",2),D([a({type:Boolean,reflect:!0})],I.prototype,"required",2),D([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],I.prototype,"styleOnValid",2),D([a({type:Boolean})],I.prototype,"hoist",2),D([a()],I.prototype,"getTag",2),D([x("useTags",{waitUntilFirstUpdate:!0})],I.prototype,"handleUseTagsChange",1),D([x("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"handleDisabledChange",1),D([x("open",{waitUntilFirstUpdate:!0})],I.prototype,"handleOpenChange",1),D([x("size",{waitUntilFirstUpdate:!0})],I.prototype,"applySizeToOptions",1),D([x("value",{waitUntilFirstUpdate:!0})],I.prototype,"handleValueChange",1),I=D([n("sd-select")],I),d("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),d("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{I as default};
@@ -96,13 +96,13 @@ let Ot=class extends K{constructor(){super(...arguments),this.renderOptions={hos
96
96
  * @license
97
97
  * Copyright 2017 Google LLC
98
98
  * SPDX-License-Identifier: BSD-3-Clause
99
- */("sd-navigation-item")],Kr);const Zr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Kr}},Symbol.toStringTag,{value:"Module"}));var Wr=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Xr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Yr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Wr(e,i,s),s};const Gr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),Jr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let Qr=class extends ie{constructor(){super(...arguments),this.localize=new k(this),this.open=!1,this.closable=!1,this.variant="info",this.toastStack="top-right",this.duration=1/0,this.durationIndicator=!1,this.remainingDuration=this.duration,this.startTime=Date.now()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>{this.hide()}),this.remainingDuration))}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await pe(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=ye(this,"notification.show",{dir:this.localize.dir()});await de(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await pe(this.base);const{keyframes:t,options:e}=ye(this,"notification.hide",{dir:this.localize.dir()});await de(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}async toast(){return new Promise((t=>{const e="bottom-center"===this.toastStack?Jr:Gr;null===e.parentElement&&document.body.append(e),e.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{e.removeChild(this),t(),null===e.querySelector("sd-notification")&&e.remove()}),{once:!0})}))}render(){return pt`<div part="base" class="${we("w-full overflow-hidden flex items-stretch relative m-2")}" role="alert" id="notification" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}"><slot name="icon" part="icon" class="${we("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${we("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable?pt`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"><sd-icon name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?pt`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${we("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute bg-neutral-400"></div>`:""}</div>`}};Qr.styles=[Gt,ie.styles,P`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],Xr([Bt('[part~="base"]')],Qr.prototype,"base",2),Xr([Mt({type:Boolean,reflect:!0})],Qr.prototype,"open",2),Xr([Mt({type:Boolean,reflect:!0})],Qr.prototype,"closable",2),Xr([Mt({reflect:!0})],Qr.prototype,"variant",2),Xr([Mt({reflect:!0,attribute:"toast-stack"})],Qr.prototype,"toastStack",2),Xr([Mt({type:Number})],Qr.prototype,"duration",2),Xr([Mt({type:Boolean,reflect:!0,attribute:"duration-indicator"})],Qr.prototype,"durationIndicator",2),Xr([Xt("open",{waitUntilFirstUpdate:!0})],Qr.prototype,"handleOpenChange",1),Xr([Xt("duration")],Qr.prototype,"handleDurationChange",1),Qr=Xr([Pt("sd-notification")],Qr),ve("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ve("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});const ts=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Qr}},Symbol.toStringTag,{value:"Module"}));var es=Object.defineProperty,is=Object.getOwnPropertyDescriptor,os=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?is(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&es(e,i,s),s};let rs=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"default","left","right"),this.localize=new k(this),this.current=!1,this.selected=!1,this.hasHover=!1,this.size="lg",this.checkbox=!1,this.disabled=!1,this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){const t=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=t:t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){return(this.textContent??"").trim()}render(){this.hasSlotController.test("default");const t=this.hasSlotController.test("left"),e=this.hasSlotController.test("right");return pt`<div part="base" class="${we("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${we("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?pt`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${we("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?pt`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""}</span>`:""} ${t?pt`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${e?pt`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};rs.styles=[Gt,ie.styles,P`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],os([Bt('[part="base"]')],rs.prototype,"defaultSlot",2),os([Dt()],rs.prototype,"current",2),os([Dt()],rs.prototype,"selected",2),os([Dt()],rs.prototype,"hasHover",2),os([Mt({reflect:!0})],rs.prototype,"size",2),os([Mt({type:Boolean,reflect:!0})],rs.prototype,"checkbox",2),os([Mt({type:Boolean,reflect:!0})],rs.prototype,"disabled",2),os([Mt({reflect:!0})],rs.prototype,"value",2),os([Xt("disabled")],rs.prototype,"handleDisabledChange",1),os([Xt("selected")],rs.prototype,"handleSelectedChange",1),os([Xt("value")],rs.prototype,"handleValueChange",1),rs=os([Pt("sd-option")],rs);const ss=Object.freeze(Object.defineProperty({__proto__:null,get default(){return rs}},Symbol.toStringTag,{value:"Module"}));var as=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,ls=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&as(e,i,s),s};let ds=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","icon"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="lg"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){const t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return pt`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${we("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline","sm"===this.size?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",t&&"px-4",this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled}" type="button" value="${ai(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${we(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?pt`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};ds.styles=[ie.styles,Gt,P`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:var(--sd-spacing-0,0);z-index:-10;opacity:var(--sd-opacity-0,0);outline-style:dotted;outline-width:1px;outline-color:rgb(var(--sd-color-error,204 25 55) / 1)}.lg-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{height:var(--sd-spacing-12,3rem);width:var(--sd-spacing-12,3rem)}.md-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{height:var(--sd-spacing-10,2.5rem);width:var(--sd-spacing-10,2.5rem)}.sm-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{height:var(--sd-spacing-8,2rem);width:var(--sd-spacing-8,2rem)}:host(.sd-button-group__button--first:not(.sd-button-group__button--last)) button{border-top-right-radius:var(--sd-border-radius-none,0);border-bottom-right-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--last:not(.sd-button-group__button--first)) button{border-top-left-radius:var(--sd-border-radius-none,0);border-bottom-left-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:-1px}:host(.sd-button-group__button--hover){z-index:10}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:20}`],ls([Bt(".button")],ds.prototype,"input",2),ls([Bt(".hidden-input")],ds.prototype,"hiddenInput",2),ls([Dt()],ds.prototype,"hasFocus",2),ls([Mt({type:Boolean,reflect:!0})],ds.prototype,"checked",2),ls([Mt()],ds.prototype,"value",2),ls([Mt({type:Boolean,reflect:!0})],ds.prototype,"disabled",2),ls([Mt({reflect:!0})],ds.prototype,"size",2),ls([Xt("disabled",{waitUntilFirstUpdate:!0})],ds.prototype,"handleDisabledChange",1),ds=ls([Pt("sd-radio-button")],ds);const hs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ds}},Symbol.toStringTag,{value:"Module"})),cs=P`${Gt}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var ps=Object.defineProperty,us=Object.getOwnPropertyDescriptor,bs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?us(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ps(e,i,s),s};let ms=class extends ie{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=gs(t.target);null==e||e.classList.add("sd-button-group__button--focus")}handleBlur(t){const e=gs(t.target);null==e||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){const e=gs(t.target);null==e||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){const e=gs(t.target);null==e||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const i=t.indexOf(e),o=gs(e);null!==o&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",0===i),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio","sd-radio-button"===o.tagName.toLowerCase()))}))}render(){return pt`<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 gs(t){const e="sd-button, sd-radio-button";return t.closest(e)??t.querySelector(e)}ms.styles=cs,bs([Bt("slot")],ms.prototype,"defaultSlot",2),bs([Dt()],ms.prototype,"disableRole",2),bs([Mt()],ms.prototype,"label",2),ms=bs([Pt("sd-button-group")],ms);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,fs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&vs(e,i,s),s};let ws=class extends ie{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 pt`<span part="base" class="${we("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${we("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?pt`<span part="checked" class="${we("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="${we("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};ws.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:rgb(var(--sd-color-primary,0 53 142) / 1)}`],fs([Dt()],ws.prototype,"checked",2),fs([Dt()],ws.prototype,"hasFocus",2),fs([Mt({reflect:!0})],ws.prototype,"size",2),fs([Mt({type:Boolean,reflect:!0})],ws.prototype,"invalid",2),fs([Mt({type:Boolean,reflect:!0})],ws.prototype,"disabled",2),fs([Mt()],ws.prototype,"value",2),fs([Xt("checked")],ws.prototype,"handleCheckedChange",1),fs([Xt("disabled",{waitUntilFirstUpdate:!0})],ws.prototype,"handleDisabledChange",1),ws=fs([Pt("sd-radio")],ws);const xs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ws}},Symbol.toStringTag,{value:"Module"}));var ks=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,$s=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Cs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ks(e,i,s),s};let Ss=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.label="",this.boldLabel=!1,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?Qe:t?Je:Ge}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-radio, sd-radio-button"),i=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,i.forEach((t=>t.checked=t===e)),this.value!==o&&(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)),i=e.find((t=>t.checked))??e[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,r=this.value;let s=e.indexOf(i)+o;s<0&&(s=e.length-1),s>e.length-1&&(s=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[s].value,e[s].checked=!0,this.hasButtonGroup?e[s].shadowRoot.querySelector("button").focus():(e[s].tabIndex=0,e[s].focus()),this.value!==r&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){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),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var t,e;const i=this.getAllRadios();if(await Promise.all(i.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof ws&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=i.some((t=>"sd-radio-button"===t.tagName.toLowerCase())),!i.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=i[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else i[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-radio")&&customElements.get("sd-radio-button")?this.syncRadioElements():(customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then((()=>this.syncRadios())),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-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.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=!!this.label||!!t,i=pt`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return pt`<fieldset part="form-control" class="${we("border-0 p-0 m-0 flex flex-col",{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="${we("mb-2 p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${we("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?pt`<sd-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${i}</sd-button-group>`:i}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};Ss.dependencies={"sd-button-group":ms},Ss.styles=[Gt,ie.styles,P`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],$s([Bt("slot:not([name])")],Ss.prototype,"defaultSlot",2),$s([Bt("#validation-input")],Ss.prototype,"validationInput",2),$s([Bt("#invalid-message")],Ss.prototype,"invalidMessage",2),$s([Dt()],Ss.prototype,"hasButtonGroup",2),$s([Dt()],Ss.prototype,"defaultValue",2),$s([Dt()],Ss.prototype,"showInvalidStyle",2),$s([Mt()],Ss.prototype,"label",2),$s([Mt({type:Boolean,reflect:!0})],Ss.prototype,"boldLabel",2),$s([Mt()],Ss.prototype,"name",2),$s([Mt({reflect:!0})],Ss.prototype,"value",2),$s([Mt({reflect:!0})],Ss.prototype,"size",2),$s([Mt({reflect:!0})],Ss.prototype,"form",2),$s([Mt({type:Boolean,reflect:!0})],Ss.prototype,"required",2),$s([Mt({reflect:!0})],Ss.prototype,"orientation",2),$s([Xt("size",{waitUntilFirstUpdate:!0})],Ss.prototype,"handleSizeChange",1),$s([Xt("showInvalidStyle",{waitUntilFirstUpdate:!0})],Ss.prototype,"handleInvalidChange",1),$s([Xt("value")],Ss.prototype,"handleValueChange",1),Ss=$s([Pt("sd-radio-group")],Ss);const _s=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ss}},Symbol.toStringTag,{value:"Module"}));var zs=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,Es=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Os(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&zs(e,i,s),s};let Ps=class extends ie{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")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}render(){const t=this.isLink(),e=t?oi`a`:oi`button`;return si`<${e} part="base" type="${ai(t?void 0:"button")}" href="${ai(t?this.href:void 0)}" rel="${ai(t&&this.target?"noreferrer noopener":void 0)}" target="${ai(t?this.target:void 0)}" download="${ai(t?this.download:void 0)}" ?disabled="${ai(t?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${we("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&&!t&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?si`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${we({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-icon library="system" name="close" label="remove"></sd-icon></slot>`:""}</${e}>`}};Ps.styles=[ie.styles,P`:host{display:inline-block}`],Es([Bt("a, button")],Ps.prototype,"tag",2),Es([Mt({reflect:!0})],Ps.prototype,"size",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"selected",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"removable",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"disabled",2),Es([Mt()],Ps.prototype,"href",2),Es([Mt()],Ps.prototype,"target",2),Es([Mt()],Ps.prototype,"download",2),Ps=Es([Pt("sd-tag")],Ps);const As=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ps}},Symbol.toStringTag,{value:"Module"}));var Ts=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,Ds=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ms(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ts(e,i,s),s};let Ls=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new ti(this,"help-text","label"),this.localize=new k(this),this.typeToSelectString="",this.hasFocus=!1,this.hasHover=!1,this.displayLabel="",this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>pt`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
99
+ */("sd-navigation-item")],Kr);const Zr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Kr}},Symbol.toStringTag,{value:"Module"}));var Wr=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Xr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Yr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Wr(e,i,s),s};const Gr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),Jr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let Qr=class extends ie{constructor(){super(...arguments),this.localize=new k(this),this.open=!1,this.closable=!1,this.variant="info",this.toastStack="top-right",this.duration=1/0,this.durationIndicator=!1,this.remainingDuration=this.duration,this.startTime=Date.now()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>{this.hide()}),this.remainingDuration))}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await pe(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=ye(this,"notification.show",{dir:this.localize.dir()});await de(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await pe(this.base);const{keyframes:t,options:e}=ye(this,"notification.hide",{dir:this.localize.dir()});await de(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}async toast(){return new Promise((t=>{const e="bottom-center"===this.toastStack?Jr:Gr;null===e.parentElement&&document.body.append(e),e.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{e.removeChild(this),t(),null===e.querySelector("sd-notification")&&e.remove()}),{once:!0})}))}render(){return pt`<div part="base" class="${we("w-full overflow-hidden flex items-stretch relative m-2")}" role="alert" id="notification" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}"><slot name="icon" part="icon" class="${we("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${we("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable?pt`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"><sd-icon name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?pt`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${we("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute bg-neutral-400"></div>`:""}</div>`}};Qr.styles=[Gt,ie.styles,P`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],Xr([Bt('[part~="base"]')],Qr.prototype,"base",2),Xr([Mt({type:Boolean,reflect:!0})],Qr.prototype,"open",2),Xr([Mt({type:Boolean,reflect:!0})],Qr.prototype,"closable",2),Xr([Mt({reflect:!0})],Qr.prototype,"variant",2),Xr([Mt({reflect:!0,attribute:"toast-stack"})],Qr.prototype,"toastStack",2),Xr([Mt({type:Number})],Qr.prototype,"duration",2),Xr([Mt({type:Boolean,reflect:!0,attribute:"duration-indicator"})],Qr.prototype,"durationIndicator",2),Xr([Xt("open",{waitUntilFirstUpdate:!0})],Qr.prototype,"handleOpenChange",1),Xr([Xt("duration")],Qr.prototype,"handleDurationChange",1),Qr=Xr([Pt("sd-notification")],Qr),ve("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ve("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});const ts=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Qr}},Symbol.toStringTag,{value:"Module"}));var es=Object.defineProperty,is=Object.getOwnPropertyDescriptor,os=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?is(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&es(e,i,s),s};let rs=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"default","left","right"),this.localize=new k(this),this.current=!1,this.selected=!1,this.hasHover=!1,this.size="lg",this.checkbox=!1,this.disabled=!1,this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){const t=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=t:t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){return(this.textContent??"").trim()}render(){this.hasSlotController.test("default");const t=this.hasSlotController.test("left"),e=this.hasSlotController.test("right");return pt`<div part="base" class="${we("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${we("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?pt`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${we("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?pt`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""}</span>`:""} ${t?pt`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${e?pt`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};rs.styles=[Gt,ie.styles,P`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],os([Bt('[part="base"]')],rs.prototype,"defaultSlot",2),os([Dt()],rs.prototype,"current",2),os([Dt()],rs.prototype,"selected",2),os([Dt()],rs.prototype,"hasHover",2),os([Mt({reflect:!0})],rs.prototype,"size",2),os([Mt({type:Boolean,reflect:!0})],rs.prototype,"checkbox",2),os([Mt({type:Boolean,reflect:!0})],rs.prototype,"disabled",2),os([Mt({reflect:!0})],rs.prototype,"value",2),os([Xt("disabled")],rs.prototype,"handleDisabledChange",1),os([Xt("selected")],rs.prototype,"handleSelectedChange",1),os([Xt("value")],rs.prototype,"handleValueChange",1),rs=os([Pt("sd-option")],rs);const ss=Object.freeze(Object.defineProperty({__proto__:null,get default(){return rs}},Symbol.toStringTag,{value:"Module"}));var as=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,ls=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&as(e,i,s),s};let ds=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","icon"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="lg"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){const t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return pt`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${we("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline","sm"===this.size?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",t&&"px-4",this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled}" type="button" value="${ai(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${we(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?pt`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};ds.styles=[ie.styles,Gt,P`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:var(--sd-spacing-0,0);z-index:-10;opacity:var(--sd-opacity-0,0);outline-style:dotted;outline-width:1px;outline-color:rgb(var(--sd-color-error,204 25 55) / 1)}.lg-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{height:var(--sd-spacing-12,3rem);width:var(--sd-spacing-12,3rem)}.md-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{height:var(--sd-spacing-10,2.5rem);width:var(--sd-spacing-10,2.5rem)}.sm-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{height:var(--sd-spacing-8,2rem);width:var(--sd-spacing-8,2rem)}:host(.sd-button-group__button--first:not(.sd-button-group__button--last)) button{border-top-right-radius:var(--sd-border-radius-none,0);border-bottom-right-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--last:not(.sd-button-group__button--first)) button{border-top-left-radius:var(--sd-border-radius-none,0);border-bottom-left-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:-1px}:host(.sd-button-group__button--hover){z-index:10}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:20}`],ls([Bt(".button")],ds.prototype,"input",2),ls([Bt(".hidden-input")],ds.prototype,"hiddenInput",2),ls([Dt()],ds.prototype,"hasFocus",2),ls([Mt({type:Boolean,reflect:!0})],ds.prototype,"checked",2),ls([Mt()],ds.prototype,"value",2),ls([Mt({type:Boolean,reflect:!0})],ds.prototype,"disabled",2),ls([Mt({reflect:!0})],ds.prototype,"size",2),ls([Xt("disabled",{waitUntilFirstUpdate:!0})],ds.prototype,"handleDisabledChange",1),ds=ls([Pt("sd-radio-button")],ds);const hs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ds}},Symbol.toStringTag,{value:"Module"})),cs=P`${Gt}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var ps=Object.defineProperty,us=Object.getOwnPropertyDescriptor,bs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?us(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ps(e,i,s),s};let ms=class extends ie{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=gs(t.target);null==e||e.classList.add("sd-button-group__button--focus")}handleBlur(t){const e=gs(t.target);null==e||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){const e=gs(t.target);null==e||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){const e=gs(t.target);null==e||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const i=t.indexOf(e),o=gs(e);null!==o&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",0===i),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio","sd-radio-button"===o.tagName.toLowerCase()))}))}render(){return pt`<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 gs(t){const e="sd-button, sd-radio-button";return t.closest(e)??t.querySelector(e)}ms.styles=cs,bs([Bt("slot")],ms.prototype,"defaultSlot",2),bs([Dt()],ms.prototype,"disableRole",2),bs([Mt()],ms.prototype,"label",2),ms=bs([Pt("sd-button-group")],ms);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,fs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&vs(e,i,s),s};let ws=class extends ie{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 pt`<span part="base" class="${we("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${we("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?pt`<span part="checked" class="${we("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="${we("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};ws.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:rgb(var(--sd-color-primary,0 53 142) / 1)}`],fs([Dt()],ws.prototype,"checked",2),fs([Dt()],ws.prototype,"hasFocus",2),fs([Mt({reflect:!0})],ws.prototype,"size",2),fs([Mt({type:Boolean,reflect:!0})],ws.prototype,"invalid",2),fs([Mt({type:Boolean,reflect:!0})],ws.prototype,"disabled",2),fs([Mt()],ws.prototype,"value",2),fs([Xt("checked")],ws.prototype,"handleCheckedChange",1),fs([Xt("disabled",{waitUntilFirstUpdate:!0})],ws.prototype,"handleDisabledChange",1),ws=fs([Pt("sd-radio")],ws);const xs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ws}},Symbol.toStringTag,{value:"Module"}));var ks=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,$s=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Cs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ks(e,i,s),s};let Ss=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.label="",this.boldLabel=!1,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?Qe:t?Je:Ge}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-radio, sd-radio-button"),i=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,i.forEach((t=>t.checked=t===e)),this.value!==o&&(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)),i=e.find((t=>t.checked))??e[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,r=this.value;let s=e.indexOf(i)+o;s<0&&(s=e.length-1),s>e.length-1&&(s=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[s].value,e[s].checked=!0,this.hasButtonGroup?e[s].shadowRoot.querySelector("button").focus():(e[s].tabIndex=0,e[s].focus()),this.value!==r&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){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),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var t,e;const i=this.getAllRadios();if(await Promise.all(i.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof ws&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=i.some((t=>"sd-radio-button"===t.tagName.toLowerCase())),!i.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=i[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else i[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-radio")&&customElements.get("sd-radio-button")?this.syncRadioElements():(customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then((()=>this.syncRadios())),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-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.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=!!this.label||!!t,i=pt`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return pt`<fieldset part="form-control" class="${we("border-0 p-0 m-0 flex flex-col",{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="${we("mb-2 p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${we("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?pt`<sd-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${i}</sd-button-group>`:i}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};Ss.dependencies={"sd-button-group":ms},Ss.styles=[Gt,ie.styles,P`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],$s([Bt("slot:not([name])")],Ss.prototype,"defaultSlot",2),$s([Bt("#validation-input")],Ss.prototype,"validationInput",2),$s([Bt("#invalid-message")],Ss.prototype,"invalidMessage",2),$s([Dt()],Ss.prototype,"hasButtonGroup",2),$s([Dt()],Ss.prototype,"defaultValue",2),$s([Dt()],Ss.prototype,"showInvalidStyle",2),$s([Mt()],Ss.prototype,"label",2),$s([Mt({type:Boolean,reflect:!0})],Ss.prototype,"boldLabel",2),$s([Mt()],Ss.prototype,"name",2),$s([Mt({reflect:!0})],Ss.prototype,"value",2),$s([Mt({reflect:!0})],Ss.prototype,"size",2),$s([Mt({reflect:!0})],Ss.prototype,"form",2),$s([Mt({type:Boolean,reflect:!0})],Ss.prototype,"required",2),$s([Mt({reflect:!0})],Ss.prototype,"orientation",2),$s([Xt("size",{waitUntilFirstUpdate:!0})],Ss.prototype,"handleSizeChange",1),$s([Xt("showInvalidStyle",{waitUntilFirstUpdate:!0})],Ss.prototype,"handleInvalidChange",1),$s([Xt("value")],Ss.prototype,"handleValueChange",1),Ss=$s([Pt("sd-radio-group")],Ss);const _s=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ss}},Symbol.toStringTag,{value:"Module"}));var zs=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,Es=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Os(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&zs(e,i,s),s};let Ps=class extends ie{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")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}render(){const t=this.isLink(),e=t?oi`a`:oi`button`;return si`<${e} part="base" type="${ai(t?void 0:"button")}" href="${ai(t?this.href:void 0)}" rel="${ai(t&&this.target?"noreferrer noopener":void 0)}" target="${ai(t?this.target:void 0)}" download="${ai(t?this.download:void 0)}" ?disabled="${ai(t?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${we("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&&!t&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?si`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${we({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-icon library="system" name="close" label="remove"></sd-icon></slot>`:""}</${e}>`}};Ps.styles=[ie.styles,P`:host{display:inline-block}`],Es([Bt("a, button")],Ps.prototype,"tag",2),Es([Mt({reflect:!0})],Ps.prototype,"size",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"selected",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"removable",2),Es([Mt({type:Boolean,reflect:!0})],Ps.prototype,"disabled",2),Es([Mt()],Ps.prototype,"href",2),Es([Mt()],Ps.prototype,"target",2),Es([Mt()],Ps.prototype,"download",2),Ps=Es([Pt("sd-tag")],Ps);const As=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ps}},Symbol.toStringTag,{value:"Module"}));var Ts=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,Ds=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ms(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ts(e,i,s),s};let Ls=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new ti(this,"help-text","label"),this.localize=new k(this),this.typeToSelectString="",this.hasHover=!1,this.displayLabel="",this.hasFocus=!1,this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>pt`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
100
100
  base:tag__base,
101
101
  content:tag__content,
102
102
  removable-indicator:tag__removable-indicator,
103
103
  " size="${"sm"===this.size?"sm":"lg"}" removable @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`,this.handleDocumentFocusIn=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()},this.handleDocumentKeyDown=t=>{const e=t.target,i=null!==e.closest(".select__clear"),o=null!==e.closest("sd-icon-button");if(!i&&!o){if("Escape"===t.key&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===t.key||" "===t.key&&""===this.typeToSelectString)return t.preventDefault(),t.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getAllOptions(),i=e.indexOf(this.currentOption);let o=Math.max(0,i);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===t.key?(o=i+1,o>e.length-1&&(o=0)):"ArrowUp"===t.key?(o=i-1,o<0&&(o=e.length-1)):"Home"===t.key?o=0:"End"===t.key&&(o=e.length-1),this.setCurrentOption(e[o])}if(1===t.key.length||"Backspace"===t.key){const e=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if("Backspace"===t.key)return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===t.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(const t of e)if(t.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(t);break}}}},this.handleDocumentMouseDown=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.applySizeToOptions(),this.open=!1}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(t){const e=t.composedPath().some((t=>t instanceof HTMLSlotElement&&"removable-indicator"===t.name));this.disabled||e||(t.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})))}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){const e=t.target.closest("sd-option"),i=this.value;e&&!e.disabled&&(this.multiple?this.toggleOptionSelection(e):this.setSelectedOptions(e),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==i&&this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],i=[];customElements.get("sd-option")?(t.forEach((t=>{this.multiple&&(t.checkbox=!0),i.push(t.value)})),this.setSelectedOptions(t.filter((t=>e.includes(t.value))))):customElements.whenDefined("sd-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(t,e){t.stopPropagation(),this.disabled||(this.toggleOptionSelection(e,!1),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t){this.getAllOptions().forEach((t=>{t.current=!1,t.tabIndex=-1})),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus())}setSelectedOptions(t){const e=this.getAllOptions(),i=Array.isArray(t)?t:[t];e.forEach((t=>t.selected=!1)),i.length&&i.forEach((t=>t.selected=!0)),this.selectionChanged()}toggleOptionSelection(t,e){t.selected=!0===e||!1===e?e:!t.selected,this.selectionChanged()}selectionChanged(){var t,e;this.selectedOptions=this.getAllOptions().filter((t=>t.selected)),this.multiple?(this.value=this.selectedOptions.map((t=>t.value)),this.useTags||0===this.value.length?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(null==(t=this.selectedOptions[0])?void 0:t.value)??"",this.displayLabel=(null==(e=this.selectedOptions[0])?void 0:e.getTextLabel())??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}get tags(){return this.selectedOptions.map(((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){const i=this.getTag(t,e);return pt`<div @sd-remove="${e=>this.handleTagRemove(e,t)}">${"string"==typeof i?Zt(i):i}</div>`}return e===this.maxOptionsVisible?pt`<sd-tag size="${"sm"===this.size?"sm":"lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length-e}</sd-tag>`:pt``}))}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){const e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){const t=this.getAllOptions();customElements.get("sd-option")&&t.forEach((t=>{t.checkbox=this.multiple}))}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await pe(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:t,options:e}=ye(this,"select.show",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.currentOption&&Ni(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await pe(this);const{keyframes:t,options:e}=ye(this,"select.hide",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach((t=>{t.size=this.size}))}handleValueChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter((t=>e.includes(t.value))))}async show(){if(!this.open&&!this.disabled)return this.open=!0,fe(this,"sd-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,fe(this,"sd-after-hide");this.open=!1}checkValidity(){var t;return null==(t=this.valueInput)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}render(){this.hasSlotController.test("[default]");const t=this.hasSlotController.test("label"),e=(this.hasSlotController.test("clear-icon"),this.hasSlotController.test("expand-icon"),this.hasSlotController.test("help-text")),i=!!this.label||!!t,o=!!this.helpText||!!e,r=this.clearable&&!this.disabled&&this.value.length>0,s=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",a=this.disabled?"cursor-not-allowed":"cursor-pointer",n={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],l={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return pt`<div part="form-control" class="${we("relative text-left",a,"sm"===this.size?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${i&&"inline-block mb-2"}" aria-hidden="${i?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${we("relative w-full bg-white",{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"}[s])}"><div part="border" class="${we("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{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"}[s],this.open&&("bottom"===this.currentPlacement?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${we("inline-flex relative w-full","bottom"===this.currentPlacement?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
104
104
  popup:popup__content,
105
- "><div part="combobox" class="${we("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${we("appearance-none outline-none flex-grow bg-transparent",a,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?pt`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${we("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",a)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${r?pt`<button part="clear-button" class="${we("select__clear flex justify-center",n)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${we("text-neutral-500",l)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?pt`<sd-icon part="invalid-icon" class="${we("text-error",n,l)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?pt`<sd-icon part="valid-icon" class="${we("text-success",n,l)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${we("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",l)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${we("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};Ls.dependencies={"sd-icon":ne,"sd-popup":mr,"sd-tag":Ps},Ls.styles=[Gt,ie.styles,P`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],Ds([Vt({selector:"sd-option"})],Ls.prototype,"_optionsInDefaultSlot",2),Ds([Bt("sd-popup")],Ls.prototype,"popup",2),Ds([Bt('[part="combobox"]')],Ls.prototype,"combobox",2),Ds([Bt('[part="display-input"]')],Ls.prototype,"displayInput",2),Ds([Bt(".value-input")],Ls.prototype,"valueInput",2),Ds([Bt('[part="listbox"]')],Ls.prototype,"listbox",2),Ds([Bt("#invalid-message")],Ls.prototype,"invalidMessage",2),Ds([Dt()],Ls.prototype,"hasFocus",2),Ds([Dt()],Ls.prototype,"hasHover",2),Ds([Dt()],Ls.prototype,"displayLabel",2),Ds([Dt()],Ls.prototype,"currentOption",2),Ds([Dt()],Ls.prototype,"selectedOptions",2),Ds([Dt()],Ls.prototype,"showValidStyle",2),Ds([Dt()],Ls.prototype,"showInvalidStyle",2),Ds([Mi()],Ls.prototype,"defaultValue",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"open",2),Ds([Mt({reflect:!0})],Ls.prototype,"size",2),Ds([Mt()],Ls.prototype,"label",2),Ds([Mt()],Ls.prototype,"placeholder",2),Ds([Mt({attribute:"help-text"})],Ls.prototype,"helpText",2),Ds([Mt({reflect:!0})],Ls.prototype,"placement",2),Ds([Dt()],Ls.prototype,"currentPlacement",2),Ds([Mt({type:Boolean})],Ls.prototype,"clearable",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"disabled",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"multiple",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"useTags",2),Ds([Mt({attribute:"max-options-visible",type:Number})],Ls.prototype,"maxOptionsVisible",2),Ds([Mt({reflect:!0})],Ls.prototype,"form",2),Ds([Mt()],Ls.prototype,"name",2),Ds([Mt({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Ls.prototype,"value",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"required",2),Ds([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Ls.prototype,"styleOnValid",2),Ds([Mt({type:Boolean})],Ls.prototype,"hoist",2),Ds([Mt()],Ls.prototype,"getTag",2),Ds([Xt("useTags",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleUseTagsChange",1),Ds([Xt("disabled",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleDisabledChange",1),Ds([Xt("open",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleOpenChange",1),Ds([Xt("size",{waitUntilFirstUpdate:!0})],Ls.prototype,"applySizeToOptions",1),Ds([Xt("value",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleValueChange",1),Ls=Ds([Pt("sd-select")],Ls),ve("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ve("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Bs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ls}},Symbol.toStringTag,{value:"Module"}));var Vs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,js=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Is(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Vs(e,i,s),s};let Us=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.showInvalidStyle=!1,this.title="",this.name="",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return pt`<label part="base" class="${we("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ai(this.value)}" .checked="${Li(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${we("relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${we("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${we("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Us.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}`],js([Bt("input")],Us.prototype,"input",2),js([Bt("#invalid-message")],Us.prototype,"invalidMessage",2),js([Dt()],Us.prototype,"showInvalidStyle",2),js([Mt()],Us.prototype,"title",2),js([Mt()],Us.prototype,"name",2),js([Mt()],Us.prototype,"value",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"disabled",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"checked",2),js([Mi("checked")],Us.prototype,"defaultChecked",2),js([Mt({reflect:!0})],Us.prototype,"form",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"required",2),js([Xt("disabled",{waitUntilFirstUpdate:!0})],Us.prototype,"handleDisabledChange",1),js([Xt(["checked"],{waitUntilFirstUpdate:!0})],Us.prototype,"handleStateChange",1),Us=js([Pt("sd-switch")],Us);const Fs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Us}},Symbol.toStringTag,{value:"Module"}));var Rs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Ns=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Hs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Rs(e,i,s),s};let qs=class extends ie{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new ti(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,e=this.hasSlotController.test("[default]"),i=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),pt`<div class="${we("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="${we(!t&&"vertical"===this._orientation&&"mb-4",!i&&"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="${we("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${we("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${we("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="${we(!e&&"hidden")}"><slot></slot></div></div></div>`}};qs.styles=[ie.styles,P`: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}`],Ns([Mt({reflect:!0})],qs.prototype,"variant",2),Ns([Mt({reflect:!0,type:Number})],qs.prototype,"breakpoint",2),Ns([Mt({type:Boolean,reflect:!0})],qs.prototype,"inset",2),Ns([Bt('[part="base"]')],qs.prototype,"teaser",2),Ns([Dt()],qs.prototype,"_orientation",2),qs=Ns([Pt("sd-teaser")],qs);const Ks=Object.freeze(Object.defineProperty({__proto__:null,get default(){return qs}},Symbol.toStringTag,{value:"Module"}));var Zs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Ys=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ws(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zs(e,i,s),s};let Xs=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(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,i="none"){this.textarea.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.textarea.setRangeText(t,e,i,o),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"),e=this.hasSlotController.test("help-text"),i=!!this.label||!!t,o=!!this.helpText||!!e,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",s="sm"===this.size?"text-sm":"text-base",a={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return pt`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${we("mb-2",i?"inline-block":"hidden",s)}" for="input" aria-hidden="${i?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${we("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${we("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="${we("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="${we("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",s)}" title="${this.title}" name="${ai(this.name)}" .value="${Li(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ai(this.placeholder)}" minlength="${ai(this.minlength)}" maxlength="${ai(this.maxlength)}" rows="${ai(this.rows)}" autocapitalize="${ai(this.autocapitalize)}" autocorrect="${ai(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ai(this.spellcheck)}" enterkeyhint="${ai(this.enterkeyhint)}" inputmode="${ai(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?pt`<sd-icon class="${we("text-error absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?pt`<sd-icon class="${we("text-success absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${we("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Xs.styles=[Gt,ie.styles,P`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],Ys([Bt("#input")],Xs.prototype,"textarea",2),Ys([Bt("#invalid-message")],Xs.prototype,"invalidMessage",2),Ys([Dt()],Xs.prototype,"hasFocus",2),Ys([Dt()],Xs.prototype,"showValidStyle",2),Ys([Dt()],Xs.prototype,"showInvalidStyle",2),Ys([Mt()],Xs.prototype,"title",2),Ys([Mt()],Xs.prototype,"name",2),Ys([Mt()],Xs.prototype,"value",2),Ys([Mt({reflect:!0})],Xs.prototype,"size",2),Ys([Mt()],Xs.prototype,"label",2),Ys([Mt({attribute:"help-text"})],Xs.prototype,"helpText",2),Ys([Mt()],Xs.prototype,"placeholder",2),Ys([Mt({type:Number})],Xs.prototype,"rows",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"disabled",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"readonly",2),Ys([Mt({reflect:!0})],Xs.prototype,"form",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"required",2),Ys([Mt({type:Number})],Xs.prototype,"minlength",2),Ys([Mt({type:Number})],Xs.prototype,"maxlength",2),Ys([Mt()],Xs.prototype,"autocapitalize",2),Ys([Mt()],Xs.prototype,"autocorrect",2),Ys([Mt()],Xs.prototype,"autocomplete",2),Ys([Mt({type:Boolean})],Xs.prototype,"autofocus",2),Ys([Mt()],Xs.prototype,"enterkeyhint",2),Ys([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Xs.prototype,"styleOnValid",2),Ys([Mt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Xs.prototype,"spellcheck",2),Ys([Mt()],Xs.prototype,"inputmode",2),Ys([Mi()],Xs.prototype,"defaultValue",2),Ys([Xt("disabled",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleDisabledChange",1),Ys([Xt("rows",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleRowsChange",1),Ys([Xt("value",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleValueChange",1),Xs=Ys([Pt("sd-textarea")],Xs);const Gs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Xs}},Symbol.toStringTag,{value:"Module"}));var Js=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,ta=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Qs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Js(e,i,s),s};let ea=class extends ie{constructor(){super(...arguments),this.localize=new k(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 t=he(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}}handleMouseOut(){if(this.hasTrigger("hover")){const t=he(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await pe(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=ye(this,"tooltip.show",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await pe(this.body);const{keyframes:t,options:e}=ye(this,"tooltip.hide",{dir:this.localize.dir()});await de(this.popup.popup,t,e),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,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return pt`<sd-popup part="base" exportparts="
105
+ "><div part="combobox" class="${we("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${we("appearance-none outline-none flex-grow bg-transparent",a,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?pt`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${we("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",a)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${r?pt`<button part="clear-button" class="${we("select__clear flex justify-center",n)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${we("text-neutral-500",l)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?pt`<sd-icon part="invalid-icon" class="${we("text-error",n,l)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?pt`<sd-icon part="valid-icon" class="${we("text-success",n,l)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${we("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",l)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${we("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};Ls.dependencies={"sd-icon":ne,"sd-popup":mr,"sd-tag":Ps},Ls.styles=[Gt,ie.styles,P`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],Ds([Vt({selector:"sd-option"})],Ls.prototype,"_optionsInDefaultSlot",2),Ds([Bt("sd-popup")],Ls.prototype,"popup",2),Ds([Bt('[part="combobox"]')],Ls.prototype,"combobox",2),Ds([Bt('[part="display-input"]')],Ls.prototype,"displayInput",2),Ds([Bt(".value-input")],Ls.prototype,"valueInput",2),Ds([Bt('[part="listbox"]')],Ls.prototype,"listbox",2),Ds([Bt("#invalid-message")],Ls.prototype,"invalidMessage",2),Ds([Dt()],Ls.prototype,"hasHover",2),Ds([Dt()],Ls.prototype,"displayLabel",2),Ds([Dt()],Ls.prototype,"hasFocus",2),Ds([Dt()],Ls.prototype,"currentOption",2),Ds([Dt()],Ls.prototype,"selectedOptions",2),Ds([Dt()],Ls.prototype,"showValidStyle",2),Ds([Dt()],Ls.prototype,"showInvalidStyle",2),Ds([Mi()],Ls.prototype,"defaultValue",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"open",2),Ds([Mt({reflect:!0})],Ls.prototype,"size",2),Ds([Mt()],Ls.prototype,"label",2),Ds([Mt()],Ls.prototype,"placeholder",2),Ds([Mt({attribute:"help-text"})],Ls.prototype,"helpText",2),Ds([Mt({reflect:!0})],Ls.prototype,"placement",2),Ds([Dt()],Ls.prototype,"currentPlacement",2),Ds([Mt({type:Boolean})],Ls.prototype,"clearable",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"disabled",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"multiple",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"useTags",2),Ds([Mt({attribute:"max-options-visible",type:Number})],Ls.prototype,"maxOptionsVisible",2),Ds([Mt({reflect:!0})],Ls.prototype,"form",2),Ds([Mt()],Ls.prototype,"name",2),Ds([Mt({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Ls.prototype,"value",2),Ds([Mt({type:Boolean,reflect:!0})],Ls.prototype,"required",2),Ds([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Ls.prototype,"styleOnValid",2),Ds([Mt({type:Boolean})],Ls.prototype,"hoist",2),Ds([Mt()],Ls.prototype,"getTag",2),Ds([Xt("useTags",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleUseTagsChange",1),Ds([Xt("disabled",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleDisabledChange",1),Ds([Xt("open",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleOpenChange",1),Ds([Xt("size",{waitUntilFirstUpdate:!0})],Ls.prototype,"applySizeToOptions",1),Ds([Xt("value",{waitUntilFirstUpdate:!0})],Ls.prototype,"handleValueChange",1),Ls=Ds([Pt("sd-select")],Ls),ve("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ve("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Bs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ls}},Symbol.toStringTag,{value:"Module"}));var Vs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,js=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Is(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Vs(e,i,s),s};let Us=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.showInvalidStyle=!1,this.title="",this.name="",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return pt`<label part="base" class="${we("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ai(this.value)}" .checked="${Li(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${we("relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${we("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${we("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Us.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}`],js([Bt("input")],Us.prototype,"input",2),js([Bt("#invalid-message")],Us.prototype,"invalidMessage",2),js([Dt()],Us.prototype,"showInvalidStyle",2),js([Mt()],Us.prototype,"title",2),js([Mt()],Us.prototype,"name",2),js([Mt()],Us.prototype,"value",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"disabled",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"checked",2),js([Mi("checked")],Us.prototype,"defaultChecked",2),js([Mt({reflect:!0})],Us.prototype,"form",2),js([Mt({type:Boolean,reflect:!0})],Us.prototype,"required",2),js([Xt("disabled",{waitUntilFirstUpdate:!0})],Us.prototype,"handleDisabledChange",1),js([Xt(["checked"],{waitUntilFirstUpdate:!0})],Us.prototype,"handleStateChange",1),Us=js([Pt("sd-switch")],Us);const Fs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Us}},Symbol.toStringTag,{value:"Module"}));var Rs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Ns=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Hs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Rs(e,i,s),s};let qs=class extends ie{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new ti(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,e=this.hasSlotController.test("[default]"),i=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),pt`<div class="${we("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="${we(!t&&"vertical"===this._orientation&&"mb-4",!i&&"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="${we("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${we("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${we("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="${we(!e&&"hidden")}"><slot></slot></div></div></div>`}};qs.styles=[ie.styles,P`: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}`],Ns([Mt({reflect:!0})],qs.prototype,"variant",2),Ns([Mt({reflect:!0,type:Number})],qs.prototype,"breakpoint",2),Ns([Mt({type:Boolean,reflect:!0})],qs.prototype,"inset",2),Ns([Bt('[part="base"]')],qs.prototype,"teaser",2),Ns([Dt()],qs.prototype,"_orientation",2),qs=Ns([Pt("sd-teaser")],qs);const Ks=Object.freeze(Object.defineProperty({__proto__:null,get default(){return qs}},Symbol.toStringTag,{value:"Module"}));var Zs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Ys=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ws(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zs(e,i,s),s};let Xs=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(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,i="none"){this.textarea.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.textarea.setRangeText(t,e,i,o),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"),e=this.hasSlotController.test("help-text"),i=!!this.label||!!t,o=!!this.helpText||!!e,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",s="sm"===this.size?"text-sm":"text-base",a={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return pt`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${we("mb-2",i?"inline-block":"hidden",s)}" for="input" aria-hidden="${i?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${we("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${we("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="${we("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="${we("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",s)}" title="${this.title}" name="${ai(this.name)}" .value="${Li(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ai(this.placeholder)}" minlength="${ai(this.minlength)}" maxlength="${ai(this.maxlength)}" rows="${ai(this.rows)}" autocapitalize="${ai(this.autocapitalize)}" autocorrect="${ai(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ai(this.spellcheck)}" enterkeyhint="${ai(this.enterkeyhint)}" inputmode="${ai(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?pt`<sd-icon class="${we("text-error absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?pt`<sd-icon class="${we("text-success absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${we("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Xs.styles=[Gt,ie.styles,P`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],Ys([Bt("#input")],Xs.prototype,"textarea",2),Ys([Bt("#invalid-message")],Xs.prototype,"invalidMessage",2),Ys([Dt()],Xs.prototype,"hasFocus",2),Ys([Dt()],Xs.prototype,"showValidStyle",2),Ys([Dt()],Xs.prototype,"showInvalidStyle",2),Ys([Mt()],Xs.prototype,"title",2),Ys([Mt()],Xs.prototype,"name",2),Ys([Mt()],Xs.prototype,"value",2),Ys([Mt({reflect:!0})],Xs.prototype,"size",2),Ys([Mt()],Xs.prototype,"label",2),Ys([Mt({attribute:"help-text"})],Xs.prototype,"helpText",2),Ys([Mt()],Xs.prototype,"placeholder",2),Ys([Mt({type:Number})],Xs.prototype,"rows",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"disabled",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"readonly",2),Ys([Mt({reflect:!0})],Xs.prototype,"form",2),Ys([Mt({type:Boolean,reflect:!0})],Xs.prototype,"required",2),Ys([Mt({type:Number})],Xs.prototype,"minlength",2),Ys([Mt({type:Number})],Xs.prototype,"maxlength",2),Ys([Mt()],Xs.prototype,"autocapitalize",2),Ys([Mt()],Xs.prototype,"autocorrect",2),Ys([Mt()],Xs.prototype,"autocomplete",2),Ys([Mt({type:Boolean})],Xs.prototype,"autofocus",2),Ys([Mt()],Xs.prototype,"enterkeyhint",2),Ys([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Xs.prototype,"styleOnValid",2),Ys([Mt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Xs.prototype,"spellcheck",2),Ys([Mt()],Xs.prototype,"inputmode",2),Ys([Mi()],Xs.prototype,"defaultValue",2),Ys([Xt("disabled",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleDisabledChange",1),Ys([Xt("rows",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleRowsChange",1),Ys([Xt("value",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleValueChange",1),Xs=Ys([Pt("sd-textarea")],Xs);const Gs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Xs}},Symbol.toStringTag,{value:"Module"}));var Js=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,ta=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Qs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Js(e,i,s),s};let ea=class extends ie{constructor(){super(...arguments),this.localize=new k(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 t=he(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}}handleMouseOut(){if(this.hasTrigger("hover")){const t=he(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await pe(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=ye(this,"tooltip.show",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await pe(this.body);const{keyframes:t,options:e}=ye(this,"tooltip.hide",{dir:this.localize.dir()});await de(this.popup.popup,t,e),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,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return pt`<sd-popup part="base" exportparts="
106
106
  popup:base__popup,
107
107
  arrow:base__arrow
108
108
  " class="${we(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="${we("lg"===this.size?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-icon library="system" name="info-circle" class="${we(this.disabled&&"sd-interactive--disabled")}"></sd-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-popup>`}};ea.styles=[ie.styles,E(ki),P`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-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-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-popup[placement^=top]::part(popup){transform-origin:bottom}sd-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}`],ta([Bt("slot:not([name])")],ea.prototype,"defaultSlot",2),ta([Bt("#tooltip")],ea.prototype,"body",2),ta([Bt("sd-popup")],ea.prototype,"popup",2),ta([Mt()],ea.prototype,"content",2),ta([Mt({reflect:!0})],ea.prototype,"placement",2),ta([Mt()],ea.prototype,"size",2),ta([Mt({type:Boolean,reflect:!0})],ea.prototype,"disabled",2),ta([Mt({type:Boolean,reflect:!0})],ea.prototype,"open",2),ta([Mt()],ea.prototype,"trigger",2),ta([Mt({type:Boolean})],ea.prototype,"hoist",2),ta([Xt("open",{waitUntilFirstUpdate:!0})],ea.prototype,"handleOpenChange",1),ta([Xt(["content","hoist","placement"])],ea.prototype,"handleOptionsChange",1),ta([Xt("disabled")],ea.prototype,"handleDisabledChange",1),ea=ta([Pt("sd-tooltip")],ea),ve("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),ve("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const ia=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ea}},Symbol.toStringTag,{value:"Module"}));var oa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,sa=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ra(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&oa(e,i,s),s};let aa=class extends ie{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new ti(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 pt`<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="${we(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="${we(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="${we(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-icon id="default-play-icon" library="system" name="start"></sd-icon></slot></div></button> ${this.hasSlotController.test("poster")?pt`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<div part="overlay" id="overlay" role="presentation" class="${we(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>`}};aa.styles=[ie.styles,P`: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))}`],sa([Bt("[part=base]")],aa.prototype,"hostEl",2),sa([Mt({type:Boolean,reflect:!0})],aa.prototype,"playing",2),sa([Mt({type:Boolean,reflect:!0})],aa.prototype,"overlay",2),sa([Mt({type:Boolean})],aa.prototype,"isBelowBreakpoint",2),aa=sa([Pt("sd-video")],aa);const na=Object.freeze(Object.defineProperty({__proto__:null,get default(){return aa}},Symbol.toStringTag,{value:"Module"}));t.LocalizeController=k,t.registerIconLibrary=c,t.unregisterIconLibrary=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})},"object"==typeof exports&&typeof module<"u"?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self)["Solid Components"]={});