atomicuilibrary 0.1.0 → 0.1.3

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 (618) hide show
  1. package/dist/cjs/category-section.cjs.entry.js +2 -2
  2. package/dist/cjs/dom-BvBb0kmW.js +267 -0
  3. package/dist/cjs/exploration-project-tailwind.cjs.js +2 -2
  4. package/dist/cjs/{index-ClkOYpT8.js → index-C32cWsm5.js} +1 -1
  5. package/dist/cjs/layout-manager.cjs.entry.js +3 -3
  6. package/dist/cjs/library-card.cjs.entry.js +2 -2
  7. package/dist/cjs/lm-container_2.cjs.entry.js +2 -2
  8. package/dist/cjs/lm-panel_3.cjs.entry.js +4 -4
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/my-component.cjs.entry.js +1 -1
  11. package/dist/cjs/my-step.cjs.entry.js +2 -2
  12. package/dist/cjs/nav-bar.cjs.entry.js +4 -4
  13. package/dist/cjs/smart-step.cjs.entry.js +3 -3
  14. package/dist/cjs/timeline-item.cjs.entry.js +2 -2
  15. package/dist/cjs/ui-accordion_11.cjs.entry.js +132 -50
  16. package/dist/cjs/ui-advanced-data-table.cjs.entry.js +2 -2
  17. package/dist/cjs/ui-anchor.cjs.entry.js +2 -2
  18. package/dist/cjs/ui-animate-on-scroll.cjs.entry.js +3 -3
  19. package/dist/cjs/ui-aside-panel.cjs.entry.js +10 -11
  20. package/dist/cjs/ui-avatar-group_5.cjs.entry.js +1694 -0
  21. package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +3 -3
  22. package/dist/cjs/ui-breadcrumb.cjs.entry.js +1 -1
  23. package/dist/cjs/ui-callout-banner.cjs.entry.js +2 -2
  24. package/dist/cjs/ui-card.cjs.entry.js +4 -3
  25. package/dist/cjs/ui-carousel.cjs.entry.js +1 -1
  26. package/dist/cjs/ui-checkbox.cjs.entry.js +3 -3
  27. package/dist/cjs/ui-code-editor.cjs.entry.js +2 -2
  28. package/dist/cjs/ui-code-preview.cjs.entry.js +2 -2
  29. package/dist/cjs/ui-color-picker.cjs.entry.js +256 -22
  30. package/dist/cjs/ui-command-palette.cjs.entry.js +1 -1
  31. package/dist/cjs/ui-dialog-box.cjs.entry.js +85 -11
  32. package/dist/cjs/ui-dialog-content.cjs.entry.js +1 -1
  33. package/dist/cjs/ui-dialog-footer_2.cjs.entry.js +1 -1
  34. package/dist/cjs/ui-divider.cjs.entry.js +1 -1
  35. package/dist/cjs/ui-dock-host.cjs.entry.js +4 -4
  36. package/dist/cjs/ui-dock.cjs.entry.js +2 -2
  37. package/dist/cjs/ui-drag-drop.cjs.entry.js +2 -2
  38. package/dist/cjs/ui-dropdown_2.cjs.entry.js +104 -34
  39. package/dist/cjs/ui-empty-state.cjs.entry.js +2 -2
  40. package/dist/cjs/ui-fab-item.cjs.entry.js +2 -2
  41. package/dist/cjs/ui-fab.cjs.entry.js +4 -4
  42. package/dist/cjs/ui-file-upload.cjs.entry.js +143 -44
  43. package/dist/cjs/ui-horizontal-nav.cjs.entry.js +2 -2
  44. package/dist/cjs/ui-knob.cjs.entry.js +1 -1
  45. package/dist/cjs/ui-label.cjs.entry.js +473 -0
  46. package/dist/cjs/ui-library.cjs.entry.js +2 -2
  47. package/dist/cjs/ui-list-group_2.cjs.entry.js +349 -60
  48. package/dist/cjs/ui-list.cjs.entry.js +76 -42
  49. package/dist/cjs/ui-masonry.cjs.entry.js +1 -1
  50. package/dist/cjs/ui-meter-group.cjs.entry.js +5 -4
  51. package/dist/cjs/ui-navigation-item.cjs.entry.js +5 -5
  52. package/dist/cjs/ui-number-input.cjs.entry.js +7 -3
  53. package/dist/cjs/ui-otp-input.cjs.entry.js +5 -5
  54. package/dist/cjs/{ui-pagination_4.cjs.entry.js → ui-pagination_3.cjs.entry.js} +35 -506
  55. package/dist/cjs/ui-panel.cjs.entry.js +1 -1
  56. package/dist/cjs/ui-pattern-input.cjs.entry.js +46 -11
  57. package/dist/cjs/ui-progress.cjs.entry.js +66 -9
  58. package/dist/cjs/ui-range-slider.cjs.entry.js +2 -2
  59. package/dist/cjs/ui-resizable-panel.cjs.entry.js +2 -2
  60. package/dist/cjs/ui-scroll-top.cjs.entry.js +1 -1
  61. package/dist/cjs/ui-smart-context-menu.cjs.entry.js +1 -1
  62. package/dist/cjs/ui-smart-stepper.cjs.entry.js +2 -2
  63. package/dist/cjs/ui-snackbar.cjs.entry.js +1 -1
  64. package/dist/cjs/ui-speed-dial.cjs.entry.js +1 -1
  65. package/dist/cjs/ui-speedometer.cjs.entry.js +28 -17
  66. package/dist/cjs/ui-splitter.cjs.entry.js +1 -1
  67. package/dist/cjs/ui-step.cjs.entry.js +2 -2
  68. package/dist/cjs/ui-stepper.cjs.entry.js +1 -1
  69. package/dist/cjs/ui-switch.cjs.entry.js +14 -13
  70. package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
  71. package/dist/cjs/ui-tag.cjs.entry.js +58 -13
  72. package/dist/cjs/ui-timeline.cjs.entry.js +10 -2
  73. package/dist/cjs/ui-timer.cjs.entry.js +2 -2
  74. package/dist/cjs/ui-toolbar.cjs.entry.js +2 -2
  75. package/dist/cjs/ui-tooltip.cjs.entry.js +4 -4
  76. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  77. package/dist/cjs/ui-transfer-list.cjs.entry.js +6 -6
  78. package/dist/cjs/ui-tree.cjs.entry.js +30 -15
  79. package/dist/cjs/ui-workspace-manager.cjs.entry.js +2 -2
  80. package/dist/collection/assets/js/component-config.js +1 -0
  81. package/dist/collection/assets/js/demo-loader.js +2 -0
  82. package/dist/collection/assets/js/demos/about-demo.js +13 -13
  83. package/dist/collection/assets/js/demos/accordion-demo.js +66 -66
  84. package/dist/collection/assets/js/demos/advanced-data-table-demo.js +102 -102
  85. package/dist/collection/assets/js/demos/anchor-demo.js +27 -28
  86. package/dist/collection/assets/js/demos/animate-on-scroll-demo.js +12 -12
  87. package/dist/collection/assets/js/demos/aside-panel-demo.js +51 -51
  88. package/dist/collection/assets/js/demos/avatar-demo.js +433 -95
  89. package/dist/collection/assets/js/demos/badge-demo.js +51 -52
  90. package/dist/collection/assets/js/demos/breadcrumb-demo.js +7 -7
  91. package/dist/collection/assets/js/demos/button-demo.js +117 -107
  92. package/dist/collection/assets/js/demos/button-toggle-demo.js +199 -96
  93. package/dist/collection/assets/js/demos/callout-banner-demo.js +23 -23
  94. package/dist/collection/assets/js/demos/card-demo.js +23 -22
  95. package/dist/collection/assets/js/demos/carousel-demo.js +632 -360
  96. package/dist/collection/assets/js/demos/checkbox-demo.js +124 -7
  97. package/dist/collection/assets/js/demos/color-picker-demo.js +394 -100
  98. package/dist/collection/assets/js/demos/command-palette-demo.js +182 -65
  99. package/dist/collection/assets/js/demos/complex-form-demo.js +5 -5
  100. package/dist/collection/assets/js/demos/context-menu-demo.js +43 -43
  101. package/dist/collection/assets/js/demos/dialog-demo-temp.js +3 -3
  102. package/dist/collection/assets/js/demos/dialog-demo.js +336 -230
  103. package/dist/collection/assets/js/demos/divider-demo.js +59 -62
  104. package/dist/collection/assets/js/demos/dock-demo.js +12 -12
  105. package/dist/collection/assets/js/demos/dock-host-init.js +31 -31
  106. package/dist/collection/assets/js/demos/documentation-demo.js +34 -34
  107. package/dist/collection/assets/js/demos/drag-drop-demo.js +2 -2
  108. package/dist/collection/assets/js/demos/dropdown-demo.js +140 -136
  109. package/dist/collection/assets/js/demos/dropdown-subtitle-demo.js +2 -2
  110. package/dist/collection/assets/js/demos/empty-state-demo.js +294 -78
  111. package/dist/collection/assets/js/demos/fab-demo.js +95 -11
  112. package/dist/collection/assets/js/demos/file-upload-demo.js +641 -171
  113. package/dist/collection/assets/js/demos/home-components.js +2 -2
  114. package/dist/collection/assets/js/demos/horizontal-nav-demo.js +6 -6
  115. package/dist/collection/assets/js/demos/icon-demo.js +17 -17
  116. package/dist/collection/assets/js/demos/input-demo.js +147 -143
  117. package/dist/collection/assets/js/demos/knob-demo.js +29 -30
  118. package/dist/collection/assets/js/demos/label-demo.js +697 -0
  119. package/dist/collection/assets/js/demos/layout-manager-demo.js +55 -55
  120. package/dist/collection/assets/js/demos/list-demo.js +185 -122
  121. package/dist/collection/assets/js/demos/loader-demo.js +48 -48
  122. package/dist/collection/assets/js/demos/masonry-demo.js +568 -140
  123. package/dist/collection/assets/js/demos/meter-group-demo.js +14 -16
  124. package/dist/collection/assets/js/demos/multi-level-context-menu-demo.js +25 -25
  125. package/dist/collection/assets/js/demos/my-profile-demo.js +27 -27
  126. package/dist/collection/assets/js/demos/nav-bar-demo.js +1 -1
  127. package/dist/collection/assets/js/demos/number-input-demo.js +262 -211
  128. package/dist/collection/assets/js/demos/pagination-demo.js +29 -29
  129. package/dist/collection/assets/js/demos/panel-demo.js +18 -25
  130. package/dist/collection/assets/js/demos/pattern-input-demo.js +278 -40
  131. package/dist/collection/assets/js/demos/popover-demo.js +240 -149
  132. package/dist/collection/assets/js/demos/progress-demo.js +170 -156
  133. package/dist/collection/assets/js/demos/radio-demo.js +73 -12
  134. package/dist/collection/assets/js/demos/range-slider-demo.js +33 -33
  135. package/dist/collection/assets/js/demos/rating-demo.js +19 -19
  136. package/dist/collection/assets/js/demos/scroll-top-demo.js +8 -9
  137. package/dist/collection/assets/js/demos/skeleton-demo.js +110 -52
  138. package/dist/collection/assets/js/demos/skeleton-performance-demo.js +2 -2
  139. package/dist/collection/assets/js/demos/smart-dialog-demo.js +12 -12
  140. package/dist/collection/assets/js/demos/smart-menu-demo.js +17 -17
  141. package/dist/collection/assets/js/demos/snackbar-demo.js +53 -53
  142. package/dist/collection/assets/js/demos/speed-dial-demo.js +14 -14
  143. package/dist/collection/assets/js/demos/speedometer-demo.js +40 -32
  144. package/dist/collection/assets/js/demos/split-button-demo.js +2 -2
  145. package/dist/collection/assets/js/demos/splitter-demo.js +14 -14
  146. package/dist/collection/assets/js/demos/stack-demo.js +27 -27
  147. package/dist/collection/assets/js/demos/stepper-demo.js +49 -49
  148. package/dist/collection/assets/js/demos/switch-demo.js +561 -125
  149. package/dist/collection/assets/js/demos/tabs-demo.js +22 -22
  150. package/dist/collection/assets/js/demos/tag-demo.js +62 -62
  151. package/dist/collection/assets/js/demos/theme-selector-demo.js +27 -27
  152. package/dist/collection/assets/js/demos/timeline-demo.js +10 -10
  153. package/dist/collection/assets/js/demos/timeline-playground.js +2 -2
  154. package/dist/collection/assets/js/demos/timer-demo.js +10 -10
  155. package/dist/collection/assets/js/demos/toolbar-demo.js +17 -17
  156. package/dist/collection/assets/js/demos/tooltip-demo.js +92 -90
  157. package/dist/collection/assets/js/demos/top-bar-demo.js +6 -6
  158. package/dist/collection/assets/js/demos/transfer-list-demo.js +20 -20
  159. package/dist/collection/assets/js/demos/tree-demo.js +50 -66
  160. package/dist/collection/assets/js/demos/workspace-manager-demo.js +20 -20
  161. package/dist/collection/collection-manifest.json +1 -2
  162. package/dist/collection/components/accordion/accordion.css +275 -9
  163. package/dist/collection/components/accordion/accordion.js +7 -6
  164. package/dist/collection/components/advanced-data-table/advanced-data-table.css +5 -5
  165. package/dist/collection/components/advanced-data-table/advanced-data-table.js +2 -2
  166. package/dist/collection/components/anchor/anchor.css +1 -0
  167. package/dist/collection/components/animate-on-scroll/animate-on-scroll.js +2 -2
  168. package/dist/collection/components/aside-panel/aside-panel.css +2 -2
  169. package/dist/collection/components/aside-panel/aside-panel.js +10 -11
  170. package/dist/collection/components/avatar/avatar.css +6 -6
  171. package/dist/collection/components/avatar/avatar.js +63 -11
  172. package/dist/collection/components/badge/badge.css +27 -17
  173. package/dist/collection/components/badge/badge.js +6 -3
  174. package/dist/collection/components/breadcrumb/breadcrumb-item.js +2 -2
  175. package/dist/collection/components/button/button.css +1 -0
  176. package/dist/collection/components/button/button.js +3 -3
  177. package/dist/collection/components/button-toggle/button-toggle.js +2 -2
  178. package/dist/collection/components/button-toggle-group/button-toggle-group.css +161 -14
  179. package/dist/collection/components/button-toggle-group/button-toggle-group.js +2 -2
  180. package/dist/collection/components/callout-banner/callout-banner.css +75 -0
  181. package/dist/collection/components/callout-banner/callout-banner.js +1 -1
  182. package/dist/collection/components/card/card.css +221 -9
  183. package/dist/collection/components/card/card.js +3 -2
  184. package/dist/collection/components/checkbox/checkbox.js +3 -3
  185. package/dist/collection/components/code-editor/code-editor.js +1 -1
  186. package/dist/collection/components/code-preview/ui-code-preview.js +1 -1
  187. package/dist/collection/components/color-picker/color-picker.css +110 -6
  188. package/dist/collection/components/color-picker/color-picker.js +302 -26
  189. package/dist/collection/components/context-menu/context-menu.css +9 -9
  190. package/dist/collection/components/dialog-box/dialog-box.js +116 -14
  191. package/dist/collection/components/dialog-header/dialog-header.js +1 -1
  192. package/dist/collection/components/dock/dock.css +116 -3
  193. package/dist/collection/components/dock-host/ui-dock-host.js +3 -3
  194. package/dist/collection/components/drag-drop/drag-drop.js +1 -1
  195. package/dist/collection/components/dropdown/dropdown.css +101 -8
  196. package/dist/collection/components/dropdown/dropdown.js +94 -28
  197. package/dist/collection/components/empty-state/empty-state.js +1 -1
  198. package/dist/collection/components/fab/fab.css +87 -15
  199. package/dist/collection/components/fab/fab.js +3 -3
  200. package/dist/collection/components/fab-item/fab-item.js +1 -1
  201. package/dist/collection/components/file-upload/file-upload.css +1362 -31
  202. package/dist/collection/components/file-upload/file-upload.js +171 -50
  203. package/dist/collection/components/horizontal-nav/horizontal-nav.css +9 -9
  204. package/dist/collection/components/horizontal-nav/horizontal-nav.js +2 -2
  205. package/dist/collection/components/icon/icon.js +1 -1
  206. package/dist/collection/components/input/input.css +9 -0
  207. package/dist/collection/components/input/input.js +20 -9
  208. package/dist/collection/components/label/label.css +583 -0
  209. package/dist/collection/components/label/label.js +1669 -0
  210. package/dist/collection/components/layout-manager/layout-manager.js +1 -1
  211. package/dist/collection/components/layout-manager/lm-floating-window/lm-floating-window.js +1 -1
  212. package/dist/collection/components/layout-manager/lm-panel/lm-panel.js +1 -1
  213. package/dist/collection/components/layout-manager/lm-splitter/lm-splitter.js +1 -1
  214. package/dist/collection/components/layout-manager/lm-tabs/lm-tabs.js +1 -1
  215. package/dist/collection/components/library/category-section.js +1 -1
  216. package/dist/collection/components/library/library-card.js +1 -1
  217. package/dist/collection/components/library/library.js +1 -1
  218. package/dist/collection/components/list/list.css +46 -5
  219. package/dist/collection/components/list/list.js +76 -42
  220. package/dist/collection/components/list-group/list-group.css +0 -2
  221. package/dist/collection/components/list-group/list-group.js +11 -5
  222. package/dist/collection/components/list-item/list-item.css +403 -131
  223. package/dist/collection/components/list-item/list-item.js +345 -61
  224. package/dist/collection/components/loader/loader.css +1 -1
  225. package/dist/collection/components/loader/loader.js +2 -2
  226. package/dist/collection/components/meter-group/meter-group.css +5 -0
  227. package/dist/collection/components/meter-group/meter-group.js +3 -2
  228. package/dist/collection/components/my-step/my-step.js +1 -1
  229. package/dist/collection/components/nav-bar/nav-bar.css +4 -4
  230. package/dist/collection/components/nav-bar/nav-bar.js +6 -6
  231. package/dist/collection/components/number-input/number-input.js +6 -2
  232. package/dist/collection/components/otp-input/otp-input.css +10 -0
  233. package/dist/collection/components/otp-input/otp-input.js +3 -3
  234. package/dist/collection/components/pagination/pagination.js +1 -1
  235. package/dist/collection/components/pattern-input/pattern-input.css +0 -1
  236. package/dist/collection/components/pattern-input/pattern-input.js +44 -9
  237. package/dist/collection/components/popover/popover.css +35 -7
  238. package/dist/collection/components/popover/popover.js +64 -9
  239. package/dist/collection/components/progress/progress.css +176 -32
  240. package/dist/collection/components/progress/progress.js +66 -8
  241. package/dist/collection/components/radio/radio.css +2 -0
  242. package/dist/collection/components/radio/radio.js +2 -2
  243. package/dist/collection/components/range-slider/range-slider.css +284 -31
  244. package/dist/collection/components/range-slider/range-slider.js +5 -5
  245. package/dist/collection/components/rating/rating.css +151 -65
  246. package/dist/collection/components/rating/rating.js +31 -13
  247. package/dist/collection/components/resizable-panel/resizable-panel.js +1 -1
  248. package/dist/collection/components/skeleton/skeleton-loader.css +144 -44
  249. package/dist/collection/components/skeleton/skeleton-loader.js +11 -7
  250. package/dist/collection/components/smart-stepper/smart-step.js +2 -2
  251. package/dist/collection/components/smart-stepper/smart-stepper.js +1 -1
  252. package/dist/collection/components/speedometer/speedometer.css +26 -6
  253. package/dist/collection/components/speedometer/speedometer.js +26 -15
  254. package/dist/collection/components/stack/stack.js +2 -2
  255. package/dist/collection/components/step/step.js +1 -1
  256. package/dist/collection/components/stepper/stepper.js +1 -1
  257. package/dist/collection/components/switch/switch.css +367 -8
  258. package/dist/collection/components/switch/switch.js +13 -12
  259. package/dist/collection/components/tag/tag.css +38 -12
  260. package/dist/collection/components/tag/tag.js +58 -13
  261. package/dist/collection/components/tag-group/tag-group.css +0 -1
  262. package/dist/collection/components/tag-group/tag-group.js +3 -3
  263. package/dist/collection/components/timeline/timeline.css +380 -317
  264. package/dist/collection/components/timeline/timeline.js +8 -0
  265. package/dist/collection/components/timeline-item/timeline-item.js +1 -1
  266. package/dist/collection/components/timer/timer.js +1 -1
  267. package/dist/collection/components/toggle-group/toggle-group.css +7 -3
  268. package/dist/collection/components/toggle-group/toggle-group.js +7 -3
  269. package/dist/collection/components/toolbar/toolbar.js +1 -1
  270. package/dist/collection/components/tooltip/tooltip.js +4 -4
  271. package/dist/collection/components/top-bar/top-bar.js +2 -2
  272. package/dist/collection/components/transfer-list/transfer-list.css +13 -13
  273. package/dist/collection/components/transfer-list/transfer-list.js +4 -4
  274. package/dist/collection/components/tree/tree.css +35 -21
  275. package/dist/collection/components/tree/tree.js +28 -13
  276. package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.css +34 -16
  277. package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.js +46 -11
  278. package/dist/collection/components/ui-navigation-bar/navigation-item.css +7 -7
  279. package/dist/collection/components/ui-navigation-bar/navigation-item.js +3 -3
  280. package/dist/collection/utils/dom.js +151 -151
  281. package/dist/components/avatar-group.js +1 -1
  282. package/dist/components/avatar.js +1 -1
  283. package/dist/components/badge.js +1 -1
  284. package/dist/components/button-toggle.js +1 -1
  285. package/dist/components/button.js +1 -0
  286. package/dist/components/category-section2.js +1 -1
  287. package/dist/components/checkbox.js +1 -1
  288. package/dist/components/context-menu.js +1 -1
  289. package/dist/components/dialog-header.js +1 -1
  290. package/dist/components/dom.js +1 -1
  291. package/dist/components/dropdown.js +1 -1
  292. package/dist/components/icon.js +2 -2
  293. package/dist/components/input.js +1 -1
  294. package/dist/components/layout-manager.js +1 -1
  295. package/dist/components/library-card2.js +1 -1
  296. package/dist/components/list-group.js +1 -1
  297. package/dist/components/list-item.js +1 -1
  298. package/dist/components/lm-container2.js +1 -1
  299. package/dist/components/lm-floating-window2.js +1 -1
  300. package/dist/components/lm-panel2.js +1 -1
  301. package/dist/components/lm-splitter2.js +1 -1
  302. package/dist/components/lm-tabs2.js +1 -1
  303. package/dist/components/loader.js +1 -1
  304. package/dist/components/my-step.js +1 -1
  305. package/dist/components/nav-bar.js +1 -1
  306. package/dist/components/pagination.js +1 -1
  307. package/dist/components/popover.js +1 -0
  308. package/dist/components/radio.js +1 -1
  309. package/dist/components/range-slider.js +1 -1
  310. package/dist/components/rating.js +1 -1
  311. package/dist/components/resizable-panel.js +1 -1
  312. package/dist/components/skeleton-loader.js +1 -1
  313. package/dist/components/smart-step.js +1 -1
  314. package/dist/components/stack.js +1 -1
  315. package/dist/components/switch.js +1 -1
  316. package/dist/components/tag-group.js +1 -1
  317. package/dist/components/tag.js +1 -1
  318. package/dist/components/timeline-item.js +1 -1
  319. package/dist/components/toggle-group.js +1 -1
  320. package/dist/components/tooltip.js +1 -1
  321. package/dist/components/ui-accordion.js +1 -1
  322. package/dist/components/ui-advanced-data-table.js +1 -1
  323. package/dist/components/ui-anchor.js +1 -1
  324. package/dist/components/ui-animate-on-scroll.js +1 -1
  325. package/dist/components/ui-aside-panel.js +1 -1
  326. package/dist/components/ui-badge.js +1 -1
  327. package/dist/components/ui-breadcrumb-item.js +1 -1
  328. package/dist/components/ui-breadcrumb.js +1 -1
  329. package/dist/components/ui-button-toggle-group.js +1 -1
  330. package/dist/components/ui-button.js +1 -1
  331. package/dist/components/ui-callout-banner.js +1 -1
  332. package/dist/components/ui-card.js +1 -1
  333. package/dist/components/ui-carousel.js +1 -1
  334. package/dist/components/ui-code-editor.js +1 -1
  335. package/dist/components/ui-code-preview.js +1 -1
  336. package/dist/components/ui-color-picker.js +1 -1
  337. package/dist/components/ui-command-palette.js +1 -1
  338. package/dist/components/ui-dialog-box.js +1 -1
  339. package/dist/components/ui-dock-host.js +1 -1
  340. package/dist/components/ui-dock.js +1 -1
  341. package/dist/components/ui-drag-drop.js +1 -1
  342. package/dist/components/ui-empty-state.js +1 -1
  343. package/dist/components/ui-fab-item.js +1 -1
  344. package/dist/components/ui-fab.js +1 -1
  345. package/dist/components/ui-file-upload.js +1 -1
  346. package/dist/components/ui-horizontal-nav.js +1 -1
  347. package/dist/components/ui-knob.js +1 -1
  348. package/dist/components/{ui-color-controller.d.ts → ui-label.d.ts} +4 -4
  349. package/dist/components/ui-label.js +1 -0
  350. package/dist/components/ui-library.js +1 -1
  351. package/dist/components/ui-list.js +1 -1
  352. package/dist/components/ui-masonry.js +1 -1
  353. package/dist/components/ui-meter-group.js +1 -1
  354. package/dist/components/ui-navigation-bar.js +1 -1
  355. package/dist/components/ui-navigation-item.js +1 -1
  356. package/dist/components/ui-number-input.js +1 -1
  357. package/dist/components/ui-otp-input.js +1 -1
  358. package/dist/components/ui-panel.js +1 -1
  359. package/dist/components/ui-pattern-input.js +1 -1
  360. package/dist/components/ui-popover.js +1 -1
  361. package/dist/components/ui-progress.js +1 -1
  362. package/dist/components/ui-scroll-top.js +1 -1
  363. package/dist/components/ui-smart-stepper.js +1 -1
  364. package/dist/components/ui-snackbar.js +1 -1
  365. package/dist/components/ui-speed-dial.js +1 -1
  366. package/dist/components/ui-speedometer.js +1 -1
  367. package/dist/components/ui-splitter.js +1 -1
  368. package/dist/components/ui-step.js +1 -1
  369. package/dist/components/ui-stepper.js +1 -1
  370. package/dist/components/ui-tabs.js +1 -1
  371. package/dist/components/ui-timeline.js +1 -1
  372. package/dist/components/ui-timer.js +1 -1
  373. package/dist/components/ui-toolbar.js +1 -1
  374. package/dist/components/ui-top-bar.js +1 -1
  375. package/dist/components/ui-transfer-list.js +1 -1
  376. package/dist/components/ui-tree.js +1 -1
  377. package/dist/components/ui-workspace-manager.js +1 -1
  378. package/dist/esm/category-section.entry.js +2 -2
  379. package/dist/esm/dom-DFBTWhGw.js +262 -0
  380. package/dist/esm/exploration-project-tailwind.js +3 -3
  381. package/dist/esm/{index-DUsoYu9r.js → index-Dqu2zaH1.js} +1 -1
  382. package/dist/esm/layout-manager.entry.js +3 -3
  383. package/dist/esm/library-card.entry.js +2 -2
  384. package/dist/esm/lm-container_2.entry.js +2 -2
  385. package/dist/esm/lm-panel_3.entry.js +4 -4
  386. package/dist/esm/loader.js +3 -3
  387. package/dist/esm/my-component.entry.js +1 -1
  388. package/dist/esm/my-step.entry.js +2 -2
  389. package/dist/esm/nav-bar.entry.js +4 -4
  390. package/dist/esm/smart-step.entry.js +3 -3
  391. package/dist/esm/timeline-item.entry.js +2 -2
  392. package/dist/esm/ui-accordion_11.entry.js +132 -50
  393. package/dist/esm/ui-advanced-data-table.entry.js +2 -2
  394. package/dist/esm/ui-anchor.entry.js +2 -2
  395. package/dist/esm/ui-animate-on-scroll.entry.js +3 -3
  396. package/dist/esm/ui-aside-panel.entry.js +10 -11
  397. package/dist/esm/ui-avatar-group_5.entry.js +1688 -0
  398. package/dist/esm/ui-breadcrumb-item.entry.js +3 -3
  399. package/dist/esm/ui-breadcrumb.entry.js +1 -1
  400. package/dist/esm/ui-callout-banner.entry.js +2 -2
  401. package/dist/esm/ui-card.entry.js +4 -3
  402. package/dist/esm/ui-carousel.entry.js +1 -1
  403. package/dist/esm/ui-checkbox.entry.js +3 -3
  404. package/dist/esm/ui-code-editor.entry.js +2 -2
  405. package/dist/esm/ui-code-preview.entry.js +2 -2
  406. package/dist/esm/ui-color-picker.entry.js +256 -22
  407. package/dist/esm/ui-command-palette.entry.js +1 -1
  408. package/dist/esm/ui-dialog-box.entry.js +85 -11
  409. package/dist/esm/ui-dialog-content.entry.js +1 -1
  410. package/dist/esm/ui-dialog-footer_2.entry.js +1 -1
  411. package/dist/esm/ui-divider.entry.js +1 -1
  412. package/dist/esm/ui-dock-host.entry.js +4 -4
  413. package/dist/esm/ui-dock.entry.js +2 -2
  414. package/dist/esm/ui-drag-drop.entry.js +2 -2
  415. package/dist/esm/ui-dropdown_2.entry.js +104 -34
  416. package/dist/esm/ui-empty-state.entry.js +2 -2
  417. package/dist/esm/ui-fab-item.entry.js +2 -2
  418. package/dist/esm/ui-fab.entry.js +4 -4
  419. package/dist/esm/ui-file-upload.entry.js +143 -44
  420. package/dist/esm/ui-horizontal-nav.entry.js +2 -2
  421. package/dist/esm/ui-knob.entry.js +1 -1
  422. package/dist/esm/ui-label.entry.js +471 -0
  423. package/dist/esm/ui-library.entry.js +2 -2
  424. package/dist/esm/ui-list-group_2.entry.js +349 -60
  425. package/dist/esm/ui-list.entry.js +76 -42
  426. package/dist/esm/ui-masonry.entry.js +1 -1
  427. package/dist/esm/ui-meter-group.entry.js +5 -4
  428. package/dist/esm/ui-navigation-item.entry.js +5 -5
  429. package/dist/esm/ui-number-input.entry.js +7 -3
  430. package/dist/esm/ui-otp-input.entry.js +5 -5
  431. package/dist/esm/{ui-pagination_4.entry.js → ui-pagination_3.entry.js} +36 -506
  432. package/dist/esm/ui-panel.entry.js +1 -1
  433. package/dist/esm/ui-pattern-input.entry.js +46 -11
  434. package/dist/esm/ui-progress.entry.js +66 -9
  435. package/dist/esm/ui-range-slider.entry.js +2 -2
  436. package/dist/esm/ui-resizable-panel.entry.js +2 -2
  437. package/dist/esm/ui-scroll-top.entry.js +1 -1
  438. package/dist/esm/ui-smart-context-menu.entry.js +1 -1
  439. package/dist/esm/ui-smart-stepper.entry.js +2 -2
  440. package/dist/esm/ui-snackbar.entry.js +1 -1
  441. package/dist/esm/ui-speed-dial.entry.js +1 -1
  442. package/dist/esm/ui-speedometer.entry.js +28 -17
  443. package/dist/esm/ui-splitter.entry.js +1 -1
  444. package/dist/esm/ui-step.entry.js +2 -2
  445. package/dist/esm/ui-stepper.entry.js +1 -1
  446. package/dist/esm/ui-switch.entry.js +14 -13
  447. package/dist/esm/ui-tabs.entry.js +2 -2
  448. package/dist/esm/ui-tag.entry.js +58 -13
  449. package/dist/esm/ui-timeline.entry.js +10 -2
  450. package/dist/esm/ui-timer.entry.js +2 -2
  451. package/dist/esm/ui-toolbar.entry.js +2 -2
  452. package/dist/esm/ui-tooltip.entry.js +4 -4
  453. package/dist/esm/ui-top-bar.entry.js +1 -1
  454. package/dist/esm/ui-transfer-list.entry.js +6 -6
  455. package/dist/esm/ui-tree.entry.js +30 -15
  456. package/dist/esm/ui-workspace-manager.entry.js +2 -2
  457. package/dist/exploration-project-tailwind/exploration-project-tailwind.css +1 -1
  458. package/dist/exploration-project-tailwind/exploration-project-tailwind.esm.js +1 -1
  459. package/dist/exploration-project-tailwind/{p-7ba2258a.entry.js → p-024a299a.entry.js} +1 -1
  460. package/dist/exploration-project-tailwind/p-0a71896a.entry.js +1 -0
  461. package/dist/exploration-project-tailwind/{p-35296877.entry.js → p-0cdeb8d8.entry.js} +1 -1
  462. package/dist/exploration-project-tailwind/{p-a42fdc33.entry.js → p-139cefbc.entry.js} +1 -1
  463. package/dist/exploration-project-tailwind/{p-036d2a44.entry.js → p-198c83e5.entry.js} +1 -1
  464. package/dist/exploration-project-tailwind/p-236f47b1.entry.js +1 -0
  465. package/dist/exploration-project-tailwind/{p-81ebba11.entry.js → p-25530d0d.entry.js} +1 -1
  466. package/dist/exploration-project-tailwind/{p-41cd6bf0.entry.js → p-298f2057.entry.js} +1 -1
  467. package/dist/exploration-project-tailwind/{p-85e36111.entry.js → p-2b5a8e3e.entry.js} +1 -1
  468. package/dist/exploration-project-tailwind/{p-e8c6d395.entry.js → p-2b6aa7bc.entry.js} +1 -1
  469. package/dist/exploration-project-tailwind/{p-70bacda8.entry.js → p-2cfba753.entry.js} +1 -1
  470. package/dist/exploration-project-tailwind/{p-cbee2607.entry.js → p-2fe22958.entry.js} +1 -1
  471. package/dist/exploration-project-tailwind/{p-20ecc116.entry.js → p-3012e780.entry.js} +1 -1
  472. package/dist/exploration-project-tailwind/p-321c3f46.entry.js +1 -0
  473. package/dist/exploration-project-tailwind/{p-8b57fe4e.entry.js → p-3ab43638.entry.js} +1 -1
  474. package/dist/exploration-project-tailwind/p-3ad7e47e.entry.js +1 -0
  475. package/dist/exploration-project-tailwind/p-3b1ca826.entry.js +1 -0
  476. package/dist/exploration-project-tailwind/p-3ee8ddae.entry.js +1 -0
  477. package/dist/exploration-project-tailwind/{p-e22317c1.entry.js → p-3efb44c8.entry.js} +1 -1
  478. package/dist/exploration-project-tailwind/{p-36861546.entry.js → p-42e3bc28.entry.js} +1 -1
  479. package/dist/exploration-project-tailwind/p-4360331a.entry.js +1 -0
  480. package/dist/exploration-project-tailwind/{p-2f961934.entry.js → p-443de32b.entry.js} +1 -1
  481. package/dist/exploration-project-tailwind/{p-898dd0fa.entry.js → p-44d15451.entry.js} +1 -1
  482. package/dist/exploration-project-tailwind/{p-4288c158.entry.js → p-46071679.entry.js} +1 -1
  483. package/dist/exploration-project-tailwind/{p-a3f465d9.entry.js → p-497d6182.entry.js} +1 -1
  484. package/dist/exploration-project-tailwind/p-4ad8c55c.entry.js +1 -0
  485. package/dist/exploration-project-tailwind/{p-4aaa8e40.entry.js → p-4c46ac0b.entry.js} +1 -1
  486. package/dist/exploration-project-tailwind/{p-98e91da5.entry.js → p-5042ddaa.entry.js} +1 -1
  487. package/dist/exploration-project-tailwind/p-60190e0e.entry.js +1 -0
  488. package/dist/exploration-project-tailwind/p-60530874.entry.js +1 -0
  489. package/dist/exploration-project-tailwind/{p-200241f8.entry.js → p-6108565d.entry.js} +1 -1
  490. package/dist/exploration-project-tailwind/{p-fb4aca69.entry.js → p-62889cfe.entry.js} +1 -1
  491. package/dist/exploration-project-tailwind/{p-c02284ea.entry.js → p-66f71613.entry.js} +1 -1
  492. package/dist/exploration-project-tailwind/{p-7889bfc4.entry.js → p-67c440b2.entry.js} +1 -1
  493. package/dist/exploration-project-tailwind/{p-c1c8ac28.entry.js → p-6f09503f.entry.js} +1 -1
  494. package/dist/exploration-project-tailwind/p-721bdbc3.entry.js +1 -0
  495. package/dist/exploration-project-tailwind/p-747b02ea.entry.js +1 -0
  496. package/dist/exploration-project-tailwind/{p-c6fd72e1.entry.js → p-754cb046.entry.js} +1 -1
  497. package/dist/exploration-project-tailwind/{p-97af03cc.entry.js → p-7ed3bba2.entry.js} +1 -1
  498. package/dist/exploration-project-tailwind/{p-d59da767.entry.js → p-864cebb7.entry.js} +1 -1
  499. package/dist/exploration-project-tailwind/{p-4d73c143.entry.js → p-96ee3196.entry.js} +1 -1
  500. package/dist/exploration-project-tailwind/{p-54965530.entry.js → p-97086868.entry.js} +1 -1
  501. package/dist/exploration-project-tailwind/{p-d114a347.entry.js → p-9c5ced88.entry.js} +1 -1
  502. package/dist/exploration-project-tailwind/p-9d3044d4.entry.js +1 -0
  503. package/dist/exploration-project-tailwind/p-9e079be6.entry.js +1 -0
  504. package/dist/exploration-project-tailwind/{p-790556f0.entry.js → p-9e4c45f5.entry.js} +1 -1
  505. package/dist/exploration-project-tailwind/p-9eee7394.entry.js +1 -0
  506. package/dist/exploration-project-tailwind/p-DFBTWhGw.js +1 -0
  507. package/dist/exploration-project-tailwind/p-Dqu2zaH1.js +2 -0
  508. package/dist/exploration-project-tailwind/p-a7bdedc2.entry.js +1 -0
  509. package/dist/exploration-project-tailwind/{p-c87aeab6.entry.js → p-a8ec29de.entry.js} +1 -1
  510. package/dist/exploration-project-tailwind/{p-6ddbee42.entry.js → p-ae617f62.entry.js} +1 -1
  511. package/dist/exploration-project-tailwind/{p-05a436d3.entry.js → p-aef76052.entry.js} +1 -1
  512. package/dist/exploration-project-tailwind/p-b5f043fa.entry.js +1 -0
  513. package/dist/exploration-project-tailwind/p-b637b91b.entry.js +1 -0
  514. package/dist/exploration-project-tailwind/{p-d2e45c5e.entry.js → p-bc49a088.entry.js} +1 -1
  515. package/dist/exploration-project-tailwind/{p-6b838549.entry.js → p-bd9a631f.entry.js} +1 -1
  516. package/dist/exploration-project-tailwind/{p-e8ba0c95.entry.js → p-bf4b6767.entry.js} +1 -1
  517. package/dist/exploration-project-tailwind/p-c0fa400e.entry.js +1 -0
  518. package/dist/exploration-project-tailwind/{p-8578b616.entry.js → p-c4f3d990.entry.js} +1 -1
  519. package/dist/exploration-project-tailwind/p-c68ddb2f.entry.js +1 -0
  520. package/dist/exploration-project-tailwind/p-c79574c4.entry.js +1 -0
  521. package/dist/exploration-project-tailwind/p-c840098d.entry.js +1 -0
  522. package/dist/exploration-project-tailwind/{p-a1ad32a2.entry.js → p-c8663cbe.entry.js} +1 -1
  523. package/dist/exploration-project-tailwind/p-cb6e38a6.entry.js +1 -0
  524. package/dist/exploration-project-tailwind/p-cb9f2df1.entry.js +1 -0
  525. package/dist/exploration-project-tailwind/p-cfe8b696.entry.js +1 -0
  526. package/dist/exploration-project-tailwind/p-d00e13ae.entry.js +1 -0
  527. package/dist/exploration-project-tailwind/{p-c4ba7e52.entry.js → p-d01ed934.entry.js} +1 -1
  528. package/dist/exploration-project-tailwind/{p-aa85ff78.entry.js → p-d4e57d94.entry.js} +1 -1
  529. package/dist/exploration-project-tailwind/{p-ccb5c737.entry.js → p-d5bd3a3f.entry.js} +1 -1
  530. package/dist/exploration-project-tailwind/{p-45482d86.entry.js → p-d987cebe.entry.js} +1 -1
  531. package/dist/exploration-project-tailwind/p-d9ae77c0.entry.js +1 -0
  532. package/dist/exploration-project-tailwind/p-e9bae5c7.entry.js +1 -0
  533. package/dist/exploration-project-tailwind/p-f516fabc.entry.js +1 -0
  534. package/dist/exploration-project-tailwind/p-f68e2794.entry.js +1 -0
  535. package/dist/exploration-project-tailwind/{p-d30e24bd.entry.js → p-fa034f69.entry.js} +1 -1
  536. package/dist/types/components/aside-panel/aside-panel.d.ts +0 -3
  537. package/dist/types/components/avatar/avatar.d.ts +3 -0
  538. package/dist/types/components/avatar/types.d.ts +2 -0
  539. package/dist/types/components/badge/badge.d.ts +1 -0
  540. package/dist/types/components/color-picker/color-picker.d.ts +35 -2
  541. package/dist/types/components/dialog-box/dialog-box.d.ts +10 -0
  542. package/dist/types/components/dropdown/dropdown.d.ts +5 -0
  543. package/dist/types/components/file-upload/file-upload.d.ts +23 -6
  544. package/dist/types/components/label/label.d.ts +290 -0
  545. package/dist/types/components/label/types.d.ts +39 -0
  546. package/dist/types/components/list/list.d.ts +2 -1
  547. package/dist/types/components/list-group/list-group.d.ts +1 -0
  548. package/dist/types/components/list-item/list-item.d.ts +45 -17
  549. package/dist/types/components/pattern-input/pattern-input.d.ts +6 -0
  550. package/dist/types/components/popover/popover.d.ts +3 -0
  551. package/dist/types/components/progress/progress.d.ts +7 -0
  552. package/dist/types/components/range-slider/range-slider.d.ts +2 -2
  553. package/dist/types/components/rating/rating.d.ts +1 -0
  554. package/dist/types/components/skeleton/skeleton-loader.d.ts +1 -1
  555. package/dist/types/components/speedometer/speedometer.d.ts +1 -0
  556. package/dist/types/components/tag/tag.d.ts +4 -0
  557. package/dist/types/components/tree/tree.d.ts +1 -0
  558. package/dist/types/components/ui-navigation-bar/navigation-bar/navigation-bar.d.ts +1 -1
  559. package/dist/types/components.d.ts +742 -425
  560. package/dist/types/types/common.d.ts +2 -2
  561. package/dist/types/types/common.type.d.ts +2 -0
  562. package/dist/types/utils/dom.d.ts +4 -4
  563. package/package.json +4 -5
  564. package/dist/cjs/dom-oP1E4Rd3.js +0 -267
  565. package/dist/cjs/ui-avatar-group_3.cjs.entry.js +0 -634
  566. package/dist/cjs/ui-color-controller.cjs.entry.js +0 -150
  567. package/dist/cjs/ui-popover.cjs.entry.js +0 -517
  568. package/dist/cjs/ui-smart-location-dropdown.cjs.entry.js +0 -565
  569. package/dist/collection/components/color-controller/color-controller.css +0 -108
  570. package/dist/collection/components/color-controller/color-controller.js +0 -224
  571. package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.css +0 -357
  572. package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.js +0 -1190
  573. package/dist/components/ui-color-controller.js +0 -1
  574. package/dist/components/ui-smart-location-dropdown.d.ts +0 -11
  575. package/dist/components/ui-smart-location-dropdown.js +0 -1
  576. package/dist/esm/dom-BMFah5q3.js +0 -262
  577. package/dist/esm/ui-avatar-group_3.entry.js +0 -630
  578. package/dist/esm/ui-color-controller.entry.js +0 -148
  579. package/dist/esm/ui-popover.entry.js +0 -515
  580. package/dist/esm/ui-smart-location-dropdown.entry.js +0 -563
  581. package/dist/exploration-project-tailwind/p-06f0c679.entry.js +0 -1
  582. package/dist/exploration-project-tailwind/p-0d31c9e9.entry.js +0 -1
  583. package/dist/exploration-project-tailwind/p-148e81df.entry.js +0 -1
  584. package/dist/exploration-project-tailwind/p-16bdd162.entry.js +0 -1
  585. package/dist/exploration-project-tailwind/p-2347d21b.entry.js +0 -1
  586. package/dist/exploration-project-tailwind/p-3d381f75.entry.js +0 -1
  587. package/dist/exploration-project-tailwind/p-4417a9d8.entry.js +0 -1
  588. package/dist/exploration-project-tailwind/p-44742ddd.entry.js +0 -1
  589. package/dist/exploration-project-tailwind/p-47e2a7ee.entry.js +0 -1
  590. package/dist/exploration-project-tailwind/p-4bef8bed.entry.js +0 -1
  591. package/dist/exploration-project-tailwind/p-4efd63ce.entry.js +0 -1
  592. package/dist/exploration-project-tailwind/p-5c835d90.entry.js +0 -1
  593. package/dist/exploration-project-tailwind/p-61717490.entry.js +0 -1
  594. package/dist/exploration-project-tailwind/p-717dad1f.entry.js +0 -1
  595. package/dist/exploration-project-tailwind/p-71d95bb1.entry.js +0 -1
  596. package/dist/exploration-project-tailwind/p-9bd14f69.entry.js +0 -1
  597. package/dist/exploration-project-tailwind/p-9fc06ff0.entry.js +0 -1
  598. package/dist/exploration-project-tailwind/p-BMFah5q3.js +0 -1
  599. package/dist/exploration-project-tailwind/p-DUsoYu9r.js +0 -2
  600. package/dist/exploration-project-tailwind/p-a27f59d2.entry.js +0 -1
  601. package/dist/exploration-project-tailwind/p-a7b07cf4.entry.js +0 -1
  602. package/dist/exploration-project-tailwind/p-bd89d060.entry.js +0 -1
  603. package/dist/exploration-project-tailwind/p-c63c522e.entry.js +0 -1
  604. package/dist/exploration-project-tailwind/p-c69dd43e.entry.js +0 -1
  605. package/dist/exploration-project-tailwind/p-d6ce9721.entry.js +0 -1
  606. package/dist/exploration-project-tailwind/p-dc92a343.entry.js +0 -1
  607. package/dist/exploration-project-tailwind/p-debede45.entry.js +0 -1
  608. package/dist/exploration-project-tailwind/p-e76318c7.entry.js +0 -1
  609. package/dist/exploration-project-tailwind/p-ea51c5d8.entry.js +0 -1
  610. package/dist/exploration-project-tailwind/p-eab5ad36.entry.js +0 -1
  611. package/dist/exploration-project-tailwind/p-f0bc5d7e.entry.js +0 -1
  612. package/dist/exploration-project-tailwind/p-f1beee72.entry.js +0 -1
  613. package/dist/exploration-project-tailwind/p-f543392f.entry.js +0 -1
  614. package/dist/exploration-project-tailwind/p-f61cfb7c.entry.js +0 -1
  615. package/dist/types/components/color-controller/color-controller.d.ts +0 -24
  616. package/dist/types/components/smart-location-dropdown/smart-location-dropdown.d.ts +0 -119
  617. package/dist/types/components/smart-location-dropdown/types.d.ts +0 -37
  618. /package/dist/collection/components/{smart-location-dropdown → label}/types.js +0 -0
@@ -0,0 +1,1688 @@
1
+ import { r as registerInstance, a as getElement, h, H as Host, c as createEvent } from './index-Dqu2zaH1.js';
2
+ import { s as sanitizeHTML } from './security-Dyu3Nplq.js';
3
+ import { F as FocusTrap } from './focus-trap-BSQ8klD4.js';
4
+ import { b as autoUpdate, c as calculateUniversalPlacement } from './dom-DFBTWhGw.js';
5
+
6
+ const avatarGroupCss = () => `.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.avatar-group{display:inline-flex;position:relative;align-items:center}.avatar-group.layout-stack .group-avatar{margin-right:var(--avatar-spacing, -16px);transition:all 0.5s cubic-bezier(0.25, 1, 0.5, 1);transform-origin:center bottom}.avatar-group.layout-stack .group-avatar:hover{z-index:100 !important;transform:scale(1.25) translateY(-10px);margin-right:8px !important;box-shadow:0 10px 25px rgba(0, 0, 0, 0.2);border-color:var(--border-subtle, #fff) !important}.avatar-group.layout-stack .group-avatar:hover~.group-avatar,.avatar-group.layout-stack .group-avatar:hover~.excess-avatar-container{transform:translateX(24px)}.avatar-group.layout-stack.avatar-group-animated:hover{padding-right:40px}.avatar-group.layout-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(calc(var(--avatar-size) + 8px), 1fr));gap:8px;width:100%}.avatar-list{display:flex;flex-wrap:wrap;align-items:center}.layout-stack .avatar-list{flex-wrap:nowrap}.avatar-extra{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-danger, #f56a00);color:var(--text-standard, #ffffff);font-weight:600;border:var(--avatar-border-width, 2px) solid var(--avatar-border-color, #fff);cursor:pointer;z-index:1;transition:transform 0.2s;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);font-size:0.8em}.avatar-extra:hover{transform:scale(1.1) translateY(-4px);z-index:100;box-shadow:0 8px 20px rgba(0, 0, 0, 0.15)}.avatar-extra.shape-circle{border-radius:50%}.avatar-extra.shape-square{border-radius:8px}.avatar-popover{position:absolute;top:100%;right:0;background:var(--bg-primary, #ffffff);border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.2);padding:12px;z-index:1000;min-width:180px;margin-top:8px;animation:popoverFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}.avatar-popover::after{content:"";position:absolute;top:-12px;right:12px;border:6px solid transparent;border-bottom-color:var(--bg-primary, #ffffff)}.avatar-popover .popover-content{display:flex;flex-direction:column;gap:4px;max-height:300px;overflow-y:auto}.avatar-popover .popover-item{display:flex;align-items:center;gap:12px;padding:8px;border-radius:6px;transition:background 0.2s;cursor:pointer}.avatar-popover .popover-item:hover{background:var(--bg-secondary, #f3f4f6)}.avatar-popover .popover-item ui-avatar{transition:none !important;transform:none !important;box-shadow:none !important}.avatar-popover .popover-text{font-size:14px;color:var(--text-secondary, #374151);font-weight:500}@keyframes popoverFadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.avatar-roster-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:2000;backdrop-filter:blur(4px)}.avatar-roster-content{background:var(--bg-primary, #ffffff);width:90%;max-width:500px;max-height:80vh;border-radius:16px;box-shadow:0 20px 50px rgba(0, 0, 0, 0.3);display:flex;flex-direction:column;overflow:hidden;animation:modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)}.roster-header{padding:20px;border-bottom:1px solid var(--border-subtle, #eee);display:flex;align-items:center;justify-content:space-between}.roster-header h3{margin:0;color:var(--text-primary, #1f2937)}.roster-header .close-btn{background:none;border:none;font-size:28px;cursor:pointer;color:var(--text-muted, #9ca3af)}.roster-header .close-btn:hover{color:var(--text-primary, #1f2937)}.roster-list{padding:12px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.roster-item{display:flex;align-items:center;gap:16px;padding:12px;border-radius:12px;transition:background 0.2s}.roster-item:hover{background:var(--bg-primary, #f9fafb)}.roster-info{display:flex;flex-direction:column}.roster-name{font-weight:600;color:var(--text-primary, #111827)}.roster-status{font-size:11px;text-transform:capitalize;border-radius:4px;padding:1px 6px;width:fit-content}.status-online{color:var(--color-success-hover, #059669);background:var(--bg-primary, #ecfdf5)}@keyframes modalIn{from{opacity:0;transform:scale(0.9) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}`;
7
+
8
+ const AvatarGroup = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ }
12
+ get el() { return getElement(this); }
13
+ /** Array of avatar props for dynamic generation */
14
+ avatars = [];
15
+ /** Maximum number of avatars to display before grouping */
16
+ maxVisible = 5;
17
+ /** Maximum config: number or object { count, style, popover } */
18
+ max = null;
19
+ /** Size of avatars in the group */
20
+ size = 'm';
21
+ /** Shape to apply to all avatars in the group */
22
+ shape = 'circle';
23
+ /** Layout mode: 'stack' or 'grid' */
24
+ layout = 'stack';
25
+ /** Spacing between avatars (in pixels) for grid mode */
26
+ spacing = 4;
27
+ /** Overlapping amount (negative value for overlap) */
28
+ overlap = null;
29
+ /** Border color for avatars in the group */
30
+ borderColor = 'white';
31
+ /** Border width for avatars in the group */
32
+ borderWidth = 2;
33
+ /** Enable popover to show all avatars when hovering over excess count */
34
+ enablePopover = true;
35
+ /** Enable animated shifting transitions on hover */
36
+ animated = true;
37
+ slottedAvatars = [];
38
+ showPopover = false;
39
+ isRosterOpen = false;
40
+ isHovered = false;
41
+ handleSlotChange() {
42
+ this.updateSlottedAvatars();
43
+ }
44
+ componentWillLoad() {
45
+ this.updateSlottedAvatars();
46
+ }
47
+ componentDidLoad() { }
48
+ updateSlottedAvatars() {
49
+ const slotElement = this.el.shadowRoot?.querySelector('slot');
50
+ const assignedElements = slotElement
51
+ ? slotElement.assignedElements()
52
+ : Array.from(this.el.children);
53
+ this.slottedAvatars = assignedElements.filter(el => el.tagName.toLowerCase() === 'ui-avatar');
54
+ }
55
+ getMaxCount() {
56
+ const maxVal = this.max || this.maxVisible;
57
+ if (typeof maxVal === 'number')
58
+ return maxVal;
59
+ if (maxVal && typeof maxVal === 'object' && 'count' in maxVal)
60
+ return maxVal.count || Infinity;
61
+ return Infinity;
62
+ }
63
+ getMaxStyle() {
64
+ if (this.max && typeof this.max === 'object' && 'style' in this.max)
65
+ return this.max.style;
66
+ return {};
67
+ }
68
+ calculateOverlap() {
69
+ if (this.layout === 'grid')
70
+ return this.spacing;
71
+ if (this.overlap !== null)
72
+ return -Math.abs(this.overlap);
73
+ const sizeMap = { xs: 24, s: 32, sm: 32, default: 20, m: 40, lg: 40, l: 48, xl: 64 };
74
+ let avatarSize = 40;
75
+ const numericSize = parseFloat(this.size);
76
+ if (!isNaN(numericSize))
77
+ avatarSize = numericSize;
78
+ else if (typeof this.size === 'string' && sizeMap[this.size])
79
+ avatarSize = sizeMap[this.size];
80
+ return -(avatarSize * 0.4);
81
+ }
82
+ handleMouseEnterGroup = () => { this.isHovered = true; };
83
+ handleMouseLeaveGroup = () => { this.isHovered = false; this.showPopover = false; };
84
+ toggleRoster = (ev) => { ev.stopPropagation(); this.isRosterOpen = !this.isRosterOpen; };
85
+ closeRoster = () => { this.isRosterOpen = false; };
86
+ renderExcessCount(total, max) {
87
+ const excess = total - max;
88
+ if (excess <= 0)
89
+ return null;
90
+ const maxStyle = this.getMaxStyle();
91
+ return (h("div", { class: "excess-avatar-container", onMouseEnter: () => this.showPopover = this.enablePopover, onMouseLeave: () => this.showPopover = false, onClick: this.toggleRoster }, h("div", { class: { 'avatar-extra': true, [`avatar-${this.getSizeAlias()}`]: true, [`shape-${this.shape}`]: true }, style: { ...maxStyle, backgroundColor: maxStyle.backgroundColor || '#f56a00' } }, "+", excess), this.showPopover && this.enablePopover && this.layout === 'stack' && this.renderPopover(max)));
92
+ }
93
+ renderPopover(max) {
94
+ const all = this.getAllAvatarData();
95
+ const hidden = all.slice(max);
96
+ return (h("div", { class: "avatar-popover" }, h("div", { class: "popover-content" }, hidden.map((avatar, idx) => (h("div", { class: "popover-item", key: idx }, h("ui-avatar", { size: "xs", shape: this.shape, src: avatar.src, icon: avatar.icon, name: avatar.name, content: avatar.content, bgColor: avatar.bgColor }), h("span", { class: "popover-text" }, avatar.name || avatar.content || 'User')))))));
97
+ }
98
+ getAllAvatarData() {
99
+ if (this.avatars && this.avatars.length > 0)
100
+ return this.avatars;
101
+ return this.slottedAvatars.map(el => ({
102
+ src: el.getAttribute('src'),
103
+ name: el.getAttribute('name'),
104
+ content: el.getAttribute('content') || el.textContent?.trim(),
105
+ tooltipText: el.getAttribute('tooltipText') || el.getAttribute('tooltip-text') || el.getAttribute('name') || el.textContent?.trim(),
106
+ icon: el.getAttribute('icon'),
107
+ bgColor: el.getAttribute('bgColor') || el.getAttribute('bg-color'),
108
+ badge: el.getAttribute('badge'),
109
+ status: el.getAttribute('status')
110
+ }));
111
+ }
112
+ getSizeAlias() {
113
+ const sizeMap = { sm: 's', md: 'm', lg: 'l' };
114
+ return sizeMap[this.size] || this.size;
115
+ }
116
+ render() {
117
+ const all = this.getAllAvatarData();
118
+ const maxCount = this.getMaxCount();
119
+ const visible = (this.layout === 'grid') ? all : all.slice(0, maxCount);
120
+ const overlap = this.calculateOverlap();
121
+ const groupClasses = {
122
+ 'avatar-group': true,
123
+ [`layout-${this.layout}`]: true,
124
+ 'avatar-group-animated': this.animated && this.layout === 'stack',
125
+ 'expanded': this.isHovered && this.layout === 'stack'
126
+ };
127
+ const groupStyle = {
128
+ '--avatar-spacing': `${overlap}px`,
129
+ '--avatar-border-color': this.borderColor,
130
+ '--avatar-border-width': `${this.borderWidth}px`,
131
+ '--avatar-size': typeof this.size === 'number' ? `${this.size}px` : this.size.toString(),
132
+ };
133
+ return (h(Host, { key: 'd1c53574be9549de6cce9cf8aae33ac8019dd556' }, h("div", { key: '0f64bd06b7f8bd077e98286b9df7cd24e1924a50', class: groupClasses, style: groupStyle, onMouseEnter: this.handleMouseEnterGroup, onMouseLeave: this.handleMouseLeaveGroup }, h("div", { key: '937475ddb42adc924320a2f15f61a76f3ec3c916', class: "avatar-list" }, visible.map((avatar, index) => (h("ui-avatar", { ...avatar, key: index, size: this.size, shape: this.shape, border: `${this.borderWidth}px solid ${this.borderColor}`, class: "group-avatar", style: { zIndex: (this.layout === 'stack' ? (all.length - index) : 1).toString() } }))), this.layout === 'stack' && this.renderExcessCount(all.length, maxCount)), h("div", { key: '52779f80360501b288b88cd896f2dd117b18c0e1', style: { display: 'none' } }, h("slot", { key: 'bd6996c4789091de98a2f01349990412278e51ee' }))), this.isRosterOpen && (h("div", { key: 'fb404a5fd2e4723bb54465a8e6b94d220052721d', class: "avatar-roster-backdrop", onClick: this.closeRoster }, h("div", { key: '81df0d927175829c2fe80e3c39bf81350011620e', class: "avatar-roster-content", onClick: e => e.stopPropagation() }, h("div", { key: '89cea0f5aed19f87eaab53bdab36b0ccf429dc54', class: "roster-header" }, h("h3", { key: '3d113ccb91edb0b47e7bccc311af3f52f09ed5f2' }, "Participants (", all.length, ")"), h("ui-button", { key: 'ad42880fadf89334d69ff0fca445adf7fb1b4494', variant: "ghost", onClick: this.closeRoster, ariaLabel: "Close roster", icon: "x", iconLibrary: "lucide", iconOnly: true, size: "sm" })), h("div", { key: 'd683e744b8a132d600d8681254c39b0569b1564c', class: "roster-list" }, all.map((avatar, idx) => (h("div", { key: idx, class: "roster-item" }, h("ui-avatar", { ...avatar, size: "s", shape: this.shape }), h("div", { class: "roster-info" }, h("span", { class: "roster-name" }, avatar.name || avatar.content || 'Anonymous'), avatar.status && h("span", { class: `roster-status status-${avatar.status}` }, avatar.status)))))))))));
134
+ }
135
+ };
136
+ AvatarGroup.style = avatarGroupCss();
137
+
138
+ const popoverCss = () => `@charset "UTF-8";.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.popover-wrapper{position:relative;display:inline-block}.popover-trigger{display:inline-block;cursor:pointer}.popover-backdrop{position:fixed;inset-block-start:0;inset-inline-start:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.45);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:19999;cursor:default;animation:backdropIn 0.18s ease}@keyframes backdropIn{from{opacity:0}to{opacity:1}}.popover{position:fixed;z-index:21000;background:var(--popover-bg, var(--bg-primary, #ffffff));border:1px solid var(--popover-border, var(--border-default, #e5e7eb));border-radius:var(--popover-radius, 10px);box-shadow:0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);opacity:0;transition:opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);pointer-events:none;max-width:calc(100vw - 32px);word-wrap:break-word;overflow-wrap:break-word;overflow:visible;isolation:isolate;margin:0;bottom:auto;right:auto}.popover-visible{opacity:1;pointer-events:auto}.popover-inner{overflow:hidden;border-radius:inherit;max-height:inherit;background:var(--popover-surface-bg, var(--popover-bg, var(--bg-primary, #ffffff)))}.popover-header{display:flex;align-items:center;justify-content:space-between;margin:0;padding-block:12px;padding-inline:16px;border-block-end:1px solid var(--popover-border, var(--border-default, #e5e7eb));background:var(--popover-header-bg, var(--popover-surface-bg, var(--popover-bg, var(--bg-primary, #ffffff))))}.popover-title{font-weight:700;font-size:14px;color:var(--popover-text-primary, var(--text-primary, #1f2937));margin:0;letter-spacing:-0.01em}.popover-close{background:transparent;border:none;color:var(--popover-text-secondary, var(--text-muted, #9ca3af));cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background 0.15s, color 0.15s;margin-inline-start:8px}.popover-close:hover{background:var(--popover-border, var(--border-default, #e5e7eb));color:var(--popover-text-primary, var(--text-primary, #1f2937))}.popover-body{padding-block:12px;padding-inline:16px;font-size:14px;color:var(--popover-text-secondary, var(--text-muted, #6b7280));line-height:1.6;overflow-y:auto;background:var(--popover-body-bg, var(--popover-surface-bg, var(--popover-bg, var(--bg-primary, #ffffff))));scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0.15) transparent}.popover-body::-webkit-scrollbar{width:4px}.popover-body::-webkit-scrollbar-track{background:transparent}.popover-body::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.15);border-radius:2px}::slotted([slot=footer]){display:block;padding-block:10px;padding-inline:16px;border-block-start:1px solid var(--popover-border, var(--border-default, #e5e7eb));background:var(--popover-footer-bg, rgba(0, 0, 0, 0.02))}.popover-dark{--popover-bg:var(--ghost-popover-bg, #0f172a);--popover-border:var(--ghost-popover-border, rgba(148, 163, 184, 0.28));--popover-text-primary:var(--ghost-popover-text-primary, #f8fafc);--popover-text-secondary:var(--ghost-popover-text-secondary, #cbd5e1);--popover-footer-bg:var(--ghost-popover-footer-bg, rgba(255,255,255,0.04));--popover-surface-bg:var(--ghost-popover-surface-bg, var(--ghost-popover-bg, #0f172a));--popover-header-bg:var(--ghost-popover-header-bg, var(--ghost-popover-surface-bg, var(--ghost-popover-bg, #0f172a)));--popover-body-bg:var(--ghost-popover-body-bg, var(--ghost-popover-surface-bg, var(--ghost-popover-bg, #0f172a)));color-scheme:dark;background:var(--popover-bg);box-shadow:0 18px 40px rgba(2, 6, 23, 0.42), 0 10px 18px rgba(15, 23, 42, 0.26);isolation:isolate}.popover-dark .popover-inner,.popover-dark .popover-header,.popover-dark .popover-body{background:var(--popover-surface-bg, var(--popover-bg));opacity:1;backdrop-filter:none;-webkit-backdrop-filter:none}.popover-dark .popover-arrow{--popover-bg:#0f172a;--popover-border:rgba(148, 163, 184, 0.28)}.popover-light{--popover-surface-bg:var(--ghost-popover-surface-bg, var(--popover-bg, var(--bg-primary, #ffffff)));--popover-header-bg:var(--ghost-popover-header-bg, var(--popover-surface-bg));--popover-body-bg:var(--ghost-popover-body-bg, var(--popover-surface-bg))}.popover-success{--popover-bg:var(--bg-primary, #f0fdf4);--popover-border:var(--color-success, #bbf7d0);--popover-text-primary:var(--color-success, #14532d);--popover-text-secondary:var(--color-success, #166534);--popover-footer-bg:rgba(var(--color-success-rgb, 16, 185, 129), 0.06)}.popover-success .popover-header{border-block-end-color:var(--color-success, #bbf7d0)}.popover-success .popover-title::before{content:"✓ ";color:var(--color-success, #16a34a)}.popover-warning{--popover-bg:var(--bg-primary, #fffbeb);--popover-border:var(--color-primary, #fde68a);--popover-text-primary:var(--color-danger, #78350f);--popover-text-secondary:var(--color-danger, #92400e);--popover-footer-bg:rgba(var(--color-warning-rgb, 245, 158, 11), 0.06)}.popover-warning .popover-header{border-block-end-color:var(--color-primary, #fde68a)}.popover-warning .popover-title::before{content:"⚠ ";color:var(--color-warning-hover, #d97706)}.popover-error{--popover-bg:var(--bg-primary, #fef2f2);--popover-border:var(--color-danger, #fecaca);--popover-text-primary:var(--color-danger, #7f1d1d);--popover-text-secondary:var(--color-danger, #991b1b);--popover-footer-bg:rgba(var(--color-danger-rgb, 239, 68, 68), 0.06)}.popover-error .popover-header{border-block-end-color:var(--color-danger, #fecaca)}.popover-error .popover-title::before{content:"✕ ";color:var(--color-danger-hover, #dc2626)}.popover-info{--popover-bg:var(--bg-primary, #eff6ff);--popover-border:var(--color-primary, #bfdbfe);--popover-text-primary:var(--color-primary, #1e3a8a);--popover-text-secondary:var(--color-primary, #1e40af);--popover-footer-bg:rgba(var(--color-primary-rgb, 59, 130, 246), 0.06)}.popover-info .popover-header{border-block-end-color:var(--color-primary, #bfdbfe)}.popover-info .popover-title::before{content:"ℹ ";color:var(--color-primary-hover, #2563eb)}.popover-arrow{position:absolute;width:var(--ui-popover-arrow-size, 10px);height:var(--ui-popover-arrow-size, 10px);background:var(--popover-bg, var(--bg-primary, #ffffff));border:1px solid var(--popover-border, var(--border-default, #e5e7eb));transform:rotate(45deg);pointer-events:none;box-sizing:border-box;z-index:1;}.popover-top .popover-arrow,.popover-top-start .popover-arrow,.popover-top-end .popover-arrow{border-top:none;border-left:none;}.popover-bottom .popover-arrow,.popover-bottom-start .popover-arrow,.popover-bottom-end .popover-arrow{border-right:none;border-bottom:none;}.popover-left .popover-arrow,.popover-left-start .popover-arrow,.popover-left-end .popover-arrow{border-left:none;border-bottom:none;}.popover-right .popover-arrow,.popover-right-start .popover-arrow,.popover-right-end .popover-arrow{border-top:none;border-right:none;}.popover-anim-scale{transform:scale(0.92);transform-origin:center top}.popover-anim-scale.popover-bottom,.popover-anim-scale.popover-bottom-start,.popover-anim-scale.popover-bottom-end{transform-origin:center bottom}.popover-anim-scale.popover-left,.popover-anim-scale.popover-left-start,.popover-anim-scale.popover-left-end{transform-origin:right center}.popover-anim-scale.popover-right,.popover-anim-scale.popover-right-start,.popover-anim-scale.popover-right-end{transform-origin:left center}.popover-anim-scale.popover-visible{transform:scale(1)}.popover-anim-slide.popover-top,.popover-anim-slide.popover-top-start,.popover-anim-slide.popover-top-end{transform:translateY(8px)}.popover-anim-slide.popover-bottom,.popover-anim-slide.popover-bottom-start,.popover-anim-slide.popover-bottom-end{transform:translateY(-8px)}.popover-anim-slide.popover-left,.popover-anim-slide.popover-left-start,.popover-anim-slide.popover-left-end{transform:translateX(8px)}.popover-anim-slide.popover-right,.popover-anim-slide.popover-right-start,.popover-anim-slide.popover-right-end{transform:translateX(-8px)}.popover-anim-slide.popover-visible{transform:translate(0, 0)}.popover-skeleton .popover-body{display:flex;flex-direction:column;gap:10px;padding:16px}.popover-skeleton .popover-body::before,.popover-skeleton .popover-body::after{content:"";display:block;height:12px;border-radius:6px;background:linear-gradient(90deg, var(--bg-primary, #e5e7eb) 25%, var(--bg-secondary, #f3f4f6) 50%, var(--bg-primary, #e5e7eb) 75%);background-size:200% 100%;animation:skeletonShimmer 1.4s infinite}.popover-skeleton .popover-body::after{width:65%}@keyframes skeletonShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.popover{transition:none;transform:none !important;opacity:1 !important;display:none}.popover-visible{display:block}}`;
139
+
140
+ const Popover = class {
141
+ constructor(hostRef) {
142
+ registerInstance(this, hostRef);
143
+ this.uiBeforeOpen = createEvent(this, "uiBeforeOpen");
144
+ this.uiOpen = createEvent(this, "uiOpen");
145
+ this.uiBeforeClose = createEvent(this, "uiBeforeClose");
146
+ this.uiClose = createEvent(this, "uiClose");
147
+ this.uiToggle = createEvent(this, "uiToggle");
148
+ }
149
+ get element() { return getElement(this); }
150
+ /** Popover heading text */
151
+ heading = '';
152
+ /**
153
+ * The target element to anchor the popover to.
154
+ * Can be a CSS selector (string) or a direct HTMLElement reference.
155
+ * If not provided, it will use the element in the 'trigger' slot or its first child.
156
+ */
157
+ target;
158
+ /** Popover content (HTML string). Use this for simple text or if you can't use the 'content' slot. */
159
+ content = '';
160
+ /** Controlled open state. */
161
+ open = false;
162
+ /** Disabled state. If true, popover will not show. */
163
+ disabled = false;
164
+ /**
165
+ * Trigger type: 'click' | 'hover' | 'focus' | 'manual'
166
+ * 'manual' = only show/hide via method calls
167
+ */
168
+ trigger = 'click';
169
+ /** Placement of popover */
170
+ placement = 'top';
171
+ /** Show arrow */
172
+ showArrow = true;
173
+ /** Popover width */
174
+ width = '280px';
175
+ /** Animation type */
176
+ animation = 'scale';
177
+ /** Show close button */
178
+ showCloseButton = false;
179
+ /** Show backdrop */
180
+ backdrop = false;
181
+ /**
182
+ * Visual variant.
183
+ * 'light' | 'dark' | 'success' | 'warning' | 'error' | 'info'
184
+ */
185
+ variant = 'light';
186
+ /**
187
+ * ARIA role for the popover panel.
188
+ * Use 'tooltip' for non-interactive hover hints, 'menu' for menus, 'dialog' for rich content.
189
+ */
190
+ popoverRole = 'dialog';
191
+ /**
192
+ * Delay in ms before showing on hover (0 = immediate)
193
+ */
194
+ showDelay = 0;
195
+ /**
196
+ * Delay in ms before hiding on hover
197
+ */
198
+ hideDelay = 200;
199
+ /**
200
+ * Close popover when window is scrolled
201
+ */
202
+ closeOnScroll = false;
203
+ /**
204
+ * Allow Escape key to close the popover (default: true)
205
+ */
206
+ closeOnEsc = true;
207
+ /**
208
+ * Maximum height of the popover body. If content exceeds this, it scrolls.
209
+ */
210
+ maxHeight = 'none';
211
+ /**
212
+ * When hover trigger is used, allow cursor to move into the popover without closing it.
213
+ * Set to false for pure tooltip behaviour.
214
+ */
215
+ interactive = true;
216
+ /** Loading state */
217
+ loading = false;
218
+ /** Skeleton state */
219
+ skeleton = false;
220
+ /** Distance between popover and trigger (in pixels) */
221
+ offset = 12;
222
+ /** Size of the arrow in pixels */
223
+ arrowSize = 10;
224
+ /** Close popover when clicking outside */
225
+ closeOnOutsideClick = true;
226
+ /** Close popover when focus leaves it */
227
+ closeOnBlur = true;
228
+ /** Match the width of the trigger element */
229
+ matchTriggerWidth = false;
230
+ /** Enable auto-flipping when hitting screen boundaries */
231
+ flip = true;
232
+ /** Enable auto-shifting (clamping) to stay inside viewport */
233
+ shift = true;
234
+ /** Boundary element for collision detection */
235
+ boundary = 'viewport';
236
+ /** Padding from boundary edges */
237
+ padding = 24;
238
+ /** Fallback placements for flipping (e.g. "top, bottom") */
239
+ fallbackPlacements;
240
+ /** Automatically choose the best placement based on available space */
241
+ autoPlacement = false;
242
+ /** Positioning strategy */
243
+ strategy = 'fixed';
244
+ /** Optional z-index for the popover panel */
245
+ zIndex = 21000;
246
+ /** Emitted before popover shows. Call event.preventDefault() to cancel. */
247
+ uiBeforeOpen;
248
+ /** Emitted when popover shows */
249
+ uiOpen;
250
+ /** Emitted before popover hides. Call event.preventDefault() to cancel. */
251
+ uiBeforeClose;
252
+ /** Emitted when popover hides */
253
+ uiClose;
254
+ /** Emitted when toggled */
255
+ uiToggle;
256
+ currentPlacement = 'top';
257
+ popoverStyles = {};
258
+ arrowStyles = {};
259
+ targetElement;
260
+ popoverContent;
261
+ arrowElement;
262
+ hideTimeout;
263
+ showTimeout;
264
+ focusTrap;
265
+ cleanupAutoUpdate;
266
+ resizeObserver;
267
+ latestSizeData = { width: '', maxWidth: '', maxHeight: '' };
268
+ updateRetries = 0;
269
+ /** Guard flag: true for the brief window after a trigger click, prevents outside-click from firing on the same event */
270
+ _justOpened = false;
271
+ componentWillLoad() {
272
+ this.currentPlacement = this.placement;
273
+ }
274
+ componentDidLoad() {
275
+ this.setupTrigger();
276
+ this.popoverContent = this.element.shadowRoot?.querySelector('.popover');
277
+ this.arrowElement = this.element.shadowRoot?.querySelector('.popover-arrow');
278
+ if (this.popoverContent) {
279
+ this.resizeObserver = new ResizeObserver(() => {
280
+ if (this.open)
281
+ this.updatePosition();
282
+ });
283
+ this.resizeObserver.observe(this.popoverContent);
284
+ }
285
+ window.addEventListener('keydown', this.handleGlobalKeyDown);
286
+ }
287
+ componentDidUpdate() {
288
+ if (this.open && !this.cleanupAutoUpdate) {
289
+ this.startAutoUpdate();
290
+ }
291
+ }
292
+ disconnectedCallback() {
293
+ this.cleanup();
294
+ if (this.cleanupAutoUpdate) {
295
+ this.cleanupAutoUpdate();
296
+ }
297
+ window.removeEventListener('keydown', this.handleGlobalKeyDown);
298
+ if (this.focusTrap) {
299
+ this.focusTrap.deactivate();
300
+ }
301
+ }
302
+ visibilityChanged(newValue) {
303
+ if (newValue) {
304
+ if (this.disabled) {
305
+ this.open = false;
306
+ return;
307
+ }
308
+ this.handleOpen();
309
+ }
310
+ else {
311
+ this.handleClose();
312
+ }
313
+ }
314
+ handleTriggerConfigChange() {
315
+ this.cleanup();
316
+ this.setupTrigger();
317
+ }
318
+ handleOpen() {
319
+ if (!this.targetElement) {
320
+ this.setupTrigger();
321
+ }
322
+ this.popoverStyles = {
323
+ position: this.strategy,
324
+ left: '0px',
325
+ top: '0px',
326
+ visibility: 'hidden',
327
+ opacity: '0'
328
+ };
329
+ this.popoverContent = this.element.shadowRoot?.querySelector('.popover');
330
+ this.arrowElement = this.element.shadowRoot?.querySelector('.popover-arrow');
331
+ if (this.popoverContent && !this.resizeObserver) {
332
+ this.resizeObserver = new ResizeObserver(() => {
333
+ if (this.open)
334
+ this.updatePosition();
335
+ });
336
+ this.resizeObserver.observe(this.popoverContent);
337
+ }
338
+ requestAnimationFrame(() => {
339
+ this.cleanup();
340
+ this.targetElement = undefined;
341
+ this.setupTrigger();
342
+ this.startAutoUpdate();
343
+ this.updateAriaAttributes(true);
344
+ // Add outside click listener only when open.
345
+ // Use a flag + slightly longer timeout to ensure the click that *opened*
346
+ // the popover cannot immediately trigger an outside-click close.
347
+ if (this.closeOnOutsideClick) {
348
+ this._justOpened = true;
349
+ setTimeout(() => {
350
+ this._justOpened = false;
351
+ document.addEventListener('click', this.handleOutsideClick);
352
+ }, 50);
353
+ }
354
+ if (this.backdrop || this.showCloseButton || this.trigger === 'click') {
355
+ requestAnimationFrame(() => {
356
+ this.initFocusTrap();
357
+ if (this.focusTrap)
358
+ this.focusTrap.activate();
359
+ });
360
+ }
361
+ this.uiOpen.emit();
362
+ });
363
+ }
364
+ handleClose() {
365
+ if (this.cleanupAutoUpdate) {
366
+ this.cleanupAutoUpdate();
367
+ this.cleanupAutoUpdate = undefined;
368
+ }
369
+ this.popoverStyles = {
370
+ position: this.strategy,
371
+ left: '0px',
372
+ top: '0px',
373
+ visibility: 'hidden',
374
+ opacity: '0'
375
+ };
376
+ document.removeEventListener('click', this.handleOutsideClick);
377
+ if (this.focusTrap) {
378
+ this.focusTrap.deactivate();
379
+ }
380
+ this.updateAriaAttributes(false);
381
+ this.uiClose.emit();
382
+ }
383
+ updateAriaAttributes(expanded) {
384
+ if (this.targetElement) {
385
+ this.targetElement.setAttribute('aria-expanded', expanded.toString());
386
+ this.targetElement.setAttribute('aria-haspopup', this.popoverRole === 'menu' ? 'menu' : 'true');
387
+ }
388
+ }
389
+ initFocusTrap() {
390
+ if (!this.popoverContent)
391
+ return;
392
+ if (!this.focusTrap) {
393
+ this.focusTrap = new FocusTrap(this.popoverContent, {
394
+ initialFocus: this.popoverContent,
395
+ returnFocus: this.targetElement,
396
+ escapeDeactivates: true,
397
+ clickOutsideDeactivates: !this.backdrop
398
+ });
399
+ }
400
+ }
401
+ getLayoutAnchor() {
402
+ let anchor = this.targetElement;
403
+ while (anchor) {
404
+ const style = window.getComputedStyle(anchor);
405
+ if (style && style.display === 'contents') {
406
+ const shadowChild = Array.from(anchor.shadowRoot?.children || []).find((c) => c.tagName !== 'STYLE' && c.tagName !== 'SCRIPT' && c.tagName !== 'SLOT');
407
+ if (shadowChild) {
408
+ anchor = shadowChild;
409
+ continue;
410
+ }
411
+ }
412
+ break;
413
+ }
414
+ return anchor || this.targetElement || this.element;
415
+ }
416
+ setupTrigger() {
417
+ // 1. Check for external target via selector or reference
418
+ if (this.target) {
419
+ if (typeof this.target === 'string') {
420
+ this.targetElement = document.querySelector(this.target);
421
+ }
422
+ else {
423
+ this.targetElement = this.target;
424
+ }
425
+ }
426
+ // 2. Fallback to slots if no external target
427
+ if (!this.targetElement) {
428
+ const triggerSlot = this.element.shadowRoot?.querySelector('slot[name="trigger"]');
429
+ const defaultSlot = this.element.shadowRoot?.querySelector('slot:not([name])');
430
+ const getAssignedElement = (slot) => {
431
+ const elements = slot?.assignedElements();
432
+ return elements?.length > 0 ? elements[0] : null;
433
+ };
434
+ this.targetElement = getAssignedElement(triggerSlot) || getAssignedElement(defaultSlot);
435
+ }
436
+ // 3. Last fallback: the component itself
437
+ if (!this.targetElement) {
438
+ this.targetElement = this.element;
439
+ }
440
+ if (this.targetElement && this.trigger !== 'manual') {
441
+ // Accessibility augmentation for non-buttons
442
+ if (!['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(this.targetElement.tagName)) {
443
+ if (!this.targetElement.hasAttribute('role'))
444
+ this.targetElement.setAttribute('role', 'button');
445
+ if (!this.targetElement.hasAttribute('tabindex'))
446
+ this.targetElement.setAttribute('tabindex', '0');
447
+ }
448
+ if (this.trigger === 'click') {
449
+ this.targetElement.addEventListener('click', this.handleTriggerClick);
450
+ this.targetElement.addEventListener('keydown', this.handleTargetKeyDown);
451
+ }
452
+ else if (this.trigger === 'hover') {
453
+ this.targetElement.addEventListener('mouseenter', this.handleMouseEnter);
454
+ this.targetElement.addEventListener('mouseleave', this.handleMouseLeave);
455
+ this.targetElement.addEventListener('focusin', this.handleFocusIn);
456
+ this.targetElement.addEventListener('focusout', this.handleFocusOut);
457
+ }
458
+ else if (this.trigger === 'focus') {
459
+ this.targetElement.addEventListener('focusin', this.handleFocusIn);
460
+ this.targetElement.addEventListener('focusout', this.handleFocusOut);
461
+ }
462
+ this.updateAriaAttributes(this.open);
463
+ }
464
+ }
465
+ handleTargetKeyDown = (e) => {
466
+ if (e.key === 'Enter' || e.key === ' ') {
467
+ e.preventDefault();
468
+ this.toggle();
469
+ }
470
+ };
471
+ cleanup() {
472
+ if (!this.targetElement)
473
+ return;
474
+ this.targetElement.removeEventListener('click', this.handleTriggerClick);
475
+ this.targetElement.removeEventListener('keydown', this.handleTargetKeyDown);
476
+ this.targetElement.removeEventListener('mouseenter', this.handleMouseEnter);
477
+ this.targetElement.removeEventListener('mouseleave', this.handleMouseLeave);
478
+ this.targetElement.removeEventListener('focusin', this.handleFocusIn);
479
+ this.targetElement.removeEventListener('focusout', this.handleFocusOut);
480
+ document.removeEventListener('click', this.handleOutsideClick);
481
+ if (this.resizeObserver) {
482
+ this.resizeObserver.disconnect();
483
+ this.resizeObserver = undefined;
484
+ }
485
+ }
486
+ handleTriggerClick = (e) => {
487
+ e.stopPropagation();
488
+ if (this.trigger === 'click') {
489
+ this.toggle();
490
+ }
491
+ };
492
+ handleFocusIn = () => {
493
+ this.show();
494
+ };
495
+ handleFocusOut = () => {
496
+ this.hide();
497
+ };
498
+ handleOutsideClick = (event) => {
499
+ if (this._justOpened && event.isTrusted)
500
+ return;
501
+ // Use composedPath() to correctly detect clicks inside Shadow DOM subtrees
502
+ // (e.g. a ui-button inside a slot="trigger" wrapper, or inside the popover panel)
503
+ const path = event.composedPath ? event.composedPath() : [];
504
+ // Check if click was inside the host element (includes trigger slot children)
505
+ if (path.includes(this.element))
506
+ return;
507
+ // Check if click was inside the floating panel
508
+ if (this.popoverContent && path.includes(this.popoverContent))
509
+ return;
510
+ // Legacy fallback for browsers without composedPath
511
+ if (this.targetElement?.contains(event.target))
512
+ return;
513
+ if (this.popoverContent?.contains(event.target))
514
+ return;
515
+ if (this.open)
516
+ this.hide();
517
+ };
518
+ handleMouseEnter = () => {
519
+ if (this.disabled)
520
+ return;
521
+ clearTimeout(this.hideTimeout);
522
+ if (this.showDelay > 0) {
523
+ this.showTimeout = setTimeout(() => this.show(), this.showDelay);
524
+ }
525
+ else {
526
+ this.show();
527
+ }
528
+ };
529
+ handleMouseLeave = () => {
530
+ clearTimeout(this.showTimeout);
531
+ this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
532
+ };
533
+ handlePopoverMouseEnter = () => {
534
+ if (this.trigger === 'hover' && this.interactive) {
535
+ clearTimeout(this.hideTimeout);
536
+ clearTimeout(this.showTimeout);
537
+ }
538
+ };
539
+ handlePopoverMouseLeave = () => {
540
+ if (this.trigger === 'hover' && this.interactive) {
541
+ this.handleMouseLeave();
542
+ }
543
+ };
544
+ handleGlobalKeyDown = (e) => {
545
+ if (this.open && this.closeOnEsc && e.key === 'Escape') {
546
+ e.stopPropagation();
547
+ this.hide();
548
+ }
549
+ };
550
+ startAutoUpdate() {
551
+ if (this.cleanupAutoUpdate)
552
+ this.cleanupAutoUpdate();
553
+ // The panel is conditionally rendered ({this.open && ...}).
554
+ this.popoverContent = this.element.shadowRoot?.querySelector('.popover');
555
+ if (this.showArrow) {
556
+ this.arrowElement = this.element.shadowRoot?.querySelector('.popover-arrow');
557
+ }
558
+ if (!this.targetElement || !this.popoverContent)
559
+ return;
560
+ // Dynamically retrieve the layout anchor to avoid race conditions with display:contents styles
561
+ const anchorEl = this.getLayoutAnchor();
562
+ this.cleanupAutoUpdate = autoUpdate(anchorEl, this.popoverContent, () => this.updatePosition(), { animationFrame: true });
563
+ }
564
+ async updatePosition() {
565
+ // Always re-query the panel and arrow in case they were null during initial mount
566
+ if (!this.popoverContent) {
567
+ this.popoverContent = this.element.shadowRoot?.querySelector('.popover');
568
+ }
569
+ if (this.showArrow && !this.arrowElement) {
570
+ this.arrowElement = this.element.shadowRoot?.querySelector('.popover-arrow');
571
+ }
572
+ if (!this.open || !this.popoverContent || !this.targetElement) {
573
+ this.updateRetries = 0;
574
+ return;
575
+ }
576
+ // Double-check dimensions - if 0, we might need a retry (like Tooltip component does)
577
+ if (this.popoverContent.offsetWidth === 0 && this.updateRetries < 5) {
578
+ this.updateRetries++;
579
+ requestAnimationFrame(() => this.updatePosition());
580
+ return;
581
+ }
582
+ this.updateRetries = 0;
583
+ // Dynamically retrieve the layout anchor to avoid race conditions with display:contents styles
584
+ const anchorEl = this.getLayoutAnchor();
585
+ const { left, top, placement, availableHeight, availableWidth, arrowX, arrowY } = calculateUniversalPlacement(anchorEl, {
586
+ menuWidth: this.popoverContent.offsetWidth,
587
+ menuHeight: this.popoverContent.offsetHeight,
588
+ gap: this.offset,
589
+ placement: this.autoPlacement ? 'auto' : this.placement.split('-')[0],
590
+ align: this.placement.includes('start') ? 'start' : (this.placement.includes('end') ? 'end' : 'center'),
591
+ padding: this.padding,
592
+ flip: this.flip,
593
+ shift: this.shift
594
+ });
595
+ this.currentPlacement = placement;
596
+ // Constrain size based on available space
597
+ this.latestSizeData = {
598
+ width: this.width,
599
+ maxWidth: `${Math.min(window.innerWidth - (this.padding * 2), availableWidth)}px`,
600
+ maxHeight: this.maxHeight !== 'none' ? this.maxHeight : `${availableHeight}px`,
601
+ };
602
+ const sizeData = this.latestSizeData;
603
+ this.popoverStyles = {
604
+ position: this.strategy,
605
+ left: `${left}px`,
606
+ top: `${top}px`,
607
+ width: this.matchTriggerWidth ? `${anchorEl.offsetWidth}px` : (sizeData.width || this.width),
608
+ minWidth: '160px',
609
+ maxWidth: sizeData.maxWidth,
610
+ maxHeight: sizeData.maxHeight,
611
+ visibility: 'visible',
612
+ opacity: '1'
613
+ };
614
+ if (this.showArrow && this.arrowElement) {
615
+ const side = placement;
616
+ const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[side];
617
+ const halfSize = Math.round(this.arrowSize / 2);
618
+ this.arrowStyles = {
619
+ top: '',
620
+ right: '',
621
+ bottom: '',
622
+ left: '',
623
+ ...(side === 'top' || side === 'bottom' ?
624
+ { left: `${arrowX}px`, transform: 'translateX(-50%) rotate(45deg)' } :
625
+ { top: `${arrowY}px`, transform: 'translateY(-50%) rotate(45deg)' }),
626
+ [staticSide]: `-${halfSize}px`,
627
+ };
628
+ }
629
+ }
630
+ async reposition() {
631
+ return this.updatePosition();
632
+ }
633
+ async computePlacement() {
634
+ return this.currentPlacement;
635
+ }
636
+ async show() {
637
+ if (this.disabled)
638
+ return;
639
+ if (this.uiBeforeOpen) {
640
+ const event = this.uiBeforeOpen.emit();
641
+ if (event && event.defaultPrevented)
642
+ return;
643
+ }
644
+ this.open = true;
645
+ }
646
+ async hide() {
647
+ if (this.uiBeforeClose) {
648
+ const event = this.uiBeforeClose.emit();
649
+ if (event && event.defaultPrevented)
650
+ return;
651
+ }
652
+ this.open = false;
653
+ }
654
+ async toggle() {
655
+ if (this.disabled)
656
+ return;
657
+ if (this.open) {
658
+ await this.hide();
659
+ }
660
+ else {
661
+ await this.show();
662
+ }
663
+ if (this.uiToggle)
664
+ this.uiToggle.emit({ open: this.open });
665
+ }
666
+ getPopoverStyle() {
667
+ return {
668
+ '--ui-popover-arrow-size': `${this.arrowSize}px`,
669
+ zIndex: this.zIndex ? `${this.zIndex}` : undefined,
670
+ };
671
+ }
672
+ render() {
673
+ const popoverClasses = {
674
+ 'popover': true,
675
+ 'popover-visible': this.open,
676
+ 'popover-loading': this.loading,
677
+ 'popover-skeleton': this.skeleton,
678
+ [`popover-${this.currentPlacement}`]: true,
679
+ [`popover-${this.variant}`]: true,
680
+ [`popover-anim-${this.animation}`]: true,
681
+ };
682
+ const finalPopoverStyle = {
683
+ ...this.getPopoverStyle(),
684
+ ...this.popoverStyles
685
+ };
686
+ return (h("div", { key: '8c9a3985b10f389cb2fa730830e3872957358435', class: "popover-wrapper" }, h("div", { key: '6b0c31365ecd79e280001c112cd33978d92393aa', class: "popover-trigger" }, h("slot", { key: '0fb48c0444ccd3ce6e7b1a68d12e6fd4b546c654', name: "trigger" }), h("slot", { key: 'e8f8f885ebf70a16b6554b9471ab234bf426d478' })), this.backdrop && this.open && (h("div", { key: '3412a54d36ddceed9ca90bf587db0d7c4c53240a', class: "popover-backdrop", onClick: () => this.hide() })), this.open && (h("div", { key: '8cbc42fedae9130dc5d453366b95ff2b9865a9a2', class: popoverClasses, style: finalPopoverStyle, onMouseEnter: () => this.handlePopoverMouseEnter(), onMouseLeave: () => this.handlePopoverMouseLeave(), role: this.popoverRole, "aria-modal": this.backdrop ? 'true' : 'false', "aria-label": this.heading || undefined }, this.showArrow && h("div", { key: '39c3c7db5436a07e8f39e594e8517e08392f8f50', class: "popover-arrow", style: this.arrowStyles }), h("div", { key: 'caaedac530b821964d6301309b984aefcae798db', class: "popover-inner" }, (this.heading || this.showCloseButton) && (h("div", { key: 'cb939a32a38e56e72c14dcebfada947c19f22ea9', class: "popover-header" }, this.heading && h("div", { key: '55080c2e755a2f4bc9cd45110b2262f57471fde7', class: "popover-title" }, this.heading), this.showCloseButton && (h("ui-button", { key: 'bd92a337a7029d19fa3b4b1e3aa211f12ca38f71', variant: "ghost", size: "xxs", iconOnly: true, class: "popover-close", onClick: () => this.hide(), ariaLabel: "Close", icon: "x", iconLibrary: "lucide", iconSize: "14px" })))), h("div", { key: 'dedbb7ecd61056c89d5c006a442ff83d6de76390', class: "popover-body", style: { maxHeight: this.maxHeight, overflowY: this.maxHeight !== 'none' ? 'auto' : undefined } }, h("slot", { key: 'b838ffbe1fdd208cbe2ca2c8f2e85f290ebfb946', name: "content" }), this.content && h("div", { key: 'e179798f83b9be0ddd68f5d80c1c8df7ff893075', innerHTML: sanitizeHTML(this.content) })), h("slot", { key: '8f235de9f318e3ed6aa386522052bfb6a7c45da3', name: "footer" }))))));
687
+ }
688
+ static get watchers() { return {
689
+ "open": [{
690
+ "visibilityChanged": 0
691
+ }],
692
+ "target": [{
693
+ "handleTriggerConfigChange": 0
694
+ }],
695
+ "trigger": [{
696
+ "handleTriggerConfigChange": 0
697
+ }]
698
+ }; }
699
+ };
700
+ Popover.style = popoverCss();
701
+
702
+ const skeletonLoaderCss = () => `@charset "UTF-8";.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{--skeleton-bg:#9ca6b3;--skeleton-wave-bg:#ffffff;--skeleton-bg:var(--skeleton-loader-bg, color-mix(in srgb, var(--bg-tertiary, #e2e8f0) 58%, #475569 42%));--skeleton-wave-bg:var(--skeleton-loader-wave-bg, #ffffff);--skeleton-border-radius:var(--skeleton-loader-border-radius, 4px);--skeleton-progress-bar-bg:var(--skeleton-loader-progress-bar-bg, var(--bg-primary, #ffffff));--skeleton-focus-ring:var(--skeleton-loader-focus-ring, var(--color-primary, #10b981));--skeleton-focus-shadow:var(--skeleton-loader-focus-shadow, #dbeafe)}:host-context([data-theme=dark]),:host-context([data-theme=blue]),:host-context([data-theme=violet]),:host-context([data-theme=green]),:host-context([data-theme=pink]),:host-context(.theme-dark),:host-context(.theme-blue),:host-context(.theme-violet),:host-context(.theme-green),:host-context(.theme-pink),:host(.theme-dark),:host([dark=dark]),:host-context(.skeleton-dark),.skeleton-dark{--skeleton-bg:#111827;--skeleton-wave-bg:#374151;--skeleton-bg:var(--skeleton-loader-bg, color-mix(in srgb, var(--bg-secondary, #1e293b) 80%, #000000 20%));--skeleton-wave-bg:var(--skeleton-loader-wave-bg, color-mix(in srgb, var(--bg-tertiary, #334155) 75%, #ffffff 25%))}.skeleton-color-primary{--skeleton-bg:color-mix(in srgb, var(--color-primary, #10b981) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-primary, #10b981) 50%, transparent)}.skeleton-color-secondary{--skeleton-bg:color-mix(in srgb, var(--color-secondary, #64748b) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-secondary, #64748b) 50%, transparent)}.skeleton-color-success{--skeleton-bg:color-mix(in srgb, var(--color-success, #22c55e) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-success, #22c55e) 50%, transparent)}.skeleton-color-danger{--skeleton-bg:color-mix(in srgb, var(--color-danger, #ef4444) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-danger, #ef4444) 50%, transparent)}.skeleton-color-warning{--skeleton-bg:color-mix(in srgb, var(--color-warning, #f59e0b) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-warning, #f59e0b) 50%, transparent)}.skeleton-color-info{--skeleton-bg:color-mix(in srgb, var(--color-info, #38bdf8) 25%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-info, #38bdf8) 50%, transparent)}.skeleton-replication-container ::slotted([slot=custom]:focus-visible){outline:2px solid var(--color-primary, #10b981);outline-offset:2px;border-radius:4px;box-shadow:0 0 0 2px var(--border-subtle, #dbeafe);transition:outline 0.2s, box-shadow 0.2s}.skeleton-rtl .skeleton{direction:rtl;--skeleton-wave-angle:-90deg;animation-direction:reverse}.skeleton-progress-bar{transition:width 0.3s cubic-bezier(0.4, 0, 0.2, 1);background:var(--skeleton-wave-bg, var(--bg-primary, #ffffff));height:4px;border-radius:2px;margin-top:4px}.skeleton-replication-container slot[name=custom]{display:block;margin-top:8px}:host{display:block}.skeleton{background:var(--skeleton-bg, #f0f0f0);position:relative;overflow:hidden}.skeleton-animated.skeleton-pulse{animation:skeleton-pulse var(--skeleton-wave-speed, 1.5s) cubic-bezier(0.4, 0, 0.2, 1) infinite}.skeleton-animated.skeleton-wave{background:linear-gradient(var(--skeleton-wave-angle, 110deg), var(--skeleton-bg) 25%, var(--skeleton-wave-bg) 50%, var(--skeleton-bg) 75%);background-size:200% 100%;animation:skeleton-wave var(--skeleton-wave-speed, 1.4s) linear infinite}.skeleton-animated.skeleton-shimmer{background:linear-gradient(110deg, var(--skeleton-bg) 25%, var(--skeleton-wave-bg) 50%, var(--skeleton-bg) 75%);background-size:200% 100%;animation:skeleton-shimmer var(--skeleton-wave-speed, 1.3s) linear infinite}.skeleton-animated.skeleton-sheen::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background:linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);animation:skeleton-sheen var(--skeleton-wave-speed, 1.4s) cubic-bezier(0.25, 1, 0.5, 1) infinite}.skeleton-dark .skeleton-animated.skeleton-sheen::after{background:linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%)}.skeleton-animated.skeleton-glow{animation:skeleton-glow var(--skeleton-wave-speed, 1.8s) ease-in-out infinite}.skeleton-animated.skeleton-flicker{animation:skeleton-flicker 0.25s ease-in-out infinite}.skeleton-animated.skeleton-neon-sweep{position:relative;background:var(--skeleton-bg, #e2e8f0)}.skeleton-animated.skeleton-neon-sweep::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg, transparent 0%, rgba(var(--color-primary-rgb, 16, 185, 129), 0) 20%, rgba(var(--color-primary-rgb, 16, 185, 129), 0.9) 50%, rgba(var(--color-primary-rgb, 16, 185, 129), 0) 80%, transparent 100%);transform:translateX(-150%) skewX(-20deg);animation:skeleton-neon-sweep var(--skeleton-wave-speed, 1.5s) cubic-bezier(0.25, 1, 0.5, 1) infinite;box-shadow:0 0 20px rgba(var(--color-primary-rgb, 16, 185, 129), 0.45)}.skeleton-animated.skeleton-liquify{background:linear-gradient(135deg, var(--skeleton-bg) 0%, var(--skeleton-bg) 35%, color-mix(in srgb, var(--skeleton-wave-bg) 75%, var(--skeleton-bg)) 47%, var(--skeleton-wave-bg) 50%, color-mix(in srgb, var(--skeleton-wave-bg) 75%, var(--skeleton-bg)) 53%, var(--skeleton-bg) 65%, var(--skeleton-bg) 100%);background-size:250% 100%;animation:skeleton-liquify var(--skeleton-wave-speed, 2s) cubic-bezier(0.33, 1, 0.68, 1) infinite}.skeleton-animated.skeleton-aurora{background:linear-gradient(45deg, var(--skeleton-bg) 0%, color-mix(in srgb, #3b82f6 28%, var(--skeleton-bg)) 30%, color-mix(in srgb, #a855f7 28%, var(--skeleton-bg)) 50%, color-mix(in srgb, #10b981 25%, var(--skeleton-bg)) 70%, var(--skeleton-bg) 100%);background-size:300% 300%;animation:skeleton-aurora 4s ease infinite}.skeleton-dark .skeleton-animated.skeleton-aurora{background:linear-gradient(45deg, var(--skeleton-bg) 0%, color-mix(in srgb, #3b82f6 24%, var(--skeleton-bg)) 30%, color-mix(in srgb, #c084fc 24%, var(--skeleton-bg)) 50%, color-mix(in srgb, #34d399 20%, var(--skeleton-bg)) 70%, var(--skeleton-bg) 100%);background-size:300% 300%;animation:skeleton-aurora 4s ease infinite}.skeleton-circle{border-radius:50%}.skeleton-rounded{border-radius:var(--skeleton-border-radius, 4px)}.skeleton-text{border-radius:4px}.skeleton-avatar{border-radius:50%}.skeleton-button{border-radius:6px}.skeleton-card{border-radius:8px;padding:16px}.skeleton-list-item{border-radius:4px;padding:12px;display:flex;align-items:center;gap:12px}.skeleton-card-content{display:flex;flex-direction:column;gap:12px}.skeleton-card-header{display:flex;align-items:center;gap:12px}.skeleton-card-title{flex:1;display:flex;flex-direction:column;gap:6px}.skeleton-card-body{display:flex;flex-direction:column;gap:8px}.skeleton-list-content{display:flex;align-items:center;gap:12px;width:100%}.skeleton-list-text{flex:1;display:flex;flex-direction:column;gap:6px}.skeleton-card .skeleton-circle,.skeleton-card .skeleton-text,.skeleton-list-item .skeleton-circle,.skeleton-list-item .skeleton-text{background:var(--skeleton-bg, #f0f0f0);animation:inherit}.skeleton-image-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.skeleton-profile-template{display:flex;align-items:center;gap:16px}.skeleton-profile-template .skeleton-profile-lines{display:flex;flex-direction:column;gap:8px}.skeleton-media-object-template{display:flex;align-items:flex-start;gap:12px}.skeleton-media-object-template .skeleton-media-lines{display:flex;flex-direction:column;gap:6px}.skeleton-feed-template{width:100%;padding:16px;border:1px solid var(--ui-color-border, var(--border-default, #e5e7eb));border-radius:12px;background:var(--ui-color-surface, var(--bg-primary, #ffffff))}.skeleton-mask{width:fit-content;height:fit-content;min-width:20px;min-height:20px;display:inline-block}.skeleton-mask>*{visibility:hidden}.skeleton-mask.skeleton-ghost>*{visibility:visible !important;opacity:0.15 !important;filter:blur(2px) grayscale(1)}.skeleton-replication-container{width:100%;display:flex;gap:var(--skeleton-gap, 16px)}.skeleton-replication-container.skeleton-direction-row{flex-wrap:wrap;flex-direction:row !important}.skeleton-replication-container.skeleton-direction-column{flex-direction:column !important}.skeleton-elevated{box-shadow:var(--skeleton-elevation, none)}@keyframes skeleton-pulse{0%,100%{background-color:var(--skeleton-bg);opacity:1}50%{background-color:var(--skeleton-wave-bg);opacity:0.4}}@keyframes skeleton-wave{0%{background-position:-200% 0}100%{background-position:200% 0}}@keyframes skeleton-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@keyframes skeleton-sheen{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}@keyframes skeleton-glow{0%,100%{box-shadow:0 0 8px rgba(var(--color-primary-rgb, 16, 185, 129), 0.15), inset 0 0 4px rgba(var(--color-primary-rgb, 16, 185, 129), 0.05);filter:brightness(0.95);opacity:0.8}50%{box-shadow:0 0 24px rgba(var(--color-primary-rgb, 16, 185, 129), 0.65), inset 0 0 12px rgba(var(--color-primary-rgb, 16, 185, 129), 0.3);filter:brightness(1.2);opacity:1}}@keyframes skeleton-flicker{0%,100%{opacity:0.35;filter:brightness(0.85)}20%{opacity:0.85;filter:brightness(1)}40%{opacity:0.45;filter:brightness(0.9)}60%{opacity:0.95;filter:brightness(1.15)}80%{opacity:0.55;filter:brightness(0.95)}}@keyframes skeleton-neon-sweep{0%{transform:translateX(-150%) skewX(-20deg)}70%,100%{transform:translateX(150%) skewX(-20deg)}}@keyframes skeleton-liquify{0%{background-position:250% 0}50%{background-position:-50% 0}100%{background-position:250% 0}}@keyframes skeleton-aurora{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}:host{--skeleton-border-radius:4px}.skeleton-speed-slow.skeleton-pulse{animation-duration:3s}.skeleton-speed-slow.skeleton-wave{animation-duration:3s}.skeleton-speed-slow.skeleton-shimmer{animation-duration:3.5s}.skeleton-speed-slow.skeleton-sheen::after{animation-duration:3.5s}.skeleton-speed-slow.skeleton-glow{animation-duration:3s}.skeleton-speed-slow.skeleton-neon-sweep::after{animation-duration:3.2s}.skeleton-speed-slow.skeleton-liquify{animation-duration:4s}.skeleton-speed-normal.skeleton-pulse{animation-duration:1.5s}.skeleton-speed-normal.skeleton-wave{animation-duration:1.5s}.skeleton-speed-normal.skeleton-shimmer{animation-duration:1.8s}.skeleton-speed-normal.skeleton-sheen::after{animation-duration:1.8s}.skeleton-speed-normal.skeleton-glow{animation-duration:1.5s}.skeleton-speed-normal.skeleton-neon-sweep::after{animation-duration:1.8s}.skeleton-speed-normal.skeleton-liquify{animation-duration:2.2s}.skeleton-speed-fast.skeleton-pulse{animation-duration:0.8s}.skeleton-speed-fast.skeleton-wave{animation-duration:0.8s}.skeleton-speed-fast.skeleton-shimmer{animation-duration:1s}.skeleton-speed-fast.skeleton-sheen::after{animation-duration:1s}.skeleton-speed-fast.skeleton-glow{animation-duration:0.8s}.skeleton-speed-fast.skeleton-neon-sweep::after{animation-duration:1.1s}.skeleton-speed-fast.skeleton-liquify{animation-duration:1.2s}`;
703
+
704
+ const SkeletonLoader = class {
705
+ constructor(hostRef) {
706
+ registerInstance(this, hostRef);
707
+ this.skeletonShow = createEvent(this, "skeletonShow");
708
+ this.skeletonHide = createEvent(this, "skeletonHide");
709
+ }
710
+ /** ARIA label for accessibility */
711
+ ariaLabel;
712
+ /** ARIA live region (off, polite, assertive) */
713
+ ariaLive = 'off';
714
+ /** ARIA role override (status, progressbar, etc.) */
715
+ ariaRole;
716
+ /** Progress value (0-100) for determinate skeletons */
717
+ progress;
718
+ /** Show in dark mode (auto, light, dark) */
719
+ dark = 'auto';
720
+ /** RTL shimmer direction */
721
+ rtl = false;
722
+ /** Fires when skeleton is shown */
723
+ skeletonShow;
724
+ /** Fires when skeleton is hidden */
725
+ skeletonHide;
726
+ /**
727
+ * Layout template to use for automatic skeleton generation.
728
+ * If set to something other than 'none', the `shape` prop is overridden for the template layout.
729
+ */
730
+ template = 'none';
731
+ /**
732
+ * Number of items to replicate (useful for lists, cards, etc.)
733
+ * Default: 1
734
+ */
735
+ count = 1;
736
+ /**
737
+ * Layout direction for replicated items ('row' or 'column')
738
+ */
739
+ direction = 'column';
740
+ /**
741
+ * If true, animations will automatically pause when the component is not in the viewport.
742
+ * Dramatically improves performance and battery life for long lists.
743
+ */
744
+ lazyAnimation = true;
745
+ /**
746
+ * Animation speed
747
+ */
748
+ speed = 'normal';
749
+ /**
750
+ * Color variant or custom color (hex/rgba)
751
+ */
752
+ color = 'neutral';
753
+ radius;
754
+ /**
755
+ * Stagger delay in ms between replicated items
756
+ * Makes the animation feel more organic as it flows down the page.
757
+ */
758
+ stagger = 0;
759
+ /**
760
+ * Layout gap between replicated items (e.g. '12px', '1rem')
761
+ */
762
+ gap = '16px';
763
+ /**
764
+ * Optional explicit highlight/shimmer color for the wave animation.
765
+ * If not provided, it is auto-derived from `color` by lightening it.
766
+ */
767
+ highlightColor;
768
+ /**
769
+ * Elevation / shadow intensity (0-4) to match the UI component it mimics
770
+ */
771
+ elevation = 0;
772
+ /**
773
+ * Shape of the skeleton
774
+ */
775
+ shape = 'rectangle';
776
+ /**
777
+ * If true, the skeleton acts as a mask over its children.
778
+ * Useful for wrapping text or components to skeletonize them seamlessly.
779
+ */
780
+ mask = false;
781
+ /**
782
+ * If true, keeps the children visible at low opacity and blurred behind the skeleton.
783
+ * Only works when `mask` is true.
784
+ */
785
+ ghost = false;
786
+ /**
787
+ * Predefined size of the skeleton (xs, sm, md, lg, xl, 2xl)
788
+ */
789
+ size = 'md';
790
+ /**
791
+ * Width of the skeleton
792
+ */
793
+ width = '100%';
794
+ /**
795
+ * Height of the skeleton
796
+ */
797
+ height = '20px';
798
+ /**
799
+ * Border radius for rounded shapes
800
+ */
801
+ borderRadius = '4px';
802
+ /**
803
+ * Whether to show animation
804
+ */
805
+ animated = true;
806
+ /**
807
+ * Animation type: 'pulse' or 'wave'
808
+ */
809
+ animationType = 'neon-sweep';
810
+ /**
811
+ * Custom class for additional styling
812
+ */
813
+ customClass = '';
814
+ /**
815
+ * Delay in milliseconds before showing the skeleton.
816
+ * Prevents "flicker" for high-speed connections.
817
+ */
818
+ delay = 0;
819
+ /**
820
+ * Angle of the wave animation (e.g. '45deg', '90deg').
821
+ * Default: '90deg' (horizontal)
822
+ */
823
+ waveAngle = '90deg';
824
+ /**
825
+ * Duration of the wave animation cycle (e.g. '1.5s', '3s').
826
+ * Default: '1.5s'
827
+ */
828
+ waveSpeed = '1.5s';
829
+ /**
830
+ * Number of rows (lines) to render when shape is 'text'
831
+ */
832
+ rows = 1;
833
+ /**
834
+ * Width of the last row when multi-line text is used (e.g. '60%')
835
+ */
836
+ lastRowWidth = '80%';
837
+ isActuallyVisible = false;
838
+ isInView = true;
839
+ delayTimer;
840
+ observer;
841
+ componentDidLoad() {
842
+ if (this.lazyAnimation) {
843
+ this.setupObserver();
844
+ }
845
+ }
846
+ setupObserver() {
847
+ if (typeof globalThis.IntersectionObserver === 'undefined') {
848
+ this.isInView = true;
849
+ return;
850
+ }
851
+ this.observer = new IntersectionObserver((entries) => {
852
+ entries.forEach(entry => {
853
+ this.isInView = entry.isIntersecting;
854
+ });
855
+ }, { threshold: 0.1 });
856
+ if (this.el) {
857
+ this.observer.observe(this.el);
858
+ }
859
+ }
860
+ handleDelayChange() {
861
+ this.handleVisibility();
862
+ }
863
+ componentWillLoad() {
864
+ this.handleVisibility();
865
+ }
866
+ get el() { return getElement(this); }
867
+ handleVisibility() {
868
+ if (this.delay <= 0) {
869
+ if (!this.isActuallyVisible)
870
+ this.skeletonShow?.emit();
871
+ this.isActuallyVisible = true;
872
+ return;
873
+ }
874
+ if (this.delayTimer)
875
+ clearTimeout(this.delayTimer);
876
+ if (this.isActuallyVisible)
877
+ this.skeletonHide?.emit();
878
+ this.isActuallyVisible = false;
879
+ this.delayTimer = setTimeout(() => {
880
+ this.isActuallyVisible = true;
881
+ this.skeletonShow?.emit();
882
+ }, this.delay);
883
+ }
884
+ disconnectedCallback() {
885
+ if (this.delayTimer)
886
+ clearTimeout(this.delayTimer);
887
+ if (this.observer)
888
+ this.observer.disconnect();
889
+ }
890
+ getSizeDimensions() {
891
+ const sizeMap = {
892
+ '3xs': { width: '12px', height: '12px' },
893
+ '2xs': { width: '16px', height: '16px' },
894
+ 'xs': { width: '20px', height: '20px' },
895
+ 'sm': { width: '24px', height: '24px' },
896
+ 'md': { width: '32px', height: '32px' },
897
+ 'lg': { width: '48px', height: '48px' },
898
+ 'xl': { width: '64px', height: '64px' },
899
+ '2xl': { width: '80px', height: '80px' },
900
+ '3xl': { width: '120px', height: '120px' },
901
+ '4xl': { width: '160px', height: '160px' },
902
+ };
903
+ return sizeMap[this.size] || sizeMap['md'];
904
+ }
905
+ getSkeletonStyles() {
906
+ // Use size dimensions as defaults if width/height are not explicitly set
907
+ const sizeDims = this.getSizeDimensions();
908
+ const hasExplicitWidth = this.width !== '100%';
909
+ const hasExplicitHeight = this.height !== '20px';
910
+ const baseStyles = {
911
+ width: hasExplicitWidth ? this.width : sizeDims.width,
912
+ height: hasExplicitHeight ? this.height : sizeDims.height,
913
+ };
914
+ switch (this.shape) {
915
+ case 'circle':
916
+ baseStyles.borderRadius = '50%';
917
+ // Ensure width and height are equal for circles
918
+ const circleSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
919
+ baseStyles.width = `${circleSize}px`;
920
+ baseStyles.height = `${circleSize}px`;
921
+ break;
922
+ case 'square':
923
+ // Ensure width and height are equal for squares
924
+ const squareSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
925
+ baseStyles.width = `${squareSize}px`;
926
+ baseStyles.height = `${squareSize}px`;
927
+ baseStyles.borderRadius = '0';
928
+ break;
929
+ case 'oval':
930
+ baseStyles.borderRadius = '50%';
931
+ // Oval allows different width and height (ellipse)
932
+ break;
933
+ case 'rounded-square':
934
+ // Ensure width and height are equal for rounded squares
935
+ const roundedSquareSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
936
+ baseStyles.width = `${roundedSquareSize}px`;
937
+ baseStyles.height = `${roundedSquareSize}px`;
938
+ baseStyles.borderRadius = this.borderRadius;
939
+ break;
940
+ case 'rounded-rectangle':
941
+ baseStyles.borderRadius = this.borderRadius;
942
+ // Rounded rectangle allows different width and height
943
+ break;
944
+ case 'rounded':
945
+ baseStyles.borderRadius = this.borderRadius;
946
+ break;
947
+ case 'text':
948
+ baseStyles.borderRadius = '4px';
949
+ // Text shapes use smer heights based on size
950
+ const textSizeMap = {
951
+ '3xs': '10px',
952
+ '2xs': '12px',
953
+ 'xs': '14px',
954
+ 'sm': '16px',
955
+ 'md': '18px',
956
+ 'lg': '24px',
957
+ 'xl': '32px',
958
+ '2xl': '40px',
959
+ '3xl': '48px',
960
+ '4xl': '64px',
961
+ };
962
+ if (!hasExplicitHeight) {
963
+ baseStyles.height = textSizeMap[this.size] || '18px';
964
+ }
965
+ break;
966
+ case 'avatar':
967
+ baseStyles.borderRadius = '50%';
968
+ const avatarSize = this.getSizeDimensions();
969
+ baseStyles.width = this.width !== '100%' ? this.width : avatarSize.width;
970
+ baseStyles.height = this.height !== '20px' ? this.height : avatarSize.height;
971
+ break;
972
+ case 'button':
973
+ baseStyles.borderRadius = '6px';
974
+ const buttonHeightMap = {
975
+ 'xs': '24px',
976
+ 'sm': '28px',
977
+ 'md': '32px',
978
+ 'lg': '36px',
979
+ 'xl': '40px',
980
+ '2xl': '44px',
981
+ };
982
+ baseStyles.height = this.height !== '20px' ? this.height : (buttonHeightMap[this.size] || '32px');
983
+ break;
984
+ case 'pill':
985
+ baseStyles.borderRadius = '20px';
986
+ const pillHeightMap = {
987
+ 'xs': '20px',
988
+ 'sm': '24px',
989
+ 'md': '28px',
990
+ 'lg': '32px',
991
+ };
992
+ baseStyles.height = this.height !== '20px' ? this.height : (pillHeightMap[this.size] || '28px');
993
+ baseStyles.width = this.width !== '100%' ? this.width : '60px';
994
+ break;
995
+ case 'card':
996
+ baseStyles.borderRadius = '8px';
997
+ const cardHeightMap = {
998
+ 'xs': '80px',
999
+ 'sm': '100px',
1000
+ 'md': '120px',
1001
+ 'lg': '160px',
1002
+ 'xl': '200px',
1003
+ '2xl': '240px',
1004
+ };
1005
+ baseStyles.minHeight = this.height !== '20px' ? this.height : (cardHeightMap[this.size] || '120px');
1006
+ break;
1007
+ case 'list-item':
1008
+ baseStyles.borderRadius = '4px';
1009
+ const listItemHeightMap = {
1010
+ 'xs': '32px',
1011
+ 'sm': '36px',
1012
+ 'md': '40px',
1013
+ 'lg': '48px',
1014
+ 'xl': '56px',
1015
+ '2xl': '64px',
1016
+ };
1017
+ baseStyles.height = this.height !== '20px' ? this.height : (listItemHeightMap[this.size] || '40px');
1018
+ break;
1019
+ case 'image':
1020
+ baseStyles.borderRadius = '8px';
1021
+ const imageHeightMap = {
1022
+ 'xs': '100px',
1023
+ 'sm': '150px',
1024
+ 'md': '200px',
1025
+ 'lg': '250px',
1026
+ 'xl': '300px',
1027
+ '2xl': '400px',
1028
+ };
1029
+ baseStyles.height = this.height !== '20px' ? this.height : (imageHeightMap[this.size] || '200px');
1030
+ baseStyles.display = 'flex';
1031
+ baseStyles.alignItems = 'center';
1032
+ baseStyles.justifyContent = 'center';
1033
+ break;
1034
+ case 'none':
1035
+ baseStyles.background = 'transparent';
1036
+ baseStyles.width = 'auto';
1037
+ baseStyles.height = 'auto';
1038
+ break;
1039
+ default: // rectangle
1040
+ baseStyles.borderRadius = '0';
1041
+ break;
1042
+ }
1043
+ return baseStyles;
1044
+ }
1045
+ /**
1046
+ * Resolves the actual color value based on variant or custom string
1047
+ */
1048
+ // private getBaseColor(): string {
1049
+ // const colorMap: Record<string, string> = {
1050
+ // primary: '#3DCD58',
1051
+ // secondary: '#64748b',
1052
+ // success: '#22c55e',
1053
+ // danger: '#ef4444',
1054
+ // warning: '#f59e0b',
1055
+ // info: '#3bf673',
1056
+ // neutral: 'var(--skeleton-bg, #e2e8f0)',
1057
+ // };
1058
+ // const resolved = colorMap[this.color] || this.color;
1059
+ // // Handle theme-based defaults if empty or neutral
1060
+ // if (!this.color || this.color === 'neutral') {
1061
+ // return 'var(red, #e2e8f0)';
1062
+ // }
1063
+ // return resolved;
1064
+ // }
1065
+ // /**
1066
+ // * Derives a lighter shimmer color from the base color.
1067
+ // * Works for most hex colors; for others falls back to the theme wave variable.
1068
+ // */
1069
+ // private getHighlightColor(base: string): string {
1070
+ // // If user explicitly provided a highlight, use it
1071
+ // if (this.highlightColor) return this.highlightColor;
1072
+ // // Handle generic theme variables
1073
+ // if (base.includes('--skeleton-bg')) {
1074
+ // return 'var(--skeleton-wave-bg, #f3f4f6)';
1075
+ // }
1076
+ // // Try to parse hex and lighten
1077
+ // const hex = base.trim();
1078
+ // if (/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) {
1079
+ // let full = hex.slice(1);
1080
+ // if (full.length === 3) {
1081
+ // full = full.split('').map(c => c + c).join('');
1082
+ // }
1083
+ // const r = Math.min(255, parseInt(full.substring(0, 2), 16) + 30);
1084
+ // const g = Math.min(255, parseInt(full.substring(2, 4), 16) + 30);
1085
+ // const b = Math.min(255, parseInt(full.substring(4, 6), 16) + 30);
1086
+ // return `rgb(${r}, ${g}, ${b})`;
1087
+ // }
1088
+ // // For other types of strings, fallback to the theme wave variable if available
1089
+ // return 'var(--skeleton-wave-bg, #f3f4f6)';
1090
+ // }
1091
+ render() {
1092
+ if (!this.isActuallyVisible)
1093
+ return null;
1094
+ const countArr = Array.from({ length: Math.max(1, this.count) });
1095
+ // ARIA role logic
1096
+ const ariaRole = this.ariaRole || (typeof this.progress === 'number' ? 'progressbar' : 'status');
1097
+ const ariaProps = {
1098
+ role: ariaRole,
1099
+ 'aria-busy': true,
1100
+ 'aria-label': this.ariaLabel,
1101
+ 'aria-live': this.ariaLive,
1102
+ };
1103
+ if (ariaRole === 'progressbar' && typeof this.progress === 'number') {
1104
+ ariaProps['aria-valuenow'] = this.progress;
1105
+ ariaProps['aria-valuemin'] = 0;
1106
+ ariaProps['aria-valuemax'] = 100;
1107
+ }
1108
+ // Dark mode/RTL
1109
+ const darkThemes = ['dark', 'blue', 'violet', 'green', 'pink'];
1110
+ const docTheme = document.documentElement.getAttribute('data-theme') || '';
1111
+ const isDarkAuto = this.dark === 'auto' && ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ||
1112
+ darkThemes.some(t => document.documentElement.classList.contains('theme-' + t) || document.body.classList.contains('theme-' + t)) ||
1113
+ darkThemes.includes(docTheme) ||
1114
+ !!this.el.closest(darkThemes.map(t => `.theme-${t}, [data-theme="${t}"]`).join(', ')));
1115
+ const darkClass = this.dark === 'dark' || isDarkAuto ? 'skeleton-dark' : '';
1116
+ const rtlClass = this.rtl ? 'skeleton-rtl' : '';
1117
+ return (h("div", { class: `skeleton-replication-container skeleton-direction-${this.direction} ${darkClass} ${rtlClass}`, style: { display: 'flex', flexDirection: this.direction, gap: this.gap }, ...ariaProps }, countArr.map((_, index) => {
1118
+ // ...existing code...
1119
+ const staggerDelay = this.stagger > 0 ? `${index * this.stagger}ms` : '0ms';
1120
+ const isAnimating = this.animated && (!this.lazyAnimation || this.isInView);
1121
+ // ...existing code...
1122
+ const namedColors = ['neutral', 'primary', 'secondary', 'success', 'danger', 'warning', 'info'];
1123
+ const isCustomColor = !namedColors.includes(this.color);
1124
+ const skeletonClass = {
1125
+ 'skeleton': true,
1126
+ 'skeleton-animated': isAnimating,
1127
+ [`skeleton-${this.animationType}`]: isAnimating,
1128
+ [`skeleton-${this.shape}`]: true,
1129
+ [`skeleton-speed-${this.speed}`]: true,
1130
+ [`skeleton-color-${this.color}`]: !isCustomColor && this.color !== 'neutral',
1131
+ 'skeleton-mask': this.mask,
1132
+ 'skeleton-ghost': this.ghost && this.mask,
1133
+ 'skeleton-elevated': this.elevation > 0,
1134
+ [this.customClass]: !!this.customClass,
1135
+ };
1136
+ const customStyles = {
1137
+ '--skeleton-stagger-delay': staggerDelay,
1138
+ '--skeleton-wave-angle': this.waveAngle,
1139
+ '--skeleton-wave-speed': this.waveSpeed,
1140
+ '--skeleton-gap': this.gap,
1141
+ '--skeleton-elevation': this.elevation > 0 ? `var(--ui-shadow-${this.elevation}, 0 2px 8px rgba(0,0,0,0.05))` : 'none',
1142
+ };
1143
+ // Custom hex/rgba colors: set as CSS vars so animations still work via gradients
1144
+ if (isCustomColor) {
1145
+ customStyles['--skeleton-bg'] = this.color;
1146
+ customStyles['--skeleton-wave-bg'] = this.highlightColor || this.color;
1147
+ }
1148
+ if (this.radius) {
1149
+ customStyles['--skeleton-border-radius'] = this.radius;
1150
+ }
1151
+ const isCircular = ['circle', 'avatar', 'oval'].includes(this.shape);
1152
+ const styles = {
1153
+ ...this.getSkeletonStyles(),
1154
+ ...customStyles,
1155
+ animationDelay: staggerDelay,
1156
+ ...(isCircular ? {} : (this.radius || this.borderRadius !== '4px' ? { borderRadius: this.radius || this.borderRadius } : {}))
1157
+ };
1158
+ return (h("div", { class: skeletonClass, style: styles, key: index }, this.renderContent(), typeof this.progress === 'number' && (h("div", { class: "skeleton-progress-bar", style: { width: this.progress + '%', height: '4px', background: 'var(--skeleton-wave-bg, #fff)', borderRadius: '2px', marginTop: '4px' } }))));
1159
+ }), h("slot", { name: "custom" })));
1160
+ }
1161
+ renderContent() {
1162
+ const isText = this.shape === 'text';
1163
+ const hasRows = isText && this.rows > 1;
1164
+ return [
1165
+ (this.mask || this.shape === 'none') ? h("slot", null) : null,
1166
+ hasRows && !this.mask ? (h("div", { class: "skeleton-text-rows", style: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%' } }, Array.from({ length: this.rows }).map((_, i) => {
1167
+ const isLast = i === this.rows - 1;
1168
+ const rowWidth = isLast ? this.lastRowWidth : (i > 0 && i % 2 === 0 ? '92%' : '100%');
1169
+ return (h("div", { class: "skeleton-text-row", style: {
1170
+ height: '1em',
1171
+ width: rowWidth,
1172
+ backgroundColor: 'inherit',
1173
+ borderRadius: '4px',
1174
+ animation: 'inherit'
1175
+ } }));
1176
+ }))) : null,
1177
+ this.shape === 'card' && !this.mask ? (h("div", { class: "skeleton-card-content" }, h("div", { class: "skeleton-card-header" }, h("div", { class: "skeleton-circle", style: { width: '32px', height: '32px', borderRadius: '50%' } }), h("div", { class: "skeleton-card-title" }, h("div", { class: "skeleton-text", style: { width: '60%', height: '16px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '40%', height: '12px', borderRadius: '4px' } }))), h("div", { class: "skeleton-card-body" }, h("div", { class: "skeleton-text", style: { width: '100%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '80%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '90%', height: '14px', borderRadius: '4px' } })))) : null,
1178
+ this.shape === 'list-item' && !this.mask ? (h("div", { class: "skeleton-list-content" }, h("div", { class: "skeleton-circle", style: { width: '32px', height: '32px', borderRadius: '50%' } }), h("div", { class: "skeleton-list-text" }, h("div", { class: "skeleton-text", style: { width: '70%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '50%', height: '12px', borderRadius: '4px' } })))) : null,
1179
+ this.shape === 'image' && !this.mask ? (h("div", { class: "skeleton-image-icon" }, h("ui-icon", { name: "image", library: "lucide", size: "25%", style: { opacity: '0.2' } }))) : null,
1180
+ this.template === 'profile' ? (h("div", { class: "skeleton-profile-template" }, h("ui-skeleton-loader", { shape: "circle", size: this.size, color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "skeleton-profile-lines" }, h("ui-skeleton-loader", { shape: "text", size: this.size, width: "120px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "80px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated })))) : null,
1181
+ this.template === 'media-object' ? (h("div", { class: "skeleton-media-object-template" }, h("ui-skeleton-loader", { shape: "rounded-rectangle", width: "48px", height: "48px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "skeleton-media-lines", style: { flex: '1' } }, h("ui-skeleton-loader", { shape: "text", size: "md", width: "70%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "40%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '4px' } }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "90%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '8px' } })))) : null,
1182
+ this.template === 'feed-item' ? (h("div", { class: "skeleton-feed-template" }, h("div", { class: "feed-header", style: { display: 'flex', gap: '12px', marginBottom: '16px' } }, h("ui-skeleton-loader", { shape: "circle", size: "md", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { style: { flex: '1' } }, h("ui-skeleton-loader", { shape: "text", size: "xs", width: "100px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '4px' } }))), h("ui-skeleton-loader", { shape: "rectangle", width: "100%", height: "200px", "border-radius": "8px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "feed-footer", style: { marginTop: '12px', display: 'flex', gap: '8px' } }, h("ui-skeleton-loader", { shape: "button", size: "sm", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "button", size: "sm", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated })))) : null,
1183
+ this.template === 'table-row' ? (h("div", { class: "skeleton-table-row-template", style: { display: 'flex', gap: '20px', alignItems: 'center', width: '100%', padding: '12px 0' } }, h("ui-skeleton-loader", { shape: "rectangle", width: "20px", height: "20px", "border-radius": "4px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "15%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "35%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "20%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "pill", width: "80px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginLeft: 'auto' } }))) : null,
1184
+ ];
1185
+ }
1186
+ static get watchers() { return {
1187
+ "delay": [{
1188
+ "handleDelayChange": 0
1189
+ }]
1190
+ }; }
1191
+ };
1192
+ SkeletonLoader.style = skeletonLoaderCss();
1193
+
1194
+ const stackCss = () => `.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{display:inline-block}:host(.stack-horizontal) .stack-container{flex-direction:row}:host(.stack-vertical) .stack-container{flex-direction:column}.stack-container{display:flex;gap:var(--stack-spacing, 8px)}:host(.stack-wrap-wrap) .stack-container{flex-wrap:wrap}:host(.stack-wrap-wrap-reverse) .stack-container{flex-wrap:wrap-reverse}:host(.stack-show-dividers) .stack-container{gap:0}:host(.stack-show-dividers) ::slotted(*:not(:last-child)){position:relative;margin-right:var(--stack-spacing, 8px);display:flex;align-items:center}:host(.stack-show-dividers) ::slotted(*:not(:last-child))::after{content:"";position:absolute;right:calc(var(--stack-spacing, 8px) / -2);background:var(--bg-primary, #e5e7eb)}:host(.stack-horizontal.stack-show-dividers) ::slotted(*:not(:last-child))::after{width:1px;height:60%;top:20%}:host(.stack-vertical.stack-show-dividers) ::slotted(*:not(:last-child))::after{height:1px;width:60%;left:20%;bottom:calc(var(--stack-spacing, 8px) / -2)}:host(.divider-dashed) ::slotted(*:not(:last-child))::after{border-right:1px dashed var(--border-default, #e5e7eb);background:none}:host(.divider-dotted) ::slotted(*:not(:last-child))::after{border-right:1px dotted var(--border-default, #e5e7eb);background:none}:host(.stack-overlap) .stack-container{padding-right:20px}:host(.stack-overlap) ::slotted(*){margin-right:var(--stack-overlap, -12px) !important;transition:transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s, filter 0.3s ease;position:relative;z-index:1;border:2px solid var(--bg-primary, #ffffff);box-sizing:border-box;filter:drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));cursor:pointer}:host(.stack-overlap) ::slotted(*:hover){transform:translateY(-8px) scale(1.1) rotate(1deg);z-index:100 !important;filter:drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2))}:host(.stack-overlap) ::slotted(*:last-child){margin-right:0 !important}.stack-roster-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn 0.2s ease-out}.stack-roster-content{background:var(--bg-primary, #ffffff);width:90%;max-width:400px;max-height:80vh;border-radius:16px;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);display:flex;flex-direction:column;overflow:hidden;animation:slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}.roster-header{padding:16px 20px;border-bottom:1px solid var(--border-subtle, #f1f5f9);display:flex;justify-content:space-between;align-items:center}.roster-header h4{margin:0;font-size:16px;font-weight:600;color:var(--text-primary, #1e293b)}.close-btn{background:var(--bg-secondary, #f1f5f9);border:none;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted, #64748b);font-size:18px;transition:all 0.2s}.close-btn:hover{background:var(--bg-primary, #e2e8f0);color:var(--text-primary, #0f172a)}.roster-list{padding:12px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.roster-item{padding:10px;border-radius:10px;background:var(--bg-primary, #f8fafc);border:1px solid var(--border-subtle, #f1f5f9);display:flex;align-items:center;transition:background 0.2s}.roster-item:hover{background:var(--bg-secondary, #f1f5f9)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.stack-overflow-indicator{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;border-radius:50%;background:var(--bg-secondary, #f3f4f6);border:2px solid var(--bg-primary, #ffffff);color:var(--text-secondary, #4b5563);font-size:12px;font-weight:600;z-index:10;cursor:pointer;transition:transform 0.2s}.stack-overflow-indicator:hover{transform:scale(1.1);background:var(--bg-primary, #e5e7eb)}@media (prefers-color-scheme: dark){.stack-roster-content{background:var(--bg-primary, #1e293b)}.roster-header h4{color:var(--text-standard, #ffffff)}.roster-item{background:var(--color-primary, #334155);border-color:var(--color-primary, #475569)}.roster-item:hover{background:var(--color-primary, #475569)}.stack-overflow-indicator{background:var(--color-primary, #374151);border-color:var(--border-strong, #1f2937);color:var(--text-standard, #f3f4f6)}.stack-overflow-indicator:hover{background:var(--color-primary, #4b5563)}}`;
1195
+
1196
+ const Stack = class {
1197
+ constructor(hostRef) {
1198
+ registerInstance(this, hostRef);
1199
+ }
1200
+ get el() { return getElement(this); }
1201
+ /** Stacking direction */
1202
+ direction = 'horizontal';
1203
+ /** Flex wrap behavior */
1204
+ wrap = 'nowrap';
1205
+ /** Spacing between items (negative for overlap) */
1206
+ spacing = '8px';
1207
+ /** Align items */
1208
+ align = 'center';
1209
+ /** Justify content */
1210
+ justify = 'start';
1211
+ /** Maximum items to show before '+N' */
1212
+ max = 0;
1213
+ /** Whether to overlap items */
1214
+ overlap = false;
1215
+ /** Whether to show dividers between items */
1216
+ showDividers = false;
1217
+ /** Type of divider to show */
1218
+ dividerType = 'solid';
1219
+ childrenCount = 0;
1220
+ isRosterOpen = false;
1221
+ mutationObserver;
1222
+ componentWillLoad() {
1223
+ this.updateChildrenCount();
1224
+ }
1225
+ componentDidLoad() {
1226
+ this.mutationObserver = new MutationObserver(() => {
1227
+ this.updateChildrenCount();
1228
+ });
1229
+ this.mutationObserver.observe(this.el, { childList: true });
1230
+ }
1231
+ disconnectedCallback() {
1232
+ if (this.mutationObserver) {
1233
+ this.mutationObserver.disconnect();
1234
+ }
1235
+ }
1236
+ toggleRoster = () => {
1237
+ this.isRosterOpen = !this.isRosterOpen;
1238
+ };
1239
+ closeRoster = () => {
1240
+ this.isRosterOpen = false;
1241
+ };
1242
+ updateChildrenVisibility(actualMax) {
1243
+ Array.from(this.el.children).forEach((child, index) => {
1244
+ if (index < actualMax) {
1245
+ child.style.display = '';
1246
+ }
1247
+ else {
1248
+ child.style.display = 'none';
1249
+ }
1250
+ });
1251
+ }
1252
+ updateChildrenCount() {
1253
+ this.childrenCount = this.el.children.length;
1254
+ }
1255
+ renderRoster(allChildren, total) {
1256
+ return (h("div", { class: "stack-roster-backdrop", onClick: this.closeRoster }, h("div", { class: "stack-roster-content", onClick: e => e.stopPropagation() }, h("div", { class: "roster-header" }, h("div", { class: "roster-titles" }, h("h4", { class: "roster-main-title" }, "Hidden Items"), h("span", { class: "roster-sub-title" }, total, " items total")), h("ui-button", { variant: "ghost", onClick: this.closeRoster, ariaLabel: "Close roster", icon: "times", iconLibrary: "fontawesome", iconOnly: true, size: "sm" })), h("div", { class: "roster-list" }, allChildren.map((child, idx) => (h("div", { key: idx, class: "roster-item" }, h("div", { class: "roster-item-preview", innerHTML: sanitizeHTML(child.outerHTML) }), h("span", { class: "roster-item-label" }, "Item ", idx + 1))))))));
1257
+ }
1258
+ render() {
1259
+ const isOverlapping = this.overlap || (this.spacing.startsWith('-'));
1260
+ const actualMax = this.max > 0 ? this.max : this.childrenCount;
1261
+ const overflowCount = this.childrenCount - actualMax;
1262
+ const allChildren = Array.from(this.el.children);
1263
+ // Update visibility after render to avoid layout thrashing
1264
+ requestAnimationFrame(() => this.updateChildrenVisibility(actualMax));
1265
+ return (h(Host, { key: 'b4bd86fd867061218a62b94f247a30f1c4710919', class: {
1266
+ 'ui-stack': true,
1267
+ [`stack-${this.direction}`]: true,
1268
+ [`stack-wrap-${this.wrap}`]: true,
1269
+ 'stack-overlap': isOverlapping,
1270
+ 'stack-show-dividers': this.showDividers && !isOverlapping,
1271
+ [`divider-${this.dividerType}`]: this.showDividers
1272
+ }, style: {
1273
+ '--stack-spacing': isOverlapping ? '0' : this.spacing,
1274
+ '--stack-overlap': isOverlapping ? (this.spacing.startsWith('-') ? this.spacing : '-12px') : '0',
1275
+ 'align-items': this.align,
1276
+ 'justify-content': this.justify,
1277
+ 'flex-wrap': this.wrap
1278
+ } }, h("div", { key: '3364fa9b69d8aa4c9c92add70a6bfc969d14ab96', class: "stack-container" }, h("slot", { key: '14b6de27b7e2c72ed9c677fff51ea721dc6eb2d1' }), overflowCount > 0 && (h("div", { key: 'bab9856ee9b5caa06b7765619efad7cf2b175e2e', class: "stack-overflow-indicator", onClick: (e) => { e.stopPropagation(); this.toggleRoster(); }, onKeyDown: (e) => {
1279
+ if (e.key === 'Enter')
1280
+ this.toggleRoster();
1281
+ }, tabindex: "0", role: "button", title: `View ${overflowCount} more items` }, "+", overflowCount))), this.isRosterOpen && this.renderRoster(allChildren, this.childrenCount)));
1282
+ }
1283
+ };
1284
+ Stack.style = stackCss();
1285
+
1286
+ const tagGroupCss = () => `.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{display:block}.tag-group-container{display:flex;flex-direction:column;gap:12px;padding:8px 12px;border:1.5px solid var(--border-subtle, #e2e8f0);border-radius:10px;background:var(--bg-primary, #f8fafc);transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1)}.tag-group-container:focus-within{background:var(--bg-primary, #ffffff);border-color:var(--color-primary, #10b981);box-shadow:0 0 0 4px rgba(var(--color-primary-rgb, 59, 130, 246), 0.1)}.tag-group-container.is-readonly{background:transparent;border-color:transparent;padding:0;pointer-events:none}.tag-group-inline-input{flex:1;min-width:60px;border:none;background:transparent;font-size:13px;padding:4px 0;outline:none;color:var(--text-primary, #1e293b)}.tag-group-inline-input::placeholder{color:var(--color-primary, #94a3b8)}ui-stack[overlap] ui-tag,ui-stack[overlap=true] ui-tag{--ui-tag-border:2px solid var(--bg-primary, #ffffff) !important;transition:transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}ui-stack[overlap] ui-tag:hover,ui-stack[overlap=true] ui-tag:hover{transform:translateY(-4px) scale(1.1);z-index:100 !important}ui-tag[highlighted=true]{--ui-tag-bg:var(--color-primary, #10b981) !important;--ui-tag-color:var(--text-standard, #ffffff) !important;--ui-tag-border:1px solid var(--color-primary-hover, #2563eb) !important;transform:scale(1.05);box-shadow:0 4px 6px -1px rgba(var(--color-primary-rgb, 59, 130, 246), 0.2)}.tag-group-overflow-toggle{margin-top:4px;align-self:flex-start;background:var(--bg-secondary, #f1f5f9);border:1px solid var(--border-subtle, #e2e8f0);color:var(--text-muted, #64748b);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;cursor:pointer;padding:4px 12px;border-radius:999px;transition:all 0.2s ease}.tag-group-overflow-toggle:hover{background:var(--bg-primary, #ffffff);color:var(--color-primary, #10b981);border-color:var(--color-primary, #10b981);transform:translateY(-1px)}.tag-group-overflow-toggle:active{transform:translateY(0)}.tag-group-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:8px;color:var(--color-primary, #94a3b8);background:transparent}.tag-group-empty ui-icon{opacity:0.4}.tag-group-empty span{font-size:13px;font-weight:500}.tag-group-empty.no-results{padding:12px;border-radius:8px;background:rgba(241, 245, 249, 0.5);color:var(--text-muted, #64748b);border:1px dashed var(--border-subtle, #e2e8f0)}`;
1287
+
1288
+ const TagGroup = class {
1289
+ constructor(hostRef) {
1290
+ registerInstance(this, hostRef);
1291
+ this.tagAdd = createEvent(this, "tagAdd");
1292
+ this.tagGroupChange = createEvent(this, "tagGroupChange");
1293
+ }
1294
+ get el() { return getElement(this); }
1295
+ /**
1296
+ * Maximum number of tags to display before hiding and showing (+N)
1297
+ */
1298
+ max = 0;
1299
+ /**
1300
+ * Spacing between tags
1301
+ */
1302
+ spacing = '8px';
1303
+ /**
1304
+ * Whether to overlap tags (avatar style)
1305
+ */
1306
+ overlap = false;
1307
+ /**
1308
+ * Selected values (for checkable tags)
1309
+ */
1310
+ value = [];
1311
+ /**
1312
+ * Selection mode: 'none', 'single', or 'multiple'
1313
+ */
1314
+ selectionMode = 'none';
1315
+ /**
1316
+ * Bulk size for all tags in group
1317
+ */
1318
+ size;
1319
+ /**
1320
+ * Bulk variant for all tags in group
1321
+ */
1322
+ variant;
1323
+ /**
1324
+ * Bulk color for all tags in group
1325
+ */
1326
+ color;
1327
+ /**
1328
+ * Whether all tags in group should be rounded
1329
+ */
1330
+ rounded = false;
1331
+ /**
1332
+ * Whether all tags in group should be removable
1333
+ */
1334
+ removable = false;
1335
+ /**
1336
+ * Whether users can add new tags (Premium)
1337
+ */
1338
+ creatable = false;
1339
+ /**
1340
+ * Whether tags are filterable via search (Premium)
1341
+ */
1342
+ searchable = false;
1343
+ /**
1344
+ * Whether overflow tags can be toggled to show (Premium)
1345
+ */
1346
+ collapsible = false;
1347
+ /**
1348
+ * Case sensitivity for search and duplicates
1349
+ */
1350
+ caseSensitive = false;
1351
+ /**
1352
+ * Delimiters to trigger tag creation
1353
+ */
1354
+ delimiters = [',', ' '];
1355
+ /**
1356
+ * Whether all tags in group should show as skeletons
1357
+ */
1358
+ skeleton = false;
1359
+ /**
1360
+ * Bulk shape for all tags in group
1361
+ */
1362
+ shape;
1363
+ /**
1364
+ * Bulk animation for all tags in group
1365
+ */
1366
+ animation;
1367
+ /**
1368
+ * Whether the entire group is read-only (disables all selection/removal)
1369
+ */
1370
+ readOnly = false;
1371
+ /**
1372
+ * Placeholder text when group is empty (creatable mode)
1373
+ */
1374
+ placeholder = 'Add tag...';
1375
+ /**
1376
+ * Event emitted when a new tag is added
1377
+ */
1378
+ tagAdd;
1379
+ searchQuery = '';
1380
+ isExpanded = false;
1381
+ isLastTagHighlighted = false;
1382
+ tagGroupChange;
1383
+ handleKeyDown(ev) {
1384
+ if (this.readOnly)
1385
+ return;
1386
+ const tags = Array.from(this.el.querySelectorAll('ui-tag'));
1387
+ const activeElement = this.el.shadowRoot?.activeElement || document.activeElement;
1388
+ // Find if any tag is focused or contains focus
1389
+ const focusedTagIndex = tags.findIndex(t => t === activeElement || t.contains(activeElement));
1390
+ const isInputFocused = activeElement === this.el.shadowRoot?.querySelector('.tag-group-inline-input');
1391
+ if (ev.key === 'ArrowLeft') {
1392
+ if (isInputFocused && ev.target.selectionStart === 0) {
1393
+ // Focus last tag
1394
+ if (tags.length > 0) {
1395
+ tags[tags.length - 1].focus();
1396
+ ev.preventDefault();
1397
+ }
1398
+ }
1399
+ else if (focusedTagIndex > 0) {
1400
+ tags[focusedTagIndex - 1].focus();
1401
+ ev.preventDefault();
1402
+ }
1403
+ }
1404
+ else if (ev.key === 'ArrowRight') {
1405
+ if (focusedTagIndex !== -1) {
1406
+ if (focusedTagIndex === tags.length - 1) {
1407
+ this.el.shadowRoot?.querySelector('.tag-group-inline-input')?.focus();
1408
+ }
1409
+ else {
1410
+ tags[focusedTagIndex + 1].focus();
1411
+ }
1412
+ ev.preventDefault();
1413
+ }
1414
+ }
1415
+ else if ((ev.key === 'Backspace' || ev.key === 'Delete') && focusedTagIndex !== -1) {
1416
+ const tagToRemove = tags[focusedTagIndex];
1417
+ const nextToFocus = focusedTagIndex < tags.length - 1 ? tags[focusedTagIndex + 1] : this.el.shadowRoot?.querySelector('.tag-group-inline-input');
1418
+ if (this.removable) {
1419
+ const tagValue = tagToRemove.value || tagToRemove.label;
1420
+ this.removeTagByValue(tagValue);
1421
+ if (nextToFocus)
1422
+ nextToFocus.focus();
1423
+ ev.preventDefault();
1424
+ }
1425
+ }
1426
+ }
1427
+ handleGroupChange() {
1428
+ this.updateChildren();
1429
+ }
1430
+ handleTagRemove(ev) {
1431
+ if (this.readOnly)
1432
+ return;
1433
+ // Find the tag that was removed
1434
+ const tag = ev.target;
1435
+ if (!tag)
1436
+ return;
1437
+ const tagValue = tag.value || tag.label;
1438
+ // If it was selected, remove it from the value array
1439
+ if (Array.isArray(this.value)) {
1440
+ const index = this.value.indexOf(tagValue);
1441
+ if (index > -1) {
1442
+ const newValue = [...this.value];
1443
+ newValue.splice(index, 1);
1444
+ this.value = newValue;
1445
+ this.tagGroupChange.emit(this.value);
1446
+ }
1447
+ }
1448
+ else if (this.value === tagValue) {
1449
+ this.value = '';
1450
+ this.tagGroupChange.emit(this.value);
1451
+ }
1452
+ // Explicitly remove from DOM if it's a child of this component
1453
+ if (tag.parentNode === this.el) {
1454
+ this.el.removeChild(tag);
1455
+ }
1456
+ // Delay updating children slightly to allow for removal animation
1457
+ setTimeout(() => this.updateChildren(), 50);
1458
+ }
1459
+ handleTagCheck(ev) {
1460
+ if (this.readOnly || this.selectionMode === 'none')
1461
+ return;
1462
+ const tag = ev.target;
1463
+ const tagValue = tag.value || tag.label;
1464
+ if (this.selectionMode === 'single') {
1465
+ this.value = ev.detail ? tagValue : '';
1466
+ this.syncSelection();
1467
+ }
1468
+ else {
1469
+ const current = Array.isArray(this.value) ? [...this.value] : (this.value ? [this.value] : []);
1470
+ if (ev.detail) {
1471
+ if (!current.includes(tagValue))
1472
+ current.push(tagValue);
1473
+ }
1474
+ else {
1475
+ const index = current.indexOf(tagValue);
1476
+ if (index > -1)
1477
+ current.splice(index, 1);
1478
+ }
1479
+ this.value = current;
1480
+ this.syncSelection();
1481
+ }
1482
+ this.tagGroupChange.emit(this.value);
1483
+ }
1484
+ componentDidLoad() {
1485
+ this.updateChildren();
1486
+ // Listen for slot changes
1487
+ const slot = this.el.shadowRoot?.querySelector('slot');
1488
+ if (slot) {
1489
+ slot.addEventListener('slotchange', () => this.updateChildren());
1490
+ }
1491
+ }
1492
+ updateChildren() {
1493
+ const tags = Array.from(this.el.querySelectorAll('ui-tag'));
1494
+ const query = this.searchQuery.toLowerCase();
1495
+ tags.forEach((tag, index) => {
1496
+ // Apply bulk styles
1497
+ if (this.size)
1498
+ tag.size = this.size;
1499
+ if (this.variant)
1500
+ tag.variant = this.variant;
1501
+ if (this.color)
1502
+ tag.color = this.color;
1503
+ // Default to circle if overlapping and no shape set
1504
+ if (this.overlap && !this.shape && !tag.shape) {
1505
+ tag.shape = 'circle';
1506
+ }
1507
+ else if (this.shape) {
1508
+ tag.shape = this.shape;
1509
+ }
1510
+ else if (this.rounded) {
1511
+ tag.shape = 'pill';
1512
+ }
1513
+ if (this.skeleton)
1514
+ tag.skeleton = this.skeleton;
1515
+ if (this.animation)
1516
+ tag.animation = this.animation;
1517
+ tag.removable = this.readOnly ? false : this.removable;
1518
+ tag.disabled = this.readOnly;
1519
+ if (this.selectionMode !== 'none')
1520
+ tag.checkable = true;
1521
+ // Handle filtering
1522
+ const label = tag.label || '';
1523
+ const matches = label.toLowerCase().includes(query);
1524
+ // Handle max/collapsible
1525
+ const isOverMax = this.max > 0 && index >= this.max;
1526
+ const isHighlighted = this.isLastTagHighlighted && index === (tags.length - 1);
1527
+ if (isHighlighted) {
1528
+ tag.setAttribute('highlighted', 'true');
1529
+ }
1530
+ else {
1531
+ tag.removeAttribute('highlighted');
1532
+ }
1533
+ const shouldBeVisible = matches && (!isOverMax || this.isExpanded);
1534
+ tag.style.display = shouldBeVisible ? '' : 'none';
1535
+ });
1536
+ this.syncSelection();
1537
+ }
1538
+ syncSelection() {
1539
+ const tags = Array.from(this.el.querySelectorAll('ui-tag'));
1540
+ const currentSelected = Array.isArray(this.value) ? this.value : [this.value];
1541
+ tags.forEach((tag) => {
1542
+ const tagValue = tag.value || tag.label;
1543
+ tag.checked = currentSelected.includes(tagValue);
1544
+ });
1545
+ }
1546
+ handleSearch = (ev) => {
1547
+ this.searchQuery = ev.detail;
1548
+ this.updateChildren();
1549
+ };
1550
+ addTags(input) {
1551
+ if (!input)
1552
+ return;
1553
+ this.isLastTagHighlighted = false;
1554
+ // Escape delimiters for regex
1555
+ const escapedDelimiters = this.delimiters.map(d => d.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|');
1556
+ const regex = new RegExp(escapedDelimiters || ',', 'g');
1557
+ const labels = input.split(regex).map(s => s.trim()).filter(s => !!s);
1558
+ labels.forEach(label => {
1559
+ // Check for duplicates (pulse logic)
1560
+ const allTags = Array.from(this.el.querySelectorAll('ui-tag'));
1561
+ const existing = allTags.find((t) => this.caseSensitive
1562
+ ? t.label === label
1563
+ : t.label.toLowerCase() === label.toLowerCase());
1564
+ if (existing) {
1565
+ existing.pulse = true;
1566
+ setTimeout(() => existing.pulse = false, 2000);
1567
+ }
1568
+ else {
1569
+ const newTag = document.createElement('ui-tag');
1570
+ newTag.setAttribute('label', label);
1571
+ this.el.appendChild(newTag);
1572
+ this.tagAdd.emit(label);
1573
+ }
1574
+ });
1575
+ this.updateChildren();
1576
+ }
1577
+ removeLastTag() {
1578
+ const tags = Array.from(this.el.querySelectorAll('ui-tag'));
1579
+ if (tags.length > 0) {
1580
+ const last = tags[tags.length - 1];
1581
+ // Emit removal sync
1582
+ const tagValue = last.value || last.label;
1583
+ // Sync internal selection if needed
1584
+ if (Array.isArray(this.value)) {
1585
+ const idx = this.value.indexOf(tagValue);
1586
+ if (idx > -1) {
1587
+ const newValue = [...this.value];
1588
+ newValue.splice(idx, 1);
1589
+ this.value = newValue;
1590
+ this.tagGroupChange.emit(this.value);
1591
+ }
1592
+ }
1593
+ this.el.removeChild(last);
1594
+ this.updateChildren();
1595
+ }
1596
+ }
1597
+ removeTagByValue(tagValue) {
1598
+ if (Array.isArray(this.value)) {
1599
+ const index = this.value.indexOf(tagValue);
1600
+ if (index > -1) {
1601
+ const newValue = [...this.value];
1602
+ newValue.splice(index, 1);
1603
+ this.value = newValue;
1604
+ this.tagGroupChange.emit(this.value);
1605
+ }
1606
+ }
1607
+ else if (this.value === tagValue) {
1608
+ this.value = '';
1609
+ this.tagGroupChange.emit(this.value);
1610
+ }
1611
+ const tags = Array.from(this.el.querySelectorAll('ui-tag'));
1612
+ const tag = tags.find(t => (t.value || t.label) === tagValue);
1613
+ if (tag) {
1614
+ this.el.removeChild(tag);
1615
+ }
1616
+ this.updateChildren();
1617
+ }
1618
+ handleAddTag = (ev) => {
1619
+ const input = ev.detail.target;
1620
+ const val = input.value;
1621
+ const key = ev.detail.key;
1622
+ if (key === 'Enter' || (this.delimiters.includes(key) && val.trim())) {
1623
+ if (this.delimiters.includes(key)) {
1624
+ ev.detail.preventDefault();
1625
+ }
1626
+ this.addTags(val);
1627
+ input.value = '';
1628
+ return;
1629
+ }
1630
+ if (key === 'Backspace' && !val) {
1631
+ if (this.isLastTagHighlighted) {
1632
+ this.removeLastTag();
1633
+ this.isLastTagHighlighted = false;
1634
+ }
1635
+ else {
1636
+ this.isLastTagHighlighted = true;
1637
+ this.updateChildren();
1638
+ }
1639
+ }
1640
+ else if (val || key !== 'Backspace') {
1641
+ this.isLastTagHighlighted = false;
1642
+ this.updateChildren();
1643
+ }
1644
+ if (key === 'Escape') {
1645
+ this.isLastTagHighlighted = false;
1646
+ this.updateChildren();
1647
+ }
1648
+ };
1649
+ // private handlePaste = (ev: ClipboardEvent) => {
1650
+ // ev.preventDefault();
1651
+ // const text = ev.clipboardData.getData('text');
1652
+ // this.addTags(text);
1653
+ // (ev.target as HTMLInputElement).value = '';
1654
+ // }
1655
+ toggleExpand = () => {
1656
+ this.isExpanded = !this.isExpanded;
1657
+ };
1658
+ render() {
1659
+ const allTags = Array.from(this.el.querySelectorAll('ui-tag'));
1660
+ const visibleTags = allTags.filter((t) => t.style.display !== 'none');
1661
+ const canShowExpand = this.max > 0 && allTags.length > this.max;
1662
+ const isEmpty = allTags.length === 0;
1663
+ const noResults = allTags.length > 0 && visibleTags.length === 0;
1664
+ const showInlineInput = (this.searchable || this.creatable) && !this.readOnly;
1665
+ return (h(Host, { key: '6c10d465949f447fa8e70506522ccf0c5bbbb16d' }, h("div", { key: 'f119d30704ba77309e2556f41f179ffa7e3c05f2', class: {
1666
+ 'tag-group-container': true,
1667
+ 'is-readonly': this.readOnly,
1668
+ 'is-empty': isEmpty
1669
+ } }, h("ui-stack", { key: 'afe10b0b6142a688eed69d1a6817c6efcac002cb', spacing: this.spacing, overlap: this.overlap, max: this.isExpanded ? 0 : this.max, wrap: "wrap" }, h("slot", { key: 'a3f61d253532ea24995c8c594b227fe389d1bce0' }), showInlineInput && (h("ui-input", { key: 'd2513ef2ea36f1c74db509f27ffcc51cf2b5b625', type: "text", class: "tag-group-inline-input", placeholder: isEmpty ? this.placeholder : '', value: this.searchQuery, onInputChange: this.handleSearch, onInputKeydown: this.handleAddTag, size: "sm", variant: "borderless", hideBorder: true, fullWidth: true }))), noResults && (h("div", { key: 'bb89ba2759c045e62522ca64fb4ba480717ffc2b', class: "tag-group-empty no-results" }, h("span", { key: '7ff0d17ae03cbb6415092177c6866143b82b6fda' }, "No tags match \"", this.searchQuery, "\""))) || (isEmpty && this.readOnly && (h("div", { key: 'f05bf41a4c408107c88e19c866d28a74563bd134', class: "tag-group-empty" }, h("ui-icon", { key: 'd688dc6f2c9093749469cbab269cd137e62d5889', name: "tag", library: "lucide", size: "1.4em" }), h("span", { key: '9a364908f459d9b8586310e8a6f0388e722637ed' }, "No items assigned")))), this.collapsible && canShowExpand && (h("ui-button", { key: 'ba66f535b3c914bd54ccfbb3f376229e3a061524', variant: "ghost", size: "sm", class: "tag-group-overflow-toggle", onClick: this.toggleExpand, label: this.isExpanded ? 'Show less' : `View all ${allTags.length} items` })))));
1670
+ }
1671
+ static get watchers() { return {
1672
+ "isExpanded": [{
1673
+ "handleGroupChange": 0
1674
+ }],
1675
+ "skeleton": [{
1676
+ "handleGroupChange": 0
1677
+ }],
1678
+ "shape": [{
1679
+ "handleGroupChange": 0
1680
+ }],
1681
+ "color": [{
1682
+ "handleGroupChange": 0
1683
+ }]
1684
+ }; }
1685
+ };
1686
+ TagGroup.style = tagGroupCss();
1687
+
1688
+ export { AvatarGroup as ui_avatar_group, Popover as ui_popover, SkeletonLoader as ui_skeleton, Stack as ui_stack, TagGroup as ui_tag_group };