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