@solid-design-system/components 3.19.1 → 3.19.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. package/dist/components/es/autoplay-controller.js +1 -1
  2. package/dist/components/es/brandshape.js +3 -1
  3. package/dist/components/es/carousel.js +3 -3
  4. package/dist/components/es/solid-components2.js +1 -1
  5. package/dist/components/umd/solid-components.js +6 -4
  6. package/dist/custom-elements.json +1 -1
  7. package/dist/package/components/brandshape/brandshape.d.ts +1 -2
  8. package/dist/package/components/brandshape/brandshape.js +9 -14
  9. package/dist/package/components/carousel/autoplay-controller.d.ts +0 -2
  10. package/dist/package/components/carousel/autoplay-controller.js +0 -8
  11. package/dist/package/components/carousel/carousel.d.ts +3 -0
  12. package/dist/package/components/carousel/carousel.js +23 -6
  13. package/dist/package/styles/tailwind.css.js +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/audio.js +1 -1
  17. package/dist/versioned-components/es/autoplay-controller.js +1 -1
  18. package/dist/versioned-components/es/badge.js +1 -1
  19. package/dist/versioned-components/es/brandshape.js +3 -1
  20. package/dist/versioned-components/es/button.js +1 -1
  21. package/dist/versioned-components/es/carousel-item.js +1 -1
  22. package/dist/versioned-components/es/carousel.js +3 -3
  23. package/dist/versioned-components/es/checkbox-group.js +1 -1
  24. package/dist/versioned-components/es/checkbox.js +1 -1
  25. package/dist/versioned-components/es/dialog.js +1 -1
  26. package/dist/versioned-components/es/divider.js +1 -1
  27. package/dist/versioned-components/es/drawer.js +1 -1
  28. package/dist/versioned-components/es/dropdown.js +1 -1
  29. package/dist/versioned-components/es/expandable.js +1 -1
  30. package/dist/versioned-components/es/flipcard.js +1 -1
  31. package/dist/versioned-components/es/form.js +1 -1
  32. package/dist/versioned-components/es/header.js +1 -1
  33. package/dist/versioned-components/es/icon.js +1 -1
  34. package/dist/versioned-components/es/include.js +1 -1
  35. package/dist/versioned-components/es/input.js +1 -1
  36. package/dist/versioned-components/es/link.js +1 -1
  37. package/dist/versioned-components/es/map-marker.js +1 -1
  38. package/dist/versioned-components/es/navigation-item.js +1 -1
  39. package/dist/versioned-components/es/notification.js +1 -1
  40. package/dist/versioned-components/es/option.js +1 -1
  41. package/dist/versioned-components/es/quickfact.js +1 -1
  42. package/dist/versioned-components/es/radio-button.js +1 -1
  43. package/dist/versioned-components/es/radio-group.js +1 -1
  44. package/dist/versioned-components/es/radio.js +1 -1
  45. package/dist/versioned-components/es/scrollable.js +1 -1
  46. package/dist/versioned-components/es/select.js +3 -3
  47. package/dist/versioned-components/es/solid-components2.js +1 -1
  48. package/dist/versioned-components/es/spinner.js +1 -1
  49. package/dist/versioned-components/es/step-group.js +1 -1
  50. package/dist/versioned-components/es/step.js +1 -1
  51. package/dist/versioned-components/es/switch.js +1 -1
  52. package/dist/versioned-components/es/tab-group.js +1 -1
  53. package/dist/versioned-components/es/tab-panel.js +1 -1
  54. package/dist/versioned-components/es/tab.js +1 -1
  55. package/dist/versioned-components/es/tag.js +1 -1
  56. package/dist/versioned-components/es/teaser-media.js +1 -1
  57. package/dist/versioned-components/es/teaser.js +1 -1
  58. package/dist/versioned-components/es/textarea.js +1 -1
  59. package/dist/versioned-components/es/tooltip.js +2 -2
  60. package/dist/versioned-components/es/video.js +1 -1
  61. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  62. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  63. package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
  64. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  65. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  66. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  67. package/dist/versioned-package/components/audio/audio.d.ts +1 -1
  68. package/dist/versioned-package/components/audio/audio.js +6 -6
  69. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  70. package/dist/versioned-package/components/badge/badge.js +1 -1
  71. package/dist/versioned-package/components/brandshape/brandshape.d.ts +2 -3
  72. package/dist/versioned-package/components/brandshape/brandshape.js +10 -15
  73. package/dist/versioned-package/components/button/button.d.ts +1 -1
  74. package/dist/versioned-package/components/button/button.js +4 -4
  75. package/dist/versioned-package/components/carousel/autoplay-controller.d.ts +0 -2
  76. package/dist/versioned-package/components/carousel/autoplay-controller.js +0 -8
  77. package/dist/versioned-package/components/carousel/carousel.d.ts +4 -1
  78. package/dist/versioned-package/components/carousel/carousel.js +29 -12
  79. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  80. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  81. package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
  82. package/dist/versioned-package/components/checkbox/checkbox.js +3 -3
  83. package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
  84. package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
  85. package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
  86. package/dist/versioned-package/components/dialog/dialog.js +2 -2
  87. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  88. package/dist/versioned-package/components/divider/divider.js +2 -2
  89. package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
  90. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  91. package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
  92. package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
  93. package/dist/versioned-package/components/expandable/expandable.d.ts +1 -1
  94. package/dist/versioned-package/components/expandable/expandable.js +2 -2
  95. package/dist/versioned-package/components/flipcard/flipcard.d.ts +1 -1
  96. package/dist/versioned-package/components/flipcard/flipcard.js +1 -1
  97. package/dist/versioned-package/components/header/header.d.ts +1 -1
  98. package/dist/versioned-package/components/header/header.js +4 -4
  99. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  100. package/dist/versioned-package/components/icon/icon.js +1 -1
  101. package/dist/versioned-package/components/include/include.d.ts +1 -1
  102. package/dist/versioned-package/components/include/include.js +1 -1
  103. package/dist/versioned-package/components/input/input.d.ts +1 -1
  104. package/dist/versioned-package/components/input/input.js +2 -2
  105. package/dist/versioned-package/components/link/link.d.ts +1 -1
  106. package/dist/versioned-package/components/link/link.js +2 -2
  107. package/dist/versioned-package/components/map-marker/map-marker.d.ts +1 -1
  108. package/dist/versioned-package/components/map-marker/map-marker.js +1 -1
  109. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  110. package/dist/versioned-package/components/navigation-item/navigation-item.js +5 -5
  111. package/dist/versioned-package/components/notification/notification.d.ts +1 -1
  112. package/dist/versioned-package/components/notification/notification.js +5 -5
  113. package/dist/versioned-package/components/option/option.d.ts +1 -1
  114. package/dist/versioned-package/components/option/option.js +2 -2
  115. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  116. package/dist/versioned-package/components/popup/popup.js +1 -1
  117. package/dist/versioned-package/components/quickfact/quickfact.d.ts +1 -1
  118. package/dist/versioned-package/components/quickfact/quickfact.js +2 -2
  119. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  120. package/dist/versioned-package/components/radio/radio.js +2 -2
  121. package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
  122. package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
  123. package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
  124. package/dist/versioned-package/components/radio-group/radio-group.js +13 -13
  125. package/dist/versioned-package/components/scrollable/scrollable.d.ts +1 -1
  126. package/dist/versioned-package/components/scrollable/scrollable.js +3 -3
  127. package/dist/versioned-package/components/select/select.d.ts +4 -4
  128. package/dist/versioned-package/components/select/select.js +25 -25
  129. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  130. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  131. package/dist/versioned-package/components/step/step.d.ts +1 -1
  132. package/dist/versioned-package/components/step/step.js +2 -2
  133. package/dist/versioned-package/components/step-group/step-group.d.ts +1 -1
  134. package/dist/versioned-package/components/step-group/step-group.js +2 -2
  135. package/dist/versioned-package/components/switch/switch.d.ts +1 -1
  136. package/dist/versioned-package/components/switch/switch.js +1 -1
  137. package/dist/versioned-package/components/tab/tab.d.ts +1 -1
  138. package/dist/versioned-package/components/tab/tab.js +2 -2
  139. package/dist/versioned-package/components/tab-group/tab-group.d.ts +1 -1
  140. package/dist/versioned-package/components/tab-group/tab-group.js +13 -13
  141. package/dist/versioned-package/components/tab-panel/tab-panel.d.ts +1 -1
  142. package/dist/versioned-package/components/tab-panel/tab-panel.js +2 -2
  143. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  144. package/dist/versioned-package/components/tag/tag.js +2 -2
  145. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  146. package/dist/versioned-package/components/teaser-media/teaser-media.js +1 -1
  147. package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
  148. package/dist/versioned-package/components/textarea/textarea.js +2 -2
  149. package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
  150. package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
  151. package/dist/versioned-package/components/video/video.d.ts +1 -1
  152. package/dist/versioned-package/components/video/video.js +2 -2
  153. package/dist/versioned-package/internal/form.js +3 -3
  154. package/dist/versioned-package/styles/headline/headline.css.js +1 -1
  155. package/dist/versioned-package/styles/tailwind.css.js +1 -1
  156. package/dist/versioned-package/utilities/autocomplete-config.js +4 -4
  157. package/dist/versioned-styles/solid-styles.css +1 -1
  158. package/dist/vscode.html-custom-data.json +47 -47
  159. package/dist/web-types.json +48 -66
  160. package/package.json +2 -2
@@ -1 +1 @@
1
- import{S as t,t as e,c as i,r as s,i as r,n as o,a}from"./solid-components2.js";import{H as l}from"./slot.js";import{s as n,n as d}from"./static.js";import{o as h}from"./if-defined.js";import{I as c}from"./interactive.js";var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,v=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?u(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&p(e,i,o),o};let f=class extends t{constructor(){super(...arguments),this.hasSlotController=new l(this,"[default]","description","children"),this.vertical=!1,this.size="base",this.current=!1,this.disabled=!1,this.chevron=!1,this.relaxed=!1,this.divider=!1,this.indented=!1,this.open=!1,this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?n`summary`:this.separated?n`div`:this.isLink?n`a`:n`button`}render(){const t=this.tag,i=this.isLink,s=this.isButton,r=this.isAccordion,o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),a=this.hasSlotController.test("children"),l=this.vertical?"pb-3":"pb-2",n=d`<${t} part="base" class="${e("cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",r?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${h(r?"navigation-item-details":void 0)}" aria-current="${h(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${h(s?this.disabled:void 0)}" href="${h(i?this.href:void 0)}" target="${h(i?this.target:void 0)}" download="${h(i?this.download:void 0)}" rel="${h(i&&this.target?"noreferrer noopener":void 0)}" role="${i?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:r?this.handleClickSummary:s?this.handleClickButton:void 0}"><div part="current-indicator" class="${e("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${e("relative pt-3 inline-flex justify-between items-center",r?"grow":"w-full",o||this.separated?"pb-1":l,this.calculatePaddingX)}">${this.divider&&this.vertical?d`<sd-3-19-1-divider part="divider" class="${e("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-3-19-1-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?d`<a class="${e("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!o&&"py-4")}" href="${h(i?this.href:void 0)}" target="${h(i?this.target:void 0)}" download="${h(i?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:d`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||a)&&this.vertical?this.separated?d`<button type="button" title="chevron-down-button" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-3-19-1-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${e("mr-4 h-6 w-6 transition-all",r||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-3-19-1-icon></button>`:d`<sd-3-19-1-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${e("h-6 w-6 ml-2 transition-all",r?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-3-19-1-icon>`:""} </span>${o&&this.vertical?d`<slot name="description" part="description" class="${e("inline-block text-sm text-left text-black",r||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,l)}"></slot>`:""}</${t}>`;return r?d`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:this.separated?d`<div part="details" id="navigation-item-details" class="relative flex flex-col">${n}${this.open?d`<slot name="children"></slot>`:""}</div>`:d`${n}`}};f.styles=[i,t.styles,s(c),r`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],v([o({type:Boolean,reflect:!0})],f.prototype,"vertical",2),v([o({reflect:!0})],f.prototype,"size",2),v([o({reflect:!0})],f.prototype,"href",2),v([o()],f.prototype,"target",2),v([o()],f.prototype,"download",2),v([o({type:Boolean,reflect:!0})],f.prototype,"current",2),v([o({type:Boolean,reflect:!0})],f.prototype,"disabled",2),v([o({type:Boolean,reflect:!0})],f.prototype,"chevron",2),v([o({type:Boolean,reflect:!0})],f.prototype,"relaxed",2),v([o({type:Boolean,reflect:!0})],f.prototype,"divider",2),v([o({type:Boolean,reflect:!0})],f.prototype,"indented",2),v([o({type:Boolean,reflect:!0})],f.prototype,"open",2),v([o({type:Boolean,reflect:!0})],f.prototype,"separated",2),f=v([a("sd-3-19-1-navigation-item")],f);export{f as default};
1
+ import{S as t,t as e,c as i,r as s,i as r,n as o,a}from"./solid-components2.js";import{H as l}from"./slot.js";import{s as n,n as d}from"./static.js";import{o as h}from"./if-defined.js";import{I as c}from"./interactive.js";var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,v=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?u(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&p(e,i,o),o};let f=class extends t{constructor(){super(...arguments),this.hasSlotController=new l(this,"[default]","description","children"),this.vertical=!1,this.size="base",this.current=!1,this.disabled=!1,this.chevron=!1,this.relaxed=!1,this.divider=!1,this.indented=!1,this.open=!1,this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?n`summary`:this.separated?n`div`:this.isLink?n`a`:n`button`}render(){const t=this.tag,i=this.isLink,s=this.isButton,r=this.isAccordion,o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),a=this.hasSlotController.test("children"),l=this.vertical?"pb-3":"pb-2",n=d`<${t} part="base" class="${e("cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",r?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${h(r?"navigation-item-details":void 0)}" aria-current="${h(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${h(s?this.disabled:void 0)}" href="${h(i?this.href:void 0)}" target="${h(i?this.target:void 0)}" download="${h(i?this.download:void 0)}" rel="${h(i&&this.target?"noreferrer noopener":void 0)}" role="${i?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:r?this.handleClickSummary:s?this.handleClickButton:void 0}"><div part="current-indicator" class="${e("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${e("relative pt-3 inline-flex justify-between items-center",r?"grow":"w-full",o||this.separated?"pb-1":l,this.calculatePaddingX)}">${this.divider&&this.vertical?d`<sd-3-19-3-divider part="divider" class="${e("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-3-19-3-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?d`<a class="${e("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!o&&"py-4")}" href="${h(i?this.href:void 0)}" target="${h(i?this.target:void 0)}" download="${h(i?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:d`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||a)&&this.vertical?this.separated?d`<button type="button" title="chevron-down-button" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-3-19-3-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${e("mr-4 h-6 w-6 transition-all",r||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-3-19-3-icon></button>`:d`<sd-3-19-3-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${e("h-6 w-6 ml-2 transition-all",r?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-3-19-3-icon>`:""} </span>${o&&this.vertical?d`<slot name="description" part="description" class="${e("inline-block text-sm text-left text-black",r||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,l)}"></slot>`:""}</${t}>`;return r?d`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:this.separated?d`<div part="details" id="navigation-item-details" class="relative flex flex-col">${n}${this.open?d`<slot name="children"></slot>`:""}</div>`:d`${n}`}};f.styles=[i,t.styles,s(c),r`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],v([o({type:Boolean,reflect:!0})],f.prototype,"vertical",2),v([o({reflect:!0})],f.prototype,"size",2),v([o({reflect:!0})],f.prototype,"href",2),v([o()],f.prototype,"target",2),v([o()],f.prototype,"download",2),v([o({type:Boolean,reflect:!0})],f.prototype,"current",2),v([o({type:Boolean,reflect:!0})],f.prototype,"disabled",2),v([o({type:Boolean,reflect:!0})],f.prototype,"chevron",2),v([o({type:Boolean,reflect:!0})],f.prototype,"relaxed",2),v([o({type:Boolean,reflect:!0})],f.prototype,"divider",2),v([o({type:Boolean,reflect:!0})],f.prototype,"indented",2),v([o({type:Boolean,reflect:!0})],f.prototype,"open",2),v([o({type:Boolean,reflect:!0})],f.prototype,"separated",2),f=v([a("sd-3-19-3-navigation-item")],f);export{f as default};
@@ -1 +1 @@
1
- import{s as t,a as i}from"./animate.js";import{S as e,L as s,x as a,t as o,c as n,i as r,e as d,n as l,a as c}from"./solid-components2.js";import{g as h,s as u}from"./animation-registry.js";import{w as p}from"./event.js";import{w as m}from"./watch.js";var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,i,e,s)=>{for(var a,o=s>1?void 0:s?b(i,e):i,n=t.length-1;n>=0;n--)(a=t[n])&&(o=(s?a(i,e,o):a(o))||o);return s&&o&&f(i,e,o),o};const w=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),g=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let v=class extends e{constructor(){super(...arguments),this.localize=new s(this),this.variant="info",this.open=!1,this.closable=!1,this.duration=1/0,this.durationIndicator=!1,this.toastStack="top-right",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 t(this.base),this.base.hidden=!1;const{keyframes:e,options:s}=h(this,"notification.show",{dir:this.localize.dir()});await i(this.base,e,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await t(this.base);const{keyframes:e,options:s}=h(this,"notification.hide",{dir:this.localize.dir()});await i(this.base,e,s),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,p(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,p(this,"sd-after-hide")}async toast(){return new Promise((t=>{const i="bottom-center"===this.toastStack?g:w;null===i.parentElement&&document.body.append(i),i.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{i.removeChild(this),t(),null===i.querySelector("sd-3-19-1-notification")&&i.remove()}),{once:!0})}))}render(){return a`<div part="base" class="${o("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="${o("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-3-19-1-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-3-19-1-icon></slot><div part="content" class="${o("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?a`<sd-3-19-1-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-3-19-1-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-3-19-1-icon></sd-3-19-1-button>`:""}</div>${this.durationIndicator?a`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${o("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>`}};v.styles=[n,e.styles,r`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],y([d('[part~="base"]')],v.prototype,"base",2),y([l({reflect:!0})],v.prototype,"variant",2),y([l({type:Boolean,reflect:!0})],v.prototype,"open",2),y([l({type:Boolean,reflect:!0})],v.prototype,"closable",2),y([l({type:Number})],v.prototype,"duration",2),y([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],v.prototype,"durationIndicator",2),y([l({reflect:!0,attribute:"toast-stack"})],v.prototype,"toastStack",2),y([m("open",{waitUntilFirstUpdate:!0})],v.prototype,"handleOpenChange",1),y([m("duration")],v.prototype,"handleDurationChange",1),v=y([c("sd-3-19-1-notification")],v),u("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),u("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});export{v as default};
1
+ import{s as t,a as i}from"./animate.js";import{S as e,L as s,x as a,t as o,c as n,i as r,e as d,n as l,a as c}from"./solid-components2.js";import{g as h,s as u}from"./animation-registry.js";import{w as p}from"./event.js";import{w as m}from"./watch.js";var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,i,e,s)=>{for(var a,o=s>1?void 0:s?b(i,e):i,n=t.length-1;n>=0;n--)(a=t[n])&&(o=(s?a(i,e,o):a(o))||o);return s&&o&&f(i,e,o),o};const w=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),g=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let v=class extends e{constructor(){super(...arguments),this.localize=new s(this),this.variant="info",this.open=!1,this.closable=!1,this.duration=1/0,this.durationIndicator=!1,this.toastStack="top-right",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 t(this.base),this.base.hidden=!1;const{keyframes:e,options:s}=h(this,"notification.show",{dir:this.localize.dir()});await i(this.base,e,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await t(this.base);const{keyframes:e,options:s}=h(this,"notification.hide",{dir:this.localize.dir()});await i(this.base,e,s),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,p(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,p(this,"sd-after-hide")}async toast(){return new Promise((t=>{const i="bottom-center"===this.toastStack?g:w;null===i.parentElement&&document.body.append(i),i.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{i.removeChild(this),t(),null===i.querySelector("sd-3-19-3-notification")&&i.remove()}),{once:!0})}))}render(){return a`<div part="base" class="${o("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="${o("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-3-19-3-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-3-19-3-icon></slot><div part="content" class="${o("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?a`<sd-3-19-3-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-3-19-3-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-3-19-3-icon></sd-3-19-3-button>`:""}</div>${this.durationIndicator?a`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${o("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>`}};v.styles=[n,e.styles,r`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],y([d('[part~="base"]')],v.prototype,"base",2),y([l({reflect:!0})],v.prototype,"variant",2),y([l({type:Boolean,reflect:!0})],v.prototype,"open",2),y([l({type:Boolean,reflect:!0})],v.prototype,"closable",2),y([l({type:Number})],v.prototype,"duration",2),y([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],v.prototype,"durationIndicator",2),y([l({reflect:!0,attribute:"toast-stack"})],v.prototype,"toastStack",2),y([m("open",{waitUntilFirstUpdate:!0})],v.prototype,"handleOpenChange",1),y([m("duration")],v.prototype,"handleDurationChange",1),v=y([c("sd-3-19-3-notification")],v),u("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),u("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});export{v as default};
@@ -1 +1 @@
1
- import"./icon.js";import{S as e,x as t,t as s,c as l,i as a,e as o,n as r,a as i}from"./solid-components2.js";import{H as n}from"./slot.js";import{r as h}from"./state.js";import{w as c}from"./watch.js";var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u=(e,t,s,l)=>{for(var a,o=l>1?void 0:l?p(t,s):t,r=e.length-1;r>=0;r--)(a=e[r])&&(o=(l?a(t,s,o):a(o))||o);return l&&o&&d(t,s,o),o};let b=class extends e{constructor(){super(...arguments),this.hasSlotController=new n(this,"default","left","right"),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 e=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=e:e!==this.cachedTextLabel&&(this.cachedTextLabel=e,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 e=this.hasSlotController.test("left"),l=this.hasSlotController.test("right");return t`<div part="base" class="${s("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="${s("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?t`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${s("relative flex flex-shrink-0 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?t`<sd-3-19-1-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-19-1-icon>`:""}</span>`:""} ${e?t`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${l?t`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};b.styles=[l,e.styles,a`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],u([o('[part="base"]')],b.prototype,"defaultSlot",2),u([h()],b.prototype,"current",2),u([h()],b.prototype,"selected",2),u([h()],b.prototype,"hasHover",2),u([r({reflect:!0})],b.prototype,"size",2),u([r({type:Boolean,reflect:!0})],b.prototype,"checkbox",2),u([r({type:Boolean,reflect:!0})],b.prototype,"disabled",2),u([r({reflect:!0})],b.prototype,"value",2),u([c("disabled")],b.prototype,"handleDisabledChange",1),u([c("selected")],b.prototype,"handleSelectedChange",1),u([c("value")],b.prototype,"handleValueChange",1),b=u([i("sd-3-19-1-option")],b);export{b as default};
1
+ import"./icon.js";import{S as e,x as t,t as s,c as l,i as a,e as o,n as r,a as i}from"./solid-components2.js";import{H as n}from"./slot.js";import{r as h}from"./state.js";import{w as c}from"./watch.js";var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u=(e,t,s,l)=>{for(var a,o=l>1?void 0:l?p(t,s):t,r=e.length-1;r>=0;r--)(a=e[r])&&(o=(l?a(t,s,o):a(o))||o);return l&&o&&d(t,s,o),o};let b=class extends e{constructor(){super(...arguments),this.hasSlotController=new n(this,"default","left","right"),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 e=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=e:e!==this.cachedTextLabel&&(this.cachedTextLabel=e,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 e=this.hasSlotController.test("left"),l=this.hasSlotController.test("right");return t`<div part="base" class="${s("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="${s("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?t`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${s("relative flex flex-shrink-0 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?t`<sd-3-19-3-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-3-19-3-icon>`:""}</span>`:""} ${e?t`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${l?t`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};b.styles=[l,e.styles,a`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],u([o('[part="base"]')],b.prototype,"defaultSlot",2),u([h()],b.prototype,"current",2),u([h()],b.prototype,"selected",2),u([h()],b.prototype,"hasHover",2),u([r({reflect:!0})],b.prototype,"size",2),u([r({type:Boolean,reflect:!0})],b.prototype,"checkbox",2),u([r({type:Boolean,reflect:!0})],b.prototype,"disabled",2),u([r({reflect:!0})],b.prototype,"value",2),u([c("disabled")],b.prototype,"handleDisabledChange",1),u([c("selected")],b.prototype,"handleSelectedChange",1),u([c("value")],b.prototype,"handleValueChange",1),b=u([i("sd-3-19-3-option")],b);export{b as default};
@@ -1 +1 @@
1
- import"./icon.js";import{x as e,t,i as a,n as s,a as i}from"./solid-components2.js";import{o}from"./if-defined.js";import{s as n}from"./animation-registry.js";import r from"./accordion.js";var l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c=(e,t,a,s)=>{for(var i,o=s>1?void 0:s?d(t,a):t,n=e.length-1;n>=0;n--)(i=e[n])&&(o=(s?i(t,a,o):i(o))||o);return s&&o&&l(t,a,o),o};let p=class extends r{constructor(){super(...arguments),this.expandable=!1}render(){return e`<div part="base" class="sm:p-6"><header part="header" id="header" class="${t("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${o(this.expandable?"button":void 0)}" aria-expanded="${o(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${o(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${t("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${t("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${t("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${t(this.open&&"hidden")}"><sd-3-19-1-icon library="system" name="chevron-down"></sd-3-19-1-icon></slot><slot name="collapse-icon" class="${t(!this.open&&"hidden")}"><sd-3-19-1-icon library="system" name="chevron-down"></sd-3-19-1-icon></slot></span></header><div part="content" id="content" class="${t("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></div>`}};p.styles=[r.styles,a`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],c([s({type:Boolean,reflect:!0})],p.prototype,"expandable",2),p=c([i("sd-3-19-1-quickfact")],p),n("quickfact.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}}),n("quickfact.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{p as default};
1
+ import"./icon.js";import{x as e,t,i as a,n as s,a as i}from"./solid-components2.js";import{o}from"./if-defined.js";import{s as n}from"./animation-registry.js";import r from"./accordion.js";var l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c=(e,t,a,s)=>{for(var i,o=s>1?void 0:s?d(t,a):t,n=e.length-1;n>=0;n--)(i=e[n])&&(o=(s?i(t,a,o):i(o))||o);return s&&o&&l(t,a,o),o};let p=class extends r{constructor(){super(...arguments),this.expandable=!1}render(){return e`<div part="base" class="sm:p-6"><header part="header" id="header" class="${t("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${o(this.expandable?"button":void 0)}" aria-expanded="${o(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${o(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${t("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${t("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${t("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${t(this.open&&"hidden")}"><sd-3-19-3-icon library="system" name="chevron-down"></sd-3-19-3-icon></slot><slot name="collapse-icon" class="${t(!this.open&&"hidden")}"><sd-3-19-3-icon library="system" name="chevron-down"></sd-3-19-3-icon></slot></span></header><div part="content" id="content" class="${t("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></div>`}};p.styles=[r.styles,a`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],c([s({type:Boolean,reflect:!0})],p.prototype,"expandable",2),p=c([i("sd-3-19-3-quickfact")],p),n("quickfact.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}}),n("quickfact.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{p as default};
@@ -1 +1 @@
1
- import{S as t,x as e,t as s,c as r,i as o,e as i,n as a,a as n}from"./solid-components2.js";import{H as d}from"./slot.js";import{o as l}from"./if-defined.js";import{r as u}from"./state.js";import{w as h}from"./watch.js";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p=(t,e,s,r)=>{for(var o,i=r>1?void 0:r?c(e,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&b(e,s,i),i};let m=class extends t{constructor(){super(...arguments),this.hasSlotController=new d(this,"[default]","icon"),this.hasFocus=!1,this.size="lg",this.disabled=!1,this.checked=!1}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]"),r=this.hasSlotController.test("icon"),o=`${this.size}-${t?"label":"no-label"}`;return e`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${s("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 border-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",r&&"button--has-icon flex gap-2",o)}" aria-disabled="${this.disabled}" type="button" value="${l(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${s(r&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!r}"></slot>${t?e`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};m.styles=[t.styles,r,o`: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-3-19-1-button-group__button--first:not(.sd-3-19-1-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-3-19-1-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-3-19-1-button-group__button--last:not(.sd-3-19-1-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-3-19-1-button-group__button:not(.sd-3-19-1-button-group__button--first)){margin-inline-start:-1px}:host(.sd-3-19-1-button-group__button--hover){z-index:10}:host(.sd-3-19-1-button-group__button--focus),:host(.sd-3-19-1-button-group__button[checked]){z-index:20}`],p([i(".button")],m.prototype,"input",2),p([i(".hidden-input")],m.prototype,"hiddenInput",2),p([u()],m.prototype,"hasFocus",2),p([a({reflect:!0})],m.prototype,"size",2),p([a({type:Boolean,reflect:!0})],m.prototype,"disabled",2),p([a({type:Boolean,reflect:!0})],m.prototype,"checked",2),p([a()],m.prototype,"value",2),p([h("disabled",{waitUntilFirstUpdate:!0})],m.prototype,"handleDisabledChange",1),m=p([n("sd-3-19-1-radio-button")],m);export{m as default};
1
+ import{S as t,x as e,t as s,c as r,i as o,e as i,n as a,a as n}from"./solid-components2.js";import{H as d}from"./slot.js";import{o as l}from"./if-defined.js";import{r as u}from"./state.js";import{w as h}from"./watch.js";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p=(t,e,s,r)=>{for(var o,i=r>1?void 0:r?c(e,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&b(e,s,i),i};let m=class extends t{constructor(){super(...arguments),this.hasSlotController=new d(this,"[default]","icon"),this.hasFocus=!1,this.size="lg",this.disabled=!1,this.checked=!1}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]"),r=this.hasSlotController.test("icon"),o=`${this.size}-${t?"label":"no-label"}`;return e`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${s("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 border-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",r&&"button--has-icon flex gap-2",o)}" aria-disabled="${this.disabled}" type="button" value="${l(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${s(r&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!r}"></slot>${t?e`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};m.styles=[t.styles,r,o`: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-3-19-3-button-group__button--first:not(.sd-3-19-3-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-3-19-3-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-3-19-3-button-group__button--last:not(.sd-3-19-3-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-3-19-3-button-group__button:not(.sd-3-19-3-button-group__button--first)){margin-inline-start:-1px}:host(.sd-3-19-3-button-group__button--hover){z-index:10}:host(.sd-3-19-3-button-group__button--focus),:host(.sd-3-19-3-button-group__button[checked]){z-index:20}`],p([i(".button")],m.prototype,"input",2),p([i(".hidden-input")],m.prototype,"hiddenInput",2),p([u()],m.prototype,"hasFocus",2),p([a({reflect:!0})],m.prototype,"size",2),p([a({type:Boolean,reflect:!0})],m.prototype,"disabled",2),p([a({type:Boolean,reflect:!0})],m.prototype,"checked",2),p([a()],m.prototype,"value",2),p([h("disabled",{waitUntilFirstUpdate:!0})],m.prototype,"handleDisabledChange",1),m=p([n("sd-3-19-3-radio-button")],m);export{m as default};
@@ -1 +1 @@
1
- import{i as t,c as e,e as o,n as s,S as i,x as a,a as l,t as r}from"./solid-components2.js";import{F as n,c as d,a as h,v as u}from"./form.js";import{H as c}from"./slot.js";import{r as p}from"./state.js";import{w as g}from"./watch.js";import m from"./radio.js";const b=t`${e}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y=(t,e,o,s)=>{for(var i,a=s>1?void 0:s?v(e,o):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(s?i(e,o,a):i(a))||a);return s&&a&&f(e,o,a),a};let C=class extends i{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=w(t.target);null==e||e.classList.add("sd-3-19-1-button-group__button--focus")}handleBlur(t){const e=w(t.target);null==e||e.classList.remove("sd-3-19-1-button-group__button--focus")}handleMouseOver(t){const e=w(t.target);null==e||e.classList.add("sd-3-19-1-button-group__button--hover")}handleMouseOut(t){const e=w(t.target);null==e||e.classList.remove("sd-3-19-1-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),s=w(e);null!==s&&(s.classList.add("sd-3-19-1-button-group__button"),s.classList.toggle("sd-3-19-1-button-group__button--first",0===o),s.classList.toggle("sd-3-19-1-button-group__button--inner",o>0&&o<t.length-1),s.classList.toggle("sd-3-19-1-button-group__button--last",o===t.length-1),s.classList.toggle("sd-3-19-1-button-group__button--radio","sd-3-19-1-radio-button"===s.tagName.toLowerCase()))}))}render(){return a`<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 w(t){const e="sd-3-19-1-button, sd-3-19-1-radio-button";return t.closest(e)??t.querySelector(e)}C.styles=b,y([o("slot")],C.prototype,"defaultSlot",2),y([p()],C.prototype,"disableRole",2),y([s()],C.prototype,"label",2),C=y([l("sd-3-19-1-button-group")],C);var R=Object.defineProperty,x=Object.getOwnPropertyDescriptor,k=(t,e,o,s)=>{for(var i,a=s>1?void 0:s?x(e,o):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(s?i(e,o,a):i(a))||a);return s&&a&&R(e,o,a),a};let I=class extends i{constructor(){super(...arguments),this.formControlController=new n(this),this.hasSlotController=new c(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.size="lg",this.required=!1,this.orientation="vertical",this.label="",this.boldLabel=!1,this.name="option",this.value="",this.form=""}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?d:t?h:u}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-3-19-1-radio, sd-3-19-1-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-3-19-1-radio, sd-3-19-1-radio-button"),o=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,o.forEach((t=>t.checked=t===e)),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),o=e.find((t=>t.checked))??e[0],s=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,i=this.value;let a=e.indexOf(o)+s;a<0&&(a=e.length-1),a>e.length-1&&(a=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[a].value,e[a].checked=!0,this.hasButtonGroup?e[a].shadowRoot.querySelector("button").focus():(e[a].tabIndex=0,e[a].focus()),this.value!==i&&(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 o=this.getAllRadios();if(await Promise.all(o.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof m&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=o.some((t=>"sd-3-19-1-radio-button"===t.tagName.toLowerCase())),!o.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=o[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-3-19-1-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-3-19-1-radio")&&customElements.get("sd-3-19-1-radio-button")?this.syncRadioElements():(customElements.get("sd-3-19-1-radio")?this.syncRadioElements():customElements.whenDefined("sd-3-19-1-radio").then((()=>this.syncRadios())),customElements.get("sd-3-19-1-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-3-19-1-radio-button").then((()=>this.syncRadios())))}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value)),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){const t=this.required&&!this.value,e=""!==this.customValidityMessage;return!t&&!e||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const t=this.validity.valid;return this.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,o=a`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return a`<fieldset part="form-control" class="${r("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="${r("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="${r("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?a`<sd-3-19-1-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${o}</sd-3-19-1-button-group>`:o}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};I.dependencies={"sd-3-19-1-button-group":C},I.styles=[e,i.styles,t`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-19-1-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-19-1-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-19-1-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-19-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-19-1-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-19-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],k([o("slot:not([name])")],I.prototype,"defaultSlot",2),k([o("#validation-input")],I.prototype,"validationInput",2),k([o("#invalid-message")],I.prototype,"invalidMessage",2),k([p()],I.prototype,"hasButtonGroup",2),k([p()],I.prototype,"defaultValue",2),k([p()],I.prototype,"showInvalidStyle",2),k([s({reflect:!0})],I.prototype,"size",2),k([s({type:Boolean,reflect:!0})],I.prototype,"required",2),k([s({reflect:!0})],I.prototype,"orientation",2),k([s()],I.prototype,"label",2),k([s({type:Boolean,reflect:!0})],I.prototype,"boldLabel",2),k([s()],I.prototype,"name",2),k([s({reflect:!0})],I.prototype,"value",2),k([s({reflect:!0})],I.prototype,"form",2),k([g("size",{waitUntilFirstUpdate:!0})],I.prototype,"handleSizeChange",1),k([g("showInvalidStyle",{waitUntilFirstUpdate:!0})],I.prototype,"handleInvalidChange",1),k([g("value")],I.prototype,"handleValueChange",1),I=k([l("sd-3-19-1-radio-group")],I);export{I as default};
1
+ import{i as t,c as e,e as o,n as s,S as i,x as a,a as l,t as r}from"./solid-components2.js";import{F as n,c as d,a as h,v as u}from"./form.js";import{H as c}from"./slot.js";import{r as p}from"./state.js";import{w as g}from"./watch.js";import m from"./radio.js";const b=t`${e}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y=(t,e,o,s)=>{for(var i,a=s>1?void 0:s?v(e,o):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(s?i(e,o,a):i(a))||a);return s&&a&&f(e,o,a),a};let C=class extends i{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=w(t.target);null==e||e.classList.add("sd-3-19-3-button-group__button--focus")}handleBlur(t){const e=w(t.target);null==e||e.classList.remove("sd-3-19-3-button-group__button--focus")}handleMouseOver(t){const e=w(t.target);null==e||e.classList.add("sd-3-19-3-button-group__button--hover")}handleMouseOut(t){const e=w(t.target);null==e||e.classList.remove("sd-3-19-3-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),s=w(e);null!==s&&(s.classList.add("sd-3-19-3-button-group__button"),s.classList.toggle("sd-3-19-3-button-group__button--first",0===o),s.classList.toggle("sd-3-19-3-button-group__button--inner",o>0&&o<t.length-1),s.classList.toggle("sd-3-19-3-button-group__button--last",o===t.length-1),s.classList.toggle("sd-3-19-3-button-group__button--radio","sd-3-19-3-radio-button"===s.tagName.toLowerCase()))}))}render(){return a`<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 w(t){const e="sd-3-19-3-button, sd-3-19-3-radio-button";return t.closest(e)??t.querySelector(e)}C.styles=b,y([o("slot")],C.prototype,"defaultSlot",2),y([p()],C.prototype,"disableRole",2),y([s()],C.prototype,"label",2),C=y([l("sd-3-19-3-button-group")],C);var R=Object.defineProperty,x=Object.getOwnPropertyDescriptor,k=(t,e,o,s)=>{for(var i,a=s>1?void 0:s?x(e,o):e,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(s?i(e,o,a):i(a))||a);return s&&a&&R(e,o,a),a};let I=class extends i{constructor(){super(...arguments),this.formControlController=new n(this),this.hasSlotController=new c(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.size="lg",this.required=!1,this.orientation="vertical",this.label="",this.boldLabel=!1,this.name="option",this.value="",this.form=""}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?d:t?h:u}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-3-19-3-radio, sd-3-19-3-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-3-19-3-radio, sd-3-19-3-radio-button"),o=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,o.forEach((t=>t.checked=t===e)),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),o=e.find((t=>t.checked))??e[0],s=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,i=this.value;let a=e.indexOf(o)+s;a<0&&(a=e.length-1),a>e.length-1&&(a=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[a].value,e[a].checked=!0,this.hasButtonGroup?e[a].shadowRoot.querySelector("button").focus():(e[a].tabIndex=0,e[a].focus()),this.value!==i&&(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 o=this.getAllRadios();if(await Promise.all(o.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof m&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=o.some((t=>"sd-3-19-3-radio-button"===t.tagName.toLowerCase())),!o.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=o[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-3-19-3-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-3-19-3-radio")&&customElements.get("sd-3-19-3-radio-button")?this.syncRadioElements():(customElements.get("sd-3-19-3-radio")?this.syncRadioElements():customElements.whenDefined("sd-3-19-3-radio").then((()=>this.syncRadios())),customElements.get("sd-3-19-3-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-3-19-3-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,o=a`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return a`<fieldset part="form-control" class="${r("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="${r("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="${r("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?a`<sd-3-19-3-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${o}</sd-3-19-3-button-group>`:o}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};I.dependencies={"sd-3-19-3-button-group":C},I.styles=[e,i.styles,t`:host{display:block}:host([orientation=vertical]) ::slotted(sd-3-19-3-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-3-19-3-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-3-19-3-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-3-19-3-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-19-3-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-3-19-3-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],k([o("slot:not([name])")],I.prototype,"defaultSlot",2),k([o("#validation-input")],I.prototype,"validationInput",2),k([o("#invalid-message")],I.prototype,"invalidMessage",2),k([p()],I.prototype,"hasButtonGroup",2),k([p()],I.prototype,"defaultValue",2),k([p()],I.prototype,"showInvalidStyle",2),k([s({reflect:!0})],I.prototype,"size",2),k([s({type:Boolean,reflect:!0})],I.prototype,"required",2),k([s({reflect:!0})],I.prototype,"orientation",2),k([s()],I.prototype,"label",2),k([s({type:Boolean,reflect:!0})],I.prototype,"boldLabel",2),k([s()],I.prototype,"name",2),k([s({reflect:!0})],I.prototype,"value",2),k([s({reflect:!0})],I.prototype,"form",2),k([g("size",{waitUntilFirstUpdate:!0})],I.prototype,"handleSizeChange",1),k([g("showInvalidStyle",{waitUntilFirstUpdate:!0})],I.prototype,"handleInvalidChange",1),k([g("value")],I.prototype,"handleValueChange",1),I=k([l("sd-3-19-3-radio-group")],I);export{I as default};
@@ -1 +1 @@
1
- import"./icon.js";import{S as e,x as t,t as s,i,n as r,a}from"./solid-components2.js";import{r as l}from"./state.js";import{w as o}from"./watch.js";var n=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(e,t,s,i)=>{for(var r,a=i>1?void 0:i?h(t,s):t,l=e.length-1;l>=0;l--)(r=e[l])&&(a=(i?r(t,s,a):r(a))||a);return i&&a&&n(t,s,a),a};let c=class extends e{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.disabled=!1,this.invalid=!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 t`<span part="base" class="${s("sd-3-19-1-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="${s("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?t`<span part="checked" class="${s("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="${s("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};c.styles=[e.styles,i`:host{display:block;width:-moz-max-content;width:max-content}: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)}`],d([l()],c.prototype,"checked",2),d([l()],c.prototype,"hasFocus",2),d([r({reflect:!0})],c.prototype,"size",2),d([r({type:Boolean,reflect:!0})],c.prototype,"disabled",2),d([r()],c.prototype,"value",2),d([r({type:Boolean,reflect:!0})],c.prototype,"invalid",2),d([o("checked")],c.prototype,"handleCheckedChange",1),d([o("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",1),c=d([a("sd-3-19-1-radio")],c);export{c as default};
1
+ import"./icon.js";import{S as e,x as t,t as s,i,n as r,a}from"./solid-components2.js";import{r as l}from"./state.js";import{w as o}from"./watch.js";var n=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(e,t,s,i)=>{for(var r,a=i>1?void 0:i?h(t,s):t,l=e.length-1;l>=0;l--)(r=e[l])&&(a=(i?r(t,s,a):r(a))||a);return i&&a&&n(t,s,a),a};let c=class extends e{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.disabled=!1,this.invalid=!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 t`<span part="base" class="${s("sd-3-19-3-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="${s("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?t`<span part="checked" class="${s("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="${s("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};c.styles=[e.styles,i`:host{display:block;width:-moz-max-content;width:max-content}: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)}`],d([l()],c.prototype,"checked",2),d([l()],c.prototype,"hasFocus",2),d([r({reflect:!0})],c.prototype,"size",2),d([r({type:Boolean,reflect:!0})],c.prototype,"disabled",2),d([r()],c.prototype,"value",2),d([r({type:Boolean,reflect:!0})],c.prototype,"invalid",2),d([o("checked")],c.prototype,"handleCheckedChange",1),d([o("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",1),c=d([a("sd-3-19-3-radio")],c);export{c as default};
@@ -1 +1 @@
1
- import{S as t,x as l,t as o,r as e,c as r,i as s,n as i,a as n}from"./solid-components2.js";import{r as a}from"./state.js";import{I as c}from"./interactive.js";var d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,b=(t,l,o,e)=>{for(var r,s=e>1?void 0:e?h(l,o):l,i=t.length-1;i>=0;i--)(r=t[i])&&(s=(e?r(l,o,s):r(s))||s);return e&&s&&d(l,o,s),s};let u=class extends t{constructor(){super(...arguments),this.orientation="horizontal",this.scrollbars=!1,this.buttons=!1,this.shadows=!1,this.inset=!1,this.step=150,this.canScroll={left:!1,right:!1,up:!1,down:!1},this.isScrollHorizontalEnabled=!1,this.isScrollVerticalEnabled=!1,this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver((()=>{this.updateScrollIndicatorVisibility()})),this.updateComplete.then((()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){const t=this.orientation;this.isScrollHorizontalEnabled="horizontal"===t||"auto"===t,this.isScrollVerticalEnabled="vertical"===t||"auto"===t}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){const t=this.container;if(t){const l=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,e=this.isScrollVerticalEnabled&&t.scrollTop>0,r=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1;this.canScroll={left:l,right:o,up:e,down:r},(l||e)&&this.dispatchEvent(new CustomEvent("start")),(o||r)&&this.dispatchEvent(new CustomEvent("end"))}}handleScroll(t){var l;const o="left"===t||"up"===t?-this.step:this.step,e={behavior:"smooth"};e["left"===t||"right"===t?"left":"top"]=o,null==(l=this.scrollContainer)||l.scrollBy(e);const r=`button-${t}`;this.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0}))}render(){const t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${o("scroll-container flex overflow-hidden flex-1","horizontal"===this.orientation&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden","vertical"===this.orientation&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden","auto"===this.orientation&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${o(t)}" @click="${()=>this.handleScroll("left")}"><slot name="icon-start"><sd-3-19-1-icon library="system" name="chevron-up" class="rotate-[-90deg]"></sd-3-19-1-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${o(t)}" @click="${()=>this.handleScroll("right")}"><slot name="icon-end"><sd-3-19-1-icon library="system" name="chevron-down" class="rotate-[-90deg]"></sd-3-19-1-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${o(t)}" @click="${()=>this.handleScroll("up")}"><slot name="icon-start"><sd-3-19-1-icon library="system" name="chevron-up"></sd-3-19-1-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${o(t)}" @click="${()=>this.handleScroll("down")}"><slot name="icon-end"><sd-3-19-1-icon library="system" name="chevron-down"></sd-3-19-1-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${e} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${e} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${e} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${e} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};u.styles=[t.styles,e(c),r,s`:host{--gradient-color:rgba(255, 255, 255, 0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}.sd-3-19-1-icon--top{align-self:flex-start}.sd-3-19-1-icon--down{align-self:flex-end}`],b([i({type:String,reflect:!0})],u.prototype,"orientation",2),b([i({type:Boolean,reflect:!0})],u.prototype,"scrollbars",2),b([i({type:Boolean,reflect:!0})],u.prototype,"buttons",2),b([i({type:Boolean,reflect:!0})],u.prototype,"shadows",2),b([i({type:Boolean,reflect:!0})],u.prototype,"inset",2),b([i({type:Number,reflect:!0})],u.prototype,"step",2),b([a()],u.prototype,"canScroll",2),b([a()],u.prototype,"isScrollHorizontalEnabled",2),b([a()],u.prototype,"isScrollVerticalEnabled",2),u=b([n("sd-3-19-1-scrollable")],u);export{u as default};
1
+ import{S as t,x as l,t as o,r as e,c as r,i as s,n as i,a as n}from"./solid-components2.js";import{r as a}from"./state.js";import{I as c}from"./interactive.js";var d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,b=(t,l,o,e)=>{for(var r,s=e>1?void 0:e?h(l,o):l,i=t.length-1;i>=0;i--)(r=t[i])&&(s=(e?r(l,o,s):r(s))||s);return e&&s&&d(l,o,s),s};let u=class extends t{constructor(){super(...arguments),this.orientation="horizontal",this.scrollbars=!1,this.buttons=!1,this.shadows=!1,this.inset=!1,this.step=150,this.canScroll={left:!1,right:!1,up:!1,down:!1},this.isScrollHorizontalEnabled=!1,this.isScrollVerticalEnabled=!1,this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver((()=>{this.updateScrollIndicatorVisibility()})),this.updateComplete.then((()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){const t=this.orientation;this.isScrollHorizontalEnabled="horizontal"===t||"auto"===t,this.isScrollVerticalEnabled="vertical"===t||"auto"===t}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){const t=this.container;if(t){const l=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,e=this.isScrollVerticalEnabled&&t.scrollTop>0,r=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1;this.canScroll={left:l,right:o,up:e,down:r},(l||e)&&this.dispatchEvent(new CustomEvent("start")),(o||r)&&this.dispatchEvent(new CustomEvent("end"))}}handleScroll(t){var l;const o="left"===t||"up"===t?-this.step:this.step,e={behavior:"smooth"};e["left"===t||"right"===t?"left":"top"]=o,null==(l=this.scrollContainer)||l.scrollBy(e);const r=`button-${t}`;this.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0}))}render(){const t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${o("scroll-container flex overflow-hidden flex-1","horizontal"===this.orientation&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden","vertical"===this.orientation&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden","auto"===this.orientation&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${o(t)}" @click="${()=>this.handleScroll("left")}"><slot name="icon-start"><sd-3-19-3-icon library="system" name="chevron-up" class="rotate-[-90deg]"></sd-3-19-3-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${o(t)}" @click="${()=>this.handleScroll("right")}"><slot name="icon-end"><sd-3-19-3-icon library="system" name="chevron-down" class="rotate-[-90deg]"></sd-3-19-3-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${o(t)}" @click="${()=>this.handleScroll("up")}"><slot name="icon-start"><sd-3-19-3-icon library="system" name="chevron-up"></sd-3-19-3-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${o(t)}" @click="${()=>this.handleScroll("down")}"><slot name="icon-end"><sd-3-19-3-icon library="system" name="chevron-down"></sd-3-19-3-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${e} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${e} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${e} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${e} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};u.styles=[t.styles,e(c),r,s`:host{--gradient-color:rgba(255, 255, 255, 0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;position:relative;display:flex;overflow:hidden}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-right]{background:linear-gradient(90deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-top]{background:linear-gradient(0deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}[part=shadow-bottom]{background:linear-gradient(180deg,rgba(24,24,24,0) 50%,rgba(24,24,24,.4) 100%)}.sd-3-19-3-icon--top{align-self:flex-start}.sd-3-19-3-icon--down{align-self:flex-end}`],b([i({type:String,reflect:!0})],u.prototype,"orientation",2),b([i({type:Boolean,reflect:!0})],u.prototype,"scrollbars",2),b([i({type:Boolean,reflect:!0})],u.prototype,"buttons",2),b([i({type:Boolean,reflect:!0})],u.prototype,"shadows",2),b([i({type:Boolean,reflect:!0})],u.prototype,"inset",2),b([i({type:Number,reflect:!0})],u.prototype,"step",2),b([a()],u.prototype,"canScroll",2),b([a()],u.prototype,"isScrollHorizontalEnabled",2),b([a()],u.prototype,"isScrollVerticalEnabled",2),u=b([n("sd-3-19-3-scrollable")],u);export{u as default};
@@ -1,7 +1,7 @@
1
- import{s as t,a as e}from"./animate.js";import{S as s,L as i,x as o,t as l,j as a,c as n,i as r,e as h,n as p,a as d}from"./solid-components2.js";import{d as c}from"./default-value.js";import{F as u}from"./form.js";import{g as m,s as y}from"./animation-registry.js";import{H as b}from"./slot.js";import{r as v}from"./state.js";import{o as f}from"./query-assigned-elements.js";import{s as g}from"./scroll.js";import{o as x,S as w}from"./icon.js";import{w as O}from"./event.js";import{w as C}from"./watch.js";import S from"./tag.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 s{constructor(){super(...arguments),this.formControlController=new u(this,{assumeInteractionOn:["sd-blur","sd-3-19-1-input"]}),this.hasSlotController=new b(this,"help-text","label"),this.localize=new i(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.placement="bottom",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.disabled=!1,this.helpText="",this.currentPlacement=this.placement,this.clearable=!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-3-19-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{s as t,a as e}from"./animate.js";import{S as s,L as i,x as o,t as l,j as a,c as n,i as r,e as h,n as p,a as d}from"./solid-components2.js";import{d as c}from"./default-value.js";import{F as u}from"./form.js";import{g as m,s as y}from"./animation-registry.js";import{H as b}from"./slot.js";import{r as v}from"./state.js";import{o as f}from"./query-assigned-elements.js";import{s as g}from"./scroll.js";import{o as x,S as w}from"./icon.js";import{w as O}from"./event.js";import{w as C}from"./watch.js";import S from"./tag.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 s{constructor(){super(...arguments),this.formControlController=new u(this,{assumeInteractionOn:["sd-blur","sd-3-19-3-input"]}),this.hasSlotController=new b(this,"help-text","label"),this.localize=new i(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.placement="bottom",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.disabled=!1,this.helpText="",this.currentPlacement=this.placement,this.clearable=!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-3-19-3-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
- " size="${"sm"===this.size?"sm":"lg"}" removable @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-3-19-1-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-3-19-1-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-3-19-1-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-3-19-1-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-3-19-1-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-3-19-1-option")]}getFirstOption(){return this.querySelector("sd-3-19-1-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?x(s):s}</div>`}return e===this.maxOptionsVisible?o`<sd-3-19-1-tag size="${"sm"===this.size?"sm":"lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length-e}</sd-3-19-1-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-3-19-1-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}=m(this,"select.show",{dir:this.localize.dir()});await e(this.popup.popup,s,i),this.currentOption&&g(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}=m(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,O(this,"sd-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,O(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,a=this.clearable&&!this.disabled&&this.value.length>0,n=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",r=this.disabled?"cursor-not-allowed":"cursor-pointer",h={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="${l("relative text-left",r,"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="${l("relative w-full bg-white","disabled"===n?"text-neutral-500":"text-black")}"><div part="border" class="${l("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"}[n],this.open&&("bottom"===this.currentPlacement?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-3-19-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${l("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="
5
+ " size="${"sm"===this.size?"sm":"lg"}" removable @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-3-19-3-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-3-19-3-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-3-19-3-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-3-19-3-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-3-19-3-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-3-19-3-option")]}getFirstOption(){return this.querySelector("sd-3-19-3-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?x(s):s}</div>`}return e===this.maxOptionsVisible?o`<sd-3-19-3-tag size="${"sm"===this.size?"sm":"lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length-e}</sd-3-19-3-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-3-19-3-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}=m(this,"select.show",{dir:this.localize.dir()});await e(this.popup.popup,s,i),this.currentOption&&g(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}=m(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,O(this,"sd-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,O(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,a=this.clearable&&!this.disabled&&this.value.length>0,n=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",r=this.disabled?"cursor-not-allowed":"cursor-pointer",h={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="${l("relative text-left",r,"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="${l("relative w-full bg-white","disabled"===n?"text-neutral-500":"text-black")}"><div part="border" class="${l("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"}[n],this.open&&("bottom"===this.currentPlacement?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-3-19-3-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${l("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="${l("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{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="${l("appearance-none outline-none flex-grow bg-transparent w-full",r,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="${l("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",r)}" 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}"> ${a?o`<button part="clear-button" class="${l("select__clear flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-3-19-1-icon class="${l("text-icon-fill-neutral-800",p)}" library="system" name="closing-round"></sd-3-19-1-icon></slot></button>`:""} ${this.showInvalidStyle?o`<sd-3-19-1-icon part="invalid-icon" class="${l(h,p,"text-error")}" library="system" name="risk"></sd-3-19-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-3-19-1-icon part="valid-icon" class="${l("flex-shrink-0 text-success",h,p)}" library="system" name="status-check"></sd-3-19-1-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${l("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",p)}"><sd-3-19-1-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-3-19-1-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="${l("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow","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-3-19-1-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-3-19-1-icon":w,"sd-3-19-1-popup":a,"sd-3-19-1-tag":S},I.styles=[n,s.styles,r`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-3-19-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-3-19-1-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-3-19-1-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-3-19-1-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([f({selector:"sd-3-19-1-option"})],I.prototype,"_optionsInDefaultSlot",2),D([h("sd-3-19-1-popup")],I.prototype,"popup",2),D([h('[part="combobox"]')],I.prototype,"combobox",2),D([h('[part="display-input"]')],I.prototype,"displayInput",2),D([h(".value-input")],I.prototype,"valueInput",2),D([h('[part="listbox"]')],I.prototype,"listbox",2),D([h("#invalid-message")],I.prototype,"invalidMessage",2),D([v()],I.prototype,"hasHover",2),D([v()],I.prototype,"displayLabel",2),D([v()],I.prototype,"hasFocus",2),D([v()],I.prototype,"currentOption",2),D([v()],I.prototype,"selectedOptions",2),D([v()],I.prototype,"showValidStyle",2),D([v()],I.prototype,"showInvalidStyle",2),D([c()],I.prototype,"defaultValue",2),D([p({type:Boolean,reflect:!0})],I.prototype,"open",2),D([p({reflect:!0})],I.prototype,"size",2),D([p({reflect:!0})],I.prototype,"placement",2),D([p()],I.prototype,"label",2),D([p()],I.prototype,"placeholder",2),D([p({type:Boolean,reflect:!0})],I.prototype,"disabled",2),D([p({attribute:"help-text"})],I.prototype,"helpText",2),D([v()],I.prototype,"currentPlacement",2),D([p({type:Boolean})],I.prototype,"clearable",2),D([p({type:Boolean,reflect:!0})],I.prototype,"multiple",2),D([p({type:Boolean,reflect:!0})],I.prototype,"useTags",2),D([p({attribute:"max-options-visible",type:Number})],I.prototype,"maxOptionsVisible",2),D([p({reflect:!0})],I.prototype,"form",2),D([p()],I.prototype,"name",2),D([p({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],I.prototype,"value",2),D([p({type:Boolean,reflect:!0})],I.prototype,"required",2),D([p({type:Boolean,reflect:!0,attribute:"style-on-valid"})],I.prototype,"styleOnValid",2),D([p({type:Boolean})],I.prototype,"hoist",2),D([p()],I.prototype,"getTag",2),D([C("useTags",{waitUntilFirstUpdate:!0})],I.prototype,"handleUseTagsChange",1),D([C("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"handleDisabledChange",1),D([C("open",{waitUntilFirstUpdate:!0})],I.prototype,"handleOpenChange",1),D([C("size",{waitUntilFirstUpdate:!0})],I.prototype,"applySizeToOptions",1),D([C("value",{waitUntilFirstUpdate:!0})],I.prototype,"handleValueChange",1),I=D([d("sd-3-19-1-select")],I),y("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),y("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="${l("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{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="${l("appearance-none outline-none flex-grow bg-transparent w-full",r,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="${l("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",r)}" 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}"> ${a?o`<button part="clear-button" class="${l("select__clear flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-3-19-3-icon class="${l("text-icon-fill-neutral-800",p)}" library="system" name="closing-round"></sd-3-19-3-icon></slot></button>`:""} ${this.showInvalidStyle?o`<sd-3-19-3-icon part="invalid-icon" class="${l(h,p,"text-error")}" library="system" name="risk"></sd-3-19-3-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-3-19-3-icon part="valid-icon" class="${l("flex-shrink-0 text-success",h,p)}" library="system" name="status-check"></sd-3-19-3-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${l("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",p)}"><sd-3-19-3-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-3-19-3-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="${l("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow","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-3-19-3-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-3-19-3-icon":w,"sd-3-19-3-popup":a,"sd-3-19-3-tag":S},I.styles=[n,s.styles,r`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-3-19-3-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-3-19-3-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-3-19-3-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-3-19-3-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([f({selector:"sd-3-19-3-option"})],I.prototype,"_optionsInDefaultSlot",2),D([h("sd-3-19-3-popup")],I.prototype,"popup",2),D([h('[part="combobox"]')],I.prototype,"combobox",2),D([h('[part="display-input"]')],I.prototype,"displayInput",2),D([h(".value-input")],I.prototype,"valueInput",2),D([h('[part="listbox"]')],I.prototype,"listbox",2),D([h("#invalid-message")],I.prototype,"invalidMessage",2),D([v()],I.prototype,"hasHover",2),D([v()],I.prototype,"displayLabel",2),D([v()],I.prototype,"hasFocus",2),D([v()],I.prototype,"currentOption",2),D([v()],I.prototype,"selectedOptions",2),D([v()],I.prototype,"showValidStyle",2),D([v()],I.prototype,"showInvalidStyle",2),D([c()],I.prototype,"defaultValue",2),D([p({type:Boolean,reflect:!0})],I.prototype,"open",2),D([p({reflect:!0})],I.prototype,"size",2),D([p({reflect:!0})],I.prototype,"placement",2),D([p()],I.prototype,"label",2),D([p()],I.prototype,"placeholder",2),D([p({type:Boolean,reflect:!0})],I.prototype,"disabled",2),D([p({attribute:"help-text"})],I.prototype,"helpText",2),D([v()],I.prototype,"currentPlacement",2),D([p({type:Boolean})],I.prototype,"clearable",2),D([p({type:Boolean,reflect:!0})],I.prototype,"multiple",2),D([p({type:Boolean,reflect:!0})],I.prototype,"useTags",2),D([p({attribute:"max-options-visible",type:Number})],I.prototype,"maxOptionsVisible",2),D([p({reflect:!0})],I.prototype,"form",2),D([p()],I.prototype,"name",2),D([p({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],I.prototype,"value",2),D([p({type:Boolean,reflect:!0})],I.prototype,"required",2),D([p({type:Boolean,reflect:!0,attribute:"style-on-valid"})],I.prototype,"styleOnValid",2),D([p({type:Boolean})],I.prototype,"hoist",2),D([p()],I.prototype,"getTag",2),D([C("useTags",{waitUntilFirstUpdate:!0})],I.prototype,"handleUseTagsChange",1),D([C("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"handleDisabledChange",1),D([C("open",{waitUntilFirstUpdate:!0})],I.prototype,"handleOpenChange",1),D([C("size",{waitUntilFirstUpdate:!0})],I.prototype,"applySizeToOptions",1),D([C("value",{waitUntilFirstUpdate:!0})],I.prototype,"handleValueChange",1),I=D([d("sd-3-19-3-select")],I),y("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),y("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{I as default};