@editora/ui-core 0.1.9 → 0.1.10

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 (521) hide show
  1. package/README.md +35 -0
  2. package/dist/ElementBase-1b301e7f.js +1 -0
  3. package/dist/ElementBase-909688f3.mjs +79 -0
  4. package/dist/accordion.cjs.js +360 -0
  5. package/dist/accordion.esm.js +647 -0
  6. package/dist/alert-dialog.cjs.js +567 -0
  7. package/dist/alert-dialog.esm.js +1043 -0
  8. package/dist/alert.cjs.js +351 -0
  9. package/dist/alert.esm.js +450 -0
  10. package/dist/anchor.cjs.js +30 -0
  11. package/dist/anchor.esm.js +62 -0
  12. package/dist/animated-beam.cjs.js +720 -0
  13. package/dist/animated-beam.esm.js +1540 -0
  14. package/dist/animated-list.cjs.js +672 -0
  15. package/dist/animated-list.esm.js +1137 -0
  16. package/dist/animated-text.cjs.js +683 -0
  17. package/dist/animated-text.esm.js +1020 -0
  18. package/dist/app-header.cjs.js +345 -0
  19. package/dist/app-header.esm.js +398 -0
  20. package/dist/aspect-ratio.cjs.js +294 -0
  21. package/dist/aspect-ratio.esm.js +416 -0
  22. package/dist/avatar.cjs.js +365 -0
  23. package/dist/avatar.esm.js +513 -0
  24. package/dist/badge.cjs.js +432 -0
  25. package/dist/badge.esm.js +554 -0
  26. package/dist/block-controls.cjs.js +347 -0
  27. package/dist/block-controls.esm.js +556 -0
  28. package/dist/box.cjs.js +226 -0
  29. package/dist/box.esm.js +556 -0
  30. package/dist/breadcrumb.cjs.js +288 -0
  31. package/dist/breadcrumb.esm.js +523 -0
  32. package/dist/button.cjs.js +521 -0
  33. package/dist/button.esm.js +671 -0
  34. package/dist/calendar-2c11b824.mjs +1685 -0
  35. package/dist/calendar-a8735e40.js +741 -0
  36. package/dist/calendar.cjs.js +1 -0
  37. package/dist/calendar.esm.js +11 -0
  38. package/dist/card.cjs.js +306 -0
  39. package/dist/card.esm.js +378 -0
  40. package/dist/chart.cjs.js +783 -0
  41. package/dist/chart.esm.js +1369 -0
  42. package/dist/checkbox.cjs.js +338 -0
  43. package/dist/checkbox.esm.js +455 -0
  44. package/dist/collapsible.cjs.js +381 -0
  45. package/dist/collapsible.esm.js +548 -0
  46. package/dist/collection-a1aac0c6.mjs +56 -0
  47. package/dist/collection-a2969ad2.js +1 -0
  48. package/dist/collection.cjs.js +1 -0
  49. package/dist/collection.esm.js +136 -0
  50. package/dist/color-picker.cjs.js +803 -0
  51. package/dist/color-picker.esm.js +1809 -0
  52. package/dist/combobox.cjs.js +525 -0
  53. package/dist/combobox.esm.js +1023 -0
  54. package/dist/command-palette.cjs.js +67 -0
  55. package/dist/command-palette.esm.js +181 -0
  56. package/dist/command.cjs.js +130 -0
  57. package/dist/command.esm.js +307 -0
  58. package/dist/container.cjs.js +115 -0
  59. package/dist/container.esm.js +156 -0
  60. package/dist/context-menu.cjs.js +357 -0
  61. package/dist/context-menu.esm.js +1204 -0
  62. package/dist/control-group.cjs.js +80 -0
  63. package/dist/control-group.esm.js +110 -0
  64. package/dist/data-table.cjs.js +682 -0
  65. package/dist/data-table.esm.js +1660 -0
  66. package/dist/date-field.cjs.js +142 -0
  67. package/dist/date-field.esm.js +384 -0
  68. package/dist/date-picker.cjs.js +570 -0
  69. package/dist/date-picker.esm.js +1067 -0
  70. package/dist/date-range-picker.cjs.js +455 -0
  71. package/dist/date-range-picker.esm.js +973 -0
  72. package/dist/date-range-time-picker.cjs.js +573 -0
  73. package/dist/date-range-time-picker.esm.js +1137 -0
  74. package/dist/date-time-picker.cjs.js +495 -0
  75. package/dist/date-time-picker.esm.js +1062 -0
  76. package/dist/date-time-utils-5cf58cd0.js +1 -0
  77. package/dist/date-time-utils-bdceb7af.mjs +273 -0
  78. package/dist/description.cjs.js +85 -0
  79. package/dist/description.esm.js +136 -0
  80. package/dist/dialog.cjs.js +406 -0
  81. package/dist/dialog.esm.js +822 -0
  82. package/dist/direction-provider.cjs.js +30 -0
  83. package/dist/direction-provider.esm.js +74 -0
  84. package/dist/dismissable-layer-193e3bed.js +1 -0
  85. package/dist/dismissable-layer-9c7e6b58.mjs +112 -0
  86. package/dist/dismissable-layer.cjs.js +6 -0
  87. package/dist/dismissable-layer.esm.js +115 -0
  88. package/dist/dock.cjs.js +347 -0
  89. package/dist/dock.esm.js +826 -0
  90. package/dist/drawer.cjs.js +538 -0
  91. package/dist/drawer.esm.js +872 -0
  92. package/dist/dropdown.cjs.js +511 -0
  93. package/dist/dropdown.esm.js +1084 -0
  94. package/dist/dropzone.cjs.js +1 -0
  95. package/dist/dropzone.esm.js +11 -0
  96. package/dist/empty-state.cjs.js +169 -0
  97. package/dist/empty-state.esm.js +199 -0
  98. package/dist/field-error.cjs.js +74 -0
  99. package/dist/field-error.esm.js +125 -0
  100. package/dist/field.cjs.js +398 -0
  101. package/dist/field.esm.js +542 -0
  102. package/dist/fieldset.cjs.js +214 -0
  103. package/dist/fieldset.esm.js +298 -0
  104. package/dist/file-upload.cjs.js +353 -0
  105. package/dist/file-upload.esm.js +740 -0
  106. package/dist/flex.cjs.js +54 -0
  107. package/dist/flex.esm.js +168 -0
  108. package/dist/floating-toolbar.cjs.js +223 -0
  109. package/dist/floating-toolbar.esm.js +513 -0
  110. package/dist/focus-scope-103833ee.mjs +147 -0
  111. package/dist/focus-scope-2b12b4e7.js +1 -0
  112. package/dist/focus-scope.cjs.js +6 -0
  113. package/dist/focus-scope.esm.js +97 -0
  114. package/dist/form.cjs.js +377 -0
  115. package/dist/form.esm.js +862 -0
  116. package/dist/gantt.cjs.js +157 -0
  117. package/dist/gantt.esm.js +214 -0
  118. package/dist/grid.cjs.js +67 -0
  119. package/dist/grid.esm.js +211 -0
  120. package/dist/hover-card.cjs.js +284 -0
  121. package/dist/hover-card.esm.js +470 -0
  122. package/dist/icon-9ed13093.mjs +364 -0
  123. package/dist/icon-cloud.cjs.js +495 -0
  124. package/dist/icon-cloud.esm.js +828 -0
  125. package/dist/icon-eaa486b3.js +207 -0
  126. package/dist/icon.cjs.js +1 -0
  127. package/dist/icon.esm.js +6 -0
  128. package/dist/index.cjs.js +1 -36010
  129. package/dist/index.esm.js +440 -66615
  130. package/dist/inline-edit.cjs.js +118 -0
  131. package/dist/inline-edit.esm.js +206 -0
  132. package/dist/input.cjs.js +535 -0
  133. package/dist/input.esm.js +790 -0
  134. package/dist/label.cjs.js +195 -0
  135. package/dist/label.esm.js +301 -0
  136. package/dist/layout.cjs.js +266 -0
  137. package/dist/layout.esm.js +408 -0
  138. package/dist/listbox-308789a0.mjs +210 -0
  139. package/dist/listbox-ef2f708e.js +46 -0
  140. package/dist/listbox.cjs.js +1 -0
  141. package/dist/listbox.esm.js +6 -0
  142. package/dist/marquee.cjs.js +513 -0
  143. package/dist/marquee.esm.js +767 -0
  144. package/dist/masonry-grid.cjs.js +65 -0
  145. package/dist/masonry-grid.esm.js +180 -0
  146. package/dist/menu-item-styles-27fdbac4.mjs +181 -0
  147. package/dist/menu-item-styles-83ad1e22.js +152 -0
  148. package/dist/menu.cjs.js +275 -0
  149. package/dist/menu.esm.js +743 -0
  150. package/dist/menubar.cjs.js +455 -0
  151. package/dist/menubar.esm.js +1195 -0
  152. package/dist/meter.cjs.js +241 -0
  153. package/dist/meter.esm.js +334 -0
  154. package/dist/multi-select.cjs.js +549 -0
  155. package/dist/multi-select.esm.js +914 -0
  156. package/dist/navigation-menu.cjs.js +382 -0
  157. package/dist/navigation-menu.esm.js +614 -0
  158. package/dist/number-field.cjs.js +351 -0
  159. package/dist/number-field.esm.js +771 -0
  160. package/dist/number-ticker.cjs.js +209 -0
  161. package/dist/number-ticker.esm.js +749 -0
  162. package/dist/odometer.cjs.js +313 -0
  163. package/dist/odometer.esm.js +565 -0
  164. package/dist/orbiter.cjs.js +495 -0
  165. package/dist/orbiter.esm.js +831 -0
  166. package/dist/overlayManager-86454af7.mjs +58 -0
  167. package/dist/overlayManager-ece06517.js +1 -0
  168. package/dist/pagination.cjs.js +201 -0
  169. package/dist/pagination.esm.js +297 -0
  170. package/dist/panel-group-40254cdd.js +36 -0
  171. package/dist/panel-group-a376cc5e.mjs +326 -0
  172. package/dist/panel-group.cjs.js +1 -0
  173. package/dist/panel-group.esm.js +7 -0
  174. package/dist/panel.cjs.js +22 -0
  175. package/dist/panel.esm.js +46 -0
  176. package/dist/password-field.cjs.js +626 -0
  177. package/dist/password-field.esm.js +925 -0
  178. package/dist/pin-input.cjs.js +185 -0
  179. package/dist/pin-input.esm.js +412 -0
  180. package/dist/placement-grid.cjs.js +99 -0
  181. package/dist/placement-grid.esm.js +486 -0
  182. package/dist/plugin-panel.cjs.js +131 -0
  183. package/dist/plugin-panel.esm.js +173 -0
  184. package/dist/popover.cjs.js +286 -0
  185. package/dist/popover.esm.js +483 -0
  186. package/dist/portal-1cf392ca.mjs +114 -0
  187. package/dist/portal-d8d7fbca.js +1 -0
  188. package/dist/portal.cjs.js +39 -0
  189. package/dist/portal.esm.js +187 -0
  190. package/dist/positioner-accc6e5f.js +1 -0
  191. package/dist/positioner-fbd61bf1.mjs +132 -0
  192. package/dist/positioner.cjs.js +6 -0
  193. package/dist/positioner.esm.js +137 -0
  194. package/dist/presence.cjs.js +164 -0
  195. package/dist/presence.esm.js +301 -0
  196. package/dist/progress.cjs.js +329 -0
  197. package/dist/progress.esm.js +453 -0
  198. package/dist/quick-actions.cjs.js +202 -0
  199. package/dist/quick-actions.esm.js +357 -0
  200. package/dist/radio-group.cjs.js +257 -0
  201. package/dist/radio-group.esm.js +477 -0
  202. package/dist/rating.cjs.js +355 -0
  203. package/dist/rating.esm.js +637 -0
  204. package/dist/roving-focus-group-4350c9a7.mjs +50 -0
  205. package/dist/roving-focus-group-5c059bf9.js +1 -0
  206. package/dist/roving-focus-group.cjs.js +1 -0
  207. package/dist/roving-focus-group.esm.js +72 -0
  208. package/dist/{runtime-3cc1c386.mjs → runtime-4ac0107b.mjs} +348 -459
  209. package/dist/runtime-5f282bc8.js +1 -0
  210. package/dist/runtime.cjs.js +1 -1
  211. package/dist/runtime.esm.js +24 -23
  212. package/dist/scroll-area.cjs.js +294 -0
  213. package/dist/scroll-area.esm.js +478 -0
  214. package/dist/scroll-lock-48793569.js +1 -0
  215. package/dist/scroll-lock-9de6d328.mjs +53 -0
  216. package/dist/section.cjs.js +167 -0
  217. package/dist/section.esm.js +202 -0
  218. package/dist/select.cjs.js +799 -0
  219. package/dist/select.esm.js +1266 -0
  220. package/dist/selection-popup.cjs.js +203 -0
  221. package/dist/selection-popup.esm.js +392 -0
  222. package/dist/separator.cjs.js +221 -0
  223. package/dist/separator.esm.js +241 -0
  224. package/dist/sidebar.cjs.js +769 -0
  225. package/dist/sidebar.esm.js +1219 -0
  226. package/dist/skeleton.cjs.js +205 -0
  227. package/dist/skeleton.esm.js +249 -0
  228. package/dist/slider.cjs.js +493 -0
  229. package/dist/slider.esm.js +694 -0
  230. package/dist/slot.cjs.js +159 -0
  231. package/dist/slot.esm.js +227 -0
  232. package/dist/sortable.cjs.js +855 -1
  233. package/dist/sortable.esm.js +2176 -2
  234. package/dist/spinning-text.cjs.js +395 -0
  235. package/dist/spinning-text.esm.js +635 -0
  236. package/dist/split-button.cjs.js +410 -0
  237. package/dist/split-button.esm.js +619 -0
  238. package/dist/splitter.cjs.js +70 -0
  239. package/dist/splitter.esm.js +105 -0
  240. package/dist/standalone/accordion.d.ts +2 -0
  241. package/dist/standalone/accordion.d.ts.map +1 -0
  242. package/dist/standalone/alert-dialog.d.ts +2 -0
  243. package/dist/standalone/alert-dialog.d.ts.map +1 -0
  244. package/dist/standalone/alert.d.ts +2 -0
  245. package/dist/standalone/alert.d.ts.map +1 -0
  246. package/dist/standalone/anchor.d.ts +2 -0
  247. package/dist/standalone/anchor.d.ts.map +1 -0
  248. package/dist/standalone/animated-beam.d.ts +2 -0
  249. package/dist/standalone/animated-beam.d.ts.map +1 -0
  250. package/dist/standalone/animated-list.d.ts +2 -0
  251. package/dist/standalone/animated-list.d.ts.map +1 -0
  252. package/dist/standalone/animated-text.d.ts +2 -0
  253. package/dist/standalone/animated-text.d.ts.map +1 -0
  254. package/dist/standalone/app-header.d.ts +2 -0
  255. package/dist/standalone/app-header.d.ts.map +1 -0
  256. package/dist/standalone/aspect-ratio.d.ts +2 -0
  257. package/dist/standalone/aspect-ratio.d.ts.map +1 -0
  258. package/dist/standalone/avatar.d.ts +2 -0
  259. package/dist/standalone/avatar.d.ts.map +1 -0
  260. package/dist/standalone/badge.d.ts +2 -0
  261. package/dist/standalone/badge.d.ts.map +1 -0
  262. package/dist/standalone/block-controls.d.ts +2 -0
  263. package/dist/standalone/block-controls.d.ts.map +1 -0
  264. package/dist/standalone/box.d.ts +2 -0
  265. package/dist/standalone/box.d.ts.map +1 -0
  266. package/dist/standalone/breadcrumb.d.ts +2 -0
  267. package/dist/standalone/breadcrumb.d.ts.map +1 -0
  268. package/dist/standalone/button.d.ts +2 -0
  269. package/dist/standalone/button.d.ts.map +1 -0
  270. package/dist/standalone/calendar.d.ts +2 -0
  271. package/dist/standalone/calendar.d.ts.map +1 -0
  272. package/dist/standalone/card.d.ts +2 -0
  273. package/dist/standalone/card.d.ts.map +1 -0
  274. package/dist/standalone/chart.d.ts +2 -0
  275. package/dist/standalone/chart.d.ts.map +1 -0
  276. package/dist/standalone/checkbox.d.ts +2 -0
  277. package/dist/standalone/checkbox.d.ts.map +1 -0
  278. package/dist/standalone/collapsible.d.ts +2 -0
  279. package/dist/standalone/collapsible.d.ts.map +1 -0
  280. package/dist/standalone/collection.d.ts +2 -0
  281. package/dist/standalone/collection.d.ts.map +1 -0
  282. package/dist/standalone/color-picker.d.ts +2 -0
  283. package/dist/standalone/color-picker.d.ts.map +1 -0
  284. package/dist/standalone/combobox.d.ts +2 -0
  285. package/dist/standalone/combobox.d.ts.map +1 -0
  286. package/dist/standalone/command-palette.d.ts +2 -0
  287. package/dist/standalone/command-palette.d.ts.map +1 -0
  288. package/dist/standalone/command.d.ts +2 -0
  289. package/dist/standalone/command.d.ts.map +1 -0
  290. package/dist/standalone/container.d.ts +2 -0
  291. package/dist/standalone/container.d.ts.map +1 -0
  292. package/dist/standalone/context-menu.d.ts +2 -0
  293. package/dist/standalone/context-menu.d.ts.map +1 -0
  294. package/dist/standalone/control-group.d.ts +2 -0
  295. package/dist/standalone/control-group.d.ts.map +1 -0
  296. package/dist/standalone/data-table.d.ts +2 -0
  297. package/dist/standalone/data-table.d.ts.map +1 -0
  298. package/dist/standalone/date-field.d.ts +2 -0
  299. package/dist/standalone/date-field.d.ts.map +1 -0
  300. package/dist/standalone/date-picker.d.ts +2 -0
  301. package/dist/standalone/date-picker.d.ts.map +1 -0
  302. package/dist/standalone/date-range-picker.d.ts +2 -0
  303. package/dist/standalone/date-range-picker.d.ts.map +1 -0
  304. package/dist/standalone/date-range-time-picker.d.ts +2 -0
  305. package/dist/standalone/date-range-time-picker.d.ts.map +1 -0
  306. package/dist/standalone/date-time-picker.d.ts +2 -0
  307. package/dist/standalone/date-time-picker.d.ts.map +1 -0
  308. package/dist/standalone/description.d.ts +2 -0
  309. package/dist/standalone/description.d.ts.map +1 -0
  310. package/dist/standalone/dialog.d.ts +2 -0
  311. package/dist/standalone/dialog.d.ts.map +1 -0
  312. package/dist/standalone/direction-provider.d.ts +2 -0
  313. package/dist/standalone/direction-provider.d.ts.map +1 -0
  314. package/dist/standalone/dismissable-layer.d.ts +2 -0
  315. package/dist/standalone/dismissable-layer.d.ts.map +1 -0
  316. package/dist/standalone/dock.d.ts +2 -0
  317. package/dist/standalone/dock.d.ts.map +1 -0
  318. package/dist/standalone/drawer.d.ts +2 -0
  319. package/dist/standalone/drawer.d.ts.map +1 -0
  320. package/dist/standalone/dropdown.d.ts +2 -0
  321. package/dist/standalone/dropdown.d.ts.map +1 -0
  322. package/dist/standalone/dropzone.d.ts +2 -0
  323. package/dist/standalone/dropzone.d.ts.map +1 -0
  324. package/dist/standalone/empty-state.d.ts +2 -0
  325. package/dist/standalone/empty-state.d.ts.map +1 -0
  326. package/dist/standalone/field-error.d.ts +2 -0
  327. package/dist/standalone/field-error.d.ts.map +1 -0
  328. package/dist/standalone/field.d.ts +2 -0
  329. package/dist/standalone/field.d.ts.map +1 -0
  330. package/dist/standalone/fieldset.d.ts +2 -0
  331. package/dist/standalone/fieldset.d.ts.map +1 -0
  332. package/dist/standalone/file-upload.d.ts +2 -0
  333. package/dist/standalone/file-upload.d.ts.map +1 -0
  334. package/dist/standalone/flex.d.ts +2 -0
  335. package/dist/standalone/flex.d.ts.map +1 -0
  336. package/dist/standalone/floating-toolbar.d.ts +2 -0
  337. package/dist/standalone/floating-toolbar.d.ts.map +1 -0
  338. package/dist/standalone/focus-scope.d.ts +2 -0
  339. package/dist/standalone/focus-scope.d.ts.map +1 -0
  340. package/dist/standalone/form.d.ts +2 -0
  341. package/dist/standalone/form.d.ts.map +1 -0
  342. package/dist/standalone/gantt.d.ts +2 -0
  343. package/dist/standalone/gantt.d.ts.map +1 -0
  344. package/dist/standalone/grid.d.ts +2 -0
  345. package/dist/standalone/grid.d.ts.map +1 -0
  346. package/dist/standalone/hover-card.d.ts +2 -0
  347. package/dist/standalone/hover-card.d.ts.map +1 -0
  348. package/dist/standalone/icon-cloud.d.ts +2 -0
  349. package/dist/standalone/icon-cloud.d.ts.map +1 -0
  350. package/dist/standalone/icon.d.ts +2 -0
  351. package/dist/standalone/icon.d.ts.map +1 -0
  352. package/dist/standalone/inline-edit.d.ts +2 -0
  353. package/dist/standalone/inline-edit.d.ts.map +1 -0
  354. package/dist/standalone/input.d.ts +2 -0
  355. package/dist/standalone/input.d.ts.map +1 -0
  356. package/dist/standalone/label.d.ts +2 -0
  357. package/dist/standalone/label.d.ts.map +1 -0
  358. package/dist/standalone/layout.d.ts +2 -0
  359. package/dist/standalone/layout.d.ts.map +1 -0
  360. package/dist/standalone/listbox.d.ts +2 -0
  361. package/dist/standalone/listbox.d.ts.map +1 -0
  362. package/dist/standalone/marquee.d.ts +2 -0
  363. package/dist/standalone/marquee.d.ts.map +1 -0
  364. package/dist/standalone/masonry-grid.d.ts +2 -0
  365. package/dist/standalone/masonry-grid.d.ts.map +1 -0
  366. package/dist/standalone/menu.d.ts +2 -0
  367. package/dist/standalone/menu.d.ts.map +1 -0
  368. package/dist/standalone/menubar.d.ts +2 -0
  369. package/dist/standalone/menubar.d.ts.map +1 -0
  370. package/dist/standalone/meter.d.ts +2 -0
  371. package/dist/standalone/meter.d.ts.map +1 -0
  372. package/dist/standalone/multi-select.d.ts +2 -0
  373. package/dist/standalone/multi-select.d.ts.map +1 -0
  374. package/dist/standalone/navigation-menu.d.ts +2 -0
  375. package/dist/standalone/navigation-menu.d.ts.map +1 -0
  376. package/dist/standalone/number-field.d.ts +2 -0
  377. package/dist/standalone/number-field.d.ts.map +1 -0
  378. package/dist/standalone/number-ticker.d.ts +2 -0
  379. package/dist/standalone/number-ticker.d.ts.map +1 -0
  380. package/dist/standalone/odometer.d.ts +2 -0
  381. package/dist/standalone/odometer.d.ts.map +1 -0
  382. package/dist/standalone/orbiter.d.ts +2 -0
  383. package/dist/standalone/orbiter.d.ts.map +1 -0
  384. package/dist/standalone/pagination.d.ts +2 -0
  385. package/dist/standalone/pagination.d.ts.map +1 -0
  386. package/dist/standalone/panel-group.d.ts +2 -0
  387. package/dist/standalone/panel-group.d.ts.map +1 -0
  388. package/dist/standalone/panel.d.ts +2 -0
  389. package/dist/standalone/panel.d.ts.map +1 -0
  390. package/dist/standalone/password-field.d.ts +2 -0
  391. package/dist/standalone/password-field.d.ts.map +1 -0
  392. package/dist/standalone/pin-input.d.ts +2 -0
  393. package/dist/standalone/pin-input.d.ts.map +1 -0
  394. package/dist/standalone/placement-grid.d.ts +2 -0
  395. package/dist/standalone/placement-grid.d.ts.map +1 -0
  396. package/dist/standalone/plugin-panel.d.ts +2 -0
  397. package/dist/standalone/plugin-panel.d.ts.map +1 -0
  398. package/dist/standalone/popover.d.ts +2 -0
  399. package/dist/standalone/popover.d.ts.map +1 -0
  400. package/dist/standalone/portal.d.ts +2 -0
  401. package/dist/standalone/portal.d.ts.map +1 -0
  402. package/dist/standalone/positioner.d.ts +2 -0
  403. package/dist/standalone/positioner.d.ts.map +1 -0
  404. package/dist/standalone/presence.d.ts +2 -0
  405. package/dist/standalone/presence.d.ts.map +1 -0
  406. package/dist/standalone/progress.d.ts +2 -0
  407. package/dist/standalone/progress.d.ts.map +1 -0
  408. package/dist/standalone/quick-actions.d.ts +2 -0
  409. package/dist/standalone/quick-actions.d.ts.map +1 -0
  410. package/dist/standalone/radio-group.d.ts +2 -0
  411. package/dist/standalone/radio-group.d.ts.map +1 -0
  412. package/dist/standalone/rating.d.ts +2 -0
  413. package/dist/standalone/rating.d.ts.map +1 -0
  414. package/dist/standalone/roving-focus-group.d.ts +2 -0
  415. package/dist/standalone/roving-focus-group.d.ts.map +1 -0
  416. package/dist/standalone/scroll-area.d.ts +2 -0
  417. package/dist/standalone/scroll-area.d.ts.map +1 -0
  418. package/dist/standalone/section.d.ts +2 -0
  419. package/dist/standalone/section.d.ts.map +1 -0
  420. package/dist/standalone/select.d.ts +2 -0
  421. package/dist/standalone/select.d.ts.map +1 -0
  422. package/dist/standalone/selection-popup.d.ts +2 -0
  423. package/dist/standalone/selection-popup.d.ts.map +1 -0
  424. package/dist/standalone/separator.d.ts +2 -0
  425. package/dist/standalone/separator.d.ts.map +1 -0
  426. package/dist/standalone/sidebar.d.ts +2 -0
  427. package/dist/standalone/sidebar.d.ts.map +1 -0
  428. package/dist/standalone/skeleton.d.ts +2 -0
  429. package/dist/standalone/skeleton.d.ts.map +1 -0
  430. package/dist/standalone/slider.d.ts +2 -0
  431. package/dist/standalone/slider.d.ts.map +1 -0
  432. package/dist/standalone/slot.d.ts +2 -0
  433. package/dist/standalone/slot.d.ts.map +1 -0
  434. package/dist/standalone/spinning-text.d.ts +2 -0
  435. package/dist/standalone/spinning-text.d.ts.map +1 -0
  436. package/dist/standalone/split-button.d.ts +2 -0
  437. package/dist/standalone/split-button.d.ts.map +1 -0
  438. package/dist/standalone/splitter.d.ts +2 -0
  439. package/dist/standalone/splitter.d.ts.map +1 -0
  440. package/dist/standalone/stepper.d.ts +2 -0
  441. package/dist/standalone/stepper.d.ts.map +1 -0
  442. package/dist/standalone/switch.d.ts +2 -0
  443. package/dist/standalone/switch.d.ts.map +1 -0
  444. package/dist/standalone/table.d.ts +2 -0
  445. package/dist/standalone/table.d.ts.map +1 -0
  446. package/dist/standalone/tabs.d.ts +2 -0
  447. package/dist/standalone/tabs.d.ts.map +1 -0
  448. package/dist/standalone/tags-input.d.ts +2 -0
  449. package/dist/standalone/tags-input.d.ts.map +1 -0
  450. package/dist/standalone/textarea.d.ts +2 -0
  451. package/dist/standalone/textarea.d.ts.map +1 -0
  452. package/dist/standalone/time-field.d.ts +2 -0
  453. package/dist/standalone/time-field.d.ts.map +1 -0
  454. package/dist/standalone/time-picker.d.ts +2 -0
  455. package/dist/standalone/time-picker.d.ts.map +1 -0
  456. package/dist/standalone/timeline.d.ts +2 -0
  457. package/dist/standalone/timeline.d.ts.map +1 -0
  458. package/dist/standalone/toast.d.ts +2 -0
  459. package/dist/standalone/toast.d.ts.map +1 -0
  460. package/dist/standalone/toggle-group.d.ts +2 -0
  461. package/dist/standalone/toggle-group.d.ts.map +1 -0
  462. package/dist/standalone/toggle.d.ts +2 -0
  463. package/dist/standalone/toggle.d.ts.map +1 -0
  464. package/dist/standalone/toolbar.d.ts +2 -0
  465. package/dist/standalone/toolbar.d.ts.map +1 -0
  466. package/dist/standalone/tooltip.d.ts +2 -0
  467. package/dist/standalone/tooltip.d.ts.map +1 -0
  468. package/dist/standalone/transfer-list.d.ts +2 -0
  469. package/dist/standalone/transfer-list.d.ts.map +1 -0
  470. package/dist/standalone/tree-item.d.ts +2 -0
  471. package/dist/standalone/tree-item.d.ts.map +1 -0
  472. package/dist/standalone/tree.d.ts +2 -0
  473. package/dist/standalone/tree.d.ts.map +1 -0
  474. package/dist/standalone/visually-hidden.d.ts +2 -0
  475. package/dist/standalone/visually-hidden.d.ts.map +1 -0
  476. package/dist/standalone/wizard.d.ts +2 -0
  477. package/dist/standalone/wizard.d.ts.map +1 -0
  478. package/dist/stepper.cjs.js +337 -0
  479. package/dist/stepper.esm.js +578 -0
  480. package/dist/switch.cjs.js +397 -0
  481. package/dist/switch.esm.js +543 -0
  482. package/dist/table.cjs.js +212 -0
  483. package/dist/table.esm.js +432 -0
  484. package/dist/tabs.cjs.js +515 -0
  485. package/dist/tabs.esm.js +808 -0
  486. package/dist/tags-input.cjs.js +202 -0
  487. package/dist/tags-input.esm.js +436 -0
  488. package/dist/textarea.cjs.js +329 -0
  489. package/dist/textarea.esm.js +520 -0
  490. package/dist/time-field.cjs.js +142 -0
  491. package/dist/time-field.esm.js +387 -0
  492. package/dist/time-picker.cjs.js +284 -0
  493. package/dist/time-picker.esm.js +686 -0
  494. package/dist/timeline.cjs.js +198 -0
  495. package/dist/timeline.esm.js +248 -0
  496. package/dist/toast.cjs.js +234 -0
  497. package/dist/toast.esm.js +399 -0
  498. package/dist/toggle-group.cjs.js +131 -0
  499. package/dist/toggle-group.esm.js +382 -0
  500. package/dist/toggle.cjs.js +237 -0
  501. package/dist/toggle.esm.js +346 -0
  502. package/dist/toolbar.cjs.js +126 -0
  503. package/dist/toolbar.esm.js +240 -0
  504. package/dist/tooltip.cjs.js +159 -0
  505. package/dist/tooltip.esm.js +376 -0
  506. package/dist/transfer-list.cjs.js +734 -0
  507. package/dist/transfer-list.esm.js +969 -0
  508. package/dist/tree-0a7a8d05.js +39 -0
  509. package/dist/tree-dcd74a4a.mjs +294 -0
  510. package/dist/tree-item.cjs.js +103 -0
  511. package/dist/tree-item.esm.js +143 -0
  512. package/dist/tree.cjs.js +1 -0
  513. package/dist/tree.esm.js +7 -0
  514. package/dist/visually-hidden.cjs.js +42 -0
  515. package/dist/visually-hidden.esm.js +68 -0
  516. package/dist/wizard.cjs.js +677 -0
  517. package/dist/wizard.esm.js +1068 -0
  518. package/package.json +7 -1
  519. package/dist/runtime-41717c1e.js +0 -1
  520. package/dist/sortable-06a3bd6c.js +0 -855
  521. package/dist/sortable-23bf110b.mjs +0 -2254
@@ -0,0 +1,1660 @@
1
+ import { E as A } from "./ElementBase-909688f3.mjs";
2
+ const S = `
3
+ :host {
4
+ display: block;
5
+ --ui-data-table-radius: 16px;
6
+ --ui-data-table-border-color: var(--ui-color-border, rgba(15, 23, 42, 0.14));
7
+ --ui-data-table-border: 1px solid var(--ui-data-table-border-color);
8
+ --ui-data-table-bg: var(--ui-color-surface, rgba(255, 255, 255, 0.96));
9
+ --ui-data-table-shadow: none;
10
+ --ui-data-table-empty-color: var(--ui-color-muted, #64748b);
11
+ --ui-data-table-summary-color: var(--ui-color-muted, #475569);
12
+ --ui-data-table-text: var(--ui-color-text, #0f172a);
13
+ --ui-data-table-header-text: var(--ui-color-text, #1e293b);
14
+ --ui-data-table-header-bg: var(--ui-color-surface-alt, #f8fafc);
15
+ --ui-data-table-footer-text: var(--ui-color-text, #0f172a);
16
+ --ui-data-table-footer-bg: color-mix(in srgb, var(--ui-color-surface-alt, #f8fafc) 88%, var(--ui-color-surface, #ffffff));
17
+ --ui-data-table-cell-border: color-mix(in srgb, var(--ui-data-table-border-color) 58%, transparent);
18
+ --ui-data-table-striped-bg: color-mix(in srgb, var(--ui-color-surface-alt, #f8fafc) 82%, transparent);
19
+ --ui-data-table-hover-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 12%, transparent);
20
+ --ui-data-table-selected-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 20%, transparent);
21
+ --ui-data-table-sort-indicator: color-mix(in srgb, var(--ui-color-muted, #94a3b8) 80%, transparent);
22
+ --ui-data-table-sort-active: var(--ui-color-primary, #2563eb);
23
+ --ui-data-table-resize-handle: color-mix(in srgb, var(--ui-color-muted, #94a3b8) 70%, transparent);
24
+ --ui-data-table-resize-handle-active: var(--ui-color-primary, #2563eb);
25
+ --ui-data-table-duration: 160ms;
26
+ --ui-data-table-ease: cubic-bezier(0.2, 0.9, 0.24, 1);
27
+ --ui-data-table-state-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 10%, transparent);
28
+ --ui-data-table-state-border: color-mix(in srgb, var(--ui-data-table-border-color) 72%, transparent);
29
+ --ui-data-table-state-text: color-mix(in srgb, var(--ui-data-table-text, #0f172a) 72%, transparent);
30
+ --ui-data-table-loading-overlay: color-mix(in srgb, var(--ui-color-surface, #ffffff) 88%, transparent);
31
+ --ui-data-table-focus-ring: var(--ui-color-focus-ring, #2563eb);
32
+ color-scheme: light dark;
33
+ }
34
+
35
+ .frame {
36
+ position: relative;
37
+ overflow: auto;
38
+ border: var(--ui-data-table-border);
39
+ border-radius: var(--ui-data-table-radius);
40
+ background:
41
+ linear-gradient(180deg, color-mix(in srgb, var(--ui-data-table-bg) 96%, #ffffff 4%), var(--ui-data-table-bg)),
42
+ var(--ui-data-table-bg);
43
+ box-shadow: var(--ui-data-table-shadow);
44
+ transition: border-color var(--ui-data-table-duration) var(--ui-data-table-ease), box-shadow var(--ui-data-table-duration) var(--ui-data-table-ease);
45
+ }
46
+
47
+ .frame::before {
48
+ content: '';
49
+ position: absolute;
50
+ left: 1px;
51
+ right: 1px;
52
+ top: 0;
53
+ height: 1px;
54
+ border-radius: inherit;
55
+ pointer-events: none;
56
+ background: color-mix(in srgb, #ffffff 66%, transparent);
57
+ opacity: 0.75;
58
+ z-index: 2;
59
+ }
60
+
61
+ .statebar {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 8px;
65
+ margin-bottom: 10px;
66
+ min-height: 30px;
67
+ border-radius: 10px;
68
+ border: 1px solid var(--ui-data-table-state-border);
69
+ background: var(--ui-data-table-state-bg);
70
+ color: var(--ui-data-table-state-text);
71
+ padding: 0 12px;
72
+ font-size: 12px;
73
+ font-weight: 600;
74
+ letter-spacing: 0.02em;
75
+ line-height: 1.3;
76
+ }
77
+
78
+ .statebar[hidden] {
79
+ display: none;
80
+ }
81
+
82
+ .state-dot {
83
+ width: 8px;
84
+ height: 8px;
85
+ border-radius: 999px;
86
+ background: currentColor;
87
+ opacity: 0.85;
88
+ flex: 0 0 auto;
89
+ }
90
+
91
+ .loading-overlay {
92
+ position: absolute;
93
+ inset: 0;
94
+ background: var(--ui-data-table-loading-overlay);
95
+ backdrop-filter: blur(2px);
96
+ z-index: 8;
97
+ display: none;
98
+ align-items: center;
99
+ justify-content: center;
100
+ pointer-events: none;
101
+ }
102
+
103
+ .loading-indicator {
104
+ display: inline-flex;
105
+ align-items: center;
106
+ gap: 10px;
107
+ min-height: 34px;
108
+ border-radius: 999px;
109
+ border: 1px solid color-mix(in srgb, var(--ui-data-table-border-color) 86%, transparent);
110
+ background: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
111
+ color: var(--ui-data-table-text);
112
+ padding: 0 12px 0 10px;
113
+ font-size: 12px;
114
+ font-weight: 600;
115
+ }
116
+
117
+ .loading-spinner {
118
+ width: 14px;
119
+ height: 14px;
120
+ border-radius: 999px;
121
+ border: 2px solid color-mix(in srgb, var(--ui-color-primary, #2563eb) 22%, transparent);
122
+ border-top-color: var(--ui-color-primary, #2563eb);
123
+ animation: ui-data-table-spin 700ms linear infinite;
124
+ }
125
+
126
+ :host([virtualize]) .frame {
127
+ max-height: var(--ui-data-table-virtual-height, 420px);
128
+ }
129
+
130
+ :host([shape="square"]) {
131
+ --ui-data-table-radius: 6px;
132
+ }
133
+
134
+ :host([shape="soft"]) {
135
+ --ui-data-table-radius: 20px;
136
+ }
137
+
138
+ :host([variant="flat"]) {
139
+ --ui-data-table-shadow: none;
140
+ --ui-data-table-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, transparent);
141
+ }
142
+
143
+ :host([variant="flat"]) .frame::before {
144
+ display: none;
145
+ }
146
+
147
+ :host([variant="contrast"]) {
148
+ --ui-data-table-bg: #0f172a;
149
+ --ui-data-table-text: #e2e8f0;
150
+ --ui-data-table-header-text: #f8fafc;
151
+ --ui-data-table-header-bg: color-mix(in srgb, #1e293b 86%, #0f172a);
152
+ --ui-data-table-border-color: #334155;
153
+ --ui-data-table-cell-border: color-mix(in srgb, #64748b 52%, transparent);
154
+ --ui-data-table-summary-color: #94a3b8;
155
+ --ui-data-table-empty-color: #94a3b8;
156
+ --ui-data-table-sort-indicator: #94a3b8;
157
+ --ui-data-table-sort-active: #93c5fd;
158
+ --ui-data-table-focus-ring: #93c5fd;
159
+ }
160
+
161
+ :host([elevation="none"]) {
162
+ --ui-data-table-shadow: none;
163
+ }
164
+
165
+ :host([elevation="low"]) {
166
+ --ui-data-table-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
167
+ }
168
+
169
+ :host([elevation="high"]) {
170
+ --ui-data-table-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
171
+ }
172
+
173
+ .bulk {
174
+ margin-top: 12px;
175
+ border: var(--ui-data-table-border);
176
+ border-radius: 14px;
177
+ background:
178
+ linear-gradient(180deg, color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, #ffffff 2%), color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent)),
179
+ color-mix(in srgb, var(--ui-color-surface, #ffffff) 95%, transparent);
180
+ box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
181
+ padding: 8px 12px;
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: space-between;
185
+ gap: 8px;
186
+ font-size: 12px;
187
+ color: var(--ui-data-table-summary-color);
188
+ }
189
+
190
+ .bulk[hidden] {
191
+ display: none;
192
+ }
193
+
194
+ .bulk-count {
195
+ font-weight: 600;
196
+ color: var(--ui-data-table-text);
197
+ }
198
+
199
+ .bulk-actions {
200
+ display: inline-flex;
201
+ align-items: center;
202
+ gap: 8px;
203
+ }
204
+
205
+ .bulk-clear {
206
+ border: 1px solid color-mix(in srgb, var(--ui-data-table-border-color) 76%, transparent);
207
+ background: color-mix(in srgb, var(--ui-color-surface, #ffffff) 92%, transparent);
208
+ color: var(--ui-data-table-text);
209
+ border-radius: 999px;
210
+ padding: 4px 10px;
211
+ font-size: 12px;
212
+ line-height: 1.2;
213
+ cursor: pointer;
214
+ transition: border-color 130ms ease, background-color 130ms ease;
215
+ }
216
+
217
+ .bulk-clear:hover {
218
+ border-color: color-mix(in srgb, var(--ui-color-primary, #2563eb) 38%, var(--ui-data-table-border-color));
219
+ background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 11%, transparent);
220
+ }
221
+
222
+ .bulk-clear:focus-visible {
223
+ outline: 2px solid var(--ui-color-focus-ring, #2563eb);
224
+ outline-offset: 1px;
225
+ }
226
+
227
+ .empty {
228
+ padding: 28px 16px;
229
+ text-align: center;
230
+ font-size: 13px;
231
+ color: var(--ui-data-table-empty-color);
232
+ }
233
+
234
+ .empty::before {
235
+ content: 'No records';
236
+ display: block;
237
+ margin-bottom: 6px;
238
+ font-size: 15px;
239
+ font-weight: 650;
240
+ color: color-mix(in srgb, var(--ui-data-table-text, #0f172a) 86%, transparent);
241
+ letter-spacing: 0.01em;
242
+ }
243
+
244
+ .meta {
245
+ display: flex;
246
+ justify-content: space-between;
247
+ align-items: center;
248
+ gap: 10px;
249
+ margin-top: 8px;
250
+ color: var(--ui-data-table-summary-color);
251
+ font-size: 12px;
252
+ line-height: 1.4;
253
+ }
254
+
255
+ :host([state="loading"]) .loading-overlay,
256
+ :host([loading]) .loading-overlay {
257
+ display: flex;
258
+ }
259
+
260
+ :host([state="loading"]) {
261
+ --ui-data-table-state-bg: color-mix(in srgb, #f59e0b 14%, transparent);
262
+ --ui-data-table-state-border: color-mix(in srgb, #f59e0b 42%, var(--ui-data-table-border-color));
263
+ --ui-data-table-state-text: #92400e;
264
+ }
265
+
266
+ :host([state="error"]) {
267
+ --ui-data-table-state-bg: color-mix(in srgb, #ef4444 13%, transparent);
268
+ --ui-data-table-state-border: color-mix(in srgb, #ef4444 42%, var(--ui-data-table-border-color));
269
+ --ui-data-table-state-text: #b91c1c;
270
+ }
271
+
272
+ :host([state="success"]) {
273
+ --ui-data-table-state-bg: color-mix(in srgb, #16a34a 13%, transparent);
274
+ --ui-data-table-state-border: color-mix(in srgb, #16a34a 42%, var(--ui-data-table-border-color));
275
+ --ui-data-table-state-text: #166534;
276
+ }
277
+
278
+ :host([state="error"]) .frame {
279
+ border-color: color-mix(in srgb, #ef4444 34%, var(--ui-data-table-border-color));
280
+ }
281
+
282
+ :host([state="success"]) .frame {
283
+ border-color: color-mix(in srgb, #16a34a 32%, var(--ui-data-table-border-color));
284
+ }
285
+
286
+ .summary {
287
+ min-height: 1.2em;
288
+ }
289
+
290
+ :host([hide-summary]) .meta {
291
+ margin-top: 0;
292
+ }
293
+
294
+ :host([hide-summary]) .summary {
295
+ display: none;
296
+ }
297
+
298
+ :host([headless]) .frame {
299
+ border: none;
300
+ border-radius: 0;
301
+ background: transparent;
302
+ box-shadow: none;
303
+ }
304
+
305
+ :host([headless]) .meta {
306
+ display: none;
307
+ }
308
+
309
+ :host([headless]) .bulk {
310
+ display: none;
311
+ }
312
+
313
+ @media (prefers-reduced-motion: reduce) {
314
+ .frame {
315
+ transition: none !important;
316
+ }
317
+
318
+ .loading-spinner {
319
+ animation: none !important;
320
+ }
321
+
322
+ .bulk-clear {
323
+ transition: none !important;
324
+ }
325
+ }
326
+
327
+ @media (prefers-contrast: more) {
328
+ :host {
329
+ --ui-data-table-border: 2px solid var(--ui-data-table-border-color);
330
+ --ui-data-table-cell-border: var(--ui-data-table-border-color);
331
+ --ui-data-table-hover-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 22%, transparent);
332
+ --ui-data-table-selected-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 28%, transparent);
333
+ --ui-data-table-shadow: none;
334
+ }
335
+ }
336
+
337
+ @media (forced-colors: active) {
338
+ :host {
339
+ --ui-data-table-border: 1px solid CanvasText;
340
+ --ui-data-table-bg: Canvas;
341
+ --ui-data-table-shadow: none;
342
+ --ui-data-table-text: CanvasText;
343
+ --ui-data-table-header-text: CanvasText;
344
+ --ui-data-table-header-bg: Canvas;
345
+ --ui-data-table-footer-text: CanvasText;
346
+ --ui-data-table-footer-bg: Canvas;
347
+ --ui-data-table-cell-border: CanvasText;
348
+ --ui-data-table-hover-bg: Highlight;
349
+ --ui-data-table-selected-bg: Highlight;
350
+ --ui-data-table-sort-indicator: CanvasText;
351
+ --ui-data-table-sort-active: HighlightText;
352
+ --ui-data-table-state-bg: Canvas;
353
+ --ui-data-table-state-border: CanvasText;
354
+ --ui-data-table-state-text: CanvasText;
355
+ --ui-data-table-loading-overlay: Canvas;
356
+ }
357
+
358
+ .loading-indicator {
359
+ forced-color-adjust: none;
360
+ background: Canvas;
361
+ color: CanvasText;
362
+ border-color: CanvasText;
363
+ }
364
+
365
+ .loading-spinner {
366
+ border-color: CanvasText;
367
+ border-top-color: CanvasText;
368
+ }
369
+ }
370
+
371
+ @keyframes ui-data-table-spin {
372
+ to {
373
+ transform: rotate(360deg);
374
+ }
375
+ }
376
+ `, x = `
377
+ ui-data-table:not([headless]) > table {
378
+ width: 100%;
379
+ border-collapse: separate;
380
+ border-spacing: 0;
381
+ font-size: 13px;
382
+ color: var(--ui-data-table-text, #0f172a);
383
+ min-width: 680px;
384
+ table-layout: fixed;
385
+ }
386
+
387
+ ui-data-table:not([headless]) > table caption {
388
+ caption-side: bottom;
389
+ padding: 10px 14px 0;
390
+ text-align: left;
391
+ font-size: 12px;
392
+ line-height: 1.4;
393
+ color: color-mix(in srgb, var(--ui-data-table-text, #0f172a) 62%, transparent);
394
+ }
395
+
396
+ ui-data-table:not([headless]) > table thead th {
397
+ text-align: left;
398
+ padding: 12px 14px;
399
+ color: var(--ui-data-table-header-text, #334155);
400
+ font-weight: 600;
401
+ letter-spacing: 0.01em;
402
+ background: var(--ui-data-table-header-bg, linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94)));
403
+ border-bottom: 1px solid var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.1));
404
+ white-space: nowrap;
405
+ overflow: hidden;
406
+ text-overflow: ellipsis;
407
+ vertical-align: middle;
408
+ transition: background-color 130ms ease, color 130ms ease;
409
+ }
410
+
411
+ ui-data-table:not([headless]) > table tbody td {
412
+ padding: 11px 14px;
413
+ border-bottom: 1px solid var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.08));
414
+ vertical-align: middle;
415
+ color: var(--ui-data-table-text, #0f172a);
416
+ white-space: nowrap;
417
+ overflow: hidden;
418
+ text-overflow: ellipsis;
419
+ transition: background-color 130ms ease, color 130ms ease;
420
+ }
421
+
422
+ ui-data-table:not([headless]) > table tfoot td,
423
+ ui-data-table:not([headless]) > table tfoot th {
424
+ padding: 11px 14px;
425
+ border-top: 1px solid var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.1));
426
+ color: var(--ui-data-table-footer-text, var(--ui-data-table-text, #0f172a));
427
+ background: var(--ui-data-table-footer-bg, color-mix(in srgb, var(--ui-color-surface-alt, #f8fafc) 88%, #ffffff));
428
+ font-weight: 600;
429
+ white-space: nowrap;
430
+ overflow: hidden;
431
+ text-overflow: ellipsis;
432
+ vertical-align: middle;
433
+ }
434
+
435
+ ui-data-table:not([headless]) > table tbody td > * {
436
+ max-width: 100%;
437
+ min-width: 0;
438
+ }
439
+
440
+ ui-data-table:not([headless]) > table tbody tr {
441
+ transition: transform 130ms ease;
442
+ }
443
+
444
+ ui-data-table[hover]:not([headless]) > table tbody tr:hover {
445
+ transform: translateY(-0.5px);
446
+ }
447
+
448
+ ui-data-table:not([headless]) > table tbody tr:last-child td {
449
+ border-bottom: none;
450
+ }
451
+
452
+ ui-data-table[compact]:not([headless]) > table thead th,
453
+ ui-data-table[compact]:not([headless]) > table tbody td {
454
+ padding-top: 8px;
455
+ padding-bottom: 8px;
456
+ }
457
+
458
+ ui-data-table[striped]:not([headless]) > table tbody tr:nth-child(even) td {
459
+ background: var(--ui-data-table-striped-bg, rgba(148, 163, 184, 0.08));
460
+ }
461
+
462
+ ui-data-table[hover]:not([headless]) > table tbody tr:hover td {
463
+ background: var(--ui-data-table-hover-bg, rgba(37, 99, 235, 0.08));
464
+ }
465
+
466
+ ui-data-table[bordered]:not([headless]) > table thead th,
467
+ ui-data-table[bordered]:not([headless]) > table tbody td {
468
+ border-right: 1px solid var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.08));
469
+ }
470
+
471
+ ui-data-table[bordered]:not([headless]) > table thead th:last-child,
472
+ ui-data-table[bordered]:not([headless]) > table tbody td:last-child {
473
+ border-right: none;
474
+ }
475
+
476
+ ui-data-table[sticky-header]:not([headless]) > table thead th {
477
+ position: sticky;
478
+ top: 0;
479
+ z-index: 2;
480
+ backdrop-filter: blur(4px);
481
+ }
482
+
483
+ ui-data-table[sticky-footer]:not([headless]) > table tfoot td,
484
+ ui-data-table[sticky-footer]:not([headless]) > table tfoot th {
485
+ position: sticky;
486
+ bottom: 0;
487
+ z-index: 2;
488
+ backdrop-filter: blur(4px);
489
+ box-shadow: inset 0 1px 0 var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.1));
490
+ }
491
+
492
+ ui-data-table[sortable]:not([headless]) > table thead th[data-sortable="true"] {
493
+ cursor: pointer;
494
+ user-select: none;
495
+ position: relative;
496
+ padding-right: 24px;
497
+ }
498
+
499
+ ui-data-table[sortable]:not([headless]) > table thead th[data-sortable="true"]:hover {
500
+ background: color-mix(in srgb, var(--ui-data-table-header-bg, #f8fafc) 84%, var(--ui-color-primary, #2563eb) 16%);
501
+ }
502
+
503
+ ui-data-table[draggable-columns]:not([headless]) > table thead th[data-draggable="true"] {
504
+ cursor: grab;
505
+ }
506
+
507
+ ui-data-table[draggable-columns]:not([headless]) > table thead th[data-dragging="true"] {
508
+ opacity: 0.62;
509
+ }
510
+
511
+ ui-data-table[draggable-columns]:not([headless]) > table thead th[data-drag-over="true"] {
512
+ box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.82);
513
+ }
514
+
515
+ ui-data-table[sortable]:not([headless]) > table thead th[data-sortable="true"]::after {
516
+ content: "⇅";
517
+ position: absolute;
518
+ right: 8px;
519
+ top: 50%;
520
+ margin-top: -7px;
521
+ font-size: 12px;
522
+ line-height: 1;
523
+ font-weight: 700;
524
+ color: var(--ui-data-table-sort-indicator, #94a3b8);
525
+ letter-spacing: 0;
526
+ }
527
+
528
+ ui-data-table[sortable]:not([headless]) > table thead th[aria-sort="ascending"]::after {
529
+ content: "↑";
530
+ letter-spacing: 0;
531
+ color: var(--ui-data-table-sort-active, #2563eb);
532
+ }
533
+
534
+ ui-data-table[sortable]:not([headless]) > table thead th[aria-sort="descending"]::after {
535
+ content: "↓";
536
+ letter-spacing: 0;
537
+ color: var(--ui-data-table-sort-active, #2563eb);
538
+ }
539
+
540
+ ui-data-table[selectable]:not([headless]) > table tbody tr {
541
+ cursor: pointer;
542
+ }
543
+
544
+ ui-data-table[selectable]:not([headless]) > table tbody tr[data-selected="true"] td {
545
+ background: var(--ui-data-table-selected-bg, rgba(37, 99, 235, 0.14));
546
+ }
547
+
548
+ ui-data-table[loading]:not([headless]) > table tbody {
549
+ opacity: 0.55;
550
+ pointer-events: none;
551
+ }
552
+
553
+ ui-data-table[state="loading"]:not([headless]) > table tbody {
554
+ opacity: 0.55;
555
+ pointer-events: none;
556
+ }
557
+
558
+ ui-data-table[resizable-columns]:not([headless]) > table thead th[data-resizable="true"] {
559
+ position: relative;
560
+ }
561
+
562
+ ui-data-table[resizable-columns]:not([headless]) > table thead th .resize-handle {
563
+ position: absolute;
564
+ inset-inline-end: -4px;
565
+ top: 0;
566
+ width: 8px;
567
+ height: 100%;
568
+ cursor: col-resize;
569
+ background: transparent;
570
+ border: none;
571
+ padding: 0;
572
+ z-index: 3;
573
+ }
574
+
575
+ ui-data-table[resizable-columns]:not([headless]) > table thead th .resize-handle::before {
576
+ content: "";
577
+ position: absolute;
578
+ inset-inline-start: 3px;
579
+ top: 18%;
580
+ width: 1px;
581
+ height: 64%;
582
+ background: var(--ui-data-table-resize-handle, rgba(148, 163, 184, 0.5));
583
+ transition: background 120ms ease;
584
+ }
585
+
586
+ ui-data-table[resizable-columns]:not([headless]) > table thead th .resize-handle:hover::before {
587
+ background: var(--ui-data-table-resize-handle-active, rgba(37, 99, 235, 0.72));
588
+ }
589
+
590
+ ui-data-table:not([headless]) > table [data-pinned="left"],
591
+ ui-data-table:not([headless]) > table [data-pinned="right"] {
592
+ position: sticky;
593
+ z-index: 3;
594
+ background: var(--ui-data-table-bg, #fff);
595
+ }
596
+
597
+ ui-data-table:not([headless]) > table thead [data-pinned="left"],
598
+ ui-data-table:not([headless]) > table thead [data-pinned="right"] {
599
+ z-index: 4;
600
+ background: var(--ui-data-table-header-bg, #f8fafc);
601
+ }
602
+
603
+ ui-data-table:not([headless]) > table tfoot [data-pinned="left"],
604
+ ui-data-table:not([headless]) > table tfoot [data-pinned="right"] {
605
+ z-index: 4;
606
+ background: var(--ui-data-table-footer-bg, color-mix(in srgb, var(--ui-color-surface-alt, #f8fafc) 88%, #ffffff));
607
+ }
608
+
609
+ ui-data-table:not([headless]) > table [data-pinned="left"][data-pin-edge="true"] {
610
+ box-shadow: 1px 0 0 var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.08)), 8px 0 14px rgba(15, 23, 42, 0.08);
611
+ }
612
+
613
+ ui-data-table:not([headless]) > table [data-pinned="right"][data-pin-edge="true"] {
614
+ box-shadow: -1px 0 0 var(--ui-data-table-cell-border, rgba(15, 23, 42, 0.08)), -8px 0 14px rgba(15, 23, 42, 0.08);
615
+ }
616
+
617
+ ui-data-table:not([headless]) > table thead th:focus-visible,
618
+ ui-data-table:not([headless]) > table tbody tr[tabindex="0"]:focus-visible {
619
+ outline: 2px solid var(--ui-data-table-focus-ring, var(--ui-color-focus-ring, #2563eb));
620
+ outline-offset: -2px;
621
+ }
622
+
623
+ @media (max-width: 800px) {
624
+ ui-data-table:not([headless]) > table {
625
+ min-width: 620px;
626
+ font-size: 12px;
627
+ }
628
+
629
+ ui-data-table:not([headless]) > table thead th,
630
+ ui-data-table:not([headless]) > table tbody td {
631
+ padding-inline: 10px;
632
+ }
633
+ }
634
+
635
+ @media (prefers-contrast: more) {
636
+ ui-data-table:not([headless]) > table thead th,
637
+ ui-data-table:not([headless]) > table tbody td {
638
+ border-color: var(--ui-data-table-cell-border, currentColor);
639
+ }
640
+ }
641
+
642
+ @media (forced-colors: active) {
643
+ ui-data-table:not([headless]) > table thead th,
644
+ ui-data-table:not([headless]) > table tbody td {
645
+ forced-color-adjust: none;
646
+ background: Canvas;
647
+ color: CanvasText;
648
+ border-color: CanvasText;
649
+ }
650
+ ui-data-table[hover]:not([headless]) > table tbody tr:hover td,
651
+ ui-data-table[selectable]:not([headless]) > table tbody tr[data-selected="true"] td {
652
+ background: Highlight;
653
+ color: HighlightText;
654
+ }
655
+ }
656
+ `;
657
+ function C() {
658
+ if (typeof document > "u")
659
+ return;
660
+ const _ = "ui-data-table-light-dom-style", t = document.getElementById(_);
661
+ if (t) {
662
+ t.textContent !== x && (t.textContent = x);
663
+ return;
664
+ }
665
+ const a = document.createElement("style");
666
+ a.id = _, a.textContent = x, document.head.appendChild(a);
667
+ }
668
+ typeof document < "u" && C();
669
+ function m(_) {
670
+ return _ ? (_.textContent || "").replace(/\s+/g, " ").trim() : "";
671
+ }
672
+ function k(_) {
673
+ const t = _.replace(/,/g, "");
674
+ if (/^-?\d+(\.\d+)?$/.test(t))
675
+ return Number(t);
676
+ const a = Date.parse(_);
677
+ return !Number.isNaN(a) && /[-/]/.test(_) ? a : _.toLowerCase();
678
+ }
679
+ const E = /* @__PURE__ */ new Set([
680
+ "sticky-header",
681
+ "sticky-footer",
682
+ "striped",
683
+ "hover",
684
+ "compact",
685
+ "bordered",
686
+ "loading",
687
+ "hide-summary",
688
+ "state",
689
+ "shape",
690
+ "variant",
691
+ "elevation"
692
+ ]), R = /* @__PURE__ */ new Set([
693
+ "pagination-id",
694
+ "bulk-actions-label",
695
+ "bulk-clear-label",
696
+ "state-text"
697
+ ]);
698
+ class z extends A {
699
+ constructor() {
700
+ super(), this._table = null, this._observer = null, this._sortColumnIndex = -1, this._sortDirection = "asc", this._selectedRows = /* @__PURE__ */ new Set(), this._isSyncing = !1, this._isSettingPage = !1, this._isSettingColumnOrder = !1, this._page = 1, this._pageCount = 1, this._pageSize = 10, this._totalRows = 0, this._filteredRows = 0, this._paginationEl = null, this._resizeState = null, this._columnWidths = /* @__PURE__ */ new Map(), this._frameEl = null, this._virtualRaf = 0, this._virtualTopSpacer = null, this._virtualBottomSpacer = null, this._dragColumnIndex = -1, this._dragOverColumnIndex = -1, this._ignoreHeaderClickUntil = 0, this._syncRaf = 0, this._virtualStart = -1, this._virtualEnd = -1, this._virtualVisibleTotal = -1, this._resizeRaf = 0, this._pendingResizeColumn = -1, this._pendingResizeWidth = null, this._onClick = this._onClick.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onPaginationChange = this._onPaginationChange.bind(this), this._onPointerDown = this._onPointerDown.bind(this), this._onPointerMove = this._onPointerMove.bind(this), this._onPointerUp = this._onPointerUp.bind(this), this._onFrameScroll = this._onFrameScroll.bind(this), this._onDragStart = this._onDragStart.bind(this), this._onDragOver = this._onDragOver.bind(this), this._onDrop = this._onDrop.bind(this), this._onDragEnd = this._onDragEnd.bind(this);
701
+ }
702
+ static get observedAttributes() {
703
+ return [
704
+ "headless",
705
+ "empty-text",
706
+ "sortable",
707
+ "selectable",
708
+ "multi-select",
709
+ "sticky-header",
710
+ "sticky-footer",
711
+ "striped",
712
+ "hover",
713
+ "compact",
714
+ "bordered",
715
+ "shape",
716
+ "variant",
717
+ "elevation",
718
+ "loading",
719
+ "state",
720
+ "state-text",
721
+ "filter-query",
722
+ "filter-column",
723
+ "filters",
724
+ "pin-columns",
725
+ "column-order",
726
+ "draggable-columns",
727
+ "resizable-columns",
728
+ "bulk-actions-label",
729
+ "bulk-clear-label",
730
+ "virtualize",
731
+ "row-height",
732
+ "overscan",
733
+ "page",
734
+ "page-size",
735
+ "pagination-id",
736
+ "hide-summary"
737
+ ];
738
+ }
739
+ connectedCallback() {
740
+ super.connectedCallback(), C(), this.addEventListener("click", this._onClick), this.addEventListener("keydown", this._onKeyDown), this.addEventListener("pointerdown", this._onPointerDown), this.addEventListener("dragstart", this._onDragStart), this.addEventListener("dragover", this._onDragOver), this.addEventListener("drop", this._onDrop), this.addEventListener("dragend", this._onDragEnd), this._observer = new MutationObserver(() => {
741
+ this._isSyncing || this._queueSyncStructure();
742
+ }), this._observer.observe(this, {
743
+ childList: !0,
744
+ subtree: !0,
745
+ characterData: !0
746
+ }), this._syncPaginationBinding();
747
+ }
748
+ disconnectedCallback() {
749
+ this.removeEventListener("click", this._onClick), this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("pointerdown", this._onPointerDown), this.removeEventListener("dragstart", this._onDragStart), this.removeEventListener("dragover", this._onDragOver), this.removeEventListener("drop", this._onDrop), this.removeEventListener("dragend", this._onDragEnd), window.removeEventListener("pointermove", this._onPointerMove), window.removeEventListener("pointerup", this._onPointerUp), this._resizeState = null, this._frameEl && (this._frameEl.removeEventListener("scroll", this._onFrameScroll), this._frameEl = null), this._virtualRaf && (cancelAnimationFrame(this._virtualRaf), this._virtualRaf = 0), this._resizeRaf && (cancelAnimationFrame(this._resizeRaf), this._resizeRaf = 0), this._pendingResizeColumn = -1, this._pendingResizeWidth = null, this._syncRaf && (cancelAnimationFrame(this._syncRaf), this._syncRaf = 0), this._clearVirtualSpacers(), this._observer && (this._observer.disconnect(), this._observer = null), this._detachPaginationListener(), super.disconnectedCallback();
750
+ }
751
+ attributeChangedCallback(t, a, e) {
752
+ if (a !== e && !(t === "column-order" && this._isSettingColumnOrder) && !(t === "page" && this._isSettingPage)) {
753
+ if (t === "headless") {
754
+ this.requestRender();
755
+ return;
756
+ }
757
+ if (t === "empty-text") {
758
+ this._syncEmptyText();
759
+ return;
760
+ }
761
+ if (this.isConnected) {
762
+ if (R.has(t)) {
763
+ t === "pagination-id" ? this._syncPaginationBinding() : t === "bulk-actions-label" || t === "bulk-clear-label" ? this._updateBulkActions() : t === "state-text" && this._syncStateBar();
764
+ return;
765
+ }
766
+ if (E.has(t)) {
767
+ t === "hide-summary" ? this._updateSummary() : (t === "state" || t === "loading") && this._syncStateBar();
768
+ return;
769
+ }
770
+ if (t === "filter-query" || t === "filter-column" || t === "filters") {
771
+ this._syncStructure(), this._dispatchFilterChange();
772
+ return;
773
+ }
774
+ this._queueSyncStructure();
775
+ }
776
+ }
777
+ }
778
+ render() {
779
+ if (this.hasAttribute("headless")) {
780
+ this.setContent("<slot></slot>"), this._syncStructure();
781
+ return;
782
+ }
783
+ const t = this.getAttribute("empty-text") || "No data available.";
784
+ this.setContent(`
785
+ <style>${S}</style>
786
+ <div class="statebar" part="state" hidden role="status" aria-live="polite">
787
+ <span class="state-dot" aria-hidden="true"></span>
788
+ <span class="state-text"></span>
789
+ </div>
790
+ <div class="frame" part="frame">
791
+ <slot></slot>
792
+ <div class="empty" part="empty" role="status" aria-live="polite" hidden>${t}</div>
793
+ <div class="loading-overlay" part="loading-overlay" aria-hidden="true">
794
+ <div class="loading-indicator" part="loading-indicator">
795
+ <span class="loading-spinner" aria-hidden="true"></span>
796
+ <span class="loading-text">Updating data</span>
797
+ </div>
798
+ </div>
799
+ </div>
800
+ <div class="meta" part="meta">
801
+ <span class="summary" part="summary" aria-live="polite"></span>
802
+ <slot name="meta"></slot>
803
+ </div>
804
+ <div class="bulk" part="bulk" hidden>
805
+ <span class="bulk-count" part="bulk-count" aria-live="polite"></span>
806
+ <div class="bulk-actions" part="bulk-actions">
807
+ <slot name="bulk-actions"></slot>
808
+ <button type="button" class="bulk-clear" part="bulk-clear"></button>
809
+ </div>
810
+ </div>
811
+ `), this._syncStructure(), this._syncStateBar();
812
+ }
813
+ _findTable() {
814
+ return this.querySelector("table");
815
+ }
816
+ _queueSyncStructure() {
817
+ this.isConnected && (this._syncRaf || (this._syncRaf = requestAnimationFrame(() => {
818
+ this._syncRaf = 0, this._syncStructure();
819
+ })));
820
+ }
821
+ _isVirtualSpacerRow(t) {
822
+ return t.hasAttribute("data-virtual-spacer");
823
+ }
824
+ _clearVirtualSpacers() {
825
+ var t, a;
826
+ (t = this._virtualTopSpacer) != null && t.isConnected && this._virtualTopSpacer.remove(), (a = this._virtualBottomSpacer) != null && a.isConnected && this._virtualBottomSpacer.remove(), this._virtualTopSpacer = null, this._virtualBottomSpacer = null, this._virtualStart = -1, this._virtualEnd = -1, this._virtualVisibleTotal = -1;
827
+ }
828
+ _parseRowHeight() {
829
+ const t = Number(this.getAttribute("row-height") || 44);
830
+ return !Number.isFinite(t) || t < 20 ? 44 : Math.round(t);
831
+ }
832
+ _parseOverscan() {
833
+ const t = Number(this.getAttribute("overscan") || 6);
834
+ return !Number.isFinite(t) || t < 0 ? 6 : Math.max(0, Math.floor(t));
835
+ }
836
+ _state() {
837
+ const t = (this.getAttribute("state") || "idle").trim().toLowerCase();
838
+ return t === "loading" || t === "error" || t === "success" ? t : this.hasAttribute("loading") ? "loading" : "idle";
839
+ }
840
+ _stateText(t) {
841
+ const a = (this.getAttribute("state-text") || "").trim();
842
+ return a || (t === "loading" ? "Refreshing table data" : t === "error" ? "Table data could not be loaded" : t === "success" ? "Table data is up to date" : "");
843
+ }
844
+ _syncStateBar() {
845
+ const t = this.root.querySelector(".statebar"), a = this.root.querySelector(".state-text"), e = this.root.querySelector(".loading-text"), i = this.root.querySelector(".frame"), r = this._table;
846
+ if (!t)
847
+ return;
848
+ const s = this._state();
849
+ s !== "idle" ? t.removeAttribute("hidden") : t.setAttribute("hidden", ""), t.setAttribute("data-state", s), t.setAttribute("aria-live", s === "error" ? "assertive" : "polite");
850
+ const n = this._stateText(s);
851
+ a && (a.textContent = n), e && (e.textContent = this._stateText("loading"));
852
+ const d = s === "loading" ? "true" : "false";
853
+ i && i.setAttribute("aria-busy", d), r && r.setAttribute("aria-busy", d);
854
+ }
855
+ _isInteractionBlocked() {
856
+ return this._state() === "loading";
857
+ }
858
+ _isInteractiveTarget(t) {
859
+ if (!t)
860
+ return !1;
861
+ const a = t.closest(
862
+ 'button, a[href], input, select, textarea, label, summary, details, [contenteditable=""], [contenteditable="true"], [role="button"], [role="link"], [role="checkbox"], [role="switch"], [role="menuitem"]'
863
+ );
864
+ return !(!a || a.classList.contains("resize-handle"));
865
+ }
866
+ _headerKey(t, a) {
867
+ if (!t)
868
+ return `column-${a + 1}`;
869
+ const e = (t.getAttribute("data-key") || "").trim();
870
+ if (e)
871
+ return e;
872
+ const i = m(t);
873
+ return i ? i.toLowerCase().replace(/\s+/g, "_") : `column-${a + 1}`;
874
+ }
875
+ _currentColumnOrderString() {
876
+ return this._headerCells().map((a, e) => this._headerKey(a, e)).join(",");
877
+ }
878
+ _setColumnOrderAttribute(t) {
879
+ (this.getAttribute("column-order") || "") !== t && (this._isSettingColumnOrder = !0, this.setAttribute("column-order", t), this._isSettingColumnOrder = !1);
880
+ }
881
+ _isRtl() {
882
+ return typeof window > "u" ? !1 : getComputedStyle(this).direction === "rtl";
883
+ }
884
+ _parsePageSize() {
885
+ const t = Number(this.getAttribute("page-size") || 10);
886
+ return !Number.isFinite(t) || t < 1 ? 10 : Math.floor(t);
887
+ }
888
+ _parsePage() {
889
+ const t = Number(this.getAttribute("page") || 1);
890
+ return !Number.isFinite(t) || t < 1 ? 1 : Math.floor(t);
891
+ }
892
+ _parseFilterQuery() {
893
+ return (this.getAttribute("filter-query") || "").trim().toLowerCase();
894
+ }
895
+ _resolveFilterColumnIndex(t) {
896
+ const a = (this.getAttribute("filter-column") || "").trim();
897
+ if (!a)
898
+ return -1;
899
+ const e = Number(a);
900
+ if (Number.isInteger(e) && e >= 0 && e < t.length)
901
+ return e;
902
+ const i = a.toLowerCase();
903
+ for (let r = 0; r < t.length; r += 1) {
904
+ const s = t[r], o = (s.getAttribute("data-key") || "").toLowerCase(), n = m(s).toLowerCase();
905
+ if (o === i || n === i)
906
+ return r;
907
+ }
908
+ return -1;
909
+ }
910
+ _resolveColumnIndex(t, a) {
911
+ if (typeof a == "number" && Number.isInteger(a) && a >= 0 && a < t.length)
912
+ return a;
913
+ const e = String(a || "").trim();
914
+ if (!e)
915
+ return -1;
916
+ const i = Number(e);
917
+ if (Number.isInteger(i) && i >= 0 && i < t.length)
918
+ return i;
919
+ const r = e.toLowerCase();
920
+ for (let s = 0; s < t.length; s += 1) {
921
+ const o = t[s], n = (o.getAttribute("data-key") || "").toLowerCase(), d = m(o).toLowerCase();
922
+ if (n === r || d === r || this._headerKey(o, s) === r)
923
+ return s;
924
+ }
925
+ return -1;
926
+ }
927
+ _parseFilters(t) {
928
+ const a = this.getAttribute("filters");
929
+ if (!a)
930
+ return [];
931
+ try {
932
+ const e = JSON.parse(a);
933
+ if (!Array.isArray(e))
934
+ return [];
935
+ const i = [];
936
+ return e.forEach((r) => {
937
+ if (!r || typeof r != "object")
938
+ return;
939
+ const s = r.column ?? r.field ?? r.key, o = this._resolveColumnIndex(t, s);
940
+ if (o < 0)
941
+ return;
942
+ const n = String(r.op || r.operator || "contains").trim().toLowerCase();
943
+ i.push({ columnIndex: o, op: n, value: r.value });
944
+ }), i;
945
+ } catch {
946
+ return [];
947
+ }
948
+ }
949
+ _normalizePinTokens(t) {
950
+ return Array.isArray(t) ? t.map((a) => String(a).trim()).filter(Boolean) : t == null ? [] : String(t).split(",").map((a) => a.trim()).filter(Boolean);
951
+ }
952
+ _parsePinColumns(t) {
953
+ const a = this.getAttribute("pin-columns");
954
+ if (!a)
955
+ return { left: [], right: [] };
956
+ const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), r = (d, c) => {
957
+ c.forEach((h) => {
958
+ const l = this._resolveColumnIndex(t, h);
959
+ l >= 0 && d.add(l);
960
+ });
961
+ };
962
+ try {
963
+ const d = JSON.parse(a);
964
+ if (d && typeof d == "object") {
965
+ r(e, this._normalizePinTokens(d.left)), r(i, this._normalizePinTokens(d.right));
966
+ const c = Array.from(e).sort((l, u) => l - u), h = Array.from(i).filter((l) => !e.has(l)).sort((l, u) => u - l);
967
+ return { left: c, right: h };
968
+ }
969
+ } catch {
970
+ }
971
+ a.split(";").map((d) => d.trim()).filter(Boolean).forEach((d) => {
972
+ const [c, h] = d.split(":"), l = (c || "").trim().toLowerCase(), u = this._normalizePinTokens(h || "");
973
+ l === "left" && r(e, u), l === "right" && r(i, u);
974
+ });
975
+ const o = Array.from(e).sort((d, c) => d - c), n = Array.from(i).filter((d) => !e.has(d)).sort((d, c) => c - d);
976
+ return { left: o, right: n };
977
+ }
978
+ _setPageAttribute(t) {
979
+ const a = Math.max(1, t);
980
+ this.getAttribute("page") !== String(a) && (this._isSettingPage = !0, this.setAttribute("page", String(a)), this._isSettingPage = !1);
981
+ }
982
+ _bodyRows() {
983
+ if (!this._table)
984
+ return [];
985
+ const t = this._table.tBodies[0];
986
+ return t ? Array.from(t.rows).filter((a) => !this._isVirtualSpacerRow(a)) : [];
987
+ }
988
+ _headerCells() {
989
+ var a;
990
+ if (!this._table)
991
+ return [];
992
+ const t = (a = this._table.tHead) == null ? void 0 : a.rows[0];
993
+ return t ? Array.from(t.cells).filter((e) => e.tagName.toLowerCase() === "th") : Array.from(this._table.querySelectorAll("th"));
994
+ }
995
+ _clearPinnedColumns() {
996
+ this._table && this._table.querySelectorAll("[data-pinned]").forEach((t) => {
997
+ const a = t;
998
+ a.removeAttribute("data-pinned"), a.removeAttribute("data-pin-edge"), a.style.left = "", a.style.right = "", a.style.zIndex = "";
999
+ });
1000
+ }
1001
+ _resolveColumnWidth(t, a) {
1002
+ const e = this._columnWidths.get(t);
1003
+ if (typeof e == "number" && Number.isFinite(e))
1004
+ return Math.max(1, e);
1005
+ const i = (a == null ? void 0 : a.getBoundingClientRect().width) || (a == null ? void 0 : a.offsetWidth) || 0;
1006
+ return Number.isFinite(i) && i > 0 ? i : 120;
1007
+ }
1008
+ _pinCell(t, a, e, i, r) {
1009
+ t && (t.setAttribute("data-pinned", a), i ? t.setAttribute("data-pin-edge", "true") : t.removeAttribute("data-pin-edge"), a === "left" ? (t.style.left = `${Math.max(0, Math.round(e))}px`, t.style.right = "") : (t.style.right = `${Math.max(0, Math.round(e))}px`, t.style.left = ""), t.style.zIndex = r ? "4" : "3");
1010
+ }
1011
+ _applyPinnedColumns() {
1012
+ if (!this._table)
1013
+ return;
1014
+ this._clearPinnedColumns();
1015
+ const t = this._headerCells();
1016
+ if (!t.length)
1017
+ return;
1018
+ const { left: a, right: e } = this._parsePinColumns(t);
1019
+ if (!a.length && !e.length)
1020
+ return;
1021
+ const i = Array.from(this._table.rows).filter((o) => !this._isVirtualSpacerRow(o));
1022
+ let r = 0;
1023
+ a.forEach((o, n) => {
1024
+ const d = this._resolveColumnWidth(o, t[o]), c = n === a.length - 1;
1025
+ i.forEach((h, l) => {
1026
+ const u = h.cells[o];
1027
+ this._pinCell(u, "left", r, c, l === 0);
1028
+ }), r += d;
1029
+ });
1030
+ let s = 0;
1031
+ e.forEach((o, n) => {
1032
+ const d = this._resolveColumnWidth(o, t[o]), c = n === e.length - 1;
1033
+ i.forEach((h, l) => {
1034
+ const u = h.cells[o];
1035
+ this._pinCell(u, "right", s, c, l === 0);
1036
+ }), s += d;
1037
+ });
1038
+ }
1039
+ _applyColumnOrder() {
1040
+ var h;
1041
+ if (!this._table)
1042
+ return;
1043
+ const t = (this.getAttribute("column-order") || "").trim();
1044
+ if (!t)
1045
+ return;
1046
+ const a = (h = this._table.tHead) == null ? void 0 : h.rows[0], e = this._table.tBodies[0];
1047
+ if (!a || !e)
1048
+ return;
1049
+ const i = Array.from(a.cells);
1050
+ if (!i.length)
1051
+ return;
1052
+ const r = t.split(",").map((l) => l.trim()).filter(Boolean);
1053
+ if (!r.length)
1054
+ return;
1055
+ const s = [], o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
1056
+ i.forEach((l, u) => {
1057
+ const b = (l.getAttribute("data-key") || m(l)).toLowerCase().trim();
1058
+ b && n.set(b, u);
1059
+ });
1060
+ for (const l of r) {
1061
+ const u = Number(l);
1062
+ if (Number.isInteger(u) && u >= 0 && u < i.length) {
1063
+ o.has(u) || (o.add(u), s.push(u));
1064
+ continue;
1065
+ }
1066
+ const b = n.get(l.toLowerCase());
1067
+ typeof b == "number" && !o.has(b) && (o.add(b), s.push(b));
1068
+ }
1069
+ for (let l = 0; l < i.length; l += 1)
1070
+ o.has(l) || s.push(l);
1071
+ if (s.every((l, u) => l === u))
1072
+ return;
1073
+ s.map((l) => i[l]).forEach((l) => a.appendChild(l)), Array.from(e.rows).filter((l) => !this._isVirtualSpacerRow(l)).forEach((l) => {
1074
+ const u = Array.from(l.cells);
1075
+ s.map((f) => u[f]).filter(Boolean).forEach((f) => l.appendChild(f));
1076
+ }), this._columnWidths.clear();
1077
+ }
1078
+ _moveColumn(t, a) {
1079
+ var h;
1080
+ if (!this._table)
1081
+ return !1;
1082
+ const e = (h = this._table.tHead) == null ? void 0 : h.rows[0], i = this._table.tBodies[0];
1083
+ if (!e || !i)
1084
+ return !1;
1085
+ const r = Array.from(e.cells), s = r.length;
1086
+ if (!s || t < 0 || t >= s || a < 0 || a >= s || t === a)
1087
+ return !1;
1088
+ const o = Array.from({ length: s }, (l, u) => u), [n] = o.splice(t, 1);
1089
+ o.splice(a, 0, n), o.map((l) => r[l]).forEach((l) => e.appendChild(l)), Array.from(i.rows).filter((l) => !this._isVirtualSpacerRow(l)).forEach((l) => {
1090
+ const u = Array.from(l.cells);
1091
+ o.map((f) => u[f]).filter(Boolean).forEach((f) => l.appendChild(f));
1092
+ });
1093
+ const c = /* @__PURE__ */ new Map();
1094
+ return o.forEach((l, u) => {
1095
+ const b = this._columnWidths.get(l);
1096
+ typeof b == "number" && c.set(u, b);
1097
+ }), this._columnWidths = c, this._sortColumnIndex >= 0 && (this._sortColumnIndex = o.indexOf(this._sortColumnIndex)), this._syncHeaderState(), this._applyPinnedColumns(), this._syncRowSelectionState(), !0;
1098
+ }
1099
+ _clearDragMarkers() {
1100
+ this._headerCells().forEach((a) => {
1101
+ a.removeAttribute("data-dragging"), a.removeAttribute("data-drag-over");
1102
+ }), this._dragOverColumnIndex = -1;
1103
+ }
1104
+ _emitColumnOrderChange(t, a) {
1105
+ const e = this._currentColumnOrderString();
1106
+ this._setColumnOrderAttribute(e), this.dispatchEvent(
1107
+ new CustomEvent("column-order-change", {
1108
+ detail: {
1109
+ sourceIndex: t,
1110
+ targetIndex: a,
1111
+ order: e,
1112
+ keys: this._headerCells().map((i, r) => this._headerKey(i, r))
1113
+ },
1114
+ bubbles: !0
1115
+ })
1116
+ );
1117
+ }
1118
+ _focusHeaderAt(t) {
1119
+ const e = this._headerCells()[t];
1120
+ e && e.focus();
1121
+ }
1122
+ _focusSelectableRow(t, a) {
1123
+ const e = this._bodyRows().filter((o) => !o.hidden), i = e.indexOf(t);
1124
+ if (i < 0)
1125
+ return;
1126
+ const r = Math.min(e.length - 1, Math.max(0, i + a)), s = e[r];
1127
+ s && s.focus();
1128
+ }
1129
+ _headerKeyboardShortcuts(t, a) {
1130
+ const e = this._isRtl(), i = e ? "ArrowRight" : "ArrowLeft", r = e ? "ArrowLeft" : "ArrowRight", s = [i, r, "Home", "End"];
1131
+ return t && s.push("Enter", "Space"), a && s.push(`Alt+${i}`, `Alt+${r}`), s.join(" ");
1132
+ }
1133
+ _syncStructure() {
1134
+ if (!this._isSyncing) {
1135
+ this._isSyncing = !0;
1136
+ try {
1137
+ this._table = this._findTable();
1138
+ const t = this.root.querySelector(".frame");
1139
+ this._frameEl !== t && (this._frameEl && this._frameEl.removeEventListener("scroll", this._onFrameScroll), this._frameEl = t, this._frameEl && this._frameEl.addEventListener("scroll", this._onFrameScroll, { passive: !0 }));
1140
+ const a = this.root.querySelector(".empty"), e = this.root.querySelector(".summary");
1141
+ if (this._syncEmptyText(), !this._table) {
1142
+ a && a.removeAttribute("hidden"), e && (e.textContent = ""), this._selectedRows.clear(), this._page = 1, this._pageCount = 1, this._totalRows = 0, this._filteredRows = 0, this._clearVirtualization(!1), this._syncPaginationElement(), this._syncStateBar();
1143
+ return;
1144
+ }
1145
+ a && a.setAttribute("hidden", ""), this._table.hasAttribute("data-ui-data-table") || this._table.setAttribute("data-ui-data-table", "true"), this._table.hasAttribute("role") || this._table.setAttribute("role", "table"), this._applyColumnOrder(), this._syncHeaderState(), this._applyPinnedColumns(), this._table.setAttribute("aria-colcount", String(this._headerCells().length || 0)), this._applyPagination(!1), a && (this._filteredRows > 0 ? a.setAttribute("hidden", "") : (this._syncEmptyText(), a.removeAttribute("hidden"))), this._applyVirtualization(!1), this._syncRowSelectionState(), this._updateBulkActions(), this._updateSummary(), this._syncPaginationElement(), this._syncStateBar();
1146
+ } finally {
1147
+ this._isSyncing = !1;
1148
+ }
1149
+ }
1150
+ }
1151
+ _syncHeaderState() {
1152
+ const t = this.hasAttribute("sortable"), a = this.hasAttribute("draggable-columns"), e = this.hasAttribute("resizable-columns"), i = this._headerKeyboardShortcuts(t, a);
1153
+ this._headerCells().forEach((s, o) => {
1154
+ if (s.setAttribute("data-col-index", String(o)), s.setAttribute("scope", "col"), s.setAttribute("aria-colindex", String(o + 1)), t || a ? s.setAttribute("aria-keyshortcuts", i) : s.removeAttribute("aria-keyshortcuts"), t ? s.setAttribute("data-sortable", "true") : s.removeAttribute("data-sortable"), t || a ? s.hasAttribute("tabindex") || s.setAttribute("tabindex", "0") : s.getAttribute("tabindex") === "0" && s.removeAttribute("tabindex"), o === this._sortColumnIndex && t ? s.setAttribute("aria-sort", this._sortDirection === "asc" ? "ascending" : "descending") : t ? s.setAttribute("aria-sort", "none") : s.removeAttribute("aria-sort"), a ? (s.setAttribute("data-draggable", "true"), s.setAttribute("draggable", "true"), s.setAttribute("aria-description", "Draggable column header")) : (s.removeAttribute("data-draggable"), s.removeAttribute("draggable"), s.removeAttribute("data-dragging"), s.removeAttribute("data-drag-over"), s.removeAttribute("aria-description")), e) {
1155
+ s.setAttribute("data-resizable", "true");
1156
+ let n = s.querySelector(".resize-handle");
1157
+ n || (n = document.createElement("button"), n.type = "button", n.className = "resize-handle", n.setAttribute("aria-hidden", "true"), n.tabIndex = -1, s.appendChild(n)), n.setAttribute("data-col-index", String(o));
1158
+ const d = this._columnWidths.get(o);
1159
+ typeof d == "number" && this._setColumnWidth(o, d, !1);
1160
+ } else {
1161
+ s.removeAttribute("data-resizable");
1162
+ const n = s.querySelector(".resize-handle");
1163
+ n && n.remove();
1164
+ }
1165
+ });
1166
+ }
1167
+ _applyPagination(t) {
1168
+ var l;
1169
+ const a = this._bodyRows();
1170
+ this._pageSize = this._parsePageSize(), this._totalRows = a.length;
1171
+ const e = this._parseFilterQuery(), i = this._headerCells(), r = this._resolveFilterColumnIndex(i), s = this._parseFilters(i), o = a.filter((u) => this._rowMatchesFilter(u, e, r, s));
1172
+ this._filteredRows = o.length, (l = this._table) == null || l.setAttribute("aria-rowcount", String(this._filteredRows));
1173
+ const n = this._parsePage();
1174
+ this._pageCount = Math.max(1, Math.ceil(o.length / this._pageSize)), this._page = Math.min(this._pageCount, Math.max(1, n)), this._page !== n && this._setPageAttribute(this._page);
1175
+ const d = (this._page - 1) * this._pageSize, c = d + this._pageSize, h = new Set(o);
1176
+ if (a.forEach((u) => {
1177
+ h.has(u) ? u.removeAttribute("data-hidden-by-filter") : (u.hidden = !0, u.setAttribute("data-hidden-by-filter", ""), u.removeAttribute("data-hidden-by-page"), u.removeAttribute("aria-rowindex"));
1178
+ }), o.forEach((u, b) => {
1179
+ const f = b >= d && b < c;
1180
+ u.hidden = !f, f ? u.removeAttribute("data-hidden-by-page") : u.setAttribute("data-hidden-by-page", ""), u.setAttribute("aria-rowindex", String(b + 1));
1181
+ }), t) {
1182
+ const u = o.length, b = u === 0 ? 0 : d + 1, f = Math.min(c, u);
1183
+ this.dispatchEvent(
1184
+ new CustomEvent("page-change", {
1185
+ detail: {
1186
+ page: this._page,
1187
+ count: this._pageCount,
1188
+ pageSize: this._pageSize,
1189
+ total: u,
1190
+ start: b,
1191
+ end: f
1192
+ },
1193
+ bubbles: !0
1194
+ })
1195
+ );
1196
+ }
1197
+ }
1198
+ _clearVirtualization(t) {
1199
+ this._virtualRaf && (cancelAnimationFrame(this._virtualRaf), this._virtualRaf = 0), this._clearVirtualSpacers(), t && this._bodyRows().forEach((a) => {
1200
+ a.style.display === "none" && (a.style.display = ""), a.removeAttribute("data-hidden-by-virtual");
1201
+ });
1202
+ }
1203
+ _ensureVirtualSpacer(t) {
1204
+ if (!this._table)
1205
+ return null;
1206
+ const a = this._table.tBodies[0];
1207
+ if (!a)
1208
+ return null;
1209
+ const e = t === "top" ? this._virtualTopSpacer : this._virtualBottomSpacer;
1210
+ if (e && e.isConnected)
1211
+ return e;
1212
+ const i = document.createElement("tr");
1213
+ i.setAttribute("data-virtual-spacer", t), i.setAttribute("aria-hidden", "true"), i.setAttribute("role", "presentation"), i.style.pointerEvents = "none";
1214
+ const r = document.createElement("td");
1215
+ return r.style.padding = "0", r.style.border = "0", r.style.height = "0px", r.style.lineHeight = "0", r.style.fontSize = "0", r.innerHTML = "&nbsp;", i.appendChild(r), t === "top" ? (a.insertBefore(i, a.firstChild), this._virtualTopSpacer = i) : (a.appendChild(i), this._virtualBottomSpacer = i), i;
1216
+ }
1217
+ _setVirtualSpacerHeight(t, a, e) {
1218
+ if (!t)
1219
+ return;
1220
+ const i = t.cells[0] || t.appendChild(document.createElement("td"));
1221
+ i.colSpan !== Math.max(1, e) && (i.colSpan = Math.max(1, e)), i.style.padding = "0", i.style.border = "0", i.style.height = `${Math.max(0, Math.round(a))}px`, i.style.lineHeight = "0", i.style.fontSize = "0";
1222
+ }
1223
+ _applyVirtualization(t) {
1224
+ var w;
1225
+ if (!this.hasAttribute("virtualize") || !this._frameEl || !this._table) {
1226
+ this._clearVirtualization(!0);
1227
+ return;
1228
+ }
1229
+ const e = this._bodyRows().filter((p) => !p.hidden);
1230
+ if (!e.length) {
1231
+ this._clearVirtualization(!0);
1232
+ return;
1233
+ }
1234
+ const i = this._parseRowHeight(), r = this._parseOverscan(), s = this._frameEl.clientHeight || i * 8, o = this._frameEl.scrollTop, n = Math.max(0, Math.floor(o / i) - r), d = Math.min(e.length, Math.ceil((o + s) / i) + r), c = n * i, h = Math.max(0, (e.length - d) * i), l = Math.max(1, this._headerCells().length || ((w = e[0]) == null ? void 0 : w.cells.length) || 1), u = this._ensureVirtualSpacer("top"), b = this._ensureVirtualSpacer("bottom");
1235
+ this._setVirtualSpacerHeight(u, c, l), this._setVirtualSpacerHeight(b, h, l);
1236
+ const f = (p, y) => {
1237
+ y ? (p.style.display === "none" && (p.style.display = ""), p.removeAttribute("data-hidden-by-virtual")) : (p.style.display !== "none" && (p.style.display = "none"), p.setAttribute("data-hidden-by-virtual", ""));
1238
+ };
1239
+ if (!(this._virtualStart >= 0 && this._virtualEnd >= this._virtualStart && this._virtualVisibleTotal === e.length))
1240
+ e.forEach((p, y) => {
1241
+ f(p, y >= n && y < d);
1242
+ });
1243
+ else {
1244
+ const p = this._virtualStart, y = this._virtualEnd;
1245
+ for (let g = p; g < Math.min(n, y); g += 1) {
1246
+ const v = e[g];
1247
+ v && f(v, !1);
1248
+ }
1249
+ for (let g = n; g < Math.min(p, d); g += 1) {
1250
+ const v = e[g];
1251
+ v && f(v, !0);
1252
+ }
1253
+ for (let g = Math.max(d, p); g < y; g += 1) {
1254
+ const v = e[g];
1255
+ v && f(v, !1);
1256
+ }
1257
+ for (let g = Math.max(y, n); g < d; g += 1) {
1258
+ const v = e[g];
1259
+ v && f(v, !0);
1260
+ }
1261
+ }
1262
+ this._virtualStart = n, this._virtualEnd = d, this._virtualVisibleTotal = e.length, t && this.dispatchEvent(
1263
+ new CustomEvent("virtual-range-change", {
1264
+ detail: {
1265
+ start: n,
1266
+ end: Math.max(n, d - 1),
1267
+ visible: Math.max(0, d - n),
1268
+ total: e.length
1269
+ },
1270
+ bubbles: !0
1271
+ })
1272
+ );
1273
+ }
1274
+ _updateSummary() {
1275
+ const t = this.root.querySelector(".summary");
1276
+ if (!t)
1277
+ return;
1278
+ const a = this._totalRows, e = this._filteredRows;
1279
+ if (!a || !e) {
1280
+ t.textContent = "No records";
1281
+ return;
1282
+ }
1283
+ const i = (this._page - 1) * this._pageSize + 1, r = Math.min(this._page * this._pageSize, e);
1284
+ if (e === a) {
1285
+ t.textContent = `Showing ${i}-${r} of ${a}`;
1286
+ return;
1287
+ }
1288
+ t.textContent = `Showing ${i}-${r} of ${e} filtered records (${a} total)`;
1289
+ }
1290
+ _syncEmptyText() {
1291
+ const t = this.root.querySelector(".empty");
1292
+ if (!t)
1293
+ return;
1294
+ const a = !!this._parseFilterQuery();
1295
+ if (this._table && this._filteredRows === 0 && a) {
1296
+ t.textContent = "No matching records.";
1297
+ return;
1298
+ }
1299
+ t.textContent = this.getAttribute("empty-text") || "No data available.";
1300
+ }
1301
+ _dispatchFilterChange() {
1302
+ this.dispatchEvent(
1303
+ new CustomEvent("filter-change", {
1304
+ detail: {
1305
+ query: this.getAttribute("filter-query") || "",
1306
+ filters: this.getAttribute("filters") || "",
1307
+ total: this._totalRows,
1308
+ filtered: this._filteredRows,
1309
+ page: this._page,
1310
+ count: this._pageCount
1311
+ },
1312
+ bubbles: !0
1313
+ })
1314
+ );
1315
+ }
1316
+ _parseComparable(t) {
1317
+ const a = t.replace(/,/g, "").trim();
1318
+ return /^-?\d+(\.\d+)?$/.test(a) ? Number(a) : t.toLowerCase();
1319
+ }
1320
+ _rulePasses(t, a) {
1321
+ const e = a.op, i = a.value, r = t.trim(), s = r.toLowerCase();
1322
+ if (e === "empty")
1323
+ return r.length === 0;
1324
+ if (e === "notempty" || e === "not-empty")
1325
+ return r.length > 0;
1326
+ if (e === "equals" || e === "eq")
1327
+ return s === String(i ?? "").toLowerCase();
1328
+ if (e === "neq" || e === "not-equals")
1329
+ return s !== String(i ?? "").toLowerCase();
1330
+ if (e === "startswith" || e === "starts-with")
1331
+ return s.startsWith(String(i ?? "").toLowerCase());
1332
+ if (e === "endswith" || e === "ends-with")
1333
+ return s.endsWith(String(i ?? "").toLowerCase());
1334
+ if (e === "in")
1335
+ return (Array.isArray(i) ? i.map((n) => String(n).toLowerCase()) : String(i ?? "").split(",").map((n) => n.trim().toLowerCase()).filter(Boolean)).includes(s);
1336
+ if (e === "gt" || e === "gte" || e === "lt" || e === "lte" || e === "between") {
1337
+ const o = this._parseComparable(r);
1338
+ if (typeof o != "number")
1339
+ return !1;
1340
+ if (e === "between") {
1341
+ const d = Array.isArray(i) ? i : String(i ?? "").split(","), c = Number(d[0]), h = Number(d[1]);
1342
+ return !Number.isFinite(c) || !Number.isFinite(h) ? !1 : o >= Math.min(c, h) && o <= Math.max(c, h);
1343
+ }
1344
+ const n = Number(i);
1345
+ return Number.isFinite(n) ? e === "gt" ? o > n : e === "gte" ? o >= n : e === "lt" ? o < n : o <= n : !1;
1346
+ }
1347
+ return s.includes(String(i ?? "").toLowerCase());
1348
+ }
1349
+ _rowMatchesFilter(t, a, e, i) {
1350
+ if (a) {
1351
+ const r = e >= 0 ? m(t.cells[e]) : Array.from(t.cells).map((n) => m(n)).join(" ");
1352
+ if (!r)
1353
+ return !1;
1354
+ const s = r.toLowerCase(), o = a.split(/\s+/).filter(Boolean);
1355
+ if (o.length && !o.every((n) => s.includes(n)))
1356
+ return !1;
1357
+ }
1358
+ return i.length ? i.every((r) => {
1359
+ const s = t.cells[r.columnIndex];
1360
+ return this._rulePasses(m(s), r);
1361
+ }) : !0;
1362
+ }
1363
+ _setColumnWidth(t, a, e = !0) {
1364
+ if (!this._table)
1365
+ return;
1366
+ const i = Math.max(72, Math.round(a));
1367
+ if (this._columnWidths.set(t, i), Array.from(this._table.rows).forEach((o) => {
1368
+ const n = o.cells[t];
1369
+ n && (n.style.width = `${i}px`, n.style.minWidth = `${i}px`, n.style.maxWidth = `${i}px`, n.style.boxSizing = "border-box");
1370
+ }), !e)
1371
+ return;
1372
+ this._applyPinnedColumns();
1373
+ const s = this._headerCells()[t];
1374
+ this.dispatchEvent(
1375
+ new CustomEvent("column-resize", {
1376
+ detail: {
1377
+ columnIndex: t,
1378
+ key: (s == null ? void 0 : s.getAttribute("data-key")) || m(s) || `column-${t + 1}`,
1379
+ width: i
1380
+ },
1381
+ bubbles: !0
1382
+ })
1383
+ );
1384
+ }
1385
+ _onPointerDown(t) {
1386
+ if (!this.hasAttribute("resizable-columns") || !this._table)
1387
+ return;
1388
+ const e = t.target.closest(".resize-handle");
1389
+ if (!e || !this._table.contains(e))
1390
+ return;
1391
+ const i = Number(e.getAttribute("data-col-index"));
1392
+ if (!Number.isInteger(i) || i < 0)
1393
+ return;
1394
+ const r = this._headerCells()[i];
1395
+ if (!r)
1396
+ return;
1397
+ t.preventDefault();
1398
+ const s = r.getBoundingClientRect().width;
1399
+ this._resizeState = {
1400
+ columnIndex: i,
1401
+ startX: t.clientX,
1402
+ startWidth: s
1403
+ }, window.addEventListener("pointermove", this._onPointerMove), window.addEventListener("pointerup", this._onPointerUp);
1404
+ }
1405
+ _onPointerMove(t) {
1406
+ if (!this._resizeState)
1407
+ return;
1408
+ const a = t.clientX - this._resizeState.startX, e = this._isRtl() ? -a : a;
1409
+ this._pendingResizeColumn = this._resizeState.columnIndex, this._pendingResizeWidth = this._resizeState.startWidth + e, this._setColumnWidth(this._pendingResizeColumn, this._pendingResizeWidth, !1);
1410
+ }
1411
+ _onPointerUp() {
1412
+ if (!this._resizeState)
1413
+ return;
1414
+ const t = this._resizeState;
1415
+ this._resizeState = null, this._resizeRaf && (cancelAnimationFrame(this._resizeRaf), this._resizeRaf = 0), this._pendingResizeColumn === t.columnIndex && this._pendingResizeWidth != null && this._setColumnWidth(t.columnIndex, this._pendingResizeWidth, !1), this._pendingResizeColumn = -1, this._pendingResizeWidth = null, window.removeEventListener("pointermove", this._onPointerMove), window.removeEventListener("pointerup", this._onPointerUp);
1416
+ const a = this._headerCells()[t.columnIndex];
1417
+ if (!a)
1418
+ return;
1419
+ const e = a.getBoundingClientRect().width;
1420
+ this._setColumnWidth(t.columnIndex, e, !0);
1421
+ }
1422
+ _onFrameScroll() {
1423
+ this.hasAttribute("virtualize") && (this._virtualRaf || (this._virtualRaf = requestAnimationFrame(() => {
1424
+ this._virtualRaf = 0, this._applyVirtualization(!0);
1425
+ })));
1426
+ }
1427
+ _onDragStart(t) {
1428
+ if (!this.hasAttribute("draggable-columns") || !this._table)
1429
+ return;
1430
+ const a = t.target;
1431
+ if (a.closest(".resize-handle")) {
1432
+ t.preventDefault();
1433
+ return;
1434
+ }
1435
+ const e = a.closest("th");
1436
+ if (!e || !this._table.contains(e))
1437
+ return;
1438
+ const r = this._headerCells().indexOf(e);
1439
+ r < 0 || (this._dragColumnIndex = r, this._dragOverColumnIndex = r, this._clearDragMarkers(), e.setAttribute("data-dragging", "true"), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", String(r))));
1440
+ }
1441
+ _onDragOver(t) {
1442
+ if (!this.hasAttribute("draggable-columns") || !this._table || this._dragColumnIndex < 0)
1443
+ return;
1444
+ const e = t.target.closest("th");
1445
+ if (!e || !this._table.contains(e))
1446
+ return;
1447
+ const i = this._headerCells(), r = i.indexOf(e);
1448
+ if (r < 0 || (t.preventDefault(), this._dragOverColumnIndex === r))
1449
+ return;
1450
+ this._clearDragMarkers(), this._dragOverColumnIndex = r, e.setAttribute("data-drag-over", "true");
1451
+ const s = i[this._dragColumnIndex];
1452
+ s && s.setAttribute("data-dragging", "true");
1453
+ }
1454
+ _onDrop(t) {
1455
+ if (!this.hasAttribute("draggable-columns") || !this._table || this._dragColumnIndex < 0)
1456
+ return;
1457
+ const e = t.target.closest("th");
1458
+ if (!e || !this._table.contains(e))
1459
+ return;
1460
+ const r = this._headerCells().indexOf(e);
1461
+ if (r < 0)
1462
+ return;
1463
+ t.preventDefault();
1464
+ const s = this._dragColumnIndex, o = this._moveColumn(s, r);
1465
+ this._clearDragMarkers(), this._dragColumnIndex = -1, this._ignoreHeaderClickUntil = Date.now() + 220, o && (this._applyVirtualization(!1), this._emitColumnOrderChange(s, r));
1466
+ }
1467
+ _onDragEnd() {
1468
+ this._clearDragMarkers(), this._dragColumnIndex = -1;
1469
+ }
1470
+ _rowValues(t) {
1471
+ const a = this._headerCells(), e = Array.from(t.cells), i = {};
1472
+ return e.forEach((r, s) => {
1473
+ const o = a[s], n = ((o == null ? void 0 : o.getAttribute("data-key")) || m(o || void 0) || `col_${s + 1}`).toLowerCase().replace(/[^a-z0-9_]+/g, "_").replace(/^_+|_+$/g, "");
1474
+ i[n || `col_${s + 1}`] = m(r);
1475
+ }), i;
1476
+ }
1477
+ _syncRowSelectionState() {
1478
+ const t = this.hasAttribute("selectable"), a = this._bodyRows();
1479
+ for (const e of Array.from(this._selectedRows))
1480
+ a.includes(e) || this._selectedRows.delete(e);
1481
+ a.forEach((e) => {
1482
+ const i = !e.hidden;
1483
+ t && i ? (e.setAttribute("aria-selected", this._selectedRows.has(e) ? "true" : "false"), e.setAttribute("aria-keyshortcuts", "ArrowUp ArrowDown Home End Enter Space"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0"), this._selectedRows.has(e) ? e.setAttribute("data-selected", "true") : e.removeAttribute("data-selected")) : (e.removeAttribute("aria-selected"), e.removeAttribute("aria-keyshortcuts"), e.removeAttribute("data-selected"), e.getAttribute("tabindex") === "0" && e.removeAttribute("tabindex"));
1484
+ });
1485
+ }
1486
+ _toggleRowSelection(t) {
1487
+ const a = this.hasAttribute("multi-select"), e = this._selectedRows.has(t);
1488
+ a || this._selectedRows.clear(), e && a ? this._selectedRows.delete(t) : this._selectedRows.add(t), this._syncRowSelectionState(), this._updateBulkActions();
1489
+ const i = this._bodyRows(), r = i.flatMap((o, n) => this._selectedRows.has(o) ? [n] : []), s = i.filter((o) => this._selectedRows.has(o)).map((o) => this._rowValues(o));
1490
+ this.dispatchEvent(
1491
+ new CustomEvent("row-select", {
1492
+ detail: {
1493
+ index: i.indexOf(t),
1494
+ selected: this._selectedRows.has(t),
1495
+ indices: r,
1496
+ rows: s,
1497
+ page: this._page
1498
+ },
1499
+ bubbles: !0
1500
+ })
1501
+ );
1502
+ }
1503
+ _sortByColumn(t, a) {
1504
+ if (!this._table)
1505
+ return;
1506
+ const e = this._table.tBodies[0];
1507
+ if (!e)
1508
+ return;
1509
+ this._sortColumnIndex === t ? this._sortDirection = this._sortDirection === "asc" ? "desc" : "asc" : (this._sortColumnIndex = t, this._sortDirection = "asc"), Array.from(e.rows).filter((o) => !this._isVirtualSpacerRow(o)).map((o, n) => ({
1510
+ row: o,
1511
+ rowIndex: n,
1512
+ value: k(m(o.cells[t]))
1513
+ })).sort((o, n) => {
1514
+ const d = o.value, c = n.value;
1515
+ let h = 0;
1516
+ return typeof d == "number" && typeof c == "number" ? h = d - c : h = String(d).localeCompare(String(c), void 0, { numeric: !0, sensitivity: "base" }), h === 0 && (h = o.rowIndex - n.rowIndex), this._sortDirection === "asc" ? h : -h;
1517
+ }).map((o) => o.row).forEach((o) => e.appendChild(o)), this._syncHeaderState(), this._applyPagination(!1), this._syncRowSelectionState(), this._updateSummary(), this._syncPaginationElement();
1518
+ const s = a.getAttribute("data-key") || m(a) || `column-${t + 1}`;
1519
+ this.dispatchEvent(
1520
+ new CustomEvent("sort-change", {
1521
+ detail: {
1522
+ columnIndex: t,
1523
+ key: s,
1524
+ direction: this._sortDirection,
1525
+ page: this._page
1526
+ },
1527
+ bubbles: !0
1528
+ })
1529
+ );
1530
+ }
1531
+ _detachPaginationListener() {
1532
+ this._paginationEl && (this._paginationEl.removeEventListener("change", this._onPaginationChange), this._paginationEl = null);
1533
+ }
1534
+ _syncPaginationBinding() {
1535
+ this._detachPaginationListener();
1536
+ const t = this.getAttribute("pagination-id");
1537
+ if (!t)
1538
+ return;
1539
+ const a = document.getElementById(t);
1540
+ a && (this._paginationEl = a, this._paginationEl.addEventListener("change", this._onPaginationChange), this._syncPaginationElement());
1541
+ }
1542
+ _syncPaginationElement() {
1543
+ this._paginationEl && (this._paginationEl.setAttribute("count", String(this._pageCount || 1)), this._paginationEl.setAttribute("page", String(this._page || 1)));
1544
+ }
1545
+ _onPaginationChange(t) {
1546
+ const a = t.detail, e = Number(a == null ? void 0 : a.page);
1547
+ Number.isFinite(e) && e !== this._page && (this._setPageAttribute(e), this._applyPagination(!0), this._syncRowSelectionState(), this._updateSummary(), this._syncPaginationElement());
1548
+ }
1549
+ _onClick(t) {
1550
+ if (!this._table)
1551
+ return;
1552
+ const e = t.composedPath().find((r) => r instanceof HTMLElement) || t.target;
1553
+ if (e.closest(".bulk-clear")) {
1554
+ const r = this._selectedRows.size;
1555
+ r > 0 && (this._selectedRows.clear(), this._syncRowSelectionState(), this._updateBulkActions(), this.dispatchEvent(new CustomEvent("bulk-clear", { detail: { count: r, page: this._page }, bubbles: !0 })));
1556
+ return;
1557
+ }
1558
+ if (!e.closest(".resize-handle") && !(e.closest("th") && Date.now() < this._ignoreHeaderClickUntil) && !this._isInteractionBlocked()) {
1559
+ if (this.hasAttribute("sortable")) {
1560
+ const r = e.closest("th");
1561
+ if (r && this._table.contains(r)) {
1562
+ if (e !== r && this._isInteractiveTarget(e))
1563
+ return;
1564
+ const o = this._headerCells().indexOf(r);
1565
+ if (o >= 0) {
1566
+ this._sortByColumn(o, r);
1567
+ return;
1568
+ }
1569
+ }
1570
+ }
1571
+ if (this.hasAttribute("selectable")) {
1572
+ const r = e.closest("tbody tr");
1573
+ if (r && this._table.contains(r) && !r.hidden && !this._isVirtualSpacerRow(r)) {
1574
+ if (e !== r && this._isInteractiveTarget(e))
1575
+ return;
1576
+ this._toggleRowSelection(r);
1577
+ }
1578
+ }
1579
+ }
1580
+ }
1581
+ _onKeyDown(t) {
1582
+ if (!this._table)
1583
+ return;
1584
+ const a = t.key, e = t.target;
1585
+ if (a === "Escape" && this._selectedRows.size) {
1586
+ const r = this._selectedRows.size;
1587
+ this._selectedRows.clear(), this._syncRowSelectionState(), this._updateBulkActions(), this.dispatchEvent(new CustomEvent("bulk-clear", { detail: { count: r, page: this._page }, bubbles: !0 }));
1588
+ return;
1589
+ }
1590
+ if (this._isInteractionBlocked())
1591
+ return;
1592
+ const i = e.closest("th");
1593
+ if (i && this._table.contains(i)) {
1594
+ const r = this._headerCells(), s = r.indexOf(i);
1595
+ if (s >= 0) {
1596
+ const n = this._isRtl() ? -1 : 1, d = -n;
1597
+ if (a === "ArrowRight" || a === "ArrowLeft") {
1598
+ t.preventDefault();
1599
+ const c = a === "ArrowRight" ? n : d, h = Math.max(0, Math.min(r.length - 1, s + c));
1600
+ if (t.altKey && this.hasAttribute("draggable-columns") && h !== s) {
1601
+ this._moveColumn(s, h) && (this._ignoreHeaderClickUntil = Date.now() + 220, this._emitColumnOrderChange(s, h), this._applyVirtualization(!1), this._focusHeaderAt(h));
1602
+ return;
1603
+ }
1604
+ this._focusHeaderAt(h);
1605
+ return;
1606
+ }
1607
+ if (a === "Home" || a === "End") {
1608
+ t.preventDefault(), this._focusHeaderAt(a === "Home" ? 0 : r.length - 1);
1609
+ return;
1610
+ }
1611
+ if ((a === "Enter" || a === " ") && this.hasAttribute("sortable")) {
1612
+ if (e !== i && this._isInteractiveTarget(e))
1613
+ return;
1614
+ t.preventDefault(), this._sortByColumn(s, i);
1615
+ return;
1616
+ }
1617
+ }
1618
+ }
1619
+ if (this.hasAttribute("selectable")) {
1620
+ const r = e.closest("tbody tr");
1621
+ if (r && this._table.contains(r) && !r.hidden && !this._isVirtualSpacerRow(r)) {
1622
+ if (e !== r && this._isInteractiveTarget(e))
1623
+ return;
1624
+ if (a === "ArrowDown" || a === "ArrowUp") {
1625
+ t.preventDefault(), this._focusSelectableRow(r, a === "ArrowDown" ? 1 : -1);
1626
+ return;
1627
+ }
1628
+ if (a === "Home" || a === "End") {
1629
+ t.preventDefault();
1630
+ const s = this._bodyRows().filter((n) => !n.hidden), o = a === "Home" ? s[0] : s[s.length - 1];
1631
+ o && o.focus();
1632
+ return;
1633
+ }
1634
+ (a === "Enter" || a === " ") && (t.preventDefault(), this._toggleRowSelection(r));
1635
+ }
1636
+ }
1637
+ }
1638
+ _updateBulkActions() {
1639
+ const t = this.root.querySelector(".bulk");
1640
+ if (!t)
1641
+ return;
1642
+ const a = this.hasAttribute("selectable"), e = this._selectedRows.size;
1643
+ if (!(a && e > 0)) {
1644
+ t.setAttribute("hidden", "");
1645
+ return;
1646
+ }
1647
+ t.removeAttribute("hidden");
1648
+ const r = this.getAttribute("bulk-actions-label") || "{count} selected", s = this.getAttribute("bulk-clear-label") || "Clear selection", o = t.querySelector(".bulk-count");
1649
+ o && (o.textContent = r.replace("{count}", String(e)));
1650
+ const n = t.querySelector(".bulk-clear");
1651
+ n && (n.textContent = s);
1652
+ }
1653
+ shouldRenderOnAttributeChange(t, a, e) {
1654
+ return !1;
1655
+ }
1656
+ }
1657
+ typeof customElements < "u" && !customElements.get("ui-data-table") && customElements.define("ui-data-table", z);
1658
+ export {
1659
+ z as UIDataTable
1660
+ };