@solid-design-system/components 4.6.12 → 4.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/cdn/chunks/chunk.3CZQFEYM.js +1 -0
  2. package/cdn/components/notification/notification.d.ts +0 -4
  3. package/cdn/components/notification/notification.js +1 -1
  4. package/cdn/custom-elements.json +1 -1
  5. package/cdn/solid-components.bundle.js +14 -14
  6. package/cdn/solid-components.iife.js +14 -14
  7. package/cdn/solid-components.js +1 -1
  8. package/cdn/web-types.json +1 -1
  9. package/cdn-versioned/_components/menu/menu.js +1 -1
  10. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  11. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  12. package/cdn-versioned/chunks/chunk.3CZQFEYM.js +1 -0
  13. package/cdn-versioned/chunks/chunk.3LNKE2CG.js +1 -1
  14. package/cdn-versioned/chunks/chunk.4YCOU55E.js +2 -2
  15. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  16. package/cdn-versioned/chunks/chunk.6G6DPUNG.js +1 -1
  17. package/cdn-versioned/chunks/chunk.6NP6ACYF.js +1 -1
  18. package/cdn-versioned/chunks/chunk.6WMAE6EM.js +1 -1
  19. package/cdn-versioned/chunks/chunk.7QJPML7E.js +1 -1
  20. package/cdn-versioned/chunks/chunk.7R5WVKOU.js +1 -1
  21. package/cdn-versioned/chunks/chunk.7VF3CHZ2.js +1 -1
  22. package/cdn-versioned/chunks/chunk.A2HHAWSZ.js +1 -1
  23. package/cdn-versioned/chunks/chunk.A4472UE3.js +1 -1
  24. package/cdn-versioned/chunks/chunk.AULSVEYK.js +1 -1
  25. package/cdn-versioned/chunks/chunk.C7TENCCC.js +1 -1
  26. package/cdn-versioned/chunks/chunk.CDEAOHOV.js +1 -1
  27. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  28. package/cdn-versioned/chunks/chunk.CJHO2CRN.js +1 -1
  29. package/cdn-versioned/chunks/chunk.CNGICFLY.js +1 -1
  30. package/cdn-versioned/chunks/chunk.CRUS5X5G.js +1 -1
  31. package/cdn-versioned/chunks/chunk.EAAM3VG2.js +3 -3
  32. package/cdn-versioned/chunks/chunk.EQSUVFCF.js +1 -1
  33. package/cdn-versioned/chunks/chunk.ETYUJIA4.js +1 -1
  34. package/cdn-versioned/chunks/chunk.FK5LYWC7.js +1 -1
  35. package/cdn-versioned/chunks/chunk.FPWMHC7P.js +1 -1
  36. package/cdn-versioned/chunks/chunk.FYIER3I3.js +1 -1
  37. package/cdn-versioned/chunks/chunk.G3JDMNCB.js +1 -1
  38. package/cdn-versioned/chunks/chunk.G5HXH4DJ.js +1 -1
  39. package/cdn-versioned/chunks/chunk.GG4532YR.js +1 -1
  40. package/cdn-versioned/chunks/chunk.HLHBWQSY.js +1 -1
  41. package/cdn-versioned/chunks/chunk.IMSUZE4K.js +1 -1
  42. package/cdn-versioned/chunks/chunk.KMWJUXQH.js +1 -1
  43. package/cdn-versioned/chunks/chunk.KSYRDJ33.js +1 -1
  44. package/cdn-versioned/chunks/chunk.L2PFOOBK.js +1 -1
  45. package/cdn-versioned/chunks/chunk.L7T6YEYN.js +1 -1
  46. package/cdn-versioned/chunks/chunk.LSAUVFWV.js +1 -1
  47. package/cdn-versioned/chunks/chunk.M7NPMAK2.js +1 -1
  48. package/cdn-versioned/chunks/chunk.MT35MRN2.js +1 -1
  49. package/cdn-versioned/chunks/chunk.NTK6WXO7.js +1 -1
  50. package/cdn-versioned/chunks/chunk.O62YAWLB.js +4 -4
  51. package/cdn-versioned/chunks/chunk.OCOLBSJK.js +2 -2
  52. package/cdn-versioned/chunks/chunk.P2CPGH2M.js +1 -1
  53. package/cdn-versioned/chunks/chunk.QE3HRWOD.js +4 -4
  54. package/cdn-versioned/chunks/chunk.QJK7ON6G.js +1 -1
  55. package/cdn-versioned/chunks/chunk.QX6EC2OV.js +1 -1
  56. package/cdn-versioned/chunks/chunk.RCNLUAML.js +1 -1
  57. package/cdn-versioned/chunks/chunk.RTOLPQCZ.js +1 -1
  58. package/cdn-versioned/chunks/chunk.SA2YRNVP.js +1 -1
  59. package/cdn-versioned/chunks/chunk.TGMCWOXL.js +1 -1
  60. package/cdn-versioned/chunks/chunk.TWHESFGL.js +1 -1
  61. package/cdn-versioned/chunks/chunk.UJZJOR6Z.js +1 -1
  62. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  63. package/cdn-versioned/chunks/chunk.YICLGCNM.js +1 -1
  64. package/cdn-versioned/chunks/chunk.ZDACAU6O.js +1 -1
  65. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  66. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  67. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  68. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  69. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  70. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  71. package/cdn-versioned/components/button/button.d.ts +1 -1
  72. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  73. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  74. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  75. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  76. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  77. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  78. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  79. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  80. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  81. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  82. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  83. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  84. package/cdn-versioned/components/header/header.d.ts +1 -1
  85. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  86. package/cdn-versioned/components/include/include.d.ts +1 -1
  87. package/cdn-versioned/components/input/input.d.ts +1 -1
  88. package/cdn-versioned/components/link/link.d.ts +1 -1
  89. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  90. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  91. package/cdn-versioned/components/notification/notification.d.ts +1 -5
  92. package/cdn-versioned/components/notification/notification.js +1 -1
  93. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  94. package/cdn-versioned/components/option/option.d.ts +1 -1
  95. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  96. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  97. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  98. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  99. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  100. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  101. package/cdn-versioned/components/select/select.d.ts +1 -1
  102. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  103. package/cdn-versioned/components/step/step.d.ts +1 -1
  104. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  105. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  106. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  107. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  108. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  109. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  110. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  111. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  112. package/cdn-versioned/components/video/video.d.ts +1 -1
  113. package/cdn-versioned/custom-elements.json +211 -211
  114. package/cdn-versioned/internal/form.js +3 -3
  115. package/cdn-versioned/solid-components.bundle.js +20 -20
  116. package/cdn-versioned/solid-components.css +2 -2
  117. package/cdn-versioned/solid-components.iife.js +20 -20
  118. package/cdn-versioned/solid-components.js +1 -1
  119. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  120. package/cdn-versioned/web-types.json +137 -137
  121. package/dist/chunks/{chunk.SYPP74RS.js → chunk.QB4ZOKFD.js} +26 -44
  122. package/dist/components/notification/notification.d.ts +0 -4
  123. package/dist/components/notification/notification.js +1 -1
  124. package/dist/custom-elements.json +1 -1
  125. package/dist/solid-components.js +1 -1
  126. package/dist/web-types.json +1 -1
  127. package/dist-versioned/_components/menu/menu.js +1 -1
  128. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  129. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  130. package/dist-versioned/chunks/chunk.2J5UWA4O.js +6 -6
  131. package/dist-versioned/chunks/chunk.2ROGEIKB.js +2 -2
  132. package/dist-versioned/chunks/chunk.5GXWP6YW.js +2 -2
  133. package/dist-versioned/chunks/chunk.5H3SWQYU.js +2 -2
  134. package/dist-versioned/chunks/chunk.5PZUOPFS.js +4 -4
  135. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  136. package/dist-versioned/chunks/chunk.7HZNYBYX.js +2 -2
  137. package/dist-versioned/chunks/chunk.AIC2K6F6.js +2 -2
  138. package/dist-versioned/chunks/chunk.BCX6GWFU.js +1 -1
  139. package/dist-versioned/chunks/chunk.BLEQBK6L.js +2 -2
  140. package/dist-versioned/chunks/chunk.BTFVVZN7.js +2 -2
  141. package/dist-versioned/chunks/chunk.C3OAT5IL.js +8 -8
  142. package/dist-versioned/chunks/chunk.COLY2AS3.js +3 -3
  143. package/dist-versioned/chunks/chunk.DCMNY5PW.js +1 -1
  144. package/dist-versioned/chunks/chunk.DCOXCIL6.js +5 -5
  145. package/dist-versioned/chunks/chunk.DDQ43DMG.js +1 -1
  146. package/dist-versioned/chunks/chunk.DRFKZJ6U.js +2 -2
  147. package/dist-versioned/chunks/chunk.EJADH4TP.js +2 -2
  148. package/dist-versioned/chunks/chunk.G6HSZF64.js +1 -1
  149. package/dist-versioned/chunks/chunk.GG6EDMMX.js +1 -1
  150. package/dist-versioned/chunks/chunk.GR4QWBKR.js +2 -2
  151. package/dist-versioned/chunks/chunk.HY3UDFFO.js +3 -3
  152. package/dist-versioned/chunks/chunk.IGLAKKCM.js +2 -2
  153. package/dist-versioned/chunks/chunk.IJO3II3P.js +2 -2
  154. package/dist-versioned/chunks/chunk.IUDU7IPQ.js +3 -3
  155. package/dist-versioned/chunks/chunk.IZJ3ASKW.js +2 -2
  156. package/dist-versioned/chunks/chunk.JKMRTFLI.js +1 -1
  157. package/dist-versioned/chunks/chunk.KDKAOP5K.js +5 -5
  158. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  159. package/dist-versioned/chunks/chunk.LHDIK3CL.js +1 -1
  160. package/dist-versioned/chunks/chunk.LMZE7CWI.js +2 -2
  161. package/dist-versioned/chunks/chunk.MHSIUMF2.js +5 -5
  162. package/dist-versioned/chunks/chunk.N4PCVM2O.js +1 -1
  163. package/dist-versioned/chunks/chunk.PAMIVTVZ.js +1 -1
  164. package/dist-versioned/chunks/{chunk.SYPP74RS.js → chunk.QB4ZOKFD.js} +30 -48
  165. package/dist-versioned/chunks/chunk.QGTHHUEP.js +11 -11
  166. package/dist-versioned/chunks/chunk.QJSVVX5A.js +5 -5
  167. package/dist-versioned/chunks/chunk.RSBV2TUF.js +3 -3
  168. package/dist-versioned/chunks/chunk.RX6EYXKU.js +1 -1
  169. package/dist-versioned/chunks/chunk.SA5CVRAH.js +1 -1
  170. package/dist-versioned/chunks/chunk.SH4PL7NS.js +26 -26
  171. package/dist-versioned/chunks/chunk.SONGMTFR.js +5 -5
  172. package/dist-versioned/chunks/chunk.TOAVJJSV.js +2 -2
  173. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  174. package/dist-versioned/chunks/chunk.ULJ5M2KG.js +1 -1
  175. package/dist-versioned/chunks/chunk.V2GCDMDD.js +9 -9
  176. package/dist-versioned/chunks/chunk.V32MUHC2.js +1 -1
  177. package/dist-versioned/chunks/chunk.VJYNSYQW.js +1 -1
  178. package/dist-versioned/chunks/chunk.WE6ILGOF.js +13 -13
  179. package/dist-versioned/chunks/chunk.XG3WGOFU.js +23 -23
  180. package/dist-versioned/chunks/chunk.ZFWQYTKN.js +14 -14
  181. package/dist-versioned/chunks/chunk.ZTC7JGWI.js +6 -6
  182. package/dist-versioned/chunks/chunk.ZW2FQM2X.js +2 -2
  183. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  184. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  185. package/dist-versioned/components/animation/animation.d.ts +1 -1
  186. package/dist-versioned/components/audio/audio.d.ts +1 -1
  187. package/dist-versioned/components/badge/badge.d.ts +1 -1
  188. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  189. package/dist-versioned/components/button/button.d.ts +1 -1
  190. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  191. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  192. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  193. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  194. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  195. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  196. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  197. package/dist-versioned/components/divider/divider.d.ts +1 -1
  198. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  199. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  200. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  201. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  202. package/dist-versioned/components/header/header.d.ts +1 -1
  203. package/dist-versioned/components/icon/icon.d.ts +1 -1
  204. package/dist-versioned/components/include/include.d.ts +1 -1
  205. package/dist-versioned/components/input/input.d.ts +1 -1
  206. package/dist-versioned/components/link/link.d.ts +1 -1
  207. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  208. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  209. package/dist-versioned/components/notification/notification.d.ts +1 -5
  210. package/dist-versioned/components/notification/notification.js +1 -1
  211. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  212. package/dist-versioned/components/option/option.d.ts +1 -1
  213. package/dist-versioned/components/popup/popup.d.ts +1 -1
  214. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  215. package/dist-versioned/components/radio/radio.d.ts +1 -1
  216. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  217. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  218. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  219. package/dist-versioned/components/select/select.d.ts +1 -1
  220. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  221. package/dist-versioned/components/step/step.d.ts +1 -1
  222. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  223. package/dist-versioned/components/switch/switch.d.ts +1 -1
  224. package/dist-versioned/components/tab/tab.d.ts +1 -1
  225. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  226. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  227. package/dist-versioned/components/tag/tag.d.ts +1 -1
  228. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  229. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  230. package/dist-versioned/components/video/video.d.ts +1 -1
  231. package/dist-versioned/custom-elements.json +211 -211
  232. package/dist-versioned/internal/form.js +3 -3
  233. package/dist-versioned/solid-components.css +2 -2
  234. package/dist-versioned/solid-components.js +1 -1
  235. package/dist-versioned/vscode.html-custom-data.json +80 -80
  236. package/dist-versioned/web-types.json +137 -137
  237. package/package.json +2 -2
  238. package/cdn/chunks/chunk.IQUBYV5M.js +0 -1
  239. package/cdn-versioned/chunks/chunk.IQUBYV5M.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solid-design-system/components",
3
3
  "description": "Solid Design System: Components",
4
- "version": "4.6.12",
4
+ "version": "4.6.13",
5
5
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
6
6
  "author": "Union Investment",
7
7
  "license": "MIT",
@@ -111,7 +111,7 @@
111
111
  "readme": "README.md",
112
112
  "meta": {
113
113
  "bundleSizeInKb": {
114
- "uncompressed": 422,
114
+ "uncompressed": 421,
115
115
  "gzip": 99
116
116
  }
117
117
  },
@@ -1 +0,0 @@
1
- import{a as u,c as m}from"./chunk.A3DKF5BY.js";import{a as d,d as h}from"./chunk.RQYP7MH5.js";import{a as p}from"./chunk.KLRPP4NQ.js";import{a as y}from"./chunk.DEXOQON7.js";import{a as o}from"./chunk.26V4EXHB.js";import{a as c}from"./chunk.E2DRD2OX.js";import{a as b,b as a,d as n,h as l}from"./chunk.CDEAOHOV.js";import{b as f,e as r}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var w=Object.assign(document.createElement("div"),{role:"region",className:"sd-toast-stack sd-toast-stack--top-right"}),v=Object.assign(document.createElement("div"),{role:"region",className:"sd-toast-stack sd-toast-stack--bottom-center"}),t=class extends l{constructor(){super(...arguments);this.localize=new y(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();this.tabDirection="forward";this.focused=!1}get stack(){return{"top-right":w,"bottom-center":v}[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications")),this.handleFocusIn=this.handleFocusIn.bind(this),document.addEventListener("focusin",this.handleFocusIn)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.handleFocusIn)}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()}checkFocus(){if(!(!this.focused||!this.closable)&&!this.matches(":focus-within")){let e=this.tabDirection==="forward"?this.base:this.close;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.focused=!0}handleKeyDown(e){if(this.tabDirection="forward",this.closable&&e.key==="Escape"){this.hide();return}e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backwards"),requestAnimationFrame(()=>this.checkFocus())}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await h(this.base),this.base.hidden=!1;let{keyframes:e,options:s}=m(this,"notification.show",{dir:this.localize.dir()});await d(this.base,e,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await h(this.base);let{keyframes:e,options:s}=m(this,"notification.hide",{dir:this.localize.dir()});await d(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(e=>{let s=this.toastStack==="bottom-center"?v:w;s.parentElement===null&&document.body.append(s),s.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{s.removeChild(this),e(),s.querySelector("sd-notification")===null&&s.remove()},{once:!0})})}render(){return r`<div part="base" class="${o("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}" role="alert" id="notification" tabindex="0" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><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-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${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 id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?r`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?r`<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 border border-neutral-400"></div>`:""}</div>`}};t.styles=[...l.styles,f`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],i([n('[part~="base"]')],t.prototype,"base",2),i([n('[part~="close-button"]')],t.prototype,"close",2),i([a({type:String,reflect:!0})],t.prototype,"variant",2),i([a({type:Boolean,reflect:!0})],t.prototype,"open",2),i([a({type:Boolean,reflect:!0})],t.prototype,"closable",2),i([a({type:Number,reflect:!0})],t.prototype,"duration",2),i([a({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),i([a({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),i([c("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([c("duration")],t.prototype,"handleDurationChange",1),t=i([b("sd-notification")],t);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{t as a};
@@ -1 +0,0 @@
1
- import{a as u,c as m}from"./chunk.A3DKF5BY.js";import{a as d,d as h}from"./chunk.RQYP7MH5.js";import{a as p}from"./chunk.KLRPP4NQ.js";import{a as y}from"./chunk.DEXOQON7.js";import{a as o}from"./chunk.26V4EXHB.js";import{a as c}from"./chunk.E2DRD2OX.js";import{a as b,b as a,d as n,h as l}from"./chunk.CDEAOHOV.js";import{b as f,e as r}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var w=Object.assign(document.createElement("div"),{role:"region",className:"sd-toast-stack sd-toast-stack--top-right"}),v=Object.assign(document.createElement("div"),{role:"region",className:"sd-toast-stack sd-toast-stack--bottom-center"}),t=class extends l{constructor(){super(...arguments);this.localize=new y(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();this.tabDirection="forward";this.focused=!1}get stack(){return{"top-right":w,"bottom-center":v}[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications")),this.handleFocusIn=this.handleFocusIn.bind(this),document.addEventListener("focusin",this.handleFocusIn)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.handleFocusIn)}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()}checkFocus(){if(!(!this.focused||!this.closable)&&!this.matches(":focus-within")){let e=this.tabDirection==="forward"?this.base:this.close;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.focused=!0}handleKeyDown(e){if(this.tabDirection="forward",this.closable&&e.key==="Escape"){this.hide();return}e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backwards"),requestAnimationFrame(()=>this.checkFocus())}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await h(this.base),this.base.hidden=!1;let{keyframes:e,options:s}=m(this,"notification.show",{dir:this.localize.dir()});await d(this.base,e,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await h(this.base);let{keyframes:e,options:s}=m(this,"notification.hide",{dir:this.localize.dir()});await d(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(e=>{let s=this.toastStack==="bottom-center"?v:w;s.parentElement===null&&document.body.append(s),s.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{s.removeChild(this),e(),s.querySelector("sd-4-6-12-notification")===null&&s.remove()},{once:!0})})}render(){return r`<div part="base" class="${o("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}" role="alert" id="notification" tabindex="0" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><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-4-6-12-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-4-6-12-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 id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?r`<sd-4-6-12-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-4-6-12-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-6-12-icon></sd-4-6-12-button>`:""}</div>${this.durationIndicator?r`<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 border border-neutral-400"></div>`:""}</div>`}};t.styles=[...l.styles,f`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],i([n('[part~="base"]')],t.prototype,"base",2),i([n('[part~="close-button"]')],t.prototype,"close",2),i([a({type:String,reflect:!0})],t.prototype,"variant",2),i([a({type:Boolean,reflect:!0})],t.prototype,"open",2),i([a({type:Boolean,reflect:!0})],t.prototype,"closable",2),i([a({type:Number,reflect:!0})],t.prototype,"duration",2),i([a({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),i([a({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),i([c("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([c("duration")],t.prototype,"handleDurationChange",1),t=i([b("sd-4-6-12-notification")],t);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{t as a};