solid-tom-ui 1.0.5 → 1.0.7

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 (509) hide show
  1. package/README.md +246 -237
  2. package/components/avatar/avatar.js.map +1 -0
  3. package/components/badge/badge.js.map +1 -0
  4. package/components/breadcrumb/breadcrumb.js.map +1 -0
  5. package/components/button/button.js.map +1 -0
  6. package/components/carousel/carousel.js.map +1 -0
  7. package/components/chat-bubble/chatBubble.js.map +1 -0
  8. package/components/checkbox/checkbox.js.map +1 -0
  9. package/components/collapse/collapse.js.map +1 -0
  10. package/components/context-menu/context-menu.js.map +1 -0
  11. package/components/context-menu/context-menu.store.js.map +1 -0
  12. package/components/divider/divider.js.map +1 -0
  13. package/components/dropdown/dropdown.js.map +1 -0
  14. package/components/dropdown/dropdown.store.js.map +1 -0
  15. package/components/float-button/float-button.js.map +1 -0
  16. package/components/hover-3d-image/hover-3d-image.js.map +1 -0
  17. package/components/image-preview/image-preview.js.map +1 -0
  18. package/components/input/input.js.map +1 -0
  19. package/components/input/input.utils.js.map +1 -0
  20. package/components/input/variants/input-color.js.map +1 -0
  21. package/components/input/variants/input-date.js.map +1 -0
  22. package/components/input/variants/input-number.js.map +1 -0
  23. package/components/input/variants/input-otp.js.map +1 -0
  24. package/components/input/variants/input-password.js.map +1 -0
  25. package/components/input/variants/input-radio.js.map +1 -0
  26. package/components/input/variants/input-range.js.map +1 -0
  27. package/components/input/variants/input-text.js.map +1 -0
  28. package/components/input/variants/input-textarea.js.map +1 -0
  29. package/components/loading/loading.js.map +1 -0
  30. package/components/mansory/mansory.js.map +1 -0
  31. package/components/menu/menu.js.map +1 -0
  32. package/components/modal/modal.js.map +1 -0
  33. package/components/modal/modalContext.js.map +1 -0
  34. package/components/pagination/pagination.js.map +1 -0
  35. package/components/progress-bar/progress-bar.js.map +1 -0
  36. package/components/qr-code/qr-code.js.map +1 -0
  37. package/components/select/select.js.map +1 -0
  38. package/components/select-zone/select-zone.js.map +1 -0
  39. package/components/skeleton/skeleton.js.map +1 -0
  40. package/components/slider/slider.js.map +1 -0
  41. package/components/splitter/splitter.js.map +1 -0
  42. package/components/steps/steps.js.map +1 -0
  43. package/components/swap/swap.js.map +1 -0
  44. package/components/switch/switch.js.map +1 -0
  45. package/components/tab/tab.js.map +1 -0
  46. package/components/table/table.js.map +1 -0
  47. package/components/timeline/timeline.js.map +1 -0
  48. package/components/toast/icons/ErrorIcon.js.map +1 -0
  49. package/components/toast/icons/IconCircle.js.map +1 -0
  50. package/components/toast/icons/InfoIcon.js.map +1 -0
  51. package/components/toast/icons/LoaderIcon.js.map +1 -0
  52. package/components/toast/icons/SuccessIcon.js.map +1 -0
  53. package/components/toast/icons/WarningIcon.js.map +1 -0
  54. package/components/toast/toast.js.map +1 -0
  55. package/components/toast/toast.store.js.map +1 -0
  56. package/components/tooltip/tooltip.js.map +1 -0
  57. package/components/tour/tour.js.map +1 -0
  58. package/components/upload/upload.js.map +1 -0
  59. package/components/z-index/z-index.context.js.map +1 -0
  60. package/components/z-index/z-index.js.map +1 -0
  61. package/components/z-index/z-index.store.js.map +1 -0
  62. package/components/z-index/z-index.types.js.map +1 -0
  63. package/package.json +14 -96
  64. package/utils/cn.js.map +1 -0
  65. package/utils/element-tracker.js.map +1 -0
  66. package/utils/helper.js.map +1 -0
  67. package/utils/hoc.js.map +1 -0
  68. package/workspace.code-workspace +8 -0
  69. package/dist/components/avatar/avatar.js.map +0 -1
  70. package/dist/components/badge/badge.js.map +0 -1
  71. package/dist/components/breadcrumb/breadcrumb.js.map +0 -1
  72. package/dist/components/button/button.js.map +0 -1
  73. package/dist/components/carousel/carousel.js.map +0 -1
  74. package/dist/components/chat-bubble/chatBubble.js.map +0 -1
  75. package/dist/components/checkbox/checkbox.js.map +0 -1
  76. package/dist/components/collapse/collapse.js.map +0 -1
  77. package/dist/components/context-menu/context-menu.js.map +0 -1
  78. package/dist/components/context-menu/context-menu.store.js.map +0 -1
  79. package/dist/components/divider/divider.js.map +0 -1
  80. package/dist/components/dropdown/dropdown.js.map +0 -1
  81. package/dist/components/dropdown/dropdown.store.js.map +0 -1
  82. package/dist/components/float-button/float-button.js.map +0 -1
  83. package/dist/components/hover-3d-image/hover-3d-image.js.map +0 -1
  84. package/dist/components/image-preview/image-preview.js.map +0 -1
  85. package/dist/components/input/input.js.map +0 -1
  86. package/dist/components/input/input.utils.js.map +0 -1
  87. package/dist/components/input/variants/input-color.js.map +0 -1
  88. package/dist/components/input/variants/input-date.js.map +0 -1
  89. package/dist/components/input/variants/input-number.js.map +0 -1
  90. package/dist/components/input/variants/input-otp.js.map +0 -1
  91. package/dist/components/input/variants/input-password.js.map +0 -1
  92. package/dist/components/input/variants/input-radio.js.map +0 -1
  93. package/dist/components/input/variants/input-range.js.map +0 -1
  94. package/dist/components/input/variants/input-text.js.map +0 -1
  95. package/dist/components/input/variants/input-textarea.js.map +0 -1
  96. package/dist/components/loading/loading.js.map +0 -1
  97. package/dist/components/mansory/mansory.js.map +0 -1
  98. package/dist/components/menu/menu.js.map +0 -1
  99. package/dist/components/modal/modal.js.map +0 -1
  100. package/dist/components/modal/modalContext.js.map +0 -1
  101. package/dist/components/pagination/pagination.js.map +0 -1
  102. package/dist/components/progress-bar/progress-bar.js.map +0 -1
  103. package/dist/components/qr-code/qr-code.js.map +0 -1
  104. package/dist/components/select/select.js.map +0 -1
  105. package/dist/components/select-zone/select-zone.js.map +0 -1
  106. package/dist/components/skeleton/skeleton.js.map +0 -1
  107. package/dist/components/slider/slider.js.map +0 -1
  108. package/dist/components/splitter/splitter.js.map +0 -1
  109. package/dist/components/steps/steps.js.map +0 -1
  110. package/dist/components/swap/swap.js.map +0 -1
  111. package/dist/components/switch/switch.js.map +0 -1
  112. package/dist/components/tab/tab.js.map +0 -1
  113. package/dist/components/table/table.js.map +0 -1
  114. package/dist/components/timeline/timeline.js.map +0 -1
  115. package/dist/components/toast/icons/ErrorIcon.js.map +0 -1
  116. package/dist/components/toast/icons/IconCircle.js.map +0 -1
  117. package/dist/components/toast/icons/InfoIcon.js.map +0 -1
  118. package/dist/components/toast/icons/LoaderIcon.js.map +0 -1
  119. package/dist/components/toast/icons/SuccessIcon.js.map +0 -1
  120. package/dist/components/toast/icons/WarningIcon.js.map +0 -1
  121. package/dist/components/toast/toast.js.map +0 -1
  122. package/dist/components/toast/toast.store.js.map +0 -1
  123. package/dist/components/tooltip/tooltip.js.map +0 -1
  124. package/dist/components/tour/tour.js.map +0 -1
  125. package/dist/components/upload/upload.js.map +0 -1
  126. package/dist/components/z-index/z-index.context.js.map +0 -1
  127. package/dist/components/z-index/z-index.js.map +0 -1
  128. package/dist/components/z-index/z-index.store.js.map +0 -1
  129. package/dist/components/z-index/z-index.types.js.map +0 -1
  130. package/dist/utils/cn.js.map +0 -1
  131. package/dist/utils/element-tracker.js.map +0 -1
  132. package/dist/utils/helper.js.map +0 -1
  133. package/dist/utils/hoc.js.map +0 -1
  134. /package/{dist/components → components}/avatar/avatar.d.ts +0 -0
  135. /package/{dist/components → components}/avatar/avatar.d.ts.map +0 -0
  136. /package/{dist/components → components}/avatar/avatar.js +0 -0
  137. /package/{dist/components → components}/avatar/avatar.types.d.ts +0 -0
  138. /package/{dist/components → components}/avatar/avatar.types.d.ts.map +0 -0
  139. /package/{dist/components → components}/avatar/index.d.ts +0 -0
  140. /package/{dist/components → components}/avatar/index.d.ts.map +0 -0
  141. /package/{dist/components → components}/badge/badge.d.ts +0 -0
  142. /package/{dist/components → components}/badge/badge.d.ts.map +0 -0
  143. /package/{dist/components → components}/badge/badge.js +0 -0
  144. /package/{dist/components → components}/badge/badge.types.d.ts +0 -0
  145. /package/{dist/components → components}/badge/badge.types.d.ts.map +0 -0
  146. /package/{dist/components → components}/badge/index.d.ts +0 -0
  147. /package/{dist/components → components}/badge/index.d.ts.map +0 -0
  148. /package/{dist/components → components}/blank/blank.d.ts +0 -0
  149. /package/{dist/components → components}/blank/blank.d.ts.map +0 -0
  150. /package/{dist/components → components}/blank/index.d.ts +0 -0
  151. /package/{dist/components → components}/blank/index.d.ts.map +0 -0
  152. /package/{dist/components → components}/breadcrumb/breadcrumb.d.ts +0 -0
  153. /package/{dist/components → components}/breadcrumb/breadcrumb.d.ts.map +0 -0
  154. /package/{dist/components → components}/breadcrumb/breadcrumb.js +0 -0
  155. /package/{dist/components → components}/breadcrumb/index.d.ts +0 -0
  156. /package/{dist/components → components}/breadcrumb/index.d.ts.map +0 -0
  157. /package/{dist/components → components}/button/button.d.ts +0 -0
  158. /package/{dist/components → components}/button/button.d.ts.map +0 -0
  159. /package/{dist/components → components}/button/button.js +0 -0
  160. /package/{dist/components → components}/button/button.types.d.ts +0 -0
  161. /package/{dist/components → components}/button/button.types.d.ts.map +0 -0
  162. /package/{dist/components → components}/button/index.d.ts +0 -0
  163. /package/{dist/components → components}/button/index.d.ts.map +0 -0
  164. /package/{dist/components → components}/carousel/carousel.d.ts +0 -0
  165. /package/{dist/components → components}/carousel/carousel.d.ts.map +0 -0
  166. /package/{dist/components → components}/carousel/carousel.js +0 -0
  167. /package/{dist/components → components}/carousel/carousel.types.d.ts +0 -0
  168. /package/{dist/components → components}/carousel/carousel.types.d.ts.map +0 -0
  169. /package/{dist/components → components}/carousel/index.d.ts +0 -0
  170. /package/{dist/components → components}/carousel/index.d.ts.map +0 -0
  171. /package/{dist/components → components}/chat-bubble/chatBubble.d.ts +0 -0
  172. /package/{dist/components → components}/chat-bubble/chatBubble.d.ts.map +0 -0
  173. /package/{dist/components → components}/chat-bubble/chatBubble.js +0 -0
  174. /package/{dist/components → components}/chat-bubble/chatBubble.type.d.ts +0 -0
  175. /package/{dist/components → components}/chat-bubble/chatBubble.type.d.ts.map +0 -0
  176. /package/{dist/components → components}/chat-bubble/index.d.ts +0 -0
  177. /package/{dist/components → components}/chat-bubble/index.d.ts.map +0 -0
  178. /package/{dist/components → components}/checkbox/checkbox.d.ts +0 -0
  179. /package/{dist/components → components}/checkbox/checkbox.d.ts.map +0 -0
  180. /package/{dist/components → components}/checkbox/checkbox.js +0 -0
  181. /package/{dist/components → components}/checkbox/index.d.ts +0 -0
  182. /package/{dist/components → components}/checkbox/index.d.ts.map +0 -0
  183. /package/{dist/components → components}/collapse/collapse.d.ts +0 -0
  184. /package/{dist/components → components}/collapse/collapse.d.ts.map +0 -0
  185. /package/{dist/components → components}/collapse/collapse.js +0 -0
  186. /package/{dist/components → components}/collapse/collapse.types.d.ts +0 -0
  187. /package/{dist/components → components}/collapse/collapse.types.d.ts.map +0 -0
  188. /package/{dist/components → components}/collapse/index.d.ts +0 -0
  189. /package/{dist/components → components}/collapse/index.d.ts.map +0 -0
  190. /package/{dist/components → components}/context-menu/context-menu.d.ts +0 -0
  191. /package/{dist/components → components}/context-menu/context-menu.d.ts.map +0 -0
  192. /package/{dist/components → components}/context-menu/context-menu.js +0 -0
  193. /package/{dist/components → components}/context-menu/context-menu.store.d.ts +0 -0
  194. /package/{dist/components → components}/context-menu/context-menu.store.d.ts.map +0 -0
  195. /package/{dist/components → components}/context-menu/context-menu.store.js +0 -0
  196. /package/{dist/components → components}/context-menu/context-menu.types.d.ts +0 -0
  197. /package/{dist/components → components}/context-menu/context-menu.types.d.ts.map +0 -0
  198. /package/{dist/components → components}/context-menu/index.d.ts +0 -0
  199. /package/{dist/components → components}/context-menu/index.d.ts.map +0 -0
  200. /package/{dist/components → components}/diff/diff.d.ts +0 -0
  201. /package/{dist/components → components}/diff/diff.d.ts.map +0 -0
  202. /package/{dist/components → components}/diff/diff.js +0 -0
  203. /package/{dist/components → components}/diff/diff.js.map +0 -0
  204. /package/{dist/components → components}/diff/index.d.ts +0 -0
  205. /package/{dist/components → components}/diff/index.d.ts.map +0 -0
  206. /package/{dist/components → components}/divider/divider.d.ts +0 -0
  207. /package/{dist/components → components}/divider/divider.d.ts.map +0 -0
  208. /package/{dist/components → components}/divider/divider.js +0 -0
  209. /package/{dist/components → components}/divider/divider.types.d.ts +0 -0
  210. /package/{dist/components → components}/divider/divider.types.d.ts.map +0 -0
  211. /package/{dist/components → components}/divider/index.d.ts +0 -0
  212. /package/{dist/components → components}/divider/index.d.ts.map +0 -0
  213. /package/{dist/components → components}/drawer/drawer.d.ts +0 -0
  214. /package/{dist/components → components}/drawer/drawer.d.ts.map +0 -0
  215. /package/{dist/components → components}/drawer/drawer.js +0 -0
  216. /package/{dist/components → components}/drawer/drawer.js.map +0 -0
  217. /package/{dist/components → components}/drawer/drawer.types.d.ts +0 -0
  218. /package/{dist/components → components}/drawer/drawer.types.d.ts.map +0 -0
  219. /package/{dist/components → components}/drawer/index.d.ts +0 -0
  220. /package/{dist/components → components}/drawer/index.d.ts.map +0 -0
  221. /package/{dist/components → components}/dropdown/dropdown.d.ts +0 -0
  222. /package/{dist/components → components}/dropdown/dropdown.d.ts.map +0 -0
  223. /package/{dist/components → components}/dropdown/dropdown.js +0 -0
  224. /package/{dist/components → components}/dropdown/dropdown.store.d.ts +0 -0
  225. /package/{dist/components → components}/dropdown/dropdown.store.d.ts.map +0 -0
  226. /package/{dist/components → components}/dropdown/dropdown.store.js +0 -0
  227. /package/{dist/components → components}/dropdown/dropdown.types.d.ts +0 -0
  228. /package/{dist/components → components}/dropdown/dropdown.types.d.ts.map +0 -0
  229. /package/{dist/components → components}/dropdown/index.d.ts +0 -0
  230. /package/{dist/components → components}/dropdown/index.d.ts.map +0 -0
  231. /package/{dist/components → components}/float-button/float-button.d.ts +0 -0
  232. /package/{dist/components → components}/float-button/float-button.d.ts.map +0 -0
  233. /package/{dist/components → components}/float-button/float-button.js +0 -0
  234. /package/{dist/components → components}/float-button/float-button.types.d.ts +0 -0
  235. /package/{dist/components → components}/float-button/float-button.types.d.ts.map +0 -0
  236. /package/{dist/components → components}/float-button/index.d.ts +0 -0
  237. /package/{dist/components → components}/float-button/index.d.ts.map +0 -0
  238. /package/{dist/components → components}/hover-3d-image/hover-3d-example.d.ts +0 -0
  239. /package/{dist/components → components}/hover-3d-image/hover-3d-example.d.ts.map +0 -0
  240. /package/{dist/components → components}/hover-3d-image/hover-3d-image.d.ts +0 -0
  241. /package/{dist/components → components}/hover-3d-image/hover-3d-image.d.ts.map +0 -0
  242. /package/{dist/components → components}/hover-3d-image/hover-3d-image.js +0 -0
  243. /package/{dist/components → components}/hover-3d-image/index.d.ts +0 -0
  244. /package/{dist/components → components}/hover-3d-image/index.d.ts.map +0 -0
  245. /package/{dist/components → components}/image-preview/image-preview.d.ts +0 -0
  246. /package/{dist/components → components}/image-preview/image-preview.d.ts.map +0 -0
  247. /package/{dist/components → components}/image-preview/image-preview.js +0 -0
  248. /package/{dist/components → components}/image-preview/index.d.ts +0 -0
  249. /package/{dist/components → components}/image-preview/index.d.ts.map +0 -0
  250. /package/{dist/components → components}/indicator/index.d.ts +0 -0
  251. /package/{dist/components → components}/indicator/index.d.ts.map +0 -0
  252. /package/{dist/components → components}/indicator/indicator.d.ts +0 -0
  253. /package/{dist/components → components}/indicator/indicator.d.ts.map +0 -0
  254. /package/{dist/components → components}/indicator/indicator.js +0 -0
  255. /package/{dist/components → components}/indicator/indicator.js.map +0 -0
  256. /package/{dist/components → components}/indicator/indicator.types.d.ts +0 -0
  257. /package/{dist/components → components}/indicator/indicator.types.d.ts.map +0 -0
  258. /package/{dist/components → components}/input/index.d.ts +0 -0
  259. /package/{dist/components → components}/input/index.d.ts.map +0 -0
  260. /package/{dist/components → components}/input/input.d.ts +0 -0
  261. /package/{dist/components → components}/input/input.d.ts.map +0 -0
  262. /package/{dist/components → components}/input/input.js +0 -0
  263. /package/{dist/components → components}/input/input.types.d.ts +0 -0
  264. /package/{dist/components → components}/input/input.types.d.ts.map +0 -0
  265. /package/{dist/components → components}/input/input.utils.d.ts +0 -0
  266. /package/{dist/components → components}/input/input.utils.d.ts.map +0 -0
  267. /package/{dist/components → components}/input/input.utils.js +0 -0
  268. /package/{dist/components → components}/input/variants/input-color.d.ts +0 -0
  269. /package/{dist/components → components}/input/variants/input-color.d.ts.map +0 -0
  270. /package/{dist/components → components}/input/variants/input-color.js +0 -0
  271. /package/{dist/components → components}/input/variants/input-date.d.ts +0 -0
  272. /package/{dist/components → components}/input/variants/input-date.d.ts.map +0 -0
  273. /package/{dist/components → components}/input/variants/input-date.js +0 -0
  274. /package/{dist/components → components}/input/variants/input-number.d.ts +0 -0
  275. /package/{dist/components → components}/input/variants/input-number.d.ts.map +0 -0
  276. /package/{dist/components → components}/input/variants/input-number.js +0 -0
  277. /package/{dist/components → components}/input/variants/input-otp.d.ts +0 -0
  278. /package/{dist/components → components}/input/variants/input-otp.d.ts.map +0 -0
  279. /package/{dist/components → components}/input/variants/input-otp.js +0 -0
  280. /package/{dist/components → components}/input/variants/input-password.d.ts +0 -0
  281. /package/{dist/components → components}/input/variants/input-password.d.ts.map +0 -0
  282. /package/{dist/components → components}/input/variants/input-password.js +0 -0
  283. /package/{dist/components → components}/input/variants/input-radio.d.ts +0 -0
  284. /package/{dist/components → components}/input/variants/input-radio.d.ts.map +0 -0
  285. /package/{dist/components → components}/input/variants/input-radio.js +0 -0
  286. /package/{dist/components → components}/input/variants/input-range.d.ts +0 -0
  287. /package/{dist/components → components}/input/variants/input-range.d.ts.map +0 -0
  288. /package/{dist/components → components}/input/variants/input-range.js +0 -0
  289. /package/{dist/components → components}/input/variants/input-text.d.ts +0 -0
  290. /package/{dist/components → components}/input/variants/input-text.d.ts.map +0 -0
  291. /package/{dist/components → components}/input/variants/input-text.js +0 -0
  292. /package/{dist/components → components}/input/variants/input-textarea.d.ts +0 -0
  293. /package/{dist/components → components}/input/variants/input-textarea.d.ts.map +0 -0
  294. /package/{dist/components → components}/input/variants/input-textarea.js +0 -0
  295. /package/{dist/components → components}/loading/index.d.ts +0 -0
  296. /package/{dist/components → components}/loading/index.d.ts.map +0 -0
  297. /package/{dist/components → components}/loading/loading.d.ts +0 -0
  298. /package/{dist/components → components}/loading/loading.d.ts.map +0 -0
  299. /package/{dist/components → components}/loading/loading.js +0 -0
  300. /package/{dist/components → components}/mansory/index.d.ts +0 -0
  301. /package/{dist/components → components}/mansory/index.d.ts.map +0 -0
  302. /package/{dist/components → components}/mansory/mansory.d.ts +0 -0
  303. /package/{dist/components → components}/mansory/mansory.d.ts.map +0 -0
  304. /package/{dist/components → components}/mansory/mansory.js +0 -0
  305. /package/{dist/components → components}/mansory/mansory.types.d.ts +0 -0
  306. /package/{dist/components → components}/mansory/mansory.types.d.ts.map +0 -0
  307. /package/{dist/components → components}/menu/index.d.ts +0 -0
  308. /package/{dist/components → components}/menu/index.d.ts.map +0 -0
  309. /package/{dist/components → components}/menu/menu.d.ts +0 -0
  310. /package/{dist/components → components}/menu/menu.d.ts.map +0 -0
  311. /package/{dist/components → components}/menu/menu.data-example.d.ts +0 -0
  312. /package/{dist/components → components}/menu/menu.data-example.d.ts.map +0 -0
  313. /package/{dist/components → components}/menu/menu.js +0 -0
  314. /package/{dist/components → components}/menu/menu.types.d.ts +0 -0
  315. /package/{dist/components → components}/menu/menu.types.d.ts.map +0 -0
  316. /package/{dist/components → components}/modal/index.d.ts +0 -0
  317. /package/{dist/components → components}/modal/index.d.ts.map +0 -0
  318. /package/{dist/components → components}/modal/modal.d.ts +0 -0
  319. /package/{dist/components → components}/modal/modal.d.ts.map +0 -0
  320. /package/{dist/components → components}/modal/modal.js +0 -0
  321. /package/{dist/components → components}/modal/modalContext.d.ts +0 -0
  322. /package/{dist/components → components}/modal/modalContext.d.ts.map +0 -0
  323. /package/{dist/components → components}/modal/modalContext.js +0 -0
  324. /package/{dist/components → components}/pagination/index.d.ts +0 -0
  325. /package/{dist/components → components}/pagination/index.d.ts.map +0 -0
  326. /package/{dist/components → components}/pagination/pagination.d.ts +0 -0
  327. /package/{dist/components → components}/pagination/pagination.d.ts.map +0 -0
  328. /package/{dist/components → components}/pagination/pagination.js +0 -0
  329. /package/{dist/components → components}/pagination/pagination.types.d.ts +0 -0
  330. /package/{dist/components → components}/pagination/pagination.types.d.ts.map +0 -0
  331. /package/{dist/components → components}/progress-bar/index.d.ts +0 -0
  332. /package/{dist/components → components}/progress-bar/index.d.ts.map +0 -0
  333. /package/{dist/components → components}/progress-bar/progress-bar.d.ts +0 -0
  334. /package/{dist/components → components}/progress-bar/progress-bar.d.ts.map +0 -0
  335. /package/{dist/components → components}/progress-bar/progress-bar.js +0 -0
  336. /package/{dist/components → components}/progress-bar/progress-bar.types.d.ts +0 -0
  337. /package/{dist/components → components}/progress-bar/progress-bar.types.d.ts.map +0 -0
  338. /package/{dist/components → components}/qr-code/index.d.ts +0 -0
  339. /package/{dist/components → components}/qr-code/index.d.ts.map +0 -0
  340. /package/{dist/components → components}/qr-code/qr-code.d.ts +0 -0
  341. /package/{dist/components → components}/qr-code/qr-code.d.ts.map +0 -0
  342. /package/{dist/components → components}/qr-code/qr-code.js +0 -0
  343. /package/{dist/components → components}/qr-code/qr-code.types.d.ts +0 -0
  344. /package/{dist/components → components}/qr-code/qr-code.types.d.ts.map +0 -0
  345. /package/{dist/components → components}/rating/index.d.ts +0 -0
  346. /package/{dist/components → components}/rating/index.d.ts.map +0 -0
  347. /package/{dist/components → components}/rating/rating.d.ts +0 -0
  348. /package/{dist/components → components}/rating/rating.d.ts.map +0 -0
  349. /package/{dist/components → components}/rating/rating.js +0 -0
  350. /package/{dist/components → components}/rating/rating.js.map +0 -0
  351. /package/{dist/components → components}/rating/rating.types.d.ts +0 -0
  352. /package/{dist/components → components}/rating/rating.types.d.ts.map +0 -0
  353. /package/{dist/components → components}/select/index.d.ts +0 -0
  354. /package/{dist/components → components}/select/index.d.ts.map +0 -0
  355. /package/{dist/components → components}/select/select.d.ts +0 -0
  356. /package/{dist/components → components}/select/select.d.ts.map +0 -0
  357. /package/{dist/components → components}/select/select.js +0 -0
  358. /package/{dist/components → components}/select/select.types.d.ts +0 -0
  359. /package/{dist/components → components}/select/select.types.d.ts.map +0 -0
  360. /package/{dist/components → components}/select-zone/index.d.ts +0 -0
  361. /package/{dist/components → components}/select-zone/index.d.ts.map +0 -0
  362. /package/{dist/components → components}/select-zone/select-zone.d.ts +0 -0
  363. /package/{dist/components → components}/select-zone/select-zone.d.ts.map +0 -0
  364. /package/{dist/components → components}/select-zone/select-zone.js +0 -0
  365. /package/{dist/components → components}/select-zone/select-zone.types.d.ts +0 -0
  366. /package/{dist/components → components}/select-zone/select-zone.types.d.ts.map +0 -0
  367. /package/{dist/components → components}/skeleton/index.d.ts +0 -0
  368. /package/{dist/components → components}/skeleton/index.d.ts.map +0 -0
  369. /package/{dist/components → components}/skeleton/skeleton.d.ts +0 -0
  370. /package/{dist/components → components}/skeleton/skeleton.d.ts.map +0 -0
  371. /package/{dist/components → components}/skeleton/skeleton.js +0 -0
  372. /package/{dist/components → components}/slider/index.d.ts +0 -0
  373. /package/{dist/components → components}/slider/index.d.ts.map +0 -0
  374. /package/{dist/components → components}/slider/slider.d.ts +0 -0
  375. /package/{dist/components → components}/slider/slider.d.ts.map +0 -0
  376. /package/{dist/components → components}/slider/slider.js +0 -0
  377. /package/{dist/components → components}/slider/slider.types.d.ts +0 -0
  378. /package/{dist/components → components}/slider/slider.types.d.ts.map +0 -0
  379. /package/{dist/components → components}/splitter/index.d.ts +0 -0
  380. /package/{dist/components → components}/splitter/index.d.ts.map +0 -0
  381. /package/{dist/components → components}/splitter/splitter.d.ts +0 -0
  382. /package/{dist/components → components}/splitter/splitter.d.ts.map +0 -0
  383. /package/{dist/components → components}/splitter/splitter.js +0 -0
  384. /package/{dist/components → components}/splitter/splitter.types.d.ts +0 -0
  385. /package/{dist/components → components}/splitter/splitter.types.d.ts.map +0 -0
  386. /package/{dist/components → components}/steps/index.d.ts +0 -0
  387. /package/{dist/components → components}/steps/index.d.ts.map +0 -0
  388. /package/{dist/components → components}/steps/steps.d.ts +0 -0
  389. /package/{dist/components → components}/steps/steps.d.ts.map +0 -0
  390. /package/{dist/components → components}/steps/steps.js +0 -0
  391. /package/{dist/components → components}/swap/index.d.ts +0 -0
  392. /package/{dist/components → components}/swap/index.d.ts.map +0 -0
  393. /package/{dist/components → components}/swap/swap.d.ts +0 -0
  394. /package/{dist/components → components}/swap/swap.d.ts.map +0 -0
  395. /package/{dist/components → components}/swap/swap.js +0 -0
  396. /package/{dist/components → components}/switch/index.d.ts +0 -0
  397. /package/{dist/components → components}/switch/index.d.ts.map +0 -0
  398. /package/{dist/components → components}/switch/switch.d.ts +0 -0
  399. /package/{dist/components → components}/switch/switch.d.ts.map +0 -0
  400. /package/{dist/components → components}/switch/switch.js +0 -0
  401. /package/{dist/components → components}/switch/switch.types.d.ts +0 -0
  402. /package/{dist/components → components}/switch/switch.types.d.ts.map +0 -0
  403. /package/{dist/components → components}/tab/index.d.ts +0 -0
  404. /package/{dist/components → components}/tab/index.d.ts.map +0 -0
  405. /package/{dist/components → components}/tab/tab.d.ts +0 -0
  406. /package/{dist/components → components}/tab/tab.d.ts.map +0 -0
  407. /package/{dist/components → components}/tab/tab.js +0 -0
  408. /package/{dist/components → components}/tab/tab.types.d.ts +0 -0
  409. /package/{dist/components → components}/tab/tab.types.d.ts.map +0 -0
  410. /package/{dist/components → components}/table/index.d.ts +0 -0
  411. /package/{dist/components → components}/table/index.d.ts.map +0 -0
  412. /package/{dist/components → components}/table/index.js +0 -0
  413. /package/{dist/components → components}/table/table.d.ts +0 -0
  414. /package/{dist/components → components}/table/table.d.ts.map +0 -0
  415. /package/{dist/components → components}/table/table.js +0 -0
  416. /package/{dist/components → components}/table/table.types.d.ts +0 -0
  417. /package/{dist/components → components}/table/table.types.d.ts.map +0 -0
  418. /package/{dist/components → components}/text-rotate/index.d.ts +0 -0
  419. /package/{dist/components → components}/text-rotate/index.d.ts.map +0 -0
  420. /package/{dist/components → components}/text-rotate/text-rotate.d.ts +0 -0
  421. /package/{dist/components → components}/text-rotate/text-rotate.d.ts.map +0 -0
  422. /package/{dist/components → components}/text-rotate/text-rotate.js +0 -0
  423. /package/{dist/components → components}/text-rotate/text-rotate.js.map +0 -0
  424. /package/{dist/components → components}/timeline/index.d.ts +0 -0
  425. /package/{dist/components → components}/timeline/index.d.ts.map +0 -0
  426. /package/{dist/components → components}/timeline/timeline.d.ts +0 -0
  427. /package/{dist/components → components}/timeline/timeline.d.ts.map +0 -0
  428. /package/{dist/components → components}/timeline/timeline.js +0 -0
  429. /package/{dist/components → components}/timeline/timeline.types.d.ts +0 -0
  430. /package/{dist/components → components}/timeline/timeline.types.d.ts.map +0 -0
  431. /package/{dist/components → components}/toast/icons/ErrorIcon.d.ts +0 -0
  432. /package/{dist/components → components}/toast/icons/ErrorIcon.d.ts.map +0 -0
  433. /package/{dist/components → components}/toast/icons/ErrorIcon.js +0 -0
  434. /package/{dist/components → components}/toast/icons/IconCircle.d.ts +0 -0
  435. /package/{dist/components → components}/toast/icons/IconCircle.d.ts.map +0 -0
  436. /package/{dist/components → components}/toast/icons/IconCircle.js +0 -0
  437. /package/{dist/components → components}/toast/icons/InfoIcon.d.ts +0 -0
  438. /package/{dist/components → components}/toast/icons/InfoIcon.d.ts.map +0 -0
  439. /package/{dist/components → components}/toast/icons/InfoIcon.js +0 -0
  440. /package/{dist/components → components}/toast/icons/LoaderIcon.d.ts +0 -0
  441. /package/{dist/components → components}/toast/icons/LoaderIcon.d.ts.map +0 -0
  442. /package/{dist/components → components}/toast/icons/LoaderIcon.js +0 -0
  443. /package/{dist/components → components}/toast/icons/SuccessIcon.d.ts +0 -0
  444. /package/{dist/components → components}/toast/icons/SuccessIcon.d.ts.map +0 -0
  445. /package/{dist/components → components}/toast/icons/SuccessIcon.js +0 -0
  446. /package/{dist/components → components}/toast/icons/WarningIcon.d.ts +0 -0
  447. /package/{dist/components → components}/toast/icons/WarningIcon.d.ts.map +0 -0
  448. /package/{dist/components → components}/toast/icons/WarningIcon.js +0 -0
  449. /package/{dist/components → components}/toast/icons/index.d.ts +0 -0
  450. /package/{dist/components → components}/toast/icons/index.d.ts.map +0 -0
  451. /package/{dist/components → components}/toast/index.d.ts +0 -0
  452. /package/{dist/components → components}/toast/index.d.ts.map +0 -0
  453. /package/{dist/components → components}/toast/toast.d.ts +0 -0
  454. /package/{dist/components → components}/toast/toast.d.ts.map +0 -0
  455. /package/{dist/components → components}/toast/toast.js +0 -0
  456. /package/{dist/components → components}/toast/toast.store.d.ts +0 -0
  457. /package/{dist/components → components}/toast/toast.store.d.ts.map +0 -0
  458. /package/{dist/components → components}/toast/toast.store.js +0 -0
  459. /package/{dist/components → components}/toast/toast.type.d.ts +0 -0
  460. /package/{dist/components → components}/toast/toast.type.d.ts.map +0 -0
  461. /package/{dist/components → components}/tooltip/index.d.ts +0 -0
  462. /package/{dist/components → components}/tooltip/index.d.ts.map +0 -0
  463. /package/{dist/components → components}/tooltip/tooltip.d.ts +0 -0
  464. /package/{dist/components → components}/tooltip/tooltip.d.ts.map +0 -0
  465. /package/{dist/components → components}/tooltip/tooltip.js +0 -0
  466. /package/{dist/components → components}/tooltip/tooltip.types.d.ts +0 -0
  467. /package/{dist/components → components}/tooltip/tooltip.types.d.ts.map +0 -0
  468. /package/{dist/components → components}/tour/index.d.ts +0 -0
  469. /package/{dist/components → components}/tour/index.d.ts.map +0 -0
  470. /package/{dist/components → components}/tour/tour.d.ts +0 -0
  471. /package/{dist/components → components}/tour/tour.d.ts.map +0 -0
  472. /package/{dist/components → components}/tour/tour.js +0 -0
  473. /package/{dist/components → components}/tour/tour.types.d.ts +0 -0
  474. /package/{dist/components → components}/tour/tour.types.d.ts.map +0 -0
  475. /package/{dist/components → components}/upload/index.d.ts +0 -0
  476. /package/{dist/components → components}/upload/index.d.ts.map +0 -0
  477. /package/{dist/components → components}/upload/upload.d.ts +0 -0
  478. /package/{dist/components → components}/upload/upload.d.ts.map +0 -0
  479. /package/{dist/components → components}/upload/upload.js +0 -0
  480. /package/{dist/components → components}/upload/upload.types.d.ts +0 -0
  481. /package/{dist/components → components}/upload/upload.types.d.ts.map +0 -0
  482. /package/{dist/components → components}/z-index/index.d.ts +0 -0
  483. /package/{dist/components → components}/z-index/index.d.ts.map +0 -0
  484. /package/{dist/components → components}/z-index/z-index.context.d.ts +0 -0
  485. /package/{dist/components → components}/z-index/z-index.context.d.ts.map +0 -0
  486. /package/{dist/components → components}/z-index/z-index.context.js +0 -0
  487. /package/{dist/components → components}/z-index/z-index.d.ts +0 -0
  488. /package/{dist/components → components}/z-index/z-index.d.ts.map +0 -0
  489. /package/{dist/components → components}/z-index/z-index.js +0 -0
  490. /package/{dist/components → components}/z-index/z-index.store.d.ts +0 -0
  491. /package/{dist/components → components}/z-index/z-index.store.d.ts.map +0 -0
  492. /package/{dist/components → components}/z-index/z-index.store.js +0 -0
  493. /package/{dist/components → components}/z-index/z-index.types.d.ts +0 -0
  494. /package/{dist/components → components}/z-index/z-index.types.d.ts.map +0 -0
  495. /package/{dist/components → components}/z-index/z-index.types.js +0 -0
  496. /package/{dist/lib.d.ts → lib.d.ts} +0 -0
  497. /package/{dist/lib.d.ts.map → lib.d.ts.map} +0 -0
  498. /package/{dist/lib.js → lib.js} +0 -0
  499. /package/{dist/solid-ui.css → solid-ui.css} +0 -0
  500. /package/{dist/type.d.ts → type.d.ts} +0 -0
  501. /package/{dist/type.d.ts.map → type.d.ts.map} +0 -0
  502. /package/{dist/utils → utils}/cn.d.ts +0 -0
  503. /package/{dist/utils → utils}/cn.d.ts.map +0 -0
  504. /package/{dist/utils → utils}/cn.js +0 -0
  505. /package/{dist/utils → utils}/element-tracker.js +0 -0
  506. /package/{dist/utils → utils}/helper.d.ts +0 -0
  507. /package/{dist/utils → utils}/helper.d.ts.map +0 -0
  508. /package/{dist/utils → utils}/helper.js +0 -0
  509. /package/{dist/utils → utils}/hoc.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","names":["cn","getColor","ColumnDef","createSolidTable","flexRender","getCoreRowModel","getFilteredRowModel","getPaginationRowModel","getSortedRowModel","createVirtualizer","ChevronDown","ChevronRight","ChevronsUpDown","ChevronUp","createEffect","createMemo","createSignal","createUniqueId","For","Match","mergeProps","on","onCleanup","onMount","Show","Switch","JSX","Button","Pagination","Tooltip","TableBorder","TableCellSpanResult","TableColumnFixed","TableExpandedOptions","TableProps","TableScroll","TableSelectionOptions","TableStyleProps","TableVirtualOptions","TableZebra","normalizeBorder","border","undefined","outer","horizontal","vertical","normalizeZebra","zebra","cols","rows","TableSizeClass","xs","sm","md","lg","xl","const","getTableClass","opts","classes","push","size","join","FixedInfo","fixed","offset","isLastStart","isFirstEnd","computeFixedColumnInfo","columns","id","width","Map","result","leftOffset","lastStartId","col","set","rightOffset","firstEndId","i","length","info","get","toCssValue","val","SELECTION_COLUMN_ID","processSelectionColumns","TData","selectionOptions","foundFirst","processed","filter","meta","_selection","EXPANDED_COLUMN_ID","extractExpandedOptions","_expanded","Table","rawProps","p","enableSorting","enableColumnFilters","resizable","showHeader","color","rounded","processedColumns","finalColumns","expandedOptions","colsWithExplicitSize","Set","map","accessorKey","resolvedEnableRowSelection","enableRowSelection","enableMultiRowSelection","type","hasExpandableRows","internalExpandedKeys","setInternalExpandedKeys","defaultExpandedRowKeys","expandAllApplied","expandedKeys","expandedRowKeys","defaultExpandAllRows","allKeys","table","getRowModel","row","isRowExpanded","rowId","includes","toggleRowExpanded","record","currentKeys","isExpanded","newKeys","k","onExpand","onExpandedRowsChange","internalData","setInternalData","data","defer","getVirtualData","paginationProps","isMultiSortEvent","getRowId","_expandApi","state","sorting","columnFilters","globalFilter","rowSelection","columnVisibility","pagination","options","onSortingChange","onColumnFiltersChange","onGlobalFilterChange","onRowSelectionChange","onColumnVisibilityChange","_","rest","isEmpty","hasFixedColumns","some","scrollX","scroll","x","scrollXWrapper","scrollXTable","sxWidths","scrollXColumnWidths","getAllLeafColumns","total","reduce","sum","getSize","columnWidths","scrollY","y","hasScroll","hasScrollX","hasScrollY","normalizedVirtual","v","virtual","itemSize","overscan","isVirtual","wrapperEl","HTMLDivElement","headerWrapperEl","rowVirtualizer","HTMLTableRowElement","count","getScrollElement","estimateSize","measureElement","el","height","getBoundingClientRect","next","nextElementSibling","classList","contains","virtualTopPadding","items","getVirtualItems","start","virtualBottomPadding","totalSize","getTotalSize","end","isSortingLoading","setIsSortingLoading","_sortTimer","ReturnType","setTimeout","clearSortTimer","clearTimeout","triggerVirtualSort","e","MouseEvent","columnId","column","getColumn","getCanSort","t0","Date","now","getToggleSortingHandler","elapsed","delay","Math","max","scrollTop","_autoLoadChain","Promise","resolve","isFetchingMore","setIsFetchingMore","callGetVirtualData","then","newRows","prev","finally","autoFillViewport","loadingMore","queueMicrotask","isConnected","scrollHeight","clientHeight","notifyTableReady","onTableReady","resolveBodySpan","cell","Cell","rowIndex","perCol","columnDef","onCell","tableEl","HTMLTableElement","bodyTableEl","tbodyId","setColumnWidths","Record","resizingIndex","setResizingIndex","handlePositions","setHandlePositions","left","top","colIndex","dataColumnSelector","getDataColumns","colMinWidth","minWidth","min","snapshotColumnWidths","ths","querySelectorAll","HTMLTableCellElement","widths","forEach","allThsTotal","Array","from","th","excess","lastColId","updateHandlePositions","handleTop","handleHeight","hdrRect","bodyRect","tableRect","positions","enableResizing","thRect","right","handleResizeStart","preventDefault","stopPropagation","lastColIndex","isLastCol","colId","startWidths","startX","clientX","startWidth","onMouseMove","ev","totalWidth","Object","values","a","b","otherCols","slice","otherMinTotal","rawDelta","newLastWidth","remainingWidth","perColWidth","newWidths","nextColIndex","nextColId","nextColStartWidth","nextColMinWidth","minDelta","maxDelta","clampedDelta","onMouseUp","document","removeEventListener","documentElement","remove","addEventListener","add","handleResizeDblClick","currentWidths","keys","equalWidth","w1","w2","half","newW1","newW2","hasResizeWidths","resizeTableWidth","declaredCols","has","undeclaredCols","declaredTotal","numUndeclared","undeclaredWidth","remaining","useFixedLayout","measuredWidths","setMeasuredWidths","measureColumnWidths","offsetWidth","fixedColumnInfo","colData","getFixedCellStyle","getFixedCellClass","AlignHeaderClass","center","AlignCellClass","AlignTdStyle","getColAlign","align","hasCellTooltip","tooltip","wrapCellContent","cellValue","content","Element","tooltipOpts","rawContent","resolvedContent","tooltipProps","containerId","position","class","root","_$createComponent","_$mergeProps","children","handleTableClick","target","HTMLElement","isOwnElement","t","closest","dataset","selectionTd","tr","getRow","getCanSelect","toggleSelected","expandTd","expandable","rowExpandable","original","index","onRowClick","window","passive","capture","removeWindowScrollListener","observer","ResizeObserver","observe","disconnectResizeObserver","disconnect","handleScroll","threshold","removeScrollListener","syncHeaderScroll","scrollLeft","_el$","_tmpl$9","_el$2","firstChild","_el$8","_el$9","_$insert","when","_$memo","onChange","page","setPageIndex","getState","pageSize","setPageSize","headerPanel","_el$3","_tmpl$","_$effect","_$className","_el$4","_tmpl$3","_el$5","_el$7","_$use","$$click","_ref$","_el$6","_tmpl$2","each","isNonResizable","_el$21","_tmpl$0","_$p","_$style","getHeaderGroups","headerGroup","groupIndex","totalRows","earlyRenderedCols","flatMap","g","headers","h","isPlaceholder","getLeafColumns","_el$22","_tmpl$1","header","isEarlyLeaf","rowSpanVal","headerSpan","onHeaderCell","colSpan","finalColSpan","finalRowSpan","rowSpan","_el$23","_tmpl$12","_el$24","_el$25","_$setAttribute","getContext","_el$26","_tmpl$11","fallback","getIsSorted","getSortIndex","_el$27","_tmpl$10","_p$","_v$14","_v$15","_v$16","_v$17","o","headerRow","_v$","_v$2","_v$3","_v$4","thead","_el$0","_el$28","_el$1","_tmpl$4","_el$29","_el$30","_el$31","_el$32","_el$33","_el$34","_v$18","_v$19","_v$20","_v$21","_el$35","_tmpl$8","_el$36","_tmpl$13","_el$37","emptyContent","_v$22","getAllColumns","_v$23","empty","expanded","_el$38","getVisibleCells","isSpecial","hasTooltip","span","_el$41","_tmpl$15","getValue","_el$42","_v$26","td","_v$27","_v$28","_v$29","_v$24","bodyRow","getIsSelected","_v$25","_el$39","_tmpl$14","_el$40","expandedRowRender","tbody","_el$43","_tmpl$16","_el$44","_el$45","_v$30","_v$31","_$setStyleProperty","_el$10","_el$11","_tmpl$5","_el$12","_v$5","_v$6","virtualRow","trEl","hasAttribute","_el$46","_el$49","_el$50","_v$35","_v$36","_v$32","_v$33","_v$34","_el$47","_el$48","_el$13","_el$14","_v$7","_v$8","_el$15","_tmpl$6","_el$16","_el$17","_tmpl$7","_el$18","_el$19","variant","loading","onClick","pos","_el$51","$$dblclick","$$mousedown","_v$37","_v$38","_v$39","_v$40","footerPanel","_el$20","tfoot","_v$9","_v$0","_v$1","_v$10","_v$11","_v$12","_v$13","n","s","Selection","hideSelectAll","title","_el$52","_tmpl$17","_$addEventListener","getToggleAllRowsSelectedHandler","syncIndeterminate","indeterminate","getIsSomeRowsSelected","checked","getIsAllRowsSelected","renderCell","_el$53","_tmpl$18","_el$54","_tmpl$19","getToggleSelectedHandler","disabled","_el$55","_tmpl$20","Expanded","api","_el$56","_tmpl$21","expandIcon","_$delegateEvents"],"sources":["../../../src/components/table/table.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\r\nimport { getColor } from '@/utils/helper';\r\nimport type { ColumnDef } from '@tanstack/solid-table';\r\nimport {\r\n createSolidTable,\r\n flexRender,\r\n getCoreRowModel,\r\n getFilteredRowModel,\r\n getPaginationRowModel,\r\n getSortedRowModel,\r\n} from '@tanstack/solid-table';\r\nimport { createVirtualizer } from '@tanstack/solid-virtual';\r\nimport ChevronDown from 'lucide-solid/icons/chevron-down';\r\nimport ChevronRight from 'lucide-solid/icons/chevron-right';\r\nimport ChevronsUpDown from 'lucide-solid/icons/chevrons-up-down';\r\nimport ChevronUp from 'lucide-solid/icons/chevron-up';\r\nimport {\r\n createEffect,\r\n createMemo,\r\n createSignal,\r\n createUniqueId,\r\n For,\r\n Match,\r\n mergeProps,\r\n on,\r\n onCleanup,\r\n onMount,\r\n Show,\r\n Switch,\r\n type JSX,\r\n} from 'solid-js';\r\nimport { Button } from '../button';\r\nimport { Pagination } from '../pagination';\r\nimport { Tooltip } from '../tooltip';\r\nimport type {\r\n TableBorder,\r\n TableCellSpanResult,\r\n TableColumnFixed,\r\n TableExpandedOptions,\r\n TableProps,\r\n TableScroll,\r\n TableSelectionOptions,\r\n TableStyleProps,\r\n TableVirtualOptions,\r\n TableZebra,\r\n} from './table.types';\r\n\r\nfunction normalizeBorder(border: TableBorder | boolean | undefined): TableBorder | undefined {\r\n if (border === undefined) return undefined;\r\n if (border === true) return { outer: true, horizontal: true, vertical: true };\r\n if (border === false) return { outer: false, horizontal: false, vertical: false };\r\n return border;\r\n}\r\n\r\nfunction normalizeZebra(zebra: TableZebra | boolean | undefined): TableZebra {\r\n switch (zebra) {\r\n case true:\r\n return { cols: false, rows: true };\r\n case false:\r\n case undefined:\r\n return { cols: false, rows: false };\r\n default:\r\n return zebra;\r\n }\r\n}\r\n\r\nconst TableSizeClass = {\r\n xs: 'tbe02',\r\n sm: 'tbe03',\r\n md: 'tbe04',\r\n lg: 'tbe05',\r\n xl: 'tbe06',\r\n} as const;\r\n\r\nfunction getTableClass(opts: TableStyleProps): string {\r\n const classes: string[] = [];\r\n const zebra = normalizeZebra(opts.zebra);\r\n if (zebra.rows) classes.push('tbe07');\r\n if (zebra.cols) classes.push('tbe08');\r\n if (opts.size) classes.push(TableSizeClass[opts.size]);\r\n return classes.join(' ');\r\n}\r\n\r\ntype FixedInfo = {\r\n fixed: TableColumnFixed;\r\n offset: number;\r\n isLastStart: boolean;\r\n isFirstEnd: boolean;\r\n};\r\n\r\nfunction computeFixedColumnInfo(\r\n columns: { id: string; fixed?: TableColumnFixed; width: number }[],\r\n): Map<string, FixedInfo> {\r\n const result = new Map<string, FixedInfo>();\r\n\r\n let leftOffset = 0;\r\n let lastStartId: string | null = null;\r\n for (const col of columns) {\r\n const fixed = col.fixed;\r\n if (fixed === true || fixed === 'start') {\r\n result.set(col.id, {\r\n fixed: 'start',\r\n offset: leftOffset,\r\n isLastStart: false,\r\n isFirstEnd: false,\r\n });\r\n leftOffset += col.width;\r\n lastStartId = col.id;\r\n }\r\n }\r\n\r\n let rightOffset = 0;\r\n let firstEndId: string | null = null;\r\n for (let i = columns.length - 1; i >= 0; i--) {\r\n const col = columns[i];\r\n const fixed = col.fixed;\r\n if (fixed === 'end') {\r\n result.set(col.id, {\r\n fixed: 'end',\r\n offset: rightOffset,\r\n isLastStart: false,\r\n isFirstEnd: false,\r\n });\r\n rightOffset += col.width;\r\n if (!firstEndId) firstEndId = col.id;\r\n }\r\n }\r\n\r\n if (lastStartId) {\r\n const info = result.get(lastStartId)!;\r\n info.isLastStart = true;\r\n }\r\n if (firstEndId) {\r\n const info = result.get(firstEndId)!;\r\n info.isFirstEnd = true;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction toCssValue(val: string | number): string {\r\n return typeof val === 'number' ? `${val}px` : val;\r\n}\r\n\r\nconst SELECTION_COLUMN_ID = '__selection__';\r\n\r\nfunction processSelectionColumns<TData>(columns: ColumnDef<TData, any>[]): {\r\n columns: ColumnDef<TData, any>[];\r\n selectionOptions: TableSelectionOptions<TData> | undefined;\r\n} {\r\n let selectionOptions: TableSelectionOptions<TData> | undefined;\r\n let foundFirst = false;\r\n\r\n const processed = columns.filter(col => {\r\n const meta = col.meta as any;\r\n if (meta?._selection) {\r\n if (foundFirst) return false;\r\n foundFirst = true;\r\n selectionOptions = meta._selection;\r\n return true;\r\n }\r\n return true;\r\n });\r\n\r\n return { columns: processed, selectionOptions };\r\n}\r\n\r\nconst EXPANDED_COLUMN_ID = '__expanded__';\r\n\r\nfunction extractExpandedOptions<TData>(\r\n columns: ColumnDef<TData, any>[],\r\n): TableExpandedOptions<TData> | undefined {\r\n for (const col of columns) {\r\n const meta = col.meta as any;\r\n if (meta?._expanded) return meta._expanded;\r\n }\r\n return undefined;\r\n}\r\n\r\nfunction Table<TData>(rawProps: TableProps<TData>) {\r\n const p = mergeProps(\r\n {\r\n zebra: { rows: true } as TableZebra | boolean,\r\n size: 'md' as const,\r\n enableSorting: false,\r\n enableColumnFilters: false,\r\n resizable: true,\r\n showHeader: true,\r\n color: 'info' as const,\r\n rounded: 'rounded-sm',\r\n } as TableProps<TData>,\r\n rawProps,\r\n );\r\n\r\n const processedColumns = createMemo(() => processSelectionColumns<TData>(p.columns));\r\n const selectionOptions = () => processedColumns().selectionOptions;\r\n const finalColumns = () => processedColumns().columns;\r\n\r\n const expandedOptions = createMemo(() => extractExpandedOptions<TData>(p.columns));\r\n\r\n const colsWithExplicitSize = createMemo(\r\n () =>\r\n new Set(\r\n p.columns\r\n .filter(col => 'size' in col)\r\n .map(col => ('accessorKey' in col ? col.accessorKey : 'id' in col ? col.id : undefined)),\r\n ),\r\n );\r\n\r\n const resolvedEnableRowSelection = () => {\r\n if (p.enableRowSelection !== undefined) return p.enableRowSelection;\r\n return !!selectionOptions();\r\n };\r\n\r\n const enableMultiRowSelection = () => {\r\n const opts = selectionOptions();\r\n if (!opts) return true;\r\n return opts.type !== 'radio';\r\n };\r\n\r\n const hasExpandableRows = () => !!expandedOptions();\r\n\r\n const [internalExpandedKeys, setInternalExpandedKeys] = createSignal<string[]>(\r\n p.defaultExpandedRowKeys ?? [],\r\n );\r\n\r\n let expandAllApplied = false;\r\n\r\n const expandedKeys = (): string[] => {\r\n if (!hasExpandableRows()) return [];\r\n\r\n if (p.expandedRowKeys !== undefined) return p.expandedRowKeys;\r\n\r\n if (p.defaultExpandAllRows && !expandAllApplied) {\r\n expandAllApplied = true;\r\n const allKeys = table.getRowModel().rows.map(row => row.id);\r\n setInternalExpandedKeys(allKeys);\r\n return allKeys;\r\n }\r\n\r\n return internalExpandedKeys();\r\n };\r\n\r\n const isRowExpanded = (rowId: string) => expandedKeys().includes(rowId);\r\n\r\n function toggleRowExpanded(rowId: string, record: TData) {\r\n const currentKeys = expandedKeys();\r\n const isExpanded = currentKeys.includes(rowId);\r\n const newKeys = isExpanded ? currentKeys.filter(k => k !== rowId) : [...currentKeys, rowId];\r\n\r\n if (p.expandedRowKeys === undefined) {\r\n setInternalExpandedKeys(newKeys);\r\n }\r\n\r\n p.onExpand?.(!isExpanded, record);\r\n p.onExpandedRowsChange?.(newKeys);\r\n }\r\n\r\n const [internalData, setInternalData] = createSignal<TData[]>(p.data as TData[]);\r\n\r\n createEffect(\r\n on(\r\n () => p.data,\r\n data => setInternalData(data as TData[]),\r\n { defer: true },\r\n ),\r\n );\r\n\r\n const table = createSolidTable<TData>({\r\n get data() {\r\n return p.getVirtualData ? internalData() : p.data;\r\n },\r\n get columns() {\r\n return finalColumns();\r\n },\r\n getCoreRowModel: getCoreRowModel(),\r\n getSortedRowModel: getSortedRowModel(),\r\n ...(p.enableColumnFilters && { getFilteredRowModel: getFilteredRowModel() }),\r\n\r\n ...(p.paginationProps !== undefined && {\r\n getPaginationRowModel: getPaginationRowModel(),\r\n }),\r\n get enableSorting() {\r\n return p.enableSorting;\r\n },\r\n\r\n isMultiSortEvent: () => true,\r\n get enableColumnFilters() {\r\n return p.enableColumnFilters;\r\n },\r\n get enableRowSelection() {\r\n return resolvedEnableRowSelection();\r\n },\r\n get enableMultiRowSelection() {\r\n return enableMultiRowSelection();\r\n },\r\n ...(p.getRowId && { getRowId: p.getRowId }),\r\n meta: {\r\n _expandApi: {\r\n isRowExpanded,\r\n toggleRowExpanded,\r\n },\r\n },\r\n state: {\r\n get sorting() {\r\n return p.sorting;\r\n },\r\n get columnFilters() {\r\n return p.columnFilters;\r\n },\r\n get globalFilter() {\r\n return p.globalFilter;\r\n },\r\n get rowSelection() {\r\n return p.rowSelection;\r\n },\r\n get columnVisibility() {\r\n return p.columnVisibility;\r\n },\r\n get pagination() {\r\n return p.pagination;\r\n },\r\n ...(p.options?.state || {}),\r\n },\r\n ...(p.onSortingChange && { onSortingChange: p.onSortingChange }),\r\n ...(p.onColumnFiltersChange && { onColumnFiltersChange: p.onColumnFiltersChange }),\r\n ...(p.onGlobalFilterChange && { onGlobalFilterChange: p.onGlobalFilterChange }),\r\n ...(p.onRowSelectionChange && { onRowSelectionChange: p.onRowSelectionChange }),\r\n ...(p.onColumnVisibilityChange && { onColumnVisibilityChange: p.onColumnVisibilityChange }),\r\n ...(p.options &&\r\n (() => {\r\n const { state: _, ...rest } = p.options!;\r\n return rest;\r\n })()),\r\n });\r\n const border = () => normalizeBorder(p.border);\r\n\r\n const isEmpty = () => table.getRowModel().rows.length === 0;\r\n\r\n const hasFixedColumns = () => p.columns.some(col => col.meta?.fixed);\r\n\r\n const scrollX = () => (p.scroll as TableScroll | undefined)?.x;\r\n\r\n const scrollXWrapper = () => {\r\n const x = scrollX();\r\n if (x === undefined) return undefined;\r\n if (x === true || x === 'max-content') return undefined;\r\n return toCssValue(x);\r\n };\r\n\r\n const scrollXTable = () => {\r\n const x = scrollX();\r\n if (x === undefined) return undefined;\r\n if (x === 'max-content') return 'max-content';\r\n\r\n const sxWidths = scrollXColumnWidths();\r\n const cols = table.getAllLeafColumns();\r\n const total = cols.reduce((sum, col) => {\r\n if (col.id === SELECTION_COLUMN_ID || col.id === EXPANDED_COLUMN_ID) {\r\n return sum + col.getSize();\r\n }\r\n if (sxWidths) return sum + (sxWidths[col.id] ?? 100);\r\n return sum + (columnWidths()[col.id] ?? col.getSize());\r\n }, 0);\r\n return `${total}px`;\r\n };\r\n\r\n const scrollY = () => {\r\n const y = p.scroll?.y;\r\n if (y === undefined) return undefined;\r\n return toCssValue(y);\r\n };\r\n\r\n const hasScroll = () => scrollX() !== undefined || p.scroll?.y !== undefined;\r\n const hasScrollX = () => scrollX() !== undefined;\r\n const hasScrollY = () => p.scroll?.y !== undefined;\r\n\r\n const normalizedVirtual = createMemo((): TableVirtualOptions | null => {\r\n const v = p.virtual;\r\n if (!v) return null;\r\n if (v === true) return { itemSize: 40, overscan: 5 };\r\n return { itemSize: v.itemSize ?? 40, overscan: v.overscan ?? 5 };\r\n });\r\n\r\n const isVirtual = () => !!normalizedVirtual();\r\n\r\n let wrapperEl!: HTMLDivElement;\r\n let headerWrapperEl!: HTMLDivElement;\r\n\r\n const rowVirtualizer = createVirtualizer<HTMLDivElement, HTMLTableRowElement>({\r\n get count() {\r\n return isVirtual() ? table.getRowModel().rows.length : 0;\r\n },\r\n getScrollElement: () => (isVirtual() ? wrapperEl : null),\r\n estimateSize: () => normalizedVirtual()?.itemSize ?? 40,\r\n get overscan() {\r\n return normalizedVirtual()?.overscan ?? 5;\r\n },\r\n\r\n measureElement: el => {\r\n let height = el.getBoundingClientRect().height;\r\n const next = el.nextElementSibling;\r\n if (next?.classList.contains('tbe31')) {\r\n height += next.getBoundingClientRect().height;\r\n }\r\n return height;\r\n },\r\n });\r\n\r\n const virtualTopPadding = createMemo(() => {\r\n if (!isVirtual()) return 0;\r\n const items = rowVirtualizer.getVirtualItems();\r\n return items.length > 0 ? (items[0]?.start ?? 0) : 0;\r\n });\r\n\r\n const virtualBottomPadding = createMemo(() => {\r\n if (!isVirtual()) return 0;\r\n const items = rowVirtualizer.getVirtualItems();\r\n const totalSize = rowVirtualizer.getTotalSize();\r\n return items.length > 0 ? totalSize - (items[items.length - 1]?.end ?? 0) : 0;\r\n });\r\n\r\n const [isSortingLoading, setIsSortingLoading] = createSignal(false);\r\n let _sortTimer: ReturnType<typeof setTimeout> | null = null;\r\n\r\n onCleanup(function clearSortTimer() {\r\n if (_sortTimer !== null) clearTimeout(_sortTimer);\r\n });\r\n\r\n function triggerVirtualSort(e: MouseEvent, columnId: string) {\r\n if (isSortingLoading()) return;\r\n const column = table.getColumn(columnId);\r\n if (!column?.getCanSort()) return;\r\n\r\n setIsSortingLoading(true);\r\n const t0 = Date.now();\r\n\r\n setTimeout(() => {\r\n column.getToggleSortingHandler()?.(e);\r\n\r\n const elapsed = Date.now() - t0;\r\n const delay = Math.max(0, 500 - elapsed);\r\n\r\n _sortTimer = setTimeout(() => {\r\n _sortTimer = null;\r\n setIsSortingLoading(false);\r\n\r\n if (wrapperEl) wrapperEl.scrollTop = 0;\r\n }, delay);\r\n }, 0);\r\n }\r\n\r\n let _autoLoadChain = Promise.resolve<void>(undefined);\r\n\r\n const [isFetchingMore, setIsFetchingMore] = createSignal(false);\r\n\r\n function callGetVirtualData() {\r\n if (!p.getVirtualData || isFetchingMore()) return;\r\n setIsFetchingMore(true);\r\n p.getVirtualData()\r\n .then(newRows => {\r\n setInternalData(prev => [...prev, ...newRows]);\r\n })\r\n .finally(() => {\r\n setIsFetchingMore(false);\r\n });\r\n }\r\n\r\n createEffect(function autoFillViewport() {\r\n if (!isVirtual() || p.loadingMore !== 'auto' || isFetchingMore()) return;\r\n\r\n _autoLoadChain = _autoLoadChain.then(\r\n () =>\r\n new Promise<void>(resolve => {\r\n queueMicrotask(() => {\r\n if (\r\n wrapperEl &&\r\n wrapperEl.isConnected &&\r\n p.getVirtualData &&\r\n p.loadingMore === 'auto' &&\r\n !isFetchingMore() &&\r\n wrapperEl.scrollHeight <= wrapperEl.clientHeight\r\n ) {\r\n callGetVirtualData();\r\n }\r\n resolve();\r\n });\r\n }),\r\n );\r\n });\r\n\r\n createEffect(function notifyTableReady() {\r\n p.onTableReady?.(table);\r\n });\r\n\r\n function resolveBodySpan(\r\n cell: import('@tanstack/solid-table').Cell<TData, unknown>,\r\n rowIndex: number,\r\n ): TableCellSpanResult {\r\n const perCol = cell.column.columnDef.meta?.onCell;\r\n if (perCol) return perCol(cell, rowIndex);\r\n return p.onCell?.(cell, rowIndex) ?? {};\r\n }\r\n\r\n let tableEl!: HTMLTableElement;\r\n let bodyTableEl!: HTMLTableElement;\r\n const tbodyId = createUniqueId();\r\n\r\n const [columnWidths, setColumnWidths] = createSignal<Record<string, number>>({});\r\n\r\n const [resizingIndex, setResizingIndex] = createSignal(-1);\r\n\r\n const [handlePositions, setHandlePositions] = createSignal<\r\n { left: number; top: number; height: number; colIndex: number }[]\r\n >([]);\r\n\r\n // When scroll.x is set, resizable is always disabled (types enforce this, but guard at runtime too)\r\n const resizable = createMemo(() => scrollX() === undefined && p.resizable !== false);\r\n\r\n const dataColumnSelector = 'thead tr:first-child th:not(.tbe23):not(.tbe22)';\r\n\r\n function getDataColumns() {\r\n return table\r\n .getAllLeafColumns()\r\n .filter(col => col.id !== EXPANDED_COLUMN_ID && col.id !== SELECTION_COLUMN_ID);\r\n }\r\n\r\n /** Effective minimum width: the smaller of the column's declared size and the meta minWidth (default 100). */\r\n function colMinWidth(col: {\r\n getSize(): number;\r\n columnDef: { meta?: { minWidth?: number } };\r\n }): number {\r\n return Math.min(col.getSize(), col.columnDef.meta?.minWidth ?? 100);\r\n }\r\n\r\n function snapshotColumnWidths(): Record<string, number> {\r\n const ths = tableEl.querySelectorAll<HTMLTableCellElement>(dataColumnSelector);\r\n const cols = getDataColumns();\r\n const widths: Record<string, number> = {};\r\n cols.forEach((col, i) => {\r\n if (ths[i]) {\r\n // Use getBoundingClientRect for sub-pixel precision — offsetWidth is an integer\r\n // and accumulated rounding can make the sum exceed the table width by 1-2px,\r\n // which triggers a spurious horizontal scrollbar when col widths are made explicit.\r\n widths[col.id] = ths[i].getBoundingClientRect().width;\r\n }\r\n });\r\n // Safety: trim any remaining excess (e.g. from non-data columns or float imprecision)\r\n // so the colgroup widths never exceed the table's own rendered width.\r\n const allThsTotal = Array.from(\r\n tableEl.querySelectorAll<HTMLTableCellElement>('thead tr:first-child th'),\r\n ).reduce((sum, th) => sum + th.getBoundingClientRect().width, 0);\r\n const excess = allThsTotal - tableEl.getBoundingClientRect().width;\r\n if (excess > 0 && cols.length > 0) {\r\n const lastColId = cols[cols.length - 1].id;\r\n if (widths[lastColId] !== undefined) {\r\n widths[lastColId] = Math.max(\r\n colMinWidth(cols[cols.length - 1]),\r\n widths[lastColId] - excess,\r\n );\r\n }\r\n }\r\n return widths;\r\n }\r\n\r\n function updateHandlePositions() {\r\n if (!tableEl) return;\r\n const ths = tableEl.querySelectorAll<HTMLTableCellElement>(dataColumnSelector);\r\n const cols = getDataColumns();\r\n\r\n let handleTop: number;\r\n let handleHeight: number;\r\n if (hasScrollY()) {\r\n const hdrRect = headerWrapperEl?.getBoundingClientRect();\r\n const bodyRect = wrapperEl?.getBoundingClientRect();\r\n handleTop = hdrRect?.top ?? 0;\r\n handleHeight = (hdrRect?.height ?? 0) + (bodyRect?.height ?? 0);\r\n } else {\r\n const tableRect = tableEl.getBoundingClientRect();\r\n handleTop = tableRect.top;\r\n handleHeight = tableRect.height;\r\n }\r\n\r\n const positions: { left: number; top: number; height: number; colIndex: number }[] = [];\r\n\r\n for (let i = 0; i < ths.length; i++) {\r\n const col = cols[i];\r\n if (!col || col.columnDef.enableResizing === false) continue;\r\n const thRect = ths[i].getBoundingClientRect();\r\n positions.push({\r\n left: thRect.right,\r\n top: handleTop,\r\n height: handleHeight,\r\n colIndex: i,\r\n });\r\n }\r\n\r\n setHandlePositions(positions);\r\n }\r\n\r\n function handleResizeStart(colIndex: number, e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n const cols = getDataColumns();\r\n const lastColIndex = cols.length - 1;\r\n const isLastCol = colIndex === lastColIndex;\r\n const colId = cols[colIndex].id;\r\n const lastColId = cols[lastColIndex].id;\r\n\r\n const startWidths = snapshotColumnWidths();\r\n setColumnWidths(startWidths);\r\n\r\n const startX = e.clientX;\r\n const startWidth = startWidths[colId] || 0;\r\n const minWidth = colMinWidth(cols[colIndex]);\r\n\r\n setResizingIndex(colIndex);\r\n\r\n let onMouseMove: (ev: MouseEvent) => void;\r\n\r\n if (isLastCol) {\r\n // Resizing the last column: distribute remaining width equally among all other columns.\r\n const totalWidth = Object.values(startWidths).reduce((a, b) => a + b, 0);\r\n const otherCols = cols.slice(0, lastColIndex);\r\n const otherMinTotal = otherCols.reduce((sum, col) => sum + colMinWidth(col), 0);\r\n\r\n onMouseMove = (ev: MouseEvent) => {\r\n const rawDelta = ev.clientX - startX;\r\n // Last col can't go below its minWidth; others can't go below their minWidths combined\r\n const newLastWidth = Math.max(\r\n minWidth,\r\n Math.min(totalWidth - otherMinTotal, startWidth + rawDelta),\r\n );\r\n const remainingWidth = totalWidth - newLastWidth;\r\n const perColWidth =\r\n otherCols.length > 0 ? remainingWidth / otherCols.length : remainingWidth;\r\n\r\n const newWidths: Record<string, number> = {};\r\n otherCols.forEach(col => {\r\n newWidths[col.id] = Math.max(colMinWidth(col), perColWidth);\r\n });\r\n newWidths[lastColId] = newLastWidth;\r\n setColumnWidths(newWidths);\r\n queueMicrotask(() => updateHandlePositions());\r\n };\r\n } else {\r\n // Resizing a non-last column: column N grows/shrinks and the ADJACENT right\r\n // column (N+1) absorbs the opposite delta. Total table width stays constant.\r\n const nextColIndex = colIndex + 1;\r\n const nextColId = cols[nextColIndex].id;\r\n const nextColStartWidth = startWidths[nextColId] || 0;\r\n const nextColMinWidth = colMinWidth(cols[nextColIndex]);\r\n\r\n onMouseMove = (ev: MouseEvent) => {\r\n const rawDelta = ev.clientX - startX;\r\n // Floor: dragged column can't go below its minWidth\r\n const minDelta = minWidth - startWidth;\r\n // Ceiling: next column can't go below its minWidth\r\n const maxDelta = nextColStartWidth - nextColMinWidth;\r\n const clampedDelta = Math.max(minDelta, Math.min(maxDelta, rawDelta));\r\n\r\n setColumnWidths(prev => ({\r\n ...prev,\r\n [colId]: startWidth + clampedDelta,\r\n [nextColId]: nextColStartWidth - clampedDelta,\r\n }));\r\n queueMicrotask(() => updateHandlePositions());\r\n };\r\n }\r\n\r\n const onMouseUp = () => {\r\n setResizingIndex(-1);\r\n document.removeEventListener('mousemove', onMouseMove);\r\n document.removeEventListener('mouseup', onMouseUp);\r\n document.documentElement.classList.remove('tbe-resizing');\r\n };\r\n\r\n document.addEventListener('mousemove', onMouseMove);\r\n document.addEventListener('mouseup', onMouseUp);\r\n document.documentElement.classList.add('tbe-resizing');\r\n }\r\n\r\n function handleResizeDblClick(colIndex: number, e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n const cols = getDataColumns();\r\n const currentWidths =\r\n Object.keys(columnWidths()).length > 0 ? columnWidths() : snapshotColumnWidths();\r\n const lastColIndex = cols.length - 1;\r\n\r\n if (colIndex === lastColIndex) {\r\n // Divider sau last col: chia đều tất cả các cột\r\n const total = cols.reduce((sum, col) => sum + (currentWidths[col.id] ?? col.getSize()), 0);\r\n const equalWidth = total / cols.length;\r\n const newWidths: Record<string, number> = {};\r\n cols.forEach(col => {\r\n newWidths[col.id] = Math.max(colMinWidth(col), equalWidth);\r\n });\r\n setColumnWidths(newWidths);\r\n } else {\r\n // Divider giữa cột colIndex và colIndex+1: chia đều tổng width 2 cột\r\n const colId = cols[colIndex].id;\r\n const nextColId = cols[colIndex + 1].id;\r\n const w1 = currentWidths[colId] ?? cols[colIndex].getSize();\r\n const w2 = currentWidths[nextColId] ?? cols[colIndex + 1].getSize();\r\n const half = (w1 + w2) / 2;\r\n const newW1 = Math.max(colMinWidth(cols[colIndex]), half);\r\n const newW2 = Math.max(colMinWidth(cols[colIndex + 1]), w1 + w2 - newW1);\r\n setColumnWidths(prev => ({\r\n ...currentWidths,\r\n ...prev,\r\n [colId]: newW1,\r\n [nextColId]: newW2,\r\n }));\r\n }\r\n\r\n queueMicrotask(() => updateHandlePositions());\r\n }\r\n\r\n const hasResizeWidths = () => Object.keys(columnWidths()).length > 0;\r\n\r\n /**\r\n * When resizing is active, override the table's `w-full` with an exact pixel width\r\n * equal to the sum of all column widths. This prevents the browser from proportionally\r\n * scaling columns to fill the container when the total is less than the container width,\r\n * and allows the table to grow beyond the container (triggering scroll) when columns expand.\r\n */\r\n const resizeTableWidth = createMemo<string | null>(() => {\r\n if (!hasResizeWidths()) return null;\r\n const widths = columnWidths();\r\n const total = table\r\n .getAllLeafColumns()\r\n .reduce((sum, col) => sum + (widths[col.id] ?? col.getSize()), 0);\r\n return `${total}px`;\r\n });\r\n\r\n /**\r\n * When scroll-x is active (resizable is off), compute explicit widths for every data column:\r\n * - Columns with a declared `size` keep that size.\r\n * - Remaining columns share the leftover space equally (min 100px each).\r\n * Returns null when scroll-x is not active.\r\n */\r\n const scrollXColumnWidths = createMemo<Record<string, number> | null>(() => {\r\n if (!hasScrollX()) return null;\r\n const cols = getDataColumns();\r\n const x = scrollX()!;\r\n const declaredCols = cols.filter(col => colsWithExplicitSize().has(col.id));\r\n const undeclaredCols = cols.filter(col => !colsWithExplicitSize().has(col.id));\r\n const declaredTotal = declaredCols.reduce((sum, col) => sum + col.getSize(), 0);\r\n const numUndeclared = undeclaredCols.length;\r\n let undeclaredWidth: number;\r\n if (typeof x === 'number') {\r\n const remaining = x - declaredTotal;\r\n undeclaredWidth = numUndeclared > 0 ? Math.max(100, remaining / numUndeclared) : 100;\r\n } else {\r\n undeclaredWidth = 100;\r\n }\r\n const widths: Record<string, number> = {};\r\n cols.forEach(col => {\r\n widths[col.id] = colsWithExplicitSize().has(col.id) ? col.getSize() : undeclaredWidth;\r\n });\r\n return widths;\r\n });\r\n\r\n const useFixedLayout = () => colsWithExplicitSize().size > 0 || hasResizeWidths() || hasScrollX();\r\n\r\n const [measuredWidths, setMeasuredWidths] = createSignal<Record<string, number>>({});\r\n\r\n function measureColumnWidths() {\r\n if (!tableEl) return;\r\n const ths = tableEl.querySelectorAll<HTMLTableCellElement>(dataColumnSelector);\r\n const cols = getDataColumns();\r\n const widths: Record<string, number> = {};\r\n cols.forEach((col, i) => {\r\n if (ths[i]) {\r\n widths[col.id] = ths[i].offsetWidth;\r\n }\r\n });\r\n setMeasuredWidths(widths);\r\n }\r\n\r\n const fixedColumnInfo = createMemo(() => {\r\n const widths = measuredWidths();\r\n if (Object.keys(widths).length === 0) return new Map<string, FixedInfo>();\r\n\r\n const cols = table.getAllLeafColumns();\r\n const colData = cols.map(col => ({\r\n id: col.id,\r\n fixed: col.columnDef.meta?.fixed,\r\n width: widths[col.id] || 0,\r\n }));\r\n\r\n return computeFixedColumnInfo(colData);\r\n });\r\n\r\n function getFixedCellStyle(colId: string): Record<string, string> | undefined {\r\n const info = fixedColumnInfo().get(colId);\r\n if (!info) return undefined;\r\n\r\n if (info.fixed === 'start') {\r\n return { left: `${info.offset}px` };\r\n }\r\n if (info.fixed === 'end') {\r\n return { right: `${info.offset}px` };\r\n }\r\n return undefined;\r\n }\r\n\r\n function getFixedCellClass(colId: string): string {\r\n const info = fixedColumnInfo().get(colId);\r\n if (!info) return '';\r\n\r\n return cn('tbe33', info.isLastStart && 'tbe34', info.isFirstEnd && 'tbe35');\r\n }\r\n\r\n const AlignHeaderClass = {\r\n start: 'justify-start',\r\n center: 'justify-center',\r\n end: 'justify-end',\r\n } as const;\r\n\r\n const AlignCellClass = {\r\n start: 'align-start',\r\n center: 'align-center',\r\n end: 'align-end',\r\n } as const;\r\n\r\n const AlignTdStyle = {\r\n start: 'text-left',\r\n center: 'text-center',\r\n end: 'text-right',\r\n } as const;\r\n\r\n function getColAlign(colId: string) {\r\n const col = table.getColumn(colId);\r\n return (col?.columnDef.meta?.align ?? 'start') as 'start' | 'center' | 'end';\r\n }\r\n\r\n function hasCellTooltip(colId: string): boolean {\r\n return !!table.getColumn(colId)?.columnDef.meta?.tooltip;\r\n }\r\n\r\n function wrapCellContent(colId: string, cellValue: unknown, content: JSX.Element): JSX.Element {\r\n const col = table.getColumn(colId);\r\n const tooltipOpts = col?.columnDef.meta?.tooltip;\r\n if (!tooltipOpts) return content;\r\n const rawContent = tooltipOpts.content;\r\n const resolvedContent = typeof rawContent === 'function' ? rawContent(cellValue) : rawContent;\r\n const tooltipProps = {\r\n ...tooltipOpts,\r\n ...(resolvedContent !== undefined && { content: resolvedContent }),\r\n containerId: tbodyId,\r\n position: tooltipOpts.position ?? ('top' as const),\r\n class: { root: 'tbe-tt-cell' },\r\n };\r\n return (\r\n <Tooltip type=\"portal\" {...(tooltipProps as any)}>\r\n {content}\r\n </Tooltip>\r\n );\r\n }\r\n\r\n function handleTableClick(e: MouseEvent) {\r\n const target = e.target as HTMLElement;\r\n\r\n const isOwnElement = (el: HTMLElement) => {\r\n const t = el.closest('table');\r\n return t === tableEl || t === bodyTableEl;\r\n };\r\n\r\n const th = target.closest('th[data-column-id]') as HTMLElement | null;\r\n if (th && isOwnElement(th)) {\r\n const columnId = th.dataset.columnId;\r\n if (columnId) {\r\n if (isVirtual() && p.enableSorting) {\r\n triggerVirtualSort(e, columnId);\r\n } else {\r\n const column = table.getColumn(columnId);\r\n if (column?.getCanSort()) {\r\n column.getToggleSortingHandler()?.(e);\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n const selectionTd = target.closest('td.tbe22') as HTMLElement | null;\r\n if (selectionTd && isOwnElement(selectionTd)) {\r\n const tr = selectionTd.closest('tr[data-row-id]') as HTMLElement | null;\r\n if (tr) {\r\n const rowId = tr.dataset.rowId;\r\n if (rowId !== undefined) {\r\n const row = table.getRow(rowId);\r\n if (row?.getCanSelect()) {\r\n row.toggleSelected();\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n const expandTd = target.closest('td.tbe23') as HTMLElement | null;\r\n if (expandTd && isOwnElement(expandTd)) {\r\n const tr = expandTd.closest('tr[data-row-id]') as HTMLElement | null;\r\n if (tr) {\r\n const rowId = tr.dataset.rowId;\r\n if (rowId !== undefined) {\r\n const row = table.getRow(rowId);\r\n if (row) {\r\n const opts = expandedOptions();\r\n const expandable = opts?.rowExpandable\r\n ? opts.rowExpandable(row.original, row.index)\r\n : true;\r\n if (expandable) {\r\n toggleRowExpanded(row.id, row.original);\r\n }\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n const tr = target.closest('tr[data-row-id]') as HTMLElement | null;\r\n if (tr && isOwnElement(tr) && p.onRowClick) {\r\n const rowId = tr.dataset.rowId;\r\n if (rowId !== undefined) {\r\n const row = table.getRow(rowId);\r\n if (row) {\r\n p.onRowClick(row, e);\r\n }\r\n }\r\n }\r\n }\r\n\r\n onMount(() => {\r\n if (resizable()) {\r\n updateHandlePositions();\r\n\r\n window.addEventListener('scroll', updateHandlePositions, { passive: true, capture: true });\r\n onCleanup(function removeWindowScrollListener() {\r\n window.removeEventListener('scroll', updateHandlePositions, { capture: true });\r\n });\r\n }\r\n if (hasFixedColumns()) {\r\n measureColumnWidths();\r\n }\r\n\r\n if (resizable() || hasFixedColumns()) {\r\n const observer = new ResizeObserver(() => {\r\n if (resizable()) updateHandlePositions();\r\n if (hasFixedColumns()) measureColumnWidths();\r\n });\r\n observer.observe(tableEl);\r\n onCleanup(function disconnectResizeObserver() {\r\n observer.disconnect();\r\n });\r\n }\r\n\r\n if (isVirtual()) {\r\n const handleScroll = () => {\r\n if (!p.getVirtualData || p.loadingMore !== 'auto') return;\r\n const opts = normalizedVirtual();\r\n const threshold = (opts?.itemSize ?? 40) * (opts?.overscan ?? 5);\r\n if (wrapperEl.scrollTop + wrapperEl.clientHeight >= wrapperEl.scrollHeight - threshold) {\r\n callGetVirtualData();\r\n }\r\n };\r\n wrapperEl.addEventListener('scroll', handleScroll, { passive: true });\r\n onCleanup(function removeScrollListener() {\r\n wrapperEl.removeEventListener('scroll', handleScroll);\r\n });\r\n }\r\n\r\n if (hasScrollY()) {\r\n const syncHeaderScroll = () => {\r\n if (headerWrapperEl) headerWrapperEl.scrollLeft = wrapperEl.scrollLeft;\r\n if (resizable()) updateHandlePositions();\r\n };\r\n wrapperEl.addEventListener('scroll', syncHeaderScroll, { passive: true });\r\n onCleanup(() => wrapperEl.removeEventListener('scroll', syncHeaderScroll));\r\n }\r\n });\r\n\r\n return (\r\n <div class={cn('tbe09', p.paginationProps !== undefined && 'tbe10')}>\r\n <Show\r\n when={\r\n p.paginationProps !== undefined && !p.virtual && p.paginationProps?.position === 'start'\r\n }\r\n >\r\n <Pagination\r\n {...p.paginationProps}\r\n onChange={(page, size) => {\r\n table.setPageIndex(page - 1);\r\n if (size !== table.getState().pagination.pageSize) {\r\n table.setPageSize(size);\r\n }\r\n p.paginationProps?.onChange?.(page, size);\r\n }}\r\n />\r\n </Show>\r\n <div\r\n class={cn(\r\n 'tbe11',\r\n border()?.outer && 'tbe42',\r\n resizable() && 'tbe36',\r\n resizingIndex() >= 0 && 'tbe39',\r\n (hasFixedColumns() || hasScrollY()) && 'tbe13',\r\n getColor(p.color),\r\n p.rounded,\r\n p.rounded && 'overflow-hidden',\r\n p.class?.root,\r\n )}\r\n style={{\r\n ...(scrollXWrapper() ? { 'max-width': scrollXWrapper() } : {}),\r\n ...(hasScrollX() && p.rounded ? { 'overflow-x': 'clip' } : {}),\r\n }}\r\n >\r\n <Show when={p.headerPanel}>\r\n <div class={cn('tbe40', border()?.outer && 'tbe41', p.class?.headerPanel)}>\r\n {p.headerPanel?.()}\r\n </div>\r\n </Show>\r\n <Show when={hasScrollY() && p.showHeader}>\r\n <div ref={el => (headerWrapperEl = el)} class={cn('tbe12', 'tbe14-hdr')}>\r\n <table\r\n ref={tableEl}\r\n class={cn(\r\n 'tbe01',\r\n getTableClass(p),\r\n border()?.horizontal && 'tbe43',\r\n border()?.vertical && 'tbe44',\r\n useFixedLayout() && 'table-fixed',\r\n p.class?.table,\r\n )}\r\n style={{\r\n ...(resizeTableWidth()\r\n ? { width: resizeTableWidth()!, 'min-width': resizeTableWidth()! }\r\n : scrollXTable()\r\n ? { 'min-width': scrollXTable()! }\r\n : {}),\r\n }}\r\n onClick={handleTableClick}\r\n >\r\n <Show when={useFixedLayout()}>\r\n <colgroup>\r\n <For each={table.getAllLeafColumns()}>\r\n {col => {\r\n const isNonResizable = () =>\r\n col.id === EXPANDED_COLUMN_ID || col.id === SELECTION_COLUMN_ID;\r\n return (\r\n <col\r\n style={{\r\n ...(isNonResizable()\r\n ? { width: `${col.getSize()}px` }\r\n : hasResizeWidths()\r\n ? { width: `${columnWidths()[col.id] || col.getSize()}px` }\r\n : scrollXColumnWidths()\r\n ? { width: `${scrollXColumnWidths()![col.id] ?? 100}px` }\r\n : colsWithExplicitSize().has(col.id)\r\n ? { width: `${col.getSize()}px` }\r\n : {}),\r\n }}\r\n />\r\n );\r\n }}\r\n </For>\r\n </colgroup>\r\n </Show>\r\n <thead\r\n class={cn(\r\n p.class?.thead,\r\n isSortingLoading() ? 'pointer-events-none cursor-wait' : '',\r\n )}\r\n >\r\n <For each={table.getHeaderGroups()}>\r\n {(headerGroup, groupIndex) => {\r\n const totalRows = table.getHeaderGroups().length;\r\n\r\n const earlyRenderedCols = new Set(\r\n table\r\n .getHeaderGroups()\r\n .slice(0, groupIndex())\r\n .flatMap(g =>\r\n g.headers\r\n .filter(h => h.isPlaceholder && h.column.getLeafColumns().length === 1)\r\n .map(h => h.column.id),\r\n ),\r\n );\r\n return (\r\n <tr class={cn(p.class?.tr, p.class?.headerRow)}>\r\n <For each={headerGroup.headers}>\r\n {header => {\r\n if (earlyRenderedCols.has(header.column.id)) return null;\r\n\r\n const isEarlyLeaf =\r\n header.isPlaceholder && header.column.getLeafColumns().length === 1;\r\n const rowSpanVal = isEarlyLeaf ? totalRows - groupIndex() : 1;\r\n\r\n if (header.isPlaceholder && !isEarlyLeaf) return null;\r\n const headerSpan =\r\n header.column.columnDef.meta?.onHeaderCell?.(header) ?? {};\r\n if (headerSpan.colSpan === 0) return null;\r\n const finalColSpan = headerSpan.colSpan ?? header.colSpan;\r\n const finalRowSpan =\r\n headerSpan.rowSpan ?? (rowSpanVal > 1 ? rowSpanVal : undefined);\r\n return (\r\n <th\r\n class={cn(\r\n p.class?.th,\r\n header.column.getCanSort() && 'tbe18',\r\n header.column.id === SELECTION_COLUMN_ID && 'tbe22',\r\n header.column.id === EXPANDED_COLUMN_ID && 'tbe23',\r\n getFixedCellClass(header.column.id),\r\n )}\r\n colSpan={finalColSpan}\r\n rowSpan={finalRowSpan}\r\n data-column-id={header.column.id}\r\n style={getFixedCellStyle(header.column.id)}\r\n >\r\n <div\r\n class={cn(\r\n 'tbe15',\r\n (colsWithExplicitSize().has(header.column.id) ||\r\n hasResizeWidths()) &&\r\n header.column.id !== SELECTION_COLUMN_ID &&\r\n header.column.id !== EXPANDED_COLUMN_ID &&\r\n 'tbe16',\r\n header.column.id !== SELECTION_COLUMN_ID &&\r\n header.column.id !== EXPANDED_COLUMN_ID &&\r\n AlignHeaderClass[getColAlign(header.column.id)],\r\n )}\r\n >\r\n <span class=\"tbe17\">\r\n {flexRender(\r\n header.column.columnDef.header,\r\n header.getContext(),\r\n )}\r\n </span>\r\n <Show when={header.column.getCanSort()}>\r\n <span class=\"tbe19\">\r\n <Switch\r\n fallback={\r\n <ChevronsUpDown\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n }\r\n >\r\n <Match when={header.column.getIsSorted() === 'asc'}>\r\n <ChevronUp\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n </Match>\r\n <Match when={header.column.getIsSorted() === 'desc'}>\r\n <ChevronDown\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n </Match>\r\n </Switch>\r\n <Show\r\n when={\r\n header.column.getIsSorted() !== false &&\r\n (header.column.getSortIndex() ?? -1) >= 0 &&\r\n table.getState().sorting.length > 1\r\n }\r\n >\r\n <span class=\"tbe20\">\r\n {(header.column.getSortIndex() ?? 0) + 1}\r\n </span>\r\n </Show>\r\n </span>\r\n </Show>\r\n </div>\r\n </th>\r\n );\r\n }}\r\n </For>\r\n </tr>\r\n );\r\n }}\r\n </For>\r\n </thead>\r\n </table>\r\n </div>\r\n </Show>\r\n <div\r\n ref={el => (wrapperEl = el)}\r\n class={cn('tbe12', hasScroll() && 'tbe14')}\r\n style={{\r\n ...(scrollY() ? { 'max-height': scrollY() } : {}),\r\n }}\r\n >\r\n <table\r\n ref={el => {\r\n bodyTableEl = el;\r\n if (!hasScrollY()) tableEl = el;\r\n }}\r\n class={cn(\r\n 'tbe01',\r\n getTableClass(p),\r\n border()?.horizontal && 'tbe43',\r\n border()?.vertical && 'tbe44',\r\n useFixedLayout() && 'table-fixed',\r\n p.class?.table,\r\n )}\r\n style={{\r\n ...(resizeTableWidth()\r\n ? { width: resizeTableWidth()!, 'min-width': resizeTableWidth()! }\r\n : scrollXTable()\r\n ? { 'min-width': scrollXTable()! }\r\n : {}),\r\n }}\r\n onClick={handleTableClick}\r\n >\r\n <Show when={useFixedLayout()}>\r\n <colgroup>\r\n <For each={table.getAllLeafColumns()}>\r\n {col => {\r\n const isNonResizable = () =>\r\n col.id === EXPANDED_COLUMN_ID || col.id === SELECTION_COLUMN_ID;\r\n return (\r\n <col\r\n style={{\r\n ...(isNonResizable()\r\n ? { width: `${col.getSize()}px` }\r\n : hasResizeWidths()\r\n ? { width: `${columnWidths()[col.id] || col.getSize()}px` }\r\n : scrollXColumnWidths()\r\n ? { width: `${scrollXColumnWidths()![col.id] ?? 100}px` }\r\n : colsWithExplicitSize().has(col.id)\r\n ? { width: `${col.getSize()}px` }\r\n : {}),\r\n }}\r\n />\r\n );\r\n }}\r\n </For>\r\n </colgroup>\r\n </Show>\r\n\r\n <Show when={!hasScrollY() && p.showHeader}>\r\n <thead\r\n class={cn(\r\n p.class?.thead,\r\n isSortingLoading() ? 'pointer-events-none cursor-wait' : '',\r\n )}\r\n >\r\n <For each={table.getHeaderGroups()}>\r\n {(headerGroup, groupIndex) => {\r\n const totalRows = table.getHeaderGroups().length;\r\n const earlyRenderedCols = new Set(\r\n table\r\n .getHeaderGroups()\r\n .slice(0, groupIndex())\r\n .flatMap(g =>\r\n g.headers\r\n .filter(h => h.isPlaceholder && h.column.getLeafColumns().length === 1)\r\n .map(h => h.column.id),\r\n ),\r\n );\r\n return (\r\n <tr class={cn(p.class?.tr, p.class?.headerRow)}>\r\n <For each={headerGroup.headers}>\r\n {header => {\r\n if (earlyRenderedCols.has(header.column.id)) return null;\r\n const isEarlyLeaf =\r\n header.isPlaceholder && header.column.getLeafColumns().length === 1;\r\n const rowSpanVal = isEarlyLeaf ? totalRows - groupIndex() : 1;\r\n if (header.isPlaceholder && !isEarlyLeaf) return null;\r\n const headerSpan =\r\n header.column.columnDef.meta?.onHeaderCell?.(header) ?? {};\r\n if (headerSpan.colSpan === 0) return null;\r\n const finalColSpan = headerSpan.colSpan ?? header.colSpan;\r\n const finalRowSpan =\r\n headerSpan.rowSpan ?? (rowSpanVal > 1 ? rowSpanVal : undefined);\r\n return (\r\n <th\r\n class={cn(\r\n p.class?.th,\r\n header.column.getCanSort() && 'tbe18',\r\n header.column.id === SELECTION_COLUMN_ID && 'tbe22',\r\n header.column.id === EXPANDED_COLUMN_ID && 'tbe23',\r\n getFixedCellClass(header.column.id),\r\n )}\r\n colSpan={finalColSpan}\r\n rowSpan={finalRowSpan}\r\n data-column-id={header.column.id}\r\n style={getFixedCellStyle(header.column.id)}\r\n >\r\n <div\r\n class={cn(\r\n 'tbe15',\r\n (colsWithExplicitSize().has(header.column.id) ||\r\n hasResizeWidths()) &&\r\n header.column.id !== SELECTION_COLUMN_ID &&\r\n header.column.id !== EXPANDED_COLUMN_ID &&\r\n 'tbe16',\r\n header.column.id !== SELECTION_COLUMN_ID &&\r\n header.column.id !== EXPANDED_COLUMN_ID &&\r\n AlignHeaderClass[getColAlign(header.column.id)],\r\n )}\r\n >\r\n <span class=\"tbe17\">\r\n {flexRender(\r\n header.column.columnDef.header,\r\n header.getContext(),\r\n )}\r\n </span>\r\n <Show when={header.column.getCanSort()}>\r\n <span class=\"tbe19\">\r\n <Switch\r\n fallback={\r\n <ChevronsUpDown\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n }\r\n >\r\n <Match when={header.column.getIsSorted() === 'asc'}>\r\n <ChevronUp\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n </Match>\r\n <Match when={header.column.getIsSorted() === 'desc'}>\r\n <ChevronDown\r\n size={14}\r\n stroke-width={3}\r\n color=\"var(--color)\"\r\n />\r\n </Match>\r\n </Switch>\r\n\r\n <Show\r\n when={\r\n header.column.getIsSorted() !== false &&\r\n (header.column.getSortIndex() ?? -1) >= 0 &&\r\n table.getState().sorting.length > 1\r\n }\r\n >\r\n <span class=\"tbe20\">\r\n {(header.column.getSortIndex() ?? 0) + 1}\r\n </span>\r\n </Show>\r\n </span>\r\n </Show>\r\n </div>\r\n </th>\r\n );\r\n }}\r\n </For>\r\n </tr>\r\n );\r\n }}\r\n </For>\r\n </thead>\r\n </Show>\r\n\r\n <Show\r\n when={isVirtual() && !isEmpty()}\r\n fallback={\r\n <tbody id={tbodyId} class={cn(p.class?.tbody)}>\r\n <Show\r\n when={!isEmpty()}\r\n fallback={\r\n <tr>\r\n <td\r\n colSpan={table.getAllColumns().length}\r\n class={cn('tbe45', p.class?.empty)}\r\n >\r\n {p.emptyContent ?? 'No data'}\r\n </td>\r\n </tr>\r\n }\r\n >\r\n <For each={table.getRowModel().rows}>\r\n {(row, rowIndex) => {\r\n const expanded = () => isRowExpanded(row.id);\r\n const opts = expandedOptions();\r\n\r\n return (\r\n <>\r\n <tr\r\n class={cn(\r\n p.class?.tr,\r\n p.class?.bodyRow,\r\n row.getIsSelected() && 'tbe27',\r\n expanded() && 'tbe28',\r\n rowIndex() % 2 === 0 ? 'tbe29' : 'tbe30',\r\n )}\r\n data-row-id={row.id}\r\n >\r\n <For each={row.getVisibleCells()}>\r\n {cell => {\r\n const isSpecial =\r\n cell.column.id === SELECTION_COLUMN_ID ||\r\n cell.column.id === EXPANDED_COLUMN_ID;\r\n const align = isSpecial ? 'start' : getColAlign(cell.column.id);\r\n const hasTooltip = !isSpecial && hasCellTooltip(cell.column.id);\r\n const span: TableCellSpanResult = resolveBodySpan(\r\n cell,\r\n rowIndex(),\r\n );\r\n if (span.colSpan === 0 || span.rowSpan === 0) return null;\r\n return (\r\n <td\r\n class={cn(\r\n p.class?.td,\r\n cell.column.id === SELECTION_COLUMN_ID && 'tbe22',\r\n cell.column.id === EXPANDED_COLUMN_ID && 'tbe23',\r\n getFixedCellClass(cell.column.id),\r\n hasTooltip && 'relative',\r\n !isSpecial && AlignTdStyle[align],\r\n )}\r\n style={{\r\n ...getFixedCellStyle(cell.column.id),\r\n }}\r\n colSpan={span.colSpan}\r\n rowSpan={span.rowSpan}\r\n >\r\n <Show\r\n when={\r\n (colsWithExplicitSize().has(cell.column.id) ||\r\n hasResizeWidths()) &&\r\n !isSpecial\r\n }\r\n fallback={wrapCellContent(\r\n cell.column.id,\r\n cell.getValue(),\r\n flexRender(cell.column.columnDef.cell, cell.getContext()),\r\n )}\r\n >\r\n <div class={cn('tbe21', AlignCellClass[align])}>\r\n {wrapCellContent(\r\n cell.column.id,\r\n cell.getValue(),\r\n flexRender(\r\n cell.column.columnDef.cell,\r\n cell.getContext(),\r\n ),\r\n )}\r\n </div>\r\n </Show>\r\n </td>\r\n );\r\n }}\r\n </For>\r\n </tr>\r\n <Show when={hasExpandableRows() && expanded()}>\r\n <tr class=\"tbe31\">\r\n <td colSpan={row.getVisibleCells().length} class=\"tbe32\">\r\n {opts!.expandedRowRender(row.original, rowIndex(), 0, true)}\r\n </td>\r\n </tr>\r\n </Show>\r\n </>\r\n );\r\n }}\r\n </For>\r\n </Show>\r\n </tbody>\r\n }\r\n >\r\n <Show\r\n when={!isSortingLoading()}\r\n fallback={\r\n <tbody>\r\n <tr>\r\n <td\r\n colSpan={table.getAllColumns().length}\r\n class=\"border-none p-0\"\r\n style={{\r\n height: scrollY() ?? '200px',\r\n }}\r\n >\r\n <div class=\"flex h-full items-center justify-center gap-2 opacity-60\">\r\n <span class=\"text-base\">Sorting</span>\r\n <span class=\"loading loading-dots loading-sm text-base-content\" />\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n }\r\n >\r\n <tbody id={tbodyId} class={p.class?.tbody}>\r\n <Show when={virtualTopPadding() > 0}>\r\n <tr>\r\n <td\r\n colSpan={table.getAllColumns().length}\r\n class=\"border-none p-0\"\r\n style={{ height: `${virtualTopPadding()}px` }}\r\n />\r\n </tr>\r\n </Show>\r\n\r\n <For each={rowVirtualizer.getVirtualItems()}>\r\n {virtualRow => {\r\n const rows = table.getRowModel().rows;\r\n const row = rows[virtualRow.index];\r\n const rowIndex = virtualRow.index;\r\n if (!row) return null;\r\n\r\n const expanded = () => isRowExpanded(row.id);\r\n const opts = expandedOptions();\r\n\r\n let trEl: HTMLTableRowElement | undefined;\r\n\r\n createEffect(\r\n on(\r\n expanded,\r\n () => {\r\n queueMicrotask(() => {\r\n if (trEl?.isConnected && trEl.hasAttribute('data-index'))\r\n rowVirtualizer.measureElement(trEl);\r\n });\r\n },\r\n { defer: true },\r\n ),\r\n );\r\n\r\n return (\r\n <>\r\n <tr\r\n ref={el => {\r\n trEl = el;\r\n if (el)\r\n queueMicrotask(() => {\r\n if (el.isConnected) rowVirtualizer.measureElement(el);\r\n });\r\n }}\r\n data-index={virtualRow.index}\r\n class={cn(\r\n p.class?.tr,\r\n p.class?.bodyRow,\r\n row.getIsSelected() && 'tbe27',\r\n expanded() && 'tbe28',\r\n rowIndex % 2 === 0 ? 'tbe29' : 'tbe30',\r\n )}\r\n data-row-id={row.id}\r\n >\r\n <For each={row.getVisibleCells()}>\r\n {cell => {\r\n const isSpecial =\r\n cell.column.id === SELECTION_COLUMN_ID ||\r\n cell.column.id === EXPANDED_COLUMN_ID;\r\n const align = isSpecial ? 'start' : getColAlign(cell.column.id);\r\n const hasTooltip = !isSpecial && hasCellTooltip(cell.column.id);\r\n return (\r\n <td\r\n class={cn(\r\n p.class?.td,\r\n cell.column.id === SELECTION_COLUMN_ID && 'tbe22',\r\n cell.column.id === EXPANDED_COLUMN_ID && 'tbe23',\r\n getFixedCellClass(cell.column.id),\r\n hasTooltip && 'relative p-0',\r\n !isSpecial && AlignTdStyle[align],\r\n )}\r\n style={{\r\n ...getFixedCellStyle(cell.column.id),\r\n }}\r\n >\r\n <Show\r\n when={\r\n (colsWithExplicitSize().has(cell.column.id) ||\r\n hasResizeWidths()) &&\r\n !isSpecial\r\n }\r\n fallback={wrapCellContent(\r\n cell.column.id,\r\n cell.getValue(),\r\n flexRender(cell.column.columnDef.cell, cell.getContext()),\r\n )}\r\n >\r\n <div class={cn('tbe21', AlignCellClass[align])}>\r\n {wrapCellContent(\r\n cell.column.id,\r\n cell.getValue(),\r\n flexRender(cell.column.columnDef.cell, cell.getContext()),\r\n )}\r\n </div>\r\n </Show>\r\n </td>\r\n );\r\n }}\r\n </For>\r\n </tr>\r\n <Show when={hasExpandableRows() && expanded()}>\r\n <tr class=\"tbe31\">\r\n <td colSpan={row.getVisibleCells().length} class=\"tbe32\">\r\n {opts!.expandedRowRender(row.original, rowIndex, 0, true)}\r\n </td>\r\n </tr>\r\n </Show>\r\n </>\r\n );\r\n }}\r\n </For>\r\n\r\n <Show when={virtualBottomPadding() > 0}>\r\n <tr>\r\n <td\r\n colSpan={table.getAllColumns().length}\r\n class=\"border-none p-0\"\r\n style={{ height: `${virtualBottomPadding()}px` }}\r\n />\r\n </tr>\r\n </Show>\r\n\r\n <Switch>\r\n <Match when={p.loadingMore === 'auto' && isFetchingMore()}>\r\n <tr>\r\n <td colSpan={table.getAllColumns().length} class=\"border-none py-2\">\r\n <div class=\"flex justify-center\">\r\n <span class=\"loading loading-dots loading-sm opacity-60\" />\r\n </div>\r\n </td>\r\n </tr>\r\n </Match>\r\n <Match when={p.loadingMore === 'manual'}>\r\n <tr>\r\n <td colSpan={table.getAllColumns().length} class=\"border-none py-2\">\r\n <div class=\"flex justify-center\">\r\n <Button\r\n variant={'default'}\r\n color={p.color}\r\n loading={isFetchingMore()}\r\n onClick={() => callGetVirtualData()}\r\n size={p.size}\r\n >\r\n Load more\r\n </Button>\r\n </div>\r\n </td>\r\n </tr>\r\n </Match>\r\n </Switch>\r\n </tbody>\r\n </Show>\r\n </Show>\r\n </table>\r\n </div>\r\n <Show when={resizable()}>\r\n <For each={handlePositions()}>\r\n {pos => (\r\n <div\r\n class={cn('tbe37', resizingIndex() === pos.colIndex && 'tbe38')}\r\n style={{\r\n left: `${pos.left}px`,\r\n top: `${pos.top}px`,\r\n height: `${pos.height}px`,\r\n }}\r\n onMouseDown={e => handleResizeStart(pos.colIndex, e)}\r\n onDblClick={e => handleResizeDblClick(pos.colIndex, e)}\r\n />\r\n )}\r\n </For>\r\n </Show>\r\n <Show when={p.footerPanel}>\r\n <div class={cn('tbe40', border()?.outer && 'border-c3/50 border-t', p.class?.tfoot)}>\r\n {p.footerPanel?.()}\r\n </div>\r\n </Show>\r\n </div>\r\n <Show\r\n when={\r\n p.paginationProps !== undefined &&\r\n !p.virtual &&\r\n (p.paginationProps?.position ?? 'end') === 'end'\r\n }\r\n >\r\n <Pagination\r\n {...p.paginationProps}\r\n onChange={(page, size) => {\r\n table.setPageIndex(page - 1);\r\n if (size !== table.getState().pagination.pageSize) {\r\n table.setPageSize(size);\r\n }\r\n p.paginationProps?.onChange?.(page, size);\r\n }}\r\n />\r\n </Show>\r\n </div>\r\n );\r\n}\r\n\r\nTable.Selection = function <TData = any>(\r\n options?: TableSelectionOptions<TData>,\r\n): ColumnDef<TData, any> {\r\n const opts: TableSelectionOptions<TData> = {\r\n type: 'checkbox',\r\n hideSelectAll: false,\r\n width: 32,\r\n ...options,\r\n };\r\n\r\n return {\r\n id: SELECTION_COLUMN_ID,\r\n size: typeof opts.width === 'number' ? opts.width : 48,\r\n enableSorting: false,\r\n enableResizing: false,\r\n meta: {\r\n _selection: opts,\r\n },\r\n header: ({ table }) => {\r\n if (opts.title !== undefined) return opts.title;\r\n if (opts.type === 'radio' || opts.hideSelectAll) return null;\r\n\r\n return (\r\n <input\r\n type=\"checkbox\"\r\n class=\"checkbox checkbox-xs checkbox-primary mx-auto\"\r\n checked={table.getIsAllRowsSelected()}\r\n ref={el => {\r\n createEffect(function syncIndeterminate() {\r\n el.indeterminate = table.getIsSomeRowsSelected();\r\n });\r\n }}\r\n onChange={table.getToggleAllRowsSelectedHandler()}\r\n />\r\n );\r\n },\r\n cell: ({ row }) => {\r\n const index = row.index;\r\n const checked = () => row.getIsSelected();\r\n const record = row.original;\r\n\r\n if (opts.renderCell) {\r\n return (\r\n <span\r\n onClick={e => {\r\n e.stopPropagation();\r\n row.toggleSelected();\r\n }}\r\n class=\"cursor-pointer\"\r\n >\r\n {opts.renderCell(checked(), record, index)}\r\n </span>\r\n );\r\n }\r\n\r\n if (opts.type === 'radio') {\r\n return (\r\n <input\r\n type=\"radio\"\r\n class=\"radio radio-xs radio-primary\"\r\n checked={checked()}\r\n disabled={!row.getCanSelect()}\r\n onChange={row.getToggleSelectedHandler()}\r\n onClick={e => e.stopPropagation()}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <input\r\n type=\"checkbox\"\r\n class=\"checkbox checkbox-xs checkbox-primary\"\r\n checked={checked()}\r\n disabled={!row.getCanSelect()}\r\n onChange={row.getToggleSelectedHandler()}\r\n onClick={e => e.stopPropagation()}\r\n />\r\n );\r\n },\r\n };\r\n};\r\n\r\nTable.Expanded = function <TData = any>(\r\n options: TableExpandedOptions<TData>,\r\n): ColumnDef<TData, any> {\r\n options = mergeProps(\r\n {\r\n width: 48,\r\n },\r\n options,\r\n );\r\n\r\n return {\r\n id: EXPANDED_COLUMN_ID,\r\n size: options.width,\r\n enableSorting: false,\r\n enableResizing: false,\r\n meta: {\r\n _expanded: options,\r\n },\r\n header: () => null,\r\n cell: ({ row, table }) => {\r\n const index = row.index;\r\n const record = row.original;\r\n const api = table.options.meta?._expandApi;\r\n const expandable = options.rowExpandable ? options.rowExpandable(record, index) : true;\r\n\r\n if (!expandable || !api) return null;\r\n\r\n const expanded = () => api.isRowExpanded(row.id);\r\n\r\n return (\r\n <span\r\n class=\"tbe24 cursor-pointer\"\r\n onClick={e => {\r\n e.stopPropagation();\r\n api.toggleRowExpanded(row.id, record);\r\n }}\r\n >\r\n <Show\r\n when={options.expandIcon}\r\n fallback={\r\n <ChevronRight size={16} stroke-width={2} class={cn('tbe25', expanded() && 'tbe26')} />\r\n }\r\n >\r\n {options.expandIcon!(expanded())}\r\n </Show>\r\n </span>\r\n );\r\n },\r\n };\r\n};\r\n\r\nexport { Table };\r\n"],"mappings":"2nEA+CA,SAASwC,GAAgBC,EAAoE,CACvFA,OAAWC,IAAAA,GAGf,OAFID,IAAW,GAAa,CAAEE,MAAO,GAAMC,WAAY,GAAMC,SAAU,GAAM,CACzEJ,IAAW,GAAc,CAAEE,MAAO,GAAOC,WAAY,GAAOC,SAAU,GAAO,CAC1EJ,EAGT,SAASK,EAAeC,EAAqD,CAC3E,OAAQA,EAAR,CACE,IAAK,GACH,MAAO,CAAEC,KAAM,GAAOC,KAAM,GAAM,CACpC,IAAK,GACL,KAAKP,IAAAA,GACH,MAAO,CAAEM,KAAM,GAAOC,KAAM,GAAO,CACrC,QACE,OAAOF,GAIb,IAAMG,GAAiB,CACrBC,GAAI,QACJC,GAAI,QACJC,GAAI,QACJC,GAAI,QACJC,GAAI,QACL,CAED,SAASE,GAAcC,EAA+B,CACpD,IAAMC,EAAoB,EAAE,CACtBZ,EAAQD,EAAeY,EAAKX,MAAM,CAIxC,OA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GAAI,EAFeQ,GAAQ0P,eAAgB1P,EAAQ0P,cAAcjR,EAAQmR,EAAM,GAE5D,CAACoO,EAAK,OAAO,KAEhC,IAAM1G,MAAiB0G,EAAI3f,cAAcD,EAAI3D,GAAG,CAEhD,WAAA,CAAA,IAAAwjB,EAAAC,IAAA,CAcsC,MAdtCD,GAAA5L,QAGalO,GAAK,CACZA,EAAEkF,iBAAiB,CACnB2U,EAAIxf,kBAAkBJ,EAAI3D,GAAIgE,EAAO,EACtCyS,EAAA+M,EAAAxP,EAEA9W,EAAI,CAAA,IACHwZ,MAAI,CAAA,OAAEnR,EAAQme,YAAU,IACxBtJ,UAAQ,CAAA,OAAApG,EACL3X,GAAY,CAACkD,KAAM,GAAE,eAAgB,EAAC,IAAA,OAAA,CAAA,OAAS7D,EAAG,QAASmhB,GAAU,EAAI,QAAQ,EAAA,CAAA,EAAA,IAAA3I,UAAA,CAAA,OAGnF3O,EAAQme,WAAY7G,GAAU,CAAC,EAAA,CAAA,CAAA,CAAA2G,KAAA,EAKzC,EAGcG,EAAA,CAAA,QAAA,YAAA,WAAA,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","names":["BaseColorProps","cn","getColor","AlertCircle","Check","Clock","Component","createMemo","For","JSX","mergeProps","Show","splitProps","TimelineItem","TimelineItemStatus","TimelineProps","STATUS_COLOR","Record","pending","active","done","error","resolveItemColor","item","globalColor","color","status","DotProps","colorClass","class","TimelineDot","p","_el$","_tmpl$3","_$insert","_$createComponent","when","loading","children","_tmpl$","_$memo","icon","_el$3","_tmpl$2","size","_$effect","_$className","ContentProps","TimelineContent","_el$4","timestamp","_el$5","title","_el$6","content","_el$7","description","resolvePosition","mode","itemPosition","index","Timeline","props","merged","items","orientation","const","reverse","nativeProps","isVertical","displayItems","globalColorClass","_el$8","_$spread","_$mergeProps","root","each","i","pos","position","itemColorClass","isLast","length","_el$9","_el$0","label","_el$1","_tmpl$4","dot","_el$10","connector","_el$11","_el$12","_el$13","_tmpl$5","_el$14","firstChild","_el$15","nextSibling","_p$","_v$","_v$2","e","t","undefined","_el$16"],"sources":["../../../src/components/timeline/timeline.tsx"],"sourcesContent":["import { BaseColorProps } from '@/type';\r\nimport { cn } from '@/utils/cn';\r\nimport { getColor } from '@/utils/helper';\r\nimport AlertCircle from 'lucide-solid/icons/alert-circle';\r\nimport Check from 'lucide-solid/icons/check';\r\nimport Clock from 'lucide-solid/icons/clock';\r\nimport { Component, createMemo, For, JSX, mergeProps, Show, splitProps } from 'solid-js';\r\nimport { TimelineItem, TimelineItemStatus, TimelineProps } from './timeline.types';\r\n\r\n// ─── Helpers ──────────────────────────────────────────────────────────────────\r\n\r\n/** Map status → màu DaisyUI mặc định (dùng khi item không có `color` prop) */\r\nconst STATUS_COLOR: Record<TimelineItemStatus, BaseColorProps> = {\r\n pending: 'neutral',\r\n active: 'primary',\r\n done: 'success',\r\n error: 'error',\r\n};\r\n\r\n/** Resolve màu cuối cùng của item: ưu tiên item.color > status-mapped > global */\r\nconst resolveItemColor = (item: TimelineItem, globalColor: BaseColorProps): BaseColorProps => {\r\n if (item.color) return item.color;\r\n if (item.status) return STATUS_COLOR[item.status];\r\n return globalColor;\r\n};\r\n\r\n// ─── TimelineDot — marker của mỗi item ───────────────────────────────────────\r\n\r\ntype DotProps = {\r\n item: TimelineItem;\r\n colorClass: string;\r\n class?: string;\r\n};\r\n\r\nconst TimelineDot: Component<DotProps> = p => {\r\n const status = () => p.item.status ?? 'done';\r\n\r\n return (\r\n <div class={cn('tl15', p.colorClass, `tl-s-${status()}`, p.class)}>\r\n {/* Loading spinner */}\r\n <Show when={p.item.loading}>\r\n <span class=\"loading loading-spinner tl16\" />\r\n </Show>\r\n\r\n {/* Custom icon */}\r\n <Show when={!p.item.loading && p.item.icon}>\r\n <span class=\"tl17\">{p.item.icon!()}</span>\r\n </Show>\r\n\r\n {/* Default icon theo status */}\r\n <Show when={!p.item.loading && !p.item.icon}>\r\n <Show when={status() === 'done'}>\r\n <Check size={12} stroke-width={3} />\r\n </Show>\r\n <Show when={status() === 'error'}>\r\n <AlertCircle size={12} stroke-width={2.5} />\r\n </Show>\r\n <Show when={status() === 'pending'}>\r\n <Clock size={11} stroke-width={2} />\r\n </Show>\r\n {/* active: chỉ hiện dot rỗng — style CSS xử lý */}\r\n </Show>\r\n </div>\r\n );\r\n};\r\n\r\n// ─── TimelineItemContent — tiêu đề + nội dung + thời gian ────────────────────\r\n\r\ntype ContentProps = {\r\n item: TimelineItem;\r\n class?: TimelineProps['class'];\r\n};\r\n\r\nconst TimelineContent: Component<ContentProps> = p => (\r\n <div class={cn('tl18', p.class?.content)}>\r\n <Show when={p.item.timestamp}>\r\n <div class={cn('tl21', p.class?.timestamp)}>{p.item.timestamp}</div>\r\n </Show>\r\n <Show when={p.item.title}>\r\n <div class={cn('tl19', p.class?.title)}>{p.item.title}</div>\r\n </Show>\r\n <Show when={p.item.content}>\r\n <div class={cn('tl20', p.class?.description)}>{p.item.content}</div>\r\n </Show>\r\n </div>\r\n);\r\n\r\n// ─── Tính vị trí nội dung dựa trên mode & item.position ──────────────────────\r\n\r\nconst resolvePosition = (\r\n mode: TimelineProps['mode'],\r\n itemPosition: TimelineItem['position'],\r\n index: number,\r\n): 'start' | 'end' => {\r\n if (itemPosition) return itemPosition;\r\n if (mode === 'start') return 'start';\r\n if (mode === 'end') return 'end';\r\n // alternate: chẵn = start, lẻ = end\r\n return index % 2 === 0 ? 'start' : 'end';\r\n};\r\n\r\n// ─── Main Component ───────────────────────────────────────────────────────────\r\n\r\nexport const Timeline: Component<TimelineProps> = props => {\r\n const merged = mergeProps(\r\n {\r\n items: [] as TimelineItem[],\r\n color: 'primary' as BaseColorProps,\r\n orientation: 'vertical' as const,\r\n mode: 'alternate' as const,\r\n reverse: false,\r\n },\r\n props,\r\n );\r\n\r\n const [p, nativeProps] = splitProps(merged, [\r\n 'items',\r\n 'color',\r\n 'orientation',\r\n 'mode',\r\n 'reverse',\r\n 'class',\r\n ]);\r\n\r\n const isVertical = () => p.orientation === 'vertical';\r\n\r\n const displayItems = createMemo(() => (p.reverse ? [...p.items].reverse() : p.items));\r\n\r\n const globalColorClass = () => getColor(p.color, 'color-primary');\r\n\r\n return (\r\n <div\r\n {...nativeProps}\r\n class={cn(\r\n 'tl01',\r\n isVertical() ? 'tl02' : 'tl03',\r\n `tl-mode-${p.mode}`,\r\n globalColorClass(),\r\n p.class?.root,\r\n )}\r\n >\r\n <For each={displayItems()}>\r\n {(item, i) => {\r\n const pos = () => resolvePosition(p.mode, item.position, i());\r\n const itemColorClass = () => getColor(resolveItemColor(item, p.color), 'color-primary');\r\n const isLast = () => i() === displayItems().length - 1;\r\n\r\n return (\r\n <div\r\n class={cn(\r\n 'tl04',\r\n isVertical() ? 'tl05' : 'tl06',\r\n `tl-pos-${pos()}`,\r\n `tl-s-${item.status ?? 'done'}`,\r\n p.class?.item,\r\n )}\r\n >\r\n {/* ── Vertical layout ── */}\r\n <Show when={isVertical()}>\r\n {/* Cột bên start (trái) */}\r\n <div class={cn('tl07', p.class?.label)}>\r\n <Show when={pos() === 'start'}>\r\n <TimelineContent item={item} class={p.class} />\r\n </Show>\r\n </div>\r\n\r\n {/* Cột giữa: dot + connector */}\r\n <div class=\"tl08\">\r\n <TimelineDot item={item} colorClass={itemColorClass()} class={p.class?.dot} />\r\n <Show when={!isLast()}>\r\n <div class={cn('tl09', p.class?.connector)} />\r\n </Show>\r\n </div>\r\n\r\n {/* Cột bên end (phải) */}\r\n <div class={cn('tl10', p.class?.label)}>\r\n <Show when={pos() === 'end'}>\r\n <TimelineContent item={item} class={p.class} />\r\n </Show>\r\n </div>\r\n </Show>\r\n\r\n {/* ── Horizontal layout ── */}\r\n <Show when={!isVertical()}>\r\n {/* Hàng trên (start) */}\r\n <div class={cn('tl11', p.class?.label)}>\r\n <Show when={pos() === 'start'}>\r\n <TimelineContent item={item} class={p.class} />\r\n </Show>\r\n </div>\r\n\r\n {/* Hàng giữa: connector + dot + connector */}\r\n <div class=\"tl12\">\r\n <div class={cn('tl13', i() === 0 && 'tl-invisible', p.class?.connector)} />\r\n <TimelineDot item={item} colorClass={itemColorClass()} class={p.class?.dot} />\r\n <div class={cn('tl13', isLast() && 'tl-invisible', p.class?.connector)} />\r\n </div>\r\n\r\n {/* Hàng dưới (end) */}\r\n <div class={cn('tl14', p.class?.label)}>\r\n <Show when={pos() === 'end'}>\r\n <TimelineContent item={item} class={p.class} />\r\n </Show>\r\n </div>\r\n </Show>\r\n </div>\r\n );\r\n }}\r\n </For>\r\n </div>\r\n );\r\n};\r\n"],"mappings":"ulBAYMgB,EAA2D,CAC/DE,QAAS,UACTC,OAAQ,UACRC,KAAM,UACNC,MAAO,QACR,CAGKC,GAAoBC,EAAoBC,IACxCD,EAAKE,MAAcF,EAAKE,MACxBF,EAAKG,OAAeV,EAAaO,EAAKG,QACnCF,EAWHM,EAAmCC,GAAK,CAC5C,IAAML,MAAeK,EAAER,KAAKG,QAAU,OAEtC,WAAA,CAAA,IAAAM,EAAAC,GAAA,CACmE,OADnEC,EAAAF,EAAAG,EAGKxB,EAAI,CAAA,IAACyB,MAAI,CAAA,OAAEL,EAAER,KAAKc,SAAO,IAAAC,UAAA,CAAA,OAAAC,GAAA,EAAA,CAAA,CAAA,KAAA,CAAAL,EAAAF,EAAAG,EAKzBxB,EAAI,CAAA,IAACyB,MAAI,CAAA,OAAEI,MAAA,CAACT,EAAER,KAAKc,QAAO,EAAA,EAAIN,EAAER,KAAKkB,MAAI,IAAAH,UAAA,CAAA,IAAAI,EAAAC,GAAA,CACR,OADQT,EAAAQ,EACpBX,EAAER,KAAKkB,KAAK,CAAAC,GAAA,CAAA,CAAA,KAAA,CAAAR,EAAAF,EAAAG,EAIjCxB,EAAI,CAAA,IAACyB,MAAI,CAAA,OAAEI,MAAA,CAACT,EAAER,KAAKc,QAAO,EAAA,EAAI,CAACN,EAAER,KAAKkB,MAAI,IAAAH,UAAA,CAAA,MAAA,CAAAH,EACxCxB,EAAI,CAAA,IAACyB,MAAI,CAAA,O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,IAAAD,EAAAG,GAAAxD,EAAAiD,EAAAI,EAAAG,EAAAF,EAAA,CAAAC,IAAAF,EAAAI,GAAAzD,EAAAmD,EAAAE,EAAAI,EAAAF,EAAA,CAAAF,GAAA,CAAAG,EAAAE,IAAAA,GAAAD,EAAAC,IAAAA,GAAA,CAAA,CAAAX,KAAA,MAAA,CAAA,IAAAY,EAAAxE,GAAA,CAIlC,OAJkCC,EAAAuE,EAAAtE,EAKrExB,EAAI,CAAA,IAACyB,MAAI,CAAA,OAAE0C,GAAK,GAAK,OAAK,IAAAxC,UAAA,CAAA,OAAAH,EACxBa,EAAe,CAAOzB,OAAI,IAAA,OAAA,CAAA,OAASQ,EAAEF,OAAK,CAAA,EAAA,CAAA,CAAA,CAAAgB,MAAAC,EAAA2D,EAFnCxG,EAAG,OAAQ8B,EAAEF,OAAOwD,MAAM,CAAA,CAAA,CAAAoB,KAAA,CAAA,EAAA,CAAA,CAAA,KAAA,CAAA5D,MAAAC,EAAAqC,EAlDjClF,EACL,OACAoE,GAAY,CAAG,OAAS,OACxB,UAAUS,GAAK,GACf,QAAQvD,EAAKG,QAAU,SACvBK,EAAEF,OAAON,KACV,CAAA,CAAA,CAAA4D,KAAA,EAoDN,CAAA,CAAA,CAAAX,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorIcon.js","names":["genSVGCubicBezier","Component","IconProps","MainCircle","SecondaryCircle","Error","props","fill","primary","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","_$insert","_$createComponent","_$spread","_$mergeProps","_$effect","_p$","_v$","secondary","_v$2","e","_$setAttribute","t","undefined"],"sources":["../../../../src/components/toast/icons/ErrorIcon.tsx"],"sourcesContent":["import { genSVGCubicBezier } from '@/utils/helper';\r\nimport type { Component } from 'solid-js';\r\nimport { IconProps } from '../toast.type';\r\nimport { MainCircle, SecondaryCircle } from './IconCircle';\r\n\r\nexport const Error: Component<IconProps> = props => {\r\n const fill = props.primary || 'var(--color-error)';\r\n return (\r\n <svg style={{ overflow: 'visible' }} viewBox=\"0 0 32 32\" width=\"1.25rem\" height=\"1.25rem\">\r\n <MainCircle fill={fill} />\r\n <SecondaryCircle fill={fill} />\r\n <path\r\n fill=\"none\"\r\n stroke={props.secondary || '#fff'}\r\n stroke-width=\"4\"\r\n stroke-dasharray=\"9\"\r\n stroke-dashoffset=\"9\"\r\n stroke-linecap=\"round\"\r\n d=\"M16,7l0,9\"\r\n >\r\n <animate\r\n attributeName=\"stroke-dashoffset\"\r\n values=\"9;0\"\r\n dur=\"0.2s\"\r\n begin=\"250ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </path>\r\n <circle fill={props.secondary || '#fff'} cx=\"16\" cy=\"23\" r=\"2.5\" opacity=\"0\">\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"0;1\"\r\n dur=\"0.25s\"\r\n begin=\"350ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </circle>\r\n </svg>\r\n );\r\n};\r\n"],"mappings":"upBAKaK,EAA8BC,GAAS,CAClD,IAAMC,EAAOD,EAAME,SAAW,qBAC9B,WAAA,CAAA,IAAAC,EAAAC,GAAA,CAAAC,EAAAF,EAAAG,WAAAC,EAAAF,EAAAC,WAAAE,EAAAH,EAAAI,YAAAC,EAAAF,EAAAF,WAsB2C,OAtB3CK,EAAAR,EAAAS,EAEKf,EAAU,CAAOI,OAAI,CAAA,CAAAI,EAAA,CAAAM,EAAAR,EAAAS,EACrBd,EAAe,CAAOG,OAAI,CAAA,CAAAI,EAAA,CAAAQ,EAAAN,EAAAO,MAgBnBpB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAmB,EAAAH,EAAAI,MAUxCpB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAqB,EAAAC,GAAA,CAAA,IAAAC,EAvBtCjB,EAAMkB,WAAa,OAAMC,EAgBrBnB,EAAMkB,WAAa,OAAM,OAAAD,IAAAD,EAAAI,GAAAC,EAAAhB,EAAA,SAAAW,EAAAI,EAAAH,EAAA,CAAAE,IAAAH,EAAAM,GAAAD,EAAAb,EAAA,OAAAQ,EAAAM,EAAAH,EAAA,CAAAH,GAAA,CAAAI,EAAAG,IAAAA,GAAAD,EAAAC,IAAAA,GAAA,CAAA,CAAApB,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconCircle.js","names":["genSVGCubicBezier","Component","JSX","MainCircle","fill","props","publicProps","AnimateSVGAttributes","SVGAnimateElement","dur","begin","calcMode","keyTimes","keySplines","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$spread","_$effect","_$setAttribute","SecondaryCircle","_el$4","_tmpl$2","_el$5","_el$6"],"sources":["../../../../src/components/toast/icons/IconCircle.tsx"],"sourcesContent":["import { genSVGCubicBezier } from '@/utils/helper';\r\nimport { Component } from 'solid-js';\r\nimport type { JSX } from 'solid-js';\r\n\r\nexport const MainCircle: Component<{ fill: string }> = props => {\r\n const publicProps: JSX.AnimateSVGAttributes<SVGAnimateElement> = {\r\n dur: '0.35s',\r\n begin: '100ms',\r\n fill: 'freeze',\r\n calcMode: 'spline',\r\n keyTimes: '0; 0.6; 1',\r\n keySplines: '0.25 0.71 0.4 0.88; .59 .22 .87 .63',\r\n };\r\n return (\r\n <circle fill={props.fill} cx=\"16\" cy=\"16\" r=\"0\">\r\n <animate attributeName=\"opacity\" values=\"0; 1; 1\" {...publicProps} />\r\n <animate attributeName=\"r\" values=\"0; 17.5; 16\" {...publicProps} />\r\n </circle>\r\n );\r\n};\r\n\r\nexport const SecondaryCircle: Component<{ fill: string; begin?: string }> = props => {\r\n const publicProps: JSX.AnimateSVGAttributes<SVGAnimateElement> = {\r\n dur: '1s',\r\n begin: props.begin || '320ms',\r\n fill: 'freeze',\r\n ...genSVGCubicBezier('0.0 0.0 0.2 1'),\r\n };\r\n return (\r\n <circle fill={props.fill} cx=\"16\" cy=\"16\" r=\"12\" opacity=\"0\">\r\n <animate attributeName=\"opacity\" values=\"1; 0\" {...publicProps} />\r\n <animate attributeName=\"r\" values=\"12; 26\" {...publicProps} />\r\n </circle>\r\n );\r\n};\r\n"],"mappings":"8cAIaG,EAA0CE,GAAS,CAC9D,IAAMC,EAA2D,CAC/DG,IAAK,QACLC,MAAO,QACPN,KAAM,SACNO,SAAU,SACVC,SAAU,YACVC,WAAY,sCACb,CACD,WAAA,CAAA,IAAAC,EAAAC,GAAA,CAAAC,EAAAF,EAAAG,WAAAC,EAAAF,EAAAG,YAC0B,OAD1BC,EAAAJ,EAE0DV,EAAW,GAAA,GAAA,CAAAc,EAAAF,EACbZ,EAAW,GAAA,GAAA,CAAAe,MAAAC,EAAAR,EAAA,OAFnDT,EAAMD,KAAI,CAAA,CAAAU,KAAA,EAOfS,EAA+DlB,GAAS,CACnF,IAAMC,EAA2D,CAC/DG,IAAK,KACLC,MAAOL,EAAMK,OAAS,QACtBN,KAAM,SACN,GAAGJ,EAAkB,gBAAe,CACrC,CACD,WAAA,CAAA,IAAAwB,EAAAC,GAAA,CAAAC,EAAAF,EAAAP,WAAAU,EAAAD,EAAAP,YAC0B,OAD1BC,EAAAM,EAEuDpB,EAAW,GAAA,GAAA,CAAAc,EAAAO,EACfrB,EAAW,GAAA,GAAA,CAAAe,MAAAC,EAAAE,EAAA,OAF9CnB,EAAMD,KAAI,CAAA,CAAAoB,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoIcon.js","names":["genSVGCubicBezier","Component","IconProps","MainCircle","SecondaryCircle","Info","props","fill","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","_$insert","_$createComponent","_$spread","_$mergeProps","_$effect","_p$","_v$","secondary","_v$2","e","_$setAttribute","t","undefined"],"sources":["../../../../src/components/toast/icons/InfoIcon.tsx"],"sourcesContent":["import { genSVGCubicBezier } from '@/utils/helper';\r\nimport type { Component } from 'solid-js';\r\nimport { IconProps } from '../toast.type';\r\nimport { MainCircle, SecondaryCircle } from './IconCircle';\r\n\r\nexport const Info: Component<IconProps> = props => {\r\n const fill = 'var(--color-info)';\r\n return (\r\n <svg\r\n style={{ overflow: 'visible' }}\r\n viewBox=\"0 0 32 32\"\r\n width=\"1.25rem\"\r\n height=\"1.25rem\"\r\n class=\"rotate-180\"\r\n >\r\n <MainCircle fill={fill} />\r\n <SecondaryCircle fill={fill} />\r\n <path\r\n fill=\"none\"\r\n stroke={props.secondary || '#fff'}\r\n stroke-width=\"4\"\r\n stroke-dasharray=\"9\"\r\n stroke-dashoffset=\"9\"\r\n stroke-linecap=\"round\"\r\n d=\"M16,7l0,9\"\r\n >\r\n <animate\r\n attributeName=\"stroke-dashoffset\"\r\n values=\"9;0\"\r\n dur=\"0.2s\"\r\n begin=\"250ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </path>\r\n <circle fill={props.secondary || '#fff'} cx=\"16\" cy=\"23\" r=\"2.5\" opacity=\"0\">\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"0;1\"\r\n dur=\"0.25s\"\r\n begin=\"350ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </circle>\r\n </svg>\r\n );\r\n};\r\n"],"mappings":"wqBAKaK,EAA6BC,GAAS,CACjD,IAAMC,EAAO,oBACb,WAAA,CAAA,IAAAC,EAAAC,GAAA,CAAAC,EAAAF,EAAAG,WAAAC,EAAAF,EAAAC,WAAAE,EAAAH,EAAAI,YAAAC,EAAAF,EAAAF,WA4B2C,OA5B3CK,EAAAR,EAAAS,EAQKd,EAAU,CAAOI,OAAI,CAAA,CAAAG,EAAA,CAAAM,EAAAR,EAAAS,EACrBb,EAAe,CAAOG,OAAI,CAAA,CAAAG,EAAA,CAAAQ,EAAAN,EAAAO,MAgBnBnB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAkB,EAAAH,EAAAI,MAUxCnB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAoB,EAAAC,GAAA,CAAA,IAAAC,EAvBtChB,EAAMiB,WAAa,OAAMC,EAgBrBlB,EAAMiB,WAAa,OAAM,OAAAD,IAAAD,EAAAI,GAAAC,EAAAhB,EAAA,SAAAW,EAAAI,EAAAH,EAAA,CAAAE,IAAAH,EAAAM,GAAAD,EAAAb,EAAA,OAAAQ,EAAAM,EAAAH,EAAA,CAAAH,GAAA,CAAAI,EAAAG,IAAAA,GAAAD,EAAAC,IAAAA,GAAA,CAAA,CAAApB,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoaderIcon.js","names":["Component","IconProps","Loader","props","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$effect","_p$","_v$","primary","_v$2","secondary","e","_$setAttribute","t","undefined"],"sources":["../../../../src/components/toast/icons/LoaderIcon.tsx"],"sourcesContent":["import type { Component } from 'solid-js';\r\nimport { IconProps } from '../toast.type';\r\n\r\nexport const Loader: Component<IconProps> = props => (\r\n <svg style={{ overflow: 'visible' }} viewBox=\"0 0 32 32\" width=\"1.25rem\" height=\"1.25rem\">\r\n <path\r\n fill=\"none\"\r\n stroke={props.primary || 'oklch(0.9276 0.0058 264.53)'}\r\n stroke-width=\"4\"\r\n stroke-miterlimit=\"10\"\r\n d=\"M16,6c3,0,5.7,1.3,7.5,3.4c1.5,1.8,2.5,4,2.5,6.6c0,5.5-4.5,10-10,10S6,21.6,6,16S10.5,6,16,6z\"\r\n />\r\n <path\r\n fill=\"none\"\r\n stroke={props.secondary || 'oklch(0.4461 0.0263 256.8)'}\r\n stroke-width=\"4\"\r\n stroke-linecap=\"round\"\r\n stroke-miterlimit=\"10\"\r\n d=\"M16,6c3,0,5.7,1.3,7.5,3.4c0.6,0.7,1.1,1.4,1.5,2.2\"\r\n >\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 16 16\"\r\n to=\"360 16 16\"\r\n dur=\"0.75s\"\r\n repeatCount=\"indefinite\"\r\n />\r\n </path>\r\n </svg>\r\n);\r\n"],"mappings":"uiBAGaE,EAA+BC,QAAK,CAAA,IAAAC,EAAAC,GAAA,CAAAC,EAAAF,EAAAG,WAAAC,EAAAF,EAAAG,YAWY,OAXZC,EAAAC,GAAA,CAAA,IAAAC,EAInCT,EAAMU,SAAW,8BAA6BC,EAO9CX,EAAMY,WAAa,6BAA4B,OAAAH,IAAAD,EAAAK,GAAAC,EAAAX,EAAA,SAAAK,EAAAK,EAAAJ,EAAA,CAAAE,IAAAH,EAAAO,GAAAD,EAAAT,EAAA,SAAAG,EAAAO,EAAAJ,EAAA,CAAAH,GAAA,CAAAK,EAAAG,IAAAA,GAAAD,EAAAC,IAAAA,GAAA,CAAA,CAAAf,KAgB5D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuccessIcon.js","names":["genSVGCubicBezier","Component","IconProps","MainCircle","SecondaryCircle","Success","props","fill","primary","_el$","_tmpl$","_el$2","firstChild","_el$3","_$insert","_$createComponent","begin","_$spread","_$mergeProps","_$effect","_$setAttribute","secondary"],"sources":["../../../../src/components/toast/icons/SuccessIcon.tsx"],"sourcesContent":["import { genSVGCubicBezier } from '@/utils/helper';\r\nimport type { Component } from 'solid-js';\r\nimport { IconProps } from '../toast.type';\r\nimport { MainCircle, SecondaryCircle } from './IconCircle';\r\n\r\nexport const Success: Component<IconProps> = (props: IconProps) => {\r\n const fill = props.primary || 'var(--color-success)';\r\n return (\r\n <svg style={{ overflow: 'visible' }} viewBox=\"0 0 32 32\" width=\"1.25rem\" height=\"1.25rem\">\r\n <MainCircle fill={fill} />\r\n <SecondaryCircle fill={fill} begin=\"350ms\" />\r\n <path\r\n fill=\"none\"\r\n stroke={props.secondary || 'oklch(0.9911 0 0)'}\r\n stroke-width=\"4\"\r\n stroke-dasharray=\"22\"\r\n stroke-dashoffset=\"22\"\r\n stroke-linecap=\"round\"\r\n stroke-miterlimit=\"10\"\r\n d=\"M9.8,17.2l3.8,3.6c0.1,0.1,0.3,0.1,0.4,0l9.6-9.7\"\r\n >\r\n <animate\r\n attributeName=\"stroke-dashoffset\"\r\n values=\"22;0\"\r\n dur=\"0.25s\"\r\n begin=\"250ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </path>\r\n </svg>\r\n );\r\n};\r\n"],"mappings":"qlBAKaK,EAAiCC,GAAqB,CACjE,IAAMC,EAAOD,EAAME,SAAW,uBAC9B,WAAA,CAAA,IAAAC,EAAAC,GAAA,CAAAC,EAAAF,EAAAG,WAAAC,EAAAF,EAAAC,WAMoD,OANpDE,EAAAL,EAAAM,EAEKZ,EAAU,CAAOI,OAAI,CAAA,CAAAI,EAAA,CAAAG,EAAAL,EAAAM,EACrBX,EAAe,CAAOG,OAAMS,MAAK,QAAA,CAAA,CAAAL,EAAA,CAAAM,EAAAJ,EAAAK,MAiB1BlB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAmB,MAAAC,EAAAT,EAAA,SAdtCL,EAAMe,WAAa,oBAAmB,CAAA,CAAAZ,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WarningIcon.js","names":["genSVGCubicBezier","Component","IconProps","Warning","props","fill","primary","stroke","secondary","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_$setAttribute","_$spread","_$mergeProps"],"sources":["../../../../src/components/toast/icons/WarningIcon.tsx"],"sourcesContent":["import { genSVGCubicBezier } from '@/utils/helper';\r\nimport type { Component } from 'solid-js';\r\nimport { IconProps } from '../toast.type';\r\n\r\nexport const Warning: Component<IconProps> = (props: IconProps) => {\r\n const fill = props.primary || 'var(--color-warning)';\r\n const stroke = props.secondary || '#000';\r\n return (\r\n <svg style={{ overflow: 'visible' }} viewBox=\"0 0 32 32\" width=\"1.25rem\" height=\"1.25rem\">\r\n <g>\r\n {/* Equilateral triangle with rounded corners */}\r\n <path\r\n fill={fill}\r\n stroke={fill}\r\n stroke-width=\"10\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n d=\"M16 1 L31 27 L1 27 Z\"\r\n opacity=\"0\"\r\n >\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"0;1\"\r\n dur=\"0.3s\"\r\n begin=\"0ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"scale\"\r\n values=\"0.5;1.1;1\"\r\n dur=\"0.4s\"\r\n begin=\"0ms\"\r\n fill=\"freeze\"\r\n keyTimes=\"0;0.7;1\"\r\n keySplines=\"0.25 0.71 0.4 0.88; .59 .22 .87 .63\"\r\n calcMode=\"spline\"\r\n />\r\n </path>\r\n {/* Exclamation line - shorter and centered */}\r\n <path\r\n fill=\"none\"\r\n stroke={stroke}\r\n stroke-width=\"2.5\"\r\n stroke-dasharray=\"6\"\r\n stroke-dashoffset=\"6\"\r\n stroke-linecap=\"round\"\r\n d=\"M16,11 L16,17\"\r\n >\r\n <animate\r\n attributeName=\"stroke-dashoffset\"\r\n values=\"6;0\"\r\n dur=\"0.2s\"\r\n begin=\"300ms\"\r\n fill=\"freeze\"\r\n {...genSVGCubicBezier('0.0, 0.0, 0.58, 1.0')}\r\n />\r\n </path>\r\n {/* Exclamation dot - smaller and higher */}\r\n <circle fill={stroke} cx=\"16\" cy=\"21.5\" r=\"0\">\r\n <animate\r\n attributeName=\"r\"\r\n values=\"0;1.8;1.5\"\r\n dur=\"0.25s\"\r\n begin=\"400ms\"\r\n fill=\"freeze\"\r\n keyTimes=\"0;0.6;1\"\r\n keySplines=\"0.25 0.71 0.4 0.88; .59 .22 .87 .63\"\r\n calcMode=\"spline\"\r\n />\r\n </circle>\r\n {/* Bell shake animation - continuous */}\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n values=\"0 16 27; -8 16 27; 8 16 27; -5 16 27; 5 16 27; -2 16 27; 2 16 27; 0 16 27\"\r\n dur=\"0.6s\"\r\n begin=\"500ms;shake.end+2s\"\r\n fill=\"freeze\"\r\n id=\"shake\"\r\n />\r\n </g>\r\n </svg>\r\n );\r\n};\r\n"],"mappings":"ktCAIaG,EAAiCC,GAAqB,CACjE,IAAMC,EAAOD,EAAME,SAAW,uBACxBC,EAASH,EAAMI,WAAa,OAClC,WAAA,CAAA,IAAAC,EAAAC,GAAA,CAAAG,EAAAJ,EAAAG,WAAAA,WAAAE,EAAAD,EAAAD,WAAAG,EAAAF,EAAAG,YAAAC,EAAAF,EAAAH,WAAAM,EAAAH,EAAAC,YAqD0B,OArD1BG,EAAAN,EAAA,OAKcR,EAAI,CAAAc,EAAAN,EAAA,SACFR,EAAI,CAAAe,EAAAN,EAAAO,MAaNrB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAmB,EAAAJ,EAAA,SAiBtCR,EAAM,CAAAa,EAAAH,EAAAI,MAaRrB,EAAkB,sBAAsB,CAAA,CAAA,GAAA,GAAA,CAAAmB,EAAAD,EAAA,OAIlCX,EAAM,CAAAE,KAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.js","names":["X","Component","For","JSX","Show","createEffect","createMemo","onCleanup","onMount","render","Error","Loader","Success","Info","Warning","toastStore","Message","PromiseOptions","ToastAPI","ToastData","ToastOptions","ToastPosition","ToastType","ToasterProps","ValueOrFunction","getToastYDirection","toast","defaultPos","position","top","includes","resolveValue","valOrFn","TValue","TArg","arg","getToastIcon","Element","icon","undefined","type","_$createComponent","_$mergeProps","iconTheme","CloseIcon","onClick","isRight","props","_el$","_tmpl$","$$click","e","stopPropagation","_$insert","size","_$effect","_$className","ToastBar","isCloseOnRight","handleClose","removeToast","id","_el$2","_tmpl$2","_el$3","firstChild","when","showCloseIcon","children","message","_p$","_v$","class","_v$2","style","_v$3","ariaProps","role","_v$4","t","_$style","a","_$setAttribute","o","ToastWrapper","dismissTimer","ReturnType","setTimeout","removeTimer","wrapperRef","HTMLDivElement","remainingTime","duration","timerStartTime","isPaused","startDismissTimer","Infinity","visible","Date","now","dismissToast","pauseDismissTimer","clearTimeout","elapsed","Math","max","handleMouseEnter","canPause","handleMouseLeave","addEventListener","handleVisibilityChange","unmountDelay","direction","animate","transform","opacity","fill","easing","cleanupToastTimersAndListeners","removeEventListener","renderContent","_el$4","_tmpl$3","_ref$","_$use","PositionContainer","toasts","gutter","getPositionStyles","CSSProperties","pos","styles","gap","bottom","left","right","length","_el$5","_tmpl$4","each","_$p","ToasterInternal","toastsByPosition","currentToasts","groups","Record","push","positions","toastsForPos","containerMounted","containerEl","ensureContainer","document","createElement","body","appendChild","Toaster","createHandler","options","toastData","createToast","upsertToast","success","error","info","warning","loading","custom","dismiss","toastId","remove","pop","removePop","dismissPop","shift","removeShift","dismissShift","promise","Promise","T","promiseOptions","toastOptions","result","successMessage","updateToast","errorMessage","_$delegateEvents"],"sources":["../../../src/components/toast/toast.tsx"],"sourcesContent":["import X from 'lucide-solid/icons/x';\r\nimport { Component, For, JSX, Show, createEffect, createMemo, onCleanup, onMount } from 'solid-js';\r\nimport { render } from 'solid-js/web';\r\nimport { Error, Loader, Success } from './icons';\r\nimport { Info } from './icons/InfoIcon';\r\nimport { Warning } from './icons/WarningIcon';\r\nimport { toastStore } from './toast.store';\r\nimport type {\r\n Message,\r\n PromiseOptions,\r\n ToastAPI,\r\n ToastData,\r\n ToastOptions,\r\n ToastPosition,\r\n ToastType,\r\n ToasterProps,\r\n ValueOrFunction,\r\n} from './toast.type';\r\n\r\nexport const getToastYDirection = (toast: ToastData, defaultPos: ToastPosition) => {\r\n const position = toast.position || defaultPos;\r\n const top = position.includes('top');\r\n return top ? 1 : -1;\r\n};\r\n// Helper to resolve value or function\r\nconst resolveValue = <TValue, TArg>(valOrFn: ValueOrFunction<TValue, TArg>, arg: TArg): TValue => {\r\n return typeof valOrFn === 'function' ? (valOrFn as (arg: TArg) => TValue)(arg) : valOrFn;\r\n};\r\n\r\nconst getToastIcon = (toast: ToastData): JSX.Element | null => {\r\n if (toast.icon !== undefined) {\r\n return toast.icon as Element;\r\n }\r\n switch (toast.type) {\r\n case 'success':\r\n return <Success {...toast.iconTheme} />;\r\n case 'error':\r\n return <Error {...toast.iconTheme} />;\r\n case 'info':\r\n return <Info {...toast.iconTheme} />;\r\n case 'warning':\r\n return <Warning {...toast.iconTheme} />;\r\n case 'loading':\r\n return <Loader {...toast.iconTheme} />;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst CloseIcon: Component<{ onClick: () => void; isRight: boolean }> = props => {\r\n return (\r\n <div\r\n class={`toa03 ${props.isRight ? 'toa04' : 'toa05'}`}\r\n onClick={e => {\r\n e.stopPropagation();\r\n props.onClick();\r\n }}\r\n aria-label=\"Close\"\r\n >\r\n <X size={10} stroke-width={4} />\r\n </div>\r\n );\r\n};\r\n\r\nconst ToastBar: Component<{ toast: ToastData; position: ToastPosition }> = props => {\r\n const icon = createMemo(() => getToastIcon(props.toast));\r\n\r\n const isCloseOnRight = createMemo(() => !props.position.includes('right'));\r\n\r\n const handleClose = () => {\r\n toastStore.removeToast(props.toast.id);\r\n };\r\n\r\n return (\r\n <div\r\n class={`toa01 ${props.toast.class || ''}`}\r\n style={props.toast.style}\r\n role={props.toast.ariaProps.role}\r\n aria-live={props.toast.ariaProps['aria-live']}\r\n >\r\n <Show when={props.toast.showCloseIcon}>\r\n <CloseIcon onClick={handleClose} isRight={isCloseOnRight()} />\r\n </Show>\r\n <Show when={icon()}>{icon()}</Show>\r\n <div class=\"flex-1 text-sm\">{props.toast.message as Element}</div>\r\n </div>\r\n );\r\n};\r\n\r\n// Individual toast wrapper with animations\r\nconst ToastWrapper: Component<{ toast: ToastData; position: ToastPosition }> = props => {\r\n let dismissTimer: ReturnType<typeof setTimeout> | undefined;\r\n let removeTimer: ReturnType<typeof setTimeout> | undefined;\r\n let wrapperRef: HTMLDivElement | undefined;\r\n\r\n // Theo dõi thời gian còn lại và thời điểm bắt đầu timer\r\n let remainingTime = props.toast.duration;\r\n let timerStartTime = 0;\r\n let isPaused = false;\r\n\r\n // Bắt đầu timer với thời gian còn lại\r\n const startDismissTimer = (duration: number) => {\r\n if (duration === Infinity || !props.toast.visible) return;\r\n\r\n timerStartTime = Date.now();\r\n dismissTimer = setTimeout(() => {\r\n toastStore.dismissToast(props.toast.id);\r\n }, duration);\r\n };\r\n\r\n // Dừng timer và lưu thời gian còn lại\r\n const pauseDismissTimer = () => {\r\n if (dismissTimer) {\r\n clearTimeout(dismissTimer);\r\n dismissTimer = undefined;\r\n // Tính thời gian còn lại\r\n const elapsed = Date.now() - timerStartTime;\r\n remainingTime = Math.max(0, remainingTime - elapsed);\r\n }\r\n };\r\n\r\n // Event handlers cho pause on hover\r\n const handleMouseEnter = () => {\r\n if (!props.toast.canPause || isPaused) return;\r\n isPaused = true;\r\n pauseDismissTimer();\r\n };\r\n\r\n const handleMouseLeave = () => {\r\n if (!props.toast.canPause || !isPaused) return;\r\n isPaused = false;\r\n startDismissTimer(remainingTime);\r\n };\r\n\r\n // Setup auto dismiss timer on mount\r\n onMount(() => {\r\n startDismissTimer(props.toast.duration);\r\n\r\n // Thêm event listeners nếu canPause = true\r\n if (props.toast.canPause && wrapperRef) {\r\n wrapperRef.addEventListener('mouseenter', handleMouseEnter);\r\n wrapperRef.addEventListener('mouseleave', handleMouseLeave);\r\n }\r\n });\r\n\r\n // Watch for visible change to schedule removal\r\n createEffect(function handleVisibilityChange() {\r\n const visible = props.toast.visible;\r\n if (!visible) {\r\n // Clear dismiss timer if exists\r\n if (dismissTimer) {\r\n clearTimeout(dismissTimer);\r\n dismissTimer = undefined;\r\n }\r\n // Schedule removal after animation\r\n removeTimer = setTimeout(() => {\r\n toastStore.removeToast(props.toast.id);\r\n }, props.toast.unmountDelay);\r\n }\r\n\r\n // run animate open/close\r\n if (!wrapperRef) return;\r\n const direction = getToastYDirection(props.toast, props.position);\r\n if (visible) {\r\n wrapperRef.animate(\r\n [\r\n { transform: `translate3d(0,${direction * -200}%,0) scale(.6)`, opacity: 0.5 },\r\n { transform: 'translate3d(0,0,0) scale(1)', opacity: 1 },\r\n ],\r\n {\r\n duration: 350,\r\n fill: 'forwards',\r\n easing: 'cubic-bezier(.21,1.02,.73,1)',\r\n },\r\n );\r\n } else {\r\n wrapperRef.animate(\r\n [\r\n { transform: 'translate3d(0,0,-1px) scale(1)', opacity: 1 },\r\n { transform: `translate3d(0,${direction * -150}%,-1px) scale(.4)`, opacity: 0 },\r\n ],\r\n {\r\n duration: 400,\r\n fill: 'forwards',\r\n easing: 'cubic-bezier(.06,.71,.55,1)',\r\n },\r\n );\r\n }\r\n });\r\n\r\n onCleanup(function cleanupToastTimersAndListeners() {\r\n if (dismissTimer) clearTimeout(dismissTimer);\r\n if (removeTimer) clearTimeout(removeTimer);\r\n // Gỡ event listeners\r\n if (props.toast.canPause && wrapperRef) {\r\n wrapperRef.removeEventListener('mouseenter', handleMouseEnter);\r\n wrapperRef.removeEventListener('mouseleave', handleMouseLeave);\r\n }\r\n });\r\n\r\n // Custom toast render\r\n const renderContent = () => {\r\n if (props.toast.type === 'custom' && typeof props.toast.message === 'function') {\r\n return (props.toast.message as (t: ToastData) => Element)(props.toast);\r\n }\r\n return <ToastBar toast={props.toast} position={props.position} />;\r\n };\r\n\r\n return (\r\n <div ref={wrapperRef} class=\"w-fit max-w-[350px]\">\r\n {renderContent()}\r\n </div>\r\n );\r\n};\r\n\r\n// Position container\r\nconst PositionContainer: Component<{\r\n position: ToastPosition;\r\n toasts: ToastData[];\r\n gutter: number;\r\n}> = props => {\r\n const getPositionStyles = (): JSX.CSSProperties => {\r\n const pos = props.position;\r\n const styles: JSX.CSSProperties = {\r\n gap: `${props.gutter}px`,\r\n };\r\n\r\n if (pos.includes('top')) {\r\n styles.top = '0';\r\n } else {\r\n styles.bottom = '0';\r\n styles['flex-direction'] = 'column-reverse';\r\n }\r\n\r\n if (pos.includes('left')) {\r\n styles.left = '0';\r\n styles['align-items'] = 'flex-start';\r\n } else if (pos.includes('right')) {\r\n styles.right = '0';\r\n styles['align-items'] = 'flex-end';\r\n } else {\r\n styles.left = '50%';\r\n styles.transform = 'translateX(-50%)';\r\n styles['align-items'] = 'center';\r\n }\r\n\r\n return styles;\r\n };\r\n\r\n return (\r\n <Show when={props.toasts.length > 0}>\r\n <div class=\"fixed z-9999 flex flex-col p-4\" style={getPositionStyles()}>\r\n <For each={props.toasts}>\r\n {toast => <ToastWrapper toast={toast} position={props.position} />}\r\n </For>\r\n </div>\r\n </Show>\r\n );\r\n};\r\n\r\n// Internal Toaster component\r\nconst ToasterInternal: Component<ToasterProps> = props => {\r\n const position = () => props.position || 'top-right';\r\n const gutter = () => props.gutter ?? 10;\r\n\r\n // Group toasts by position\r\n const toastsByPosition = createMemo(() => {\r\n const currentToasts = toastStore.toasts();\r\n const groups: Record<ToastPosition, ToastData[]> = {\r\n 'top-left': [],\r\n 'top-center': [],\r\n 'top-right': [],\r\n 'bottom-left': [],\r\n 'bottom-center': [],\r\n 'bottom-right': [],\r\n };\r\n\r\n for (const t of currentToasts) {\r\n const pos = t.position || position();\r\n groups[pos].push(t);\r\n }\r\n\r\n return groups;\r\n });\r\n\r\n const positions: ToastPosition[] = [\r\n 'top-left',\r\n 'top-center',\r\n 'top-right',\r\n 'bottom-left',\r\n 'bottom-center',\r\n 'bottom-right',\r\n ];\r\n\r\n return (\r\n <>\r\n <For each={positions}>\r\n {pos => {\r\n const toastsForPos = createMemo(() => toastsByPosition()[pos]);\r\n return <PositionContainer position={pos} toasts={toastsForPos()} gutter={gutter()} />;\r\n }}\r\n </For>\r\n </>\r\n );\r\n};\r\n\r\n// Auto-mount toast container\r\nlet containerMounted = false;\r\nlet containerEl: HTMLDivElement | null = null;\r\n\r\nconst ensureContainer = () => {\r\n if (containerMounted) return;\r\n\r\n containerEl = document.createElement('div');\r\n containerEl.id = 'sui-toast-container';\r\n document.body.appendChild(containerEl);\r\n\r\n render(() => <ToasterInternal />, containerEl);\r\n containerMounted = true;\r\n};\r\n\r\n// Optional Toaster component for custom configuration\r\nexport const Toaster: Component<ToasterProps> = props => {\r\n onMount(() => {\r\n // If user adds Toaster, use their config\r\n if (!containerMounted) {\r\n containerEl = document.createElement('div');\r\n containerEl.id = 'sui-toast-container';\r\n document.body.appendChild(containerEl);\r\n\r\n render(() => <ToasterInternal {...props} />, containerEl);\r\n containerMounted = true;\r\n }\r\n });\r\n\r\n return null;\r\n};\r\n\r\n// Toast API\r\nconst createHandler =\r\n (type: ToastType) =>\r\n (message: Message, options?: ToastOptions): string => {\r\n ensureContainer();\r\n const toastData = toastStore.createToast(message, type, options);\r\n toastStore.upsertToast(toastData);\r\n return toastData.id;\r\n };\r\n\r\n// Main toast function\r\nconst toast = ((message: Message, options?: ToastOptions): string => {\r\n return createHandler('blank')(message, options);\r\n}) as ToastAPI;\r\n\r\ntoast.success = createHandler('success');\r\ntoast.error = createHandler('error');\r\ntoast.info = createHandler('info');\r\ntoast.warning = createHandler('warning');\r\ntoast.loading = createHandler('loading');\r\n\r\ntoast.custom = (message: (toast: ToastData) => JSX.Element, options?: ToastOptions): string => {\r\n ensureContainer();\r\n const toastData = toastStore.createToast(message as any, 'custom', options);\r\n toastStore.upsertToast(toastData);\r\n return toastData.id;\r\n};\r\n\r\ntoast.dismiss = (toastId?: string) => {\r\n toastStore.dismissToast(toastId);\r\n};\r\n\r\ntoast.remove = (toastId?: string) => {\r\n toastStore.removeToast(toastId);\r\n};\r\n\r\ntoast.pop = (options?: { animate?: boolean }) => {\r\n if (options?.animate === false) {\r\n toastStore.removePop();\r\n } else {\r\n toastStore.dismissPop();\r\n }\r\n};\r\n\r\ntoast.shift = (options?: { animate?: boolean }) => {\r\n if (options?.animate === false) {\r\n toastStore.removeShift();\r\n } else {\r\n toastStore.dismissShift();\r\n }\r\n};\r\n\r\ntoast.promise = async <T,>(\r\n promise: Promise<T>,\r\n promiseOptions: PromiseOptions<T>,\r\n toastOptions?: ToastOptions,\r\n): Promise<T> => {\r\n const id = toast.loading(promiseOptions.loading, toastOptions);\r\n\r\n try {\r\n const result = await promise;\r\n const successMessage = resolveValue(promiseOptions.success, result);\r\n toastStore.updateToast(id, {\r\n type: 'success',\r\n message: successMessage as any,\r\n icon: undefined, // Reset icon to use default success icon\r\n });\r\n // Schedule dismiss after showing success\r\n setTimeout(() => {\r\n toastStore.dismissToast(id);\r\n }, toastOptions?.duration ?? 3000);\r\n return result;\r\n } catch (error) {\r\n const errorMessage = resolveValue(promiseOptions.error, error);\r\n toastStore.updateToast(id, {\r\n type: 'error',\r\n message: errorMessage as any,\r\n icon: undefined, // Reset icon to use default error icon\r\n });\r\n // Schedule dismiss after showing error\r\n setTimeout(() => {\r\n toastStore.dismissToast(id);\r\n }, toastOptions?.duration ?? 3000);\r\n throw error;\r\n }\r\n};\r\n\r\nexport { toast };\r\n"],"mappings":"owBAmBayB,GAAsBC,EAAkBC,KAClCD,EAAME,UAAYD,GACdG,SAAS,MAAM,CACvB,EAAI,GAGbC,GAA8BC,EAAwCG,IACnE,OAAOH,GAAY,WAAcA,EAAkCG,EAAI,CAAGH,EAG7EI,EAAgBV,GAAyC,CAC7D,GAAIA,EAAMY,OAASC,IAAAA,GACjB,OAAOb,EAAMY,KAEf,OAAQZ,EAAMc,KAAd,CACE,IAAK,UACH,OAAAC,EAAQ7B,EAAO8B,MAAKhB,EAAMiB,UAAS,CAAA,CACrC,IAAK,QACH,OAAAF,EAAQ/B,EAAKgC,MAAKhB,EAAMiB,UAAS,CAAA,CACnC,IAAK,OACH,OAAAF,EAAQ5B,EAAI6B,MAAKhB,EAAMiB,UAAS,CAAA,CAClC,IAAK,UACH,OAAAF,EAAQ3B,EAAO4B,MAAKhB,EAAMiB,UAAS,CAAA,CACrC,IAAK,UACH,OAAAF,EAAQ9B,EAAM+B,MAAKhB,EAAMiB,UAAS,CAAA,CACpC,QACE,OAAO,OAIPC,EAAkEG,QACtE,CAAA,IAAAC,E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AC7FP,GAAiB,CACjB,IAAMQ,EAAYhJ,EAAWiJ,YAAY3F,EAAgB,SAAUyF,EAAQ,CAE3E,OADA/I,EAAWkJ,YAAYF,EAAU,CAC1BA,EAAUlG,IAGnBnC,EAAM8I,QAAWC,GAAqB,CACpC1J,EAAWqF,aAAaqE,EAAQ,EAGlC/I,EAAMgJ,OAAUD,GAAqB,CACnC1J,EAAW6C,YAAY6G,EAAQ,EAGjC/I,EAAMiJ,IAAOb,GAAoC,CAC3CA,GAAS7C,UAAY,GACvBlG,EAAW6J,WAAW,CAEtB7J,EAAW8J,YAAY,EAI3BnJ,EAAMoJ,MAAShB,GAAoC,CAC7CA,GAAS7C,UAAY,GACvBlG,EAAWgK,aAAa,CAExBhK,EAAWiK,cAAc,EAI7BtJ,EAAMuJ,QAAU,MACdA,EACAG,EACAC,IACe,CACf,IAAMxH,EAAKnC,EAAM4I,QAAQc,EAAed,QAASe,EAAa,CAE9D,GAAI,CACF,IAAMC,EAAS,MAAML,EACfM,EAAiBxJ,EAAaqJ,EAAelB,QAASoB,EAAO,CAUnE,OATAvK,EAAWyK,YAAY3H,EAAI,CACzBrB,KAAM,UACN6B,QAASkH,EACTjJ,KAAMC,IAAAA,GACP,CAAC,CAEFgD,eAAiB,CACfxE,EAAWqF,aAAavC,EAAG,EAC1BwH,GAAczF,UAAY,IAAK,CAC3B0F,QACAnB,EAAO,CACd,IAAMsB,EAAe1J,EAAaqJ,EAAejB,MAAOA,EAAM,CAU9D,MATApJ,EAAWyK,YAAY3H,EAAI,CACzBrB,KAAM,QACN6B,QAASoH,EACTnJ,KAAMC,IAAAA,GACP,CAAC,CAEFgD,eAAiB,CACfxE,EAAWqF,aAAavC,EAAG,EAC1BwH,GAAczF,UAAY,IAAK,CAC5BuE,IAIOuB,EAAA,CAAA,QAAA,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.store.js","names":[],"sources":["../../../src/components/toast/toast.store.ts"],"sourcesContent":["import { createSignal, createRoot, JSX, createUniqueId } from 'solid-js';\r\nimport type { ToastData, ToastOptions, ToastType, ToastPosition, Message } from './toast.type';\r\n\r\n// Default values\r\nconst DEFAULT_DURATION: Record<ToastType, number> = {\r\n blank: 3000,\r\n success: 3000,\r\n error: 3000,\r\n info: 3000,\r\n warning: 3000,\r\n loading: Infinity,\r\n custom: 3000,\r\n};\r\n\r\nconst DEFAULT_POSITION: ToastPosition = 'top-right';\r\nconst DEFAULT_UNMOUNT_DELAY = 400;\r\nconst MAX_TOASTS = 10;\r\n\r\n// Toast store using signals\r\nfunction createToastStore() {\r\n const [toasts, setToasts] = createSignal<ToastData[]>([]);\r\n const [pausedAt, setPausedAt] = createSignal<number | null>(null);\r\n\r\n const createToast = (\r\n message: Message | ((toast: ToastData) => JSX.Element),\r\n type: ToastType,\r\n options?: ToastOptions,\r\n ): ToastData => {\r\n const id = createUniqueId();\r\n const existingToast = toasts().find(t => t.id === id);\r\n const toast: ToastData = {\r\n id,\r\n type,\r\n message: message as Message,\r\n icon: options?.icon,\r\n duration: options?.duration ?? DEFAULT_DURATION[type],\r\n pauseDuration: existingToast?.pauseDuration ?? 0,\r\n paused: false,\r\n position: options?.position ?? DEFAULT_POSITION,\r\n ariaProps: options?.ariaProps ?? {\r\n role: 'status',\r\n 'aria-live': 'polite',\r\n },\r\n style: options?.style,\r\n class: options?.class,\r\n iconTheme: options?.iconTheme,\r\n createdAt: existingToast?.createdAt ?? Date.now(),\r\n visible: true,\r\n unmountDelay: options?.unmountDelay ?? DEFAULT_UNMOUNT_DELAY,\r\n canPause: options?.canPause ?? true,\r\n showCloseIcon: options?.showCloseIcon ?? true,\r\n };\r\n\r\n return toast;\r\n };\r\n\r\n const upsertToast = (toast: ToastData) => {\r\n setToasts(prev => {\r\n const index = prev.findIndex(t => t.id === toast.id);\r\n if (index !== -1) {\r\n // Update existing toast\r\n const newToasts = [...prev];\r\n newToasts[index] = { ...prev[index], ...toast, updatedAt: Date.now() };\r\n return newToasts;\r\n } else {\r\n // Add new toast at the beginning and enforce max limit\r\n let newToasts = [toast, ...prev];\r\n if (newToasts.length > MAX_TOASTS) {\r\n newToasts = newToasts.slice(0, MAX_TOASTS);\r\n }\r\n return newToasts;\r\n }\r\n });\r\n };\r\n\r\n const dismissToast = (toastId?: string) => {\r\n setToasts(prev => {\r\n if (toastId) {\r\n return prev.map(t => (t.id === toastId ? { ...t, visible: false } : t));\r\n } else {\r\n // Dismiss all\r\n return prev.map(t => ({ ...t, visible: false }));\r\n }\r\n });\r\n };\r\n\r\n const removeToast = (toastId?: string) => {\r\n setToasts(prev => {\r\n if (toastId) {\r\n return prev.filter(t => t.id !== toastId);\r\n } else {\r\n // Remove all\r\n return [];\r\n }\r\n });\r\n };\r\n\r\n const dismissPop = () => {\r\n setToasts(prev => {\r\n for (let i = prev.length - 1; i >= 0; i--) {\r\n if (prev[i].visible) {\r\n return prev.map((t, idx) => (idx === i ? { ...t, visible: false } : t));\r\n }\r\n }\r\n return prev;\r\n });\r\n };\r\n\r\n const removePop = () => {\r\n setToasts(prev => {\r\n for (let i = prev.length - 1; i >= 0; i--) {\r\n if (prev[i].visible) {\r\n return [...prev.slice(0, i), ...prev.slice(i + 1)];\r\n }\r\n }\r\n return prev;\r\n });\r\n };\r\n\r\n const dismissShift = () => {\r\n setToasts(prev => {\r\n for (let i = 0; i < prev.length; i++) {\r\n if (prev[i].visible) {\r\n return prev.map((t, idx) => (idx === i ? { ...t, visible: false } : t));\r\n }\r\n }\r\n return prev;\r\n });\r\n };\r\n\r\n const removeShift = () => {\r\n setToasts(prev => {\r\n for (let i = 0; i < prev.length; i++) {\r\n if (prev[i].visible) {\r\n return [...prev.slice(0, i), ...prev.slice(i + 1)];\r\n }\r\n }\r\n return prev;\r\n });\r\n };\r\n\r\n const updateToast = (toastId: string, updates: Partial<ToastData>) => {\r\n setToasts(prev =>\r\n prev.map(t => (t.id === toastId ? { ...t, ...updates, updatedAt: Date.now() } : t)),\r\n );\r\n };\r\n\r\n const pauseToast = (toastId: string) => {\r\n setToasts(prev => prev.map(t => (t.id === toastId && !t.paused ? { ...t, paused: true } : t)));\r\n setPausedAt(Date.now());\r\n };\r\n\r\n const resumeToast = (toastId: string) => {\r\n const pauseTime = pausedAt();\r\n if (pauseTime) {\r\n setToasts(prev =>\r\n prev.map(t =>\r\n t.id === toastId && t.paused\r\n ? { ...t, paused: false, pauseDuration: t.pauseDuration + (Date.now() - pauseTime) }\r\n : t,\r\n ),\r\n );\r\n }\r\n setPausedAt(null);\r\n };\r\n\r\n return {\r\n toasts,\r\n createToast,\r\n upsertToast,\r\n dismissToast,\r\n removeToast,\r\n updateToast,\r\n pauseToast,\r\n resumeToast,\r\n dismissPop,\r\n removePop,\r\n dismissShift,\r\n removeShift,\r\n };\r\n}\r\n\r\n// Create singleton store\r\nexport const toastStore = createRoot(createToastStore);\r\n"],"mappings":"4EAIA,IAAM,EAA8C,CAClD,MAAO,IACP,QAAS,IACT,MAAO,IACP,KAAM,IACN,QAAS,IACT,QAAS,IACT,OAAQ,IACT,CAEK,EAAkC,YAClC,EAAwB,IACxB,EAAa,GAGnB,SAAS,GAAmB,CAC1B,GAAM,CAAC,EAAQ,GAAa,EAA0B,EAAE,CAAC,CACnD,CAAC,EAAU,GAAe,EAA4B,KAAK,CAiJjE,MAAO,CACL,SACA,aAhJA,EACA,EACA,IACc,CACd,IAAM,EAAK,GAAgB,CACrB,EAAgB,GAAQ,CAAC,KAAK,GAAK,EAAE,KAAO,EAAG,CAwBrD,MAvByB,CACvB,KACA,OACS,UACT,KAAM,GAAS,KACf,SAAU,GAAS,UAAY,EAAiB,GAChD,cAAe,GAAe,eAAiB,EAC/C,OAAQ,GACR,SAAU,GAAS,UAAY,EAC/B,UAAW,GAAS,WAAa,CAC/B,KAAM,SACN,YAAa,SACd,CACD,MAAO,GAAS,MAChB,MAAO,GAAS,MAChB,UAAW,GAAS,UACpB,UAAW,GAAe,WAAa,KAAK,KAAK,CACjD,QAAS,GACT,aAAc,GAAS,cAAgB,EACvC,SAAU,GAAS,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CAClF,EACL,CACF,CAEH,EAAY,KAAK,EAYjB,eA9EuB,CACvB,EAAU,GAAQ,CAChB,IAAK,IAAI,EAAI,EAAK,OAAS,EAAG,GAAK,EAAG,IACpC,GAAI,EAAK,GAAG,QACV,OAAO,EAAK,KAAK,EAAG,IAAS,IAAQ,EAAI,CAAE,GAAG,EAAG,QAAS,GAAO,CAAG,EAAG,CAG3E,OAAO,GACP,EAuEF,cApEsB,CACtB,EAAU,GAAQ,CAChB,IAAK,IAAI,EAAI,EAAK,OAAS,EAAG,GAAK,EAAG,IACpC,GAAI,EAAK,GAAG,QACV,MAAO,CAAC,GAAG,EAAK,MAAM,EAAG,EAAE,CAAE,GAAG,EAAK,MAAM,EAAI,EAAE,CAAC,CAGtD,OAAO,GACP,EA6DF,iBA1DyB,CACzB,EAAU,GAAQ,CAChB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAC/B,GAAI,EAAK,GAAG,QACV,OAAO,EAAK,KAAK,EAAG,IAAS,IAAQ,EAAI,CAAE,GAAG,EAAG,QAAS,GAAO,CAAG,EAAG,CAG3E,OAAO,GACP,EAmDF,gBAhDwB,CACxB,EAAU,GAAQ,CAChB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAC/B,GAAI,EAAK,GAAG,QACV,MAAO,CAAC,GAAG,EAAK,MAAM,EAAG,EAAE,CAAE,GAAG,EAAK,MAAM,EAAI,EAAE,CAAC,CAGtD,OAAO,GACP,EAyCH,CAIH,IAAa,EAAa,EAAW,EAAiB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","names":["cn","getColor","acquire","OFFSET","release","ZIndex","ZIndexType","cva","VariantProps","Component","createSignal","createUniqueId","JSX","Match","mergeProps","onCleanup","onMount","Show","Switch","TooltipPortalProps","TooltipProps","tooltipVariants","variants","color","neutral","primary","secondary","accent","info","success","warning","error","position","top","bottom","right","left","TooltipVariantsProps","ActiveEntry","node","HTMLDivElement","registryKey","offset","bubbleHovered","activeMap","Map","customContentRegistry","Element","refCount","observer","IntersectionObserver","calcStyle","r","DOMRect","Record","OFFSET_PX","width","transform","height","showTooltip","id","triggerEl","HTMLElement","content","customContent","colorClass","extraClass","customZIndex","has","getBoundingClientRect","style","document","createElement","className","Object","assign","pointerEvents","zIndexOffset","zIndex","undefined","acquired","TOOLTIP","String","textContent","appendChild","cloneNode","entry","set","addEventListener","onBubbleEnter","onBubbleLeave","removeTooltipIfIdle","body","sentinelActiveSet","Set","get","remove","delete","removeTooltip","getOrCreateObserver","entries","el","target","dataset","tip","pos","Number","isIntersecting","add","closest","threshold","Tooltip","p","_$createComponent","when","hidden","fallback","_$memo","children","TooltipDefaultMain","type","TooltipPortalMain","const","sentinelRef","customContentRef","class","firstElementChild","observe","cleanupTooltipRegistration","unobserve","disconnect","_el$","_tmpl$","_el$2","firstChild","_$use","tt","_ref$","_$insert","_c$","_el$3","_tmpl$2","_ref$2","_$effect","_p$","_v$","root","_v$2","e","_$className","t","_$setAttribute","portalBubbleStyle","setPortalBubbleStyle","CSSProperties","TooltipEntry","setHovered","v","updateCoords","ContainerState","count","containerMap","WeakMap","ListenerPair","over","Event","out","listenerMap","makeMouseOver","state","getAttribute","makeMouseOut","related","MouseEvent","relatedTarget","contains","attachToContainer","passive","detachFromContainer","pair","removeEventListener","calcPortalStyle","isHovered","setIsHovered","onTriggerMount","setAttribute","handle","cancelled","doCleanup","register","getElementById","containerId","s","removeAttribute","queueMicrotask","cancelAndDetachTrigger","_el$4","_tmpl$3","_$spread","_$mergeProps","open","blockScroll","customValue"],"sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\r\nimport { getColor } from '@/utils/helper';\r\nimport { acquire, OFFSET, release, ZIndex, ZIndexType } from '@components/z-index';\r\nimport { cva, VariantProps } from 'class-variance-authority';\r\nimport {\r\n Component,\r\n createSignal,\r\n createUniqueId,\r\n JSX,\r\n Match,\r\n mergeProps,\r\n onCleanup,\r\n onMount,\r\n Show,\r\n Switch,\r\n} from 'solid-js';\r\nimport type { TooltipPortalProps, TooltipProps } from './tooltip.types';\r\n\r\n// ─── CVA variants (dùng cho TooltipPortal) ────────────────────────────────\r\n\r\nconst tooltipVariants = cva('', {\r\n variants: {\r\n color: {\r\n neutral: 'tooltip-neutral',\r\n primary: 'tooltip-primary',\r\n secondary: 'tooltip-secondary',\r\n accent: 'tooltip-accent',\r\n info: 'tooltip-info',\r\n success: 'tooltip-success',\r\n warning: 'tooltip-warning',\r\n error: 'tooltip-error',\r\n },\r\n position: {\r\n top: 'tooltip-top',\r\n bottom: 'tooltip-bottom',\r\n right: 'tooltip-right',\r\n left: 'tooltip-left',\r\n },\r\n },\r\n});\r\nexport type TooltipVariantsProps = VariantProps<typeof tooltipVariants>;\r\n\r\n// ═══════════════════════════════════════════════════════════════════════════\r\n// TOOLTIP — IO-based (không bị clip bởi overflow)\r\n// ═══════════════════════════════════════════════════════════════════════════\r\n\r\n// --- Global scope (IO mechanism) ---\r\ntype ActiveEntry = {\r\n node: HTMLDivElement;\r\n registryKey: string;\r\n offset: number;\r\n /** true khi chuột đang ở trên bubble — giữ tooltip không bị remove */\r\n bubbleHovered: boolean;\r\n /** position của trigger để tính bridge */\r\n position: 'top' | 'bottom' | 'left' | 'right';\r\n};\r\n\r\nconst activeMap = new Map<string, ActiveEntry>();\r\n\r\n/** Registry cho customContent: id → rendered DOM node */\r\nconst customContentRegistry = new Map<string, Element>();\r\n\r\nlet refCount = 0;\r\nlet observer: IntersectionObserver | null = null;\r\n\r\nfunction calcStyle(\r\n r: DOMRect,\r\n position: 'top' | 'bottom' | 'left' | 'right',\r\n): Record<string, string> {\r\n const OFFSET_PX = 8;\r\n if (position === 'top') {\r\n return {\r\n left: `${r.left + r.width / 2}px`,\r\n top: `${r.top - OFFSET_PX}px`,\r\n transform: 'translateX(-50%) translateY(-100%)',\r\n };\r\n } else if (position === 'bottom') {\r\n return {\r\n left: `${r.left + r.width / 2}px`,\r\n top: `${r.bottom + OFFSET_PX}px`,\r\n transform: 'translateX(-50%)',\r\n };\r\n } else if (position === 'left') {\r\n return {\r\n left: `${r.left - OFFSET_PX}px`,\r\n top: `${r.top + r.height / 2}px`,\r\n transform: 'translateX(-100%) translateY(-50%)',\r\n };\r\n } else {\r\n return {\r\n left: `${r.right + OFFSET_PX}px`,\r\n top: `${r.top + r.height / 2}px`,\r\n transform: 'translateY(-50%)',\r\n };\r\n }\r\n}\r\n\r\nfunction showTooltip(\r\n id: string,\r\n triggerEl: HTMLElement,\r\n content: string | undefined,\r\n customContent: Element | undefined,\r\n position: 'top' | 'bottom' | 'left' | 'right',\r\n colorClass: string,\r\n extraClass: string | undefined,\r\n customZIndex: number | undefined,\r\n) {\r\n if (activeMap.has(id)) return;\r\n\r\n const r = triggerEl.getBoundingClientRect();\r\n const style = calcStyle(r, position);\r\n\r\n const node = document.createElement('div');\r\n node.className = cn('too06', colorClass, extraClass);\r\n\r\n Object.assign(node.style, { position: 'fixed', pointerEvents: 'auto' }, style);\r\n\r\n let registryKey: string;\r\n let zIndexOffset: number;\r\n let zIndex: number;\r\n\r\n if (customZIndex !== undefined) {\r\n zIndex = customZIndex;\r\n registryKey = '';\r\n zIndexOffset = -1;\r\n } else {\r\n const acquired = acquire(ZIndexType.TOOLTIP, OFFSET[ZIndexType.TOOLTIP]);\r\n zIndex = acquired.zIndex;\r\n registryKey = acquired.registryKey;\r\n zIndexOffset = acquired.offset;\r\n }\r\n\r\n node.style.zIndex = String(zIndex);\r\n\r\n if (content) {\r\n node.textContent = content;\r\n } else if (customContent) {\r\n node.appendChild(customContent.cloneNode(true));\r\n }\r\n\r\n const entry: ActiveEntry = {\r\n node,\r\n registryKey,\r\n offset: zIndexOffset,\r\n bubbleHovered: false,\r\n position,\r\n };\r\n activeMap.set(id, entry);\r\n\r\n node.addEventListener('mouseenter', function onBubbleEnter() {\r\n entry.bubbleHovered = true;\r\n });\r\n node.addEventListener('mouseleave', function onBubbleLeave() {\r\n entry.bubbleHovered = false;\r\n // Nếu sentinel đã không còn visible (chuột đã rời trigger), xóa tooltip\r\n removeTooltipIfIdle(id);\r\n });\r\n\r\n document.body.appendChild(node);\r\n}\r\n\r\n/** sentinelActive = true khi IO đang thấy sentinel (chuột trên trigger/bridge) */\r\nconst sentinelActiveSet = new Set<string>();\r\n\r\nfunction removeTooltipIfIdle(id: string) {\r\n const entry = activeMap.get(id);\r\n if (!entry) return;\r\n // Chỉ remove nếu cả sentinel lẫn bubble đều không có hover\r\n if (sentinelActiveSet.has(id) || entry.bubbleHovered) return;\r\n entry.node.remove();\r\n if (entry.offset >= 0) {\r\n release(entry.registryKey, entry.offset);\r\n }\r\n activeMap.delete(id);\r\n}\r\n\r\nfunction removeTooltip(id: string) {\r\n sentinelActiveSet.delete(id);\r\n removeTooltipIfIdle(id);\r\n}\r\n\r\n/**\r\n * Trick kết hợp CSS: sentinel element 1×1px ẩn bên trong wrapper.\r\n * Khi `:hover` CSS làm sentinel hiển thị (`display: block`), IntersectionObserver\r\n * phát hiện nó intersect viewport và gọi `showTooltip()`.\r\n * Không dùng JS event listener trên trigger — zero overhead.\r\n */\r\nfunction getOrCreateObserver(): IntersectionObserver {\r\n if (!observer) {\r\n observer = new IntersectionObserver(\r\n entries => {\r\n for (const entry of entries) {\r\n const el = entry.target as HTMLElement;\r\n const id = el.dataset.id ?? '';\r\n const content = el.dataset.tip;\r\n const pos = (el.dataset.position ?? 'top') as 'top' | 'bottom' | 'left' | 'right';\r\n const colorClass = el.dataset.colorClass ?? '';\r\n const extraClass = el.dataset.extraClass;\r\n const customZIndex = el.dataset.customZIndex\r\n ? Number(el.dataset.customZIndex)\r\n : undefined;\r\n\r\n if (entry.isIntersecting) {\r\n sentinelActiveSet.add(id);\r\n const triggerEl = el.closest('[data-tt]') as HTMLElement | null;\r\n if (!triggerEl) continue;\r\n const customContent = customContentRegistry.get(id);\r\n showTooltip(\r\n id,\r\n triggerEl,\r\n content,\r\n customContent,\r\n pos,\r\n colorClass,\r\n extraClass,\r\n customZIndex,\r\n );\r\n } else {\r\n removeTooltip(id);\r\n }\r\n }\r\n },\r\n { threshold: 0 },\r\n );\r\n }\r\n return observer;\r\n}\r\n\r\n// ─── Tooltip — unified entry point ──────────────────────────────────────────\r\n\r\nexport const Tooltip: Component<TooltipProps> = p => {\r\n return (\r\n <Show when={!p.hidden} fallback={<>{p.children}</>}>\r\n <Switch fallback={<TooltipDefaultMain {...p} />}>\r\n <Match when={p.type === 'portal' || 'containerId' in p}>\r\n <TooltipPortalMain {...(p as TooltipPortalProps)} />\r\n </Match>\r\n </Switch>\r\n </Show>\r\n );\r\n};\r\n\r\n// ─── Default (IO-based) impl ─────────────────────────────────────────────────\r\n\r\nconst TooltipDefaultMain: Component<TooltipProps> = p => {\r\n p = mergeProps(\r\n {\r\n position: 'top' as const,\r\n color: 'neutral' as const,\r\n },\r\n p,\r\n );\r\n const id = createUniqueId();\r\n let sentinelRef!: HTMLDivElement;\r\n let customContentRef!: HTMLDivElement;\r\n\r\n onMount(() => {\r\n refCount++;\r\n sentinelRef.dataset.id = id;\r\n sentinelRef.dataset.tip = p.content ?? '';\r\n sentinelRef.dataset.position = p.position;\r\n sentinelRef.dataset.colorClass = getColor(p.color);\r\n if (p.class?.content) sentinelRef.dataset.extraClass = p.class.content;\r\n if (p.zIndex !== undefined) sentinelRef.dataset.customZIndex = String(p.zIndex);\r\n if (p.customContent && customContentRef?.firstElementChild) {\r\n customContentRegistry.set(id, customContentRef.firstElementChild);\r\n }\r\n getOrCreateObserver().observe(sentinelRef);\r\n });\r\n\r\n onCleanup(function cleanupTooltipRegistration() {\r\n observer?.unobserve(sentinelRef);\r\n removeTooltip(id);\r\n customContentRegistry.delete(id);\r\n refCount--;\r\n if (refCount === 0 && observer) {\r\n observer.disconnect();\r\n observer = null;\r\n }\r\n });\r\n\r\n return (\r\n <div\r\n ref={el => (el.dataset.tt = '')}\r\n class={cn('too07', p.class?.root)}\r\n data-pos={p.position ?? 'top'}\r\n >\r\n <div ref={sentinelRef} class=\"too08\" />\r\n {p.children as JSX.Element}\r\n {p.customContent && (\r\n <div ref={customContentRef} class=\"hidden\">\r\n {p.customContent}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\n// ═══════════════════════════════════════════════════════════════════════════\r\n// TOOLTIP PORTAL — Event-delegation mode\r\n// ═══════════════════════════════════════════════════════════════════════════\r\n\r\n/**\r\n * SINGLETON PORTAL BUBBLE — Thiết kế có chủ đích.\r\n * Signal ở module scope vì toàn bộ hệ thống tooltip portal chỉ có\r\n * DUY NHẤT 1 bubble tồn tại trong DOM tại bất kỳ thời điểm nào.\r\n */\r\nconst [portalBubbleStyle, setPortalBubbleStyle] = createSignal<\r\n import('solid-js').JSX.CSSProperties\r\n>({});\r\n\r\ntype TooltipEntry = {\r\n setHovered: (v: boolean) => void;\r\n updateCoords: () => void;\r\n};\r\n\r\ntype ContainerState = {\r\n count: number;\r\n entries: Map<string, TooltipEntry>;\r\n};\r\n\r\nconst containerMap = new WeakMap<Element, ContainerState>();\r\n\r\ntype ListenerPair = { over: (e: Event) => void; out: (e: Event) => void };\r\nconst listenerMap = new WeakMap<Element, ListenerPair>();\r\n\r\nfunction makeMouseOver(state: ContainerState) {\r\n return (e: Event) => {\r\n const el = (e.target as Element).closest('[tt]');\r\n if (!el) return;\r\n const tt = el.getAttribute('tt')!;\r\n const entry = state.entries.get(tt);\r\n if (entry) {\r\n entry.updateCoords();\r\n entry.setHovered(true);\r\n }\r\n };\r\n}\r\n\r\nfunction makeMouseOut(state: ContainerState) {\r\n return (e: Event) => {\r\n const el = (e.target as Element).closest('[tt]');\r\n if (!el) return;\r\n const tt = el.getAttribute('tt')!;\r\n const related = (e as MouseEvent).relatedTarget as Element | null;\r\n if (related && el.contains(related)) return;\r\n const entry = state.entries.get(tt);\r\n if (entry) entry.setHovered(false);\r\n };\r\n}\r\n\r\nfunction attachToContainer(root: Element, state: ContainerState) {\r\n const over = makeMouseOver(state);\r\n const out = makeMouseOut(state);\r\n listenerMap.set(root, { over, out });\r\n root.addEventListener('mouseover', over, { passive: true });\r\n root.addEventListener('mouseout', out, { passive: true });\r\n}\r\n\r\nfunction detachFromContainer(root: Element) {\r\n const pair = listenerMap.get(root);\r\n if (!pair) return;\r\n root.removeEventListener('mouseover', pair.over);\r\n root.removeEventListener('mouseout', pair.out);\r\n listenerMap.delete(root);\r\n}\r\n\r\nfunction calcPortalStyle(\r\n el: HTMLElement,\r\n position: 'top' | 'bottom' | 'left' | 'right',\r\n): import('solid-js').JSX.CSSProperties {\r\n const r = el.getBoundingClientRect();\r\n const OFFSET_PX = 8;\r\n\r\n if (position === 'top') {\r\n return {\r\n left: `${r.left + r.width / 2}px`,\r\n top: `${r.top - OFFSET_PX}px`,\r\n transform: 'translateX(-50%) translateY(-100%)',\r\n };\r\n } else if (position === 'bottom') {\r\n return {\r\n left: `${r.left + r.width / 2}px`,\r\n top: `${r.bottom + OFFSET_PX}px`,\r\n transform: 'translateX(-50%)',\r\n };\r\n } else if (position === 'left') {\r\n return {\r\n left: `${r.left - OFFSET_PX}px`,\r\n top: `${r.top + r.height / 2}px`,\r\n transform: 'translateX(-100%) translateY(-50%)',\r\n };\r\n } else {\r\n return {\r\n left: `${r.right + OFFSET_PX}px`,\r\n top: `${r.top + r.height / 2}px`,\r\n transform: 'translateY(-50%)',\r\n };\r\n }\r\n}\r\n\r\nconst TooltipPortalMain: Component<TooltipPortalProps> = p => {\r\n const id = createUniqueId();\r\n p = mergeProps(\r\n {\r\n position: 'top' as const,\r\n color: 'neutral' as const,\r\n },\r\n p,\r\n );\r\n\r\n const [isHovered, setIsHovered] = createSignal(false);\r\n\r\n const onTriggerMount = (el: HTMLDivElement) => {\r\n const position = p.position ?? 'top';\r\n const updateCoords = () => setPortalBubbleStyle(calcPortalStyle(el, position));\r\n el.setAttribute('tt', id);\r\n\r\n const handle = { cancelled: false, doCleanup: undefined as (() => void) | undefined };\r\n\r\n const register = () => {\r\n if (handle.cancelled) return;\r\n\r\n const root = document.getElementById(p.containerId);\r\n if (!root) return;\r\n\r\n let state = containerMap.get(root);\r\n if (!state) {\r\n state = { count: 0, entries: new Map() };\r\n containerMap.set(root, state);\r\n }\r\n state.entries.set(id, { setHovered: setIsHovered, updateCoords });\r\n state.count += 1;\r\n if (state.count === 1) attachToContainer(root, state);\r\n\r\n handle.doCleanup = () => {\r\n const s = containerMap.get(root);\r\n if (!s) return;\r\n s.entries.delete(id);\r\n s.count -= 1;\r\n el.removeAttribute('tt');\r\n if (s.count === 0) {\r\n detachFromContainer(root);\r\n containerMap.delete(root);\r\n }\r\n };\r\n };\r\n\r\n queueMicrotask(register);\r\n onCleanup(function cancelAndDetachTrigger() {\r\n handle.cancelled = true;\r\n handle.doCleanup?.();\r\n });\r\n };\r\n\r\n return (\r\n <div\r\n ref={onTriggerMount}\r\n class={cn(\r\n 'too01',\r\n tooltipVariants({ color: p.color, position: p.position }),\r\n getColor(p.color),\r\n 'too04',\r\n p.class?.root,\r\n )}\r\n {...(p.content && !p.customContent && { ['data-tip']: p.content })}\r\n >\r\n <Switch>\r\n <Match when={p.content}>\r\n <ZIndex\r\n type={ZIndexType.TOOLTIP}\r\n open={isHovered()}\r\n position={portalBubbleStyle()}\r\n class={cn('too05', getColor(p.color), p.class?.content)}\r\n blockScroll={false}\r\n customValue={p.zIndex}\r\n >\r\n {p.content}\r\n </ZIndex>\r\n </Match>\r\n <Match when={p.customContent}>\r\n <ZIndex\r\n type={ZIndexType.TOOLTIP}\r\n open={isHovered()}\r\n position={portalBubbleStyle()}\r\n class={cn('too05', p.class?.content)}\r\n customValue={p.zIndex}\r\n >\r\n {p.customContent}\r\n </ZIndex>\r\n </Match>\r\n </Switch>\r\n {p.children as JSX.Element}\r\n </div>\r\n );\r\n};\r\n"],"mappings":"qrBAoBMqB,EAAkBd,EAAI,GAAI,CAC9Be,SAAU,CACRC,MAAO,CACLC,QAAS,kBACTC,QAAS,kBACTC,UAAW,oBACXC,OAAQ,iBACRC,KAAM,eACNC,QAAS,kBACTC,QAAS,kBACTC,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