@editora/ui-core 0.2.2 → 0.3.0

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 (365) hide show
  1. package/dist/{ElementBase-DxbvhLJs.js → ElementBase-CbUsP3D6.js} +1 -1
  2. package/dist/{ElementBase-BeZT54Hj.mjs → ElementBase-D5QsC5Vw.mjs} +10 -1
  3. package/dist/ElementBase.d.ts +7 -0
  4. package/dist/ElementBase.d.ts.map +1 -1
  5. package/dist/accordion.cjs.js +1 -1
  6. package/dist/accordion.esm.js +1 -1
  7. package/dist/add-icons-CVeHOsWl.js +1 -0
  8. package/dist/add-icons-DBUZJ0g7.mjs +14 -0
  9. package/dist/add-icons.cjs.js +1 -0
  10. package/dist/add-icons.d.ts +16 -0
  11. package/dist/add-icons.d.ts.map +1 -0
  12. package/dist/add-icons.esm.js +4 -0
  13. package/dist/alert-dialog.cjs.js +24 -24
  14. package/dist/alert-dialog.esm.js +112 -107
  15. package/dist/alert.cjs.js +8 -8
  16. package/dist/alert.esm.js +22 -22
  17. package/dist/animated-beam.cjs.js +1 -1
  18. package/dist/animated-beam.esm.js +1 -1
  19. package/dist/animated-list.cjs.js +1 -1
  20. package/dist/animated-list.esm.js +1 -1
  21. package/dist/animated-text.cjs.js +1 -1
  22. package/dist/animated-text.esm.js +1 -1
  23. package/dist/app-header.cjs.js +15 -3
  24. package/dist/app-header.esm.js +31 -4
  25. package/dist/aspect-ratio.cjs.js +1 -1
  26. package/dist/aspect-ratio.esm.js +1 -1
  27. package/dist/avatar.cjs.js +1 -1
  28. package/dist/avatar.esm.js +1 -1
  29. package/dist/badge.cjs.js +1 -1
  30. package/dist/badge.esm.js +1 -1
  31. package/dist/block-controls.cjs.js +1 -1
  32. package/dist/block-controls.esm.js +1 -1
  33. package/dist/box.cjs.js +1 -1
  34. package/dist/box.esm.js +1 -1
  35. package/dist/breadcrumb.cjs.js +4 -4
  36. package/dist/breadcrumb.esm.js +93 -84
  37. package/dist/button.cjs.js +520 -1
  38. package/dist/button.esm.js +682 -2
  39. package/dist/{calendar-CzpWDxLc.js → calendar-BsVqtpjM.js} +6 -6
  40. package/dist/{calendar-DkSDFg33.mjs → calendar-CFafqZVA.mjs} +6 -6
  41. package/dist/calendar.cjs.js +1 -1
  42. package/dist/calendar.esm.js +1 -1
  43. package/dist/card.cjs.js +6 -5
  44. package/dist/card.esm.js +52 -39
  45. package/dist/chart.cjs.js +2 -2
  46. package/dist/chart.esm.js +2 -2
  47. package/dist/checkbox.cjs.js +4 -4
  48. package/dist/checkbox.esm.js +36 -15
  49. package/dist/clone-source-BxK2pEVw.mjs +11 -0
  50. package/dist/clone-source-C7E_ri5f.js +1 -0
  51. package/dist/collapsible.cjs.js +1 -1
  52. package/dist/collapsible.esm.js +1 -1
  53. package/dist/color-picker.cjs.js +2 -2
  54. package/dist/color-picker.esm.js +3 -3
  55. package/dist/combobox.cjs.js +4 -4
  56. package/dist/combobox.esm.js +22 -19
  57. package/dist/command-palette.cjs.js +1 -1
  58. package/dist/command-palette.esm.js +1 -1
  59. package/dist/command.cjs.js +1 -1
  60. package/dist/command.esm.js +1 -1
  61. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  62. package/dist/components/ui-alert.d.ts.map +1 -1
  63. package/dist/components/ui-app-header.d.ts +1 -0
  64. package/dist/components/ui-app-header.d.ts.map +1 -1
  65. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  66. package/dist/components/ui-card.d.ts +7 -0
  67. package/dist/components/ui-card.d.ts.map +1 -1
  68. package/dist/components/ui-checkbox.d.ts +6 -0
  69. package/dist/components/ui-checkbox.d.ts.map +1 -1
  70. package/dist/components/ui-combobox.d.ts.map +1 -1
  71. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  72. package/dist/components/ui-dialog.d.ts +1 -0
  73. package/dist/components/ui-dialog.d.ts.map +1 -1
  74. package/dist/components/ui-drawer.d.ts.map +1 -1
  75. package/dist/components/ui-dropdown.d.ts.map +1 -1
  76. package/dist/components/ui-empty-state.d.ts.map +1 -1
  77. package/dist/components/ui-hover-card.d.ts.map +1 -1
  78. package/dist/components/ui-icon.d.ts +1 -0
  79. package/dist/components/ui-icon.d.ts.map +1 -1
  80. package/dist/components/ui-input.d.ts +16 -0
  81. package/dist/components/ui-input.d.ts.map +1 -1
  82. package/dist/components/ui-layout.d.ts +20 -0
  83. package/dist/components/ui-layout.d.ts.map +1 -1
  84. package/dist/components/ui-menu.d.ts +1 -0
  85. package/dist/components/ui-menu.d.ts.map +1 -1
  86. package/dist/components/ui-menubar.d.ts.map +1 -1
  87. package/dist/components/ui-multi-select.d.ts +6 -0
  88. package/dist/components/ui-multi-select.d.ts.map +1 -1
  89. package/dist/components/ui-number-field.d.ts +6 -0
  90. package/dist/components/ui-number-field.d.ts.map +1 -1
  91. package/dist/components/ui-pagination.d.ts.map +1 -1
  92. package/dist/components/ui-password-field.d.ts +11 -0
  93. package/dist/components/ui-password-field.d.ts.map +1 -1
  94. package/dist/components/ui-popover.d.ts.map +1 -1
  95. package/dist/components/ui-positioner.d.ts.map +1 -1
  96. package/dist/components/ui-radio-group.d.ts +6 -0
  97. package/dist/components/ui-radio-group.d.ts.map +1 -1
  98. package/dist/components/ui-rating.d.ts +1 -0
  99. package/dist/components/ui-rating.d.ts.map +1 -1
  100. package/dist/components/ui-select.d.ts +7 -0
  101. package/dist/components/ui-select.d.ts.map +1 -1
  102. package/dist/components/ui-sidebar.d.ts +1 -0
  103. package/dist/components/ui-sidebar.d.ts.map +1 -1
  104. package/dist/components/ui-slider.d.ts +6 -0
  105. package/dist/components/ui-slider.d.ts.map +1 -1
  106. package/dist/components/ui-sortable.d.ts +1 -0
  107. package/dist/components/ui-sortable.d.ts.map +1 -1
  108. package/dist/components/ui-switch.d.ts +6 -0
  109. package/dist/components/ui-switch.d.ts.map +1 -1
  110. package/dist/components/ui-tabs.d.ts +2 -0
  111. package/dist/components/ui-tabs.d.ts.map +1 -1
  112. package/dist/components/ui-textarea.d.ts +6 -0
  113. package/dist/components/ui-textarea.d.ts.map +1 -1
  114. package/dist/components/ui-toast.d.ts.map +1 -1
  115. package/dist/components/ui-tooltip.d.ts.map +1 -1
  116. package/dist/container.cjs.js +1 -1
  117. package/dist/container.esm.js +1 -1
  118. package/dist/context-menu.cjs.js +2 -2
  119. package/dist/context-menu.esm.js +2 -2
  120. package/dist/control-group.cjs.js +1 -1
  121. package/dist/control-group.esm.js +1 -1
  122. package/dist/data-table.cjs.js +5 -5
  123. package/dist/data-table.esm.js +7 -7
  124. package/dist/date-field.cjs.js +1 -1
  125. package/dist/date-field.esm.js +3 -3
  126. package/dist/date-picker.cjs.js +2 -2
  127. package/dist/date-picker.esm.js +17 -17
  128. package/dist/date-range-picker.cjs.js +2 -2
  129. package/dist/date-range-picker.esm.js +4 -4
  130. package/dist/date-range-time-picker.cjs.js +3 -3
  131. package/dist/date-range-time-picker.esm.js +16 -16
  132. package/dist/date-time-picker.cjs.js +26 -23
  133. package/dist/date-time-picker.esm.js +49 -46
  134. package/dist/{date-time-utils-zAx4ghvC.mjs → date-time-utils-CJUksWj3.mjs} +1 -1
  135. package/dist/{date-time-utils-C-4eHTyy.js → date-time-utils-D3hQQ5Om.js} +1 -1
  136. package/dist/description.cjs.js +1 -1
  137. package/dist/description.esm.js +1 -1
  138. package/dist/dialog.cjs.js +7 -7
  139. package/dist/dialog.esm.js +51 -47
  140. package/dist/direction-provider.cjs.js +1 -1
  141. package/dist/direction-provider.esm.js +1 -1
  142. package/dist/dismissable-layer.cjs.js +1 -1
  143. package/dist/dismissable-layer.esm.js +1 -1
  144. package/dist/dock.cjs.js +1 -1
  145. package/dist/dock.esm.js +1 -1
  146. package/dist/drawer.cjs.js +5 -5
  147. package/dist/drawer.esm.js +18 -17
  148. package/dist/dropdown.cjs.js +7 -7
  149. package/dist/dropdown.esm.js +39 -38
  150. package/dist/empty-state.cjs.js +12 -2
  151. package/dist/empty-state.esm.js +17 -7
  152. package/dist/field-error.cjs.js +1 -1
  153. package/dist/field-error.esm.js +1 -1
  154. package/dist/field.cjs.js +2 -2
  155. package/dist/field.esm.js +2 -2
  156. package/dist/fieldset.cjs.js +1 -1
  157. package/dist/fieldset.esm.js +1 -1
  158. package/dist/file-upload.cjs.js +1 -1
  159. package/dist/file-upload.esm.js +1 -1
  160. package/dist/flex.cjs.js +1 -1
  161. package/dist/flex.esm.js +1 -1
  162. package/dist/floating-toolbar.cjs.js +2 -2
  163. package/dist/floating-toolbar.esm.js +2 -2
  164. package/dist/focus-scope-Dl0qk5GP.mjs +177 -0
  165. package/dist/focus-scope-Doz0bnE1.js +1 -0
  166. package/dist/focus-scope.cjs.js +1 -1
  167. package/dist/focus-scope.esm.js +2 -2
  168. package/dist/form-control-B90_3kYN.js +1 -0
  169. package/dist/form-control-D9wWUMBl.mjs +86 -0
  170. package/dist/form.cjs.js +2 -2
  171. package/dist/form.esm.js +2 -2
  172. package/dist/gantt.cjs.js +2 -2
  173. package/dist/gantt.esm.js +2 -2
  174. package/dist/grid.cjs.js +1 -1
  175. package/dist/grid.esm.js +1 -1
  176. package/dist/hover-card.cjs.js +5 -5
  177. package/dist/hover-card.esm.js +19 -18
  178. package/dist/icon-cloud.cjs.js +1 -1
  179. package/dist/icon-cloud.esm.js +1 -1
  180. package/dist/icon.cjs.js +207 -1
  181. package/dist/icon.esm.js +294 -2
  182. package/dist/icons-CpCpPXV5.js +1 -0
  183. package/dist/icons-DWYbbhb0.mjs +115 -0
  184. package/dist/icons.d.ts +11 -1
  185. package/dist/icons.d.ts.map +1 -1
  186. package/dist/implicit-submit-B6M5Uc56.js +1 -0
  187. package/dist/implicit-submit-Lr0-q2LR.mjs +44 -0
  188. package/dist/index.cjs.js +1 -1
  189. package/dist/index.d.ts +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.esm.js +309 -299
  192. package/dist/inline-edit.cjs.js +1 -1
  193. package/dist/inline-edit.esm.js +1 -1
  194. package/dist/input.cjs.js +62 -20
  195. package/dist/input.esm.js +164 -58
  196. package/dist/label.cjs.js +1 -1
  197. package/dist/label.esm.js +1 -1
  198. package/dist/layout.cjs.js +145 -4
  199. package/dist/layout.esm.js +278 -40
  200. package/dist/marquee.cjs.js +1 -1
  201. package/dist/marquee.esm.js +1 -1
  202. package/dist/masonry-grid.cjs.js +1 -1
  203. package/dist/masonry-grid.esm.js +1 -1
  204. package/dist/menu.cjs.js +8 -8
  205. package/dist/menu.esm.js +51 -47
  206. package/dist/menubar.cjs.js +9 -9
  207. package/dist/menubar.esm.js +41 -40
  208. package/dist/meter.cjs.js +1 -1
  209. package/dist/meter.esm.js +1 -1
  210. package/dist/multi-select.cjs.js +7 -7
  211. package/dist/multi-select.esm.js +55 -34
  212. package/dist/navigate-CXebafwF.mjs +18 -0
  213. package/dist/navigate-ChJVIIuS.js +1 -0
  214. package/dist/navigation-menu.cjs.js +1 -1
  215. package/dist/navigation-menu.esm.js +1 -1
  216. package/dist/number-attribute-BAF07JrU.mjs +8 -0
  217. package/dist/number-attribute-C4Rrl7d3.js +1 -0
  218. package/dist/number-field.cjs.js +8 -8
  219. package/dist/number-field.esm.js +90 -69
  220. package/dist/number-ticker.cjs.js +1 -1
  221. package/dist/number-ticker.esm.js +1 -1
  222. package/dist/odometer.cjs.js +1 -1
  223. package/dist/odometer.esm.js +1 -1
  224. package/dist/orbiter.cjs.js +1 -1
  225. package/dist/orbiter.esm.js +1 -1
  226. package/dist/pagination.cjs.js +24 -23
  227. package/dist/pagination.esm.js +61 -46
  228. package/dist/{panel-group-BVHJEdfx.js → panel-group-BIzzpQ5i.js} +1 -1
  229. package/dist/{panel-group-BxO_eNW6.mjs → panel-group-CFLjzRWI.mjs} +1 -1
  230. package/dist/panel-group.cjs.js +1 -1
  231. package/dist/panel-group.esm.js +1 -1
  232. package/dist/panel.cjs.js +1 -1
  233. package/dist/panel.esm.js +1 -1
  234. package/dist/password-field.cjs.js +36 -16
  235. package/dist/password-field.esm.js +113 -44
  236. package/dist/pin-input.cjs.js +1 -1
  237. package/dist/pin-input.esm.js +1 -1
  238. package/dist/placement-grid.cjs.js +1 -1
  239. package/dist/placement-grid.esm.js +1 -1
  240. package/dist/plugin-panel.cjs.js +1 -1
  241. package/dist/plugin-panel.esm.js +1 -1
  242. package/dist/popover.cjs.js +2 -2
  243. package/dist/popover.esm.js +28 -26
  244. package/dist/portal.cjs.js +1 -1
  245. package/dist/portal.esm.js +1 -1
  246. package/dist/positioner.cjs.js +2 -2
  247. package/dist/positioner.esm.js +35 -38
  248. package/dist/preload.cjs.js +221 -0
  249. package/dist/preload.css +220 -0
  250. package/dist/preload.d.ts +17 -0
  251. package/dist/preload.d.ts.map +1 -0
  252. package/dist/preload.esm.js +224 -0
  253. package/dist/presence.cjs.js +1 -1
  254. package/dist/presence.esm.js +1 -1
  255. package/dist/primitives/clone-source.d.ts +3 -0
  256. package/dist/primitives/clone-source.d.ts.map +1 -0
  257. package/dist/primitives/focus-scope.d.ts +6 -0
  258. package/dist/primitives/focus-scope.d.ts.map +1 -1
  259. package/dist/primitives/form-control.d.ts +68 -0
  260. package/dist/primitives/form-control.d.ts.map +1 -0
  261. package/dist/primitives/implicit-submit.d.ts +17 -0
  262. package/dist/primitives/implicit-submit.d.ts.map +1 -0
  263. package/dist/primitives/navigate.d.ts +27 -0
  264. package/dist/primitives/navigate.d.ts.map +1 -0
  265. package/dist/primitives/number-attribute.d.ts +7 -0
  266. package/dist/primitives/number-attribute.d.ts.map +1 -0
  267. package/dist/primitives/slotted-input.d.ts +19 -0
  268. package/dist/primitives/slotted-input.d.ts.map +1 -0
  269. package/dist/progress.cjs.js +3 -3
  270. package/dist/progress.esm.js +3 -3
  271. package/dist/quick-actions.cjs.js +5 -5
  272. package/dist/quick-actions.esm.js +3 -3
  273. package/dist/radio-group.cjs.js +9 -9
  274. package/dist/radio-group.esm.js +47 -24
  275. package/dist/radio.cjs.js +1 -1
  276. package/dist/radio.esm.js +1 -1
  277. package/dist/rating.cjs.js +6 -6
  278. package/dist/rating.esm.js +21 -10
  279. package/dist/{runtime-CJzoaC8Z.mjs → runtime-CORXjP7e.mjs} +366 -352
  280. package/dist/runtime-uCly3ECd.js +5 -0
  281. package/dist/runtime.cjs.js +1 -1
  282. package/dist/runtime.esm.js +1 -1
  283. package/dist/scroll-area.cjs.js +1 -1
  284. package/dist/scroll-area.esm.js +1 -1
  285. package/dist/section.cjs.js +1 -1
  286. package/dist/section.esm.js +1 -1
  287. package/dist/select.cjs.js +21 -21
  288. package/dist/select.esm.js +111 -71
  289. package/dist/selection-popup.cjs.js +2 -2
  290. package/dist/selection-popup.esm.js +2 -2
  291. package/dist/semantic-tokens.d.ts.map +1 -1
  292. package/dist/separator.cjs.js +1 -1
  293. package/dist/separator.esm.js +1 -1
  294. package/dist/sidebar.cjs.js +15 -15
  295. package/dist/sidebar.esm.js +48 -42
  296. package/dist/skeleton.cjs.js +1 -1
  297. package/dist/skeleton.esm.js +1 -1
  298. package/dist/slider.cjs.js +11 -11
  299. package/dist/slider.esm.js +40 -23
  300. package/dist/slot.cjs.js +1 -1
  301. package/dist/slot.esm.js +1 -1
  302. package/dist/slotted-input-BVq2QQg2.js +1 -0
  303. package/dist/slotted-input-atWznLfm.mjs +13 -0
  304. package/dist/sortable.cjs.js +25 -25
  305. package/dist/sortable.esm.js +29 -21
  306. package/dist/spinning-text.cjs.js +1 -1
  307. package/dist/spinning-text.esm.js +1 -1
  308. package/dist/split-button.cjs.js +1 -1
  309. package/dist/split-button.esm.js +1 -1
  310. package/dist/splitter.cjs.js +1 -1
  311. package/dist/splitter.esm.js +1 -1
  312. package/dist/standalone/add-icons.d.ts +2 -0
  313. package/dist/standalone/add-icons.d.ts.map +1 -0
  314. package/dist/standalone/preload.d.ts +2 -0
  315. package/dist/standalone/preload.d.ts.map +1 -0
  316. package/dist/stepper.cjs.js +3 -3
  317. package/dist/stepper.esm.js +3 -3
  318. package/dist/switch.cjs.js +9 -9
  319. package/dist/switch.esm.js +56 -35
  320. package/dist/table.cjs.js +1 -1
  321. package/dist/table.esm.js +1 -1
  322. package/dist/tabs.cjs.js +14 -14
  323. package/dist/tabs.esm.js +129 -115
  324. package/dist/tags-input.cjs.js +1 -1
  325. package/dist/tags-input.esm.js +1 -1
  326. package/dist/textarea.cjs.js +33 -11
  327. package/dist/textarea.esm.js +74 -35
  328. package/dist/theme.d.ts +6 -0
  329. package/dist/theme.d.ts.map +1 -1
  330. package/dist/time-field.cjs.js +1 -1
  331. package/dist/time-field.esm.js +2 -2
  332. package/dist/time-picker.cjs.js +1 -1
  333. package/dist/time-picker.esm.js +3 -3
  334. package/dist/timeline.cjs.js +2 -2
  335. package/dist/timeline.esm.js +2 -2
  336. package/dist/toast.cjs.js +4 -4
  337. package/dist/toast.esm.js +17 -16
  338. package/dist/toggle-group.cjs.js +1 -1
  339. package/dist/toggle-group.esm.js +1 -1
  340. package/dist/toggle.cjs.js +3 -3
  341. package/dist/toggle.esm.js +9 -9
  342. package/dist/toolbar.cjs.js +1 -1
  343. package/dist/toolbar.esm.js +1 -1
  344. package/dist/tooltip.cjs.js +2 -2
  345. package/dist/tooltip.esm.js +12 -14
  346. package/dist/transfer-list.cjs.js +1 -1
  347. package/dist/transfer-list.esm.js +1 -1
  348. package/dist/{tree-33fVNnaf.mjs → tree-CD2k2lIC.mjs} +1 -1
  349. package/dist/{tree-Dc02MChE.js → tree-ChQfhxya.js} +1 -1
  350. package/dist/tree-item.cjs.js +1 -1
  351. package/dist/tree-item.esm.js +1 -1
  352. package/dist/tree.cjs.js +1 -1
  353. package/dist/tree.esm.js +1 -1
  354. package/dist/visually-hidden.cjs.js +1 -1
  355. package/dist/visually-hidden.esm.js +1 -1
  356. package/dist/wizard.cjs.js +4 -4
  357. package/dist/wizard.esm.js +4 -4
  358. package/package.json +3 -2
  359. package/dist/focus-scope-Bwug2gDv.js +0 -1
  360. package/dist/focus-scope-CmEsG5UZ.mjs +0 -138
  361. package/dist/runtime-DYSIU3sR.js +0 -5
  362. package/dist/ui-button-C3OmI7Sn.mjs +0 -684
  363. package/dist/ui-button-CnLwXBnx.js +0 -520
  364. package/dist/ui-icon-D3avtxX_.js +0 -207
  365. package/dist/ui-icon-DLhB08Fo.mjs +0 -361
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-DxbvhLJs.js"),u=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-CbUsP3D6.js"),u=`
2
2
  :host {
3
3
  --ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
4
4
  --ui-field-error-size: 12px;
@@ -1,4 +1,4 @@
1
- import { E as d } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as d } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const l = `
3
3
  :host {
4
4
  --ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
package/dist/field.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./ElementBase-DxbvhLJs.js"),N=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./ElementBase-CbUsP3D6.js"),N=`
2
2
  :host {
3
3
  --ui-field-gap: 8px;
4
4
  --ui-field-label-width: 192px;
@@ -195,7 +195,7 @@
195
195
  --ui-field-description-color: #93a4bd;
196
196
  --ui-field-border-color: #334155;
197
197
  --ui-field-shell-border-color: #334155;
198
- --ui-field-focus-ring: #93c5fd;
198
+ --ui-field-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
199
199
  --ui-field-shadow:
200
200
  0 2px 8px rgba(2, 6, 23, 0.2),
201
201
  0 22px 44px rgba(2, 6, 23, 0.34);
package/dist/field.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as $ } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as $ } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const N = `
3
3
  :host {
4
4
  --ui-field-gap: 8px;
@@ -196,7 +196,7 @@ const N = `
196
196
  --ui-field-description-color: #93a4bd;
197
197
  --ui-field-border-color: #334155;
198
198
  --ui-field-shell-border-color: #334155;
199
- --ui-field-focus-ring: #93c5fd;
199
+ --ui-field-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
200
200
  --ui-field-shadow:
201
201
  0 2px 8px rgba(2, 6, 23, 0.2),
202
202
  0 22px 44px rgba(2, 6, 23, 0.34);
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./ElementBase-DxbvhLJs.js"),A=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./ElementBase-CbUsP3D6.js"),A=`
2
2
  :host {
3
3
  --ui-fieldset-gap: 10px;
4
4
  --ui-fieldset-radius: calc(var(--ui-radius, 6px) + 4px);
@@ -1,4 +1,4 @@
1
- import { E as x } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as x } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const S = `
3
3
  :host {
4
4
  --ui-fieldset-gap: 10px;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("./ElementBase-DxbvhLJs.js"),j=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("./ElementBase-CbUsP3D6.js"),j=`
2
2
  :host {
3
3
  --ui-file-upload-border-color: var(--ui-color-line, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent));
4
4
  --ui-file-upload-border: 1px solid var(--ui-file-upload-border-color);
@@ -1,4 +1,4 @@
1
- import { E as I } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as I } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const M = `
3
3
  :host {
4
4
  --ui-file-upload-border-color: var(--ui-color-line, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent));
package/dist/flex.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),y={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},p=["display","direction","align","justify","wrap","gap","rowgap","columngap"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-CbUsP3D6.js"),y={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},p=["display","direction","align","justify","wrap","gap","rowgap","columngap"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
2
2
  :host {
3
3
  --ui-flex-display: flex;
4
4
  --ui-flex-direction: row;
package/dist/flex.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as g } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as g } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const h = {
3
3
  sm: "var(--ui-breakpoint-sm, 640px)",
4
4
  md: "var(--ui-breakpoint-md, 768px)",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),d=require("./positioner-DZ1FW6A9.js"),c=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-CbUsP3D6.js"),d=require("./positioner-DZ1FW6A9.js"),c=`
2
2
  :host {
3
3
  position: fixed;
4
4
  inset: 0;
@@ -141,7 +141,7 @@
141
141
  --ui-floating-toolbar-color: #f8fafc;
142
142
  --ui-floating-toolbar-muted: #93a4bd;
143
143
  --ui-floating-toolbar-border-color: #334155;
144
- --ui-floating-toolbar-focus-ring: #93c5fd;
144
+ --ui-floating-toolbar-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
145
145
  }
146
146
 
147
147
  :host([tone="success"]) {
@@ -1,4 +1,4 @@
1
- import { E as u } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as u } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  import { e as h } from "./positioner-BE8Nbho2.mjs";
3
3
  const d = `
4
4
  :host {
@@ -143,7 +143,7 @@ const d = `
143
143
  --ui-floating-toolbar-color: #f8fafc;
144
144
  --ui-floating-toolbar-muted: #93a4bd;
145
145
  --ui-floating-toolbar-border-color: #334155;
146
- --ui-floating-toolbar-focus-ring: #93c5fd;
146
+ --ui-floating-toolbar-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
147
147
  }
148
148
 
149
149
  :host([tone="success"]) {
@@ -0,0 +1,177 @@
1
+ const f = [], E = [
2
+ "a[href]",
3
+ "area[href]",
4
+ 'input:not([type="hidden"])',
5
+ "select",
6
+ "textarea",
7
+ "button",
8
+ "iframe",
9
+ "[tabindex]",
10
+ '[contenteditable="true"]'
11
+ ].join(", ");
12
+ function h() {
13
+ const e = f.filter((t) => !t.paused);
14
+ return e.length ? e[e.length - 1] : null;
15
+ }
16
+ function A(e) {
17
+ return !(e.hasAttribute("disabled") || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden") || e.getAttribute("tabindex") === "-1");
18
+ }
19
+ function b(e) {
20
+ if (e instanceof HTMLSlotElement) {
21
+ const n = e.assignedElements({ flatten: !0 });
22
+ return n.length ? n : Array.from(e.children);
23
+ }
24
+ const t = e.shadowRoot;
25
+ return Array.from(t ? t.children : e.children);
26
+ }
27
+ function v(e) {
28
+ return typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
29
+ }
30
+ function a(e) {
31
+ const t = [], n = (r) => {
32
+ if (!(r instanceof HTMLElement)) {
33
+ b(r).forEach(n);
34
+ return;
35
+ }
36
+ r !== e && (r.hasAttribute("hidden") || r.hasAttribute("inert") || r.getAttribute("aria-hidden") === "true") || (r !== e && r.matches(E) && A(r) && v(r) && t.push(r), b(r).forEach(n));
37
+ };
38
+ return n(e), t;
39
+ }
40
+ function m() {
41
+ let e = typeof document < "u" ? document.activeElement : null;
42
+ for (; e?.shadowRoot?.activeElement; ) e = e.shadowRoot.activeElement;
43
+ return e;
44
+ }
45
+ function y(e, t) {
46
+ let n = t;
47
+ for (; n; ) {
48
+ if (n === e) return !0;
49
+ const r = n.assignedSlot;
50
+ if (r) {
51
+ n = r;
52
+ continue;
53
+ }
54
+ n = n.parentNode || (n.host ?? null);
55
+ }
56
+ return !1;
57
+ }
58
+ function d(e) {
59
+ e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
60
+ }
61
+ function F(e) {
62
+ return typeof e == "function" ? e() : e ?? null;
63
+ }
64
+ function u(e) {
65
+ if (!e || !e.isConnected) return !1;
66
+ try {
67
+ return e.focus(), !0;
68
+ } catch {
69
+ return !1;
70
+ }
71
+ }
72
+ function g(e) {
73
+ return e.querySelector(
74
+ '[aria-selected="true"], [data-selected="true"], [selected], [checked], [aria-current="true"]'
75
+ ) || null;
76
+ }
77
+ function w(e) {
78
+ if (!e.options.inertOthers || typeof document > "u" || !document.body) return;
79
+ const t = Array.from(document.body.children);
80
+ e.inerted = t.filter((n) => n !== e.options.node && !n.contains(e.options.node)).map((n) => {
81
+ const r = n.hasAttribute("inert");
82
+ return r || n.setAttribute("inert", ""), { element: n, hadInert: r };
83
+ });
84
+ }
85
+ function L(e) {
86
+ e.inerted.forEach(({ element: t, hadInert: n }) => {
87
+ n || t.removeAttribute("inert");
88
+ }), e.inerted = [];
89
+ }
90
+ function S(e) {
91
+ if (!(e.node instanceof HTMLElement))
92
+ throw new Error("createFocusScope requires a valid HTMLElement node");
93
+ const t = {
94
+ id: /* @__PURE__ */ Symbol("focus-scope"),
95
+ options: {
96
+ trapped: !0,
97
+ loop: !0,
98
+ restoreFocus: !0,
99
+ autoFocus: "first",
100
+ inertOthers: !1,
101
+ ...e
102
+ },
103
+ paused: !1,
104
+ previouslyFocused: m(),
105
+ inerted: [],
106
+ onKeyDown: () => {
107
+ },
108
+ onFocusIn: () => {
109
+ }
110
+ }, n = () => {
111
+ const o = a(t.options.node)[0] || null;
112
+ u(o) || (d(t.options.node), u(t.options.node));
113
+ }, r = () => {
114
+ const o = a(t.options.node), i = o.length ? o[o.length - 1] : null;
115
+ u(i) || (d(t.options.node), u(t.options.node));
116
+ }, c = () => {
117
+ const o = F(t.options.initialFocus);
118
+ if (u(o)) return;
119
+ const i = t.options.autoFocus;
120
+ if (i !== "none") {
121
+ if (i === "container") {
122
+ d(t.options.node), u(t.options.node);
123
+ return;
124
+ }
125
+ if (i === "selected") {
126
+ const s = g(t.options.node);
127
+ if (u(s)) return;
128
+ }
129
+ n();
130
+ }
131
+ };
132
+ return t.onKeyDown = (o) => {
133
+ if (t.paused || h()?.id !== t.id || !t.options.trapped || o.key !== "Tab") return;
134
+ const i = a(t.options.node);
135
+ if (!i.length) {
136
+ o.preventDefault(), c();
137
+ return;
138
+ }
139
+ const s = m();
140
+ if (!s || !y(t.options.node, s)) {
141
+ o.preventDefault(), c();
142
+ return;
143
+ }
144
+ const l = i[0], p = i[i.length - 1];
145
+ if (o.shiftKey) {
146
+ (s === l || s === t.options.node) && (o.preventDefault(), t.options.loop && u(p));
147
+ return;
148
+ }
149
+ s === p && (o.preventDefault(), t.options.loop && u(l));
150
+ }, t.onFocusIn = (o) => {
151
+ if (t.paused || h()?.id !== t.id || !t.options.trapped) return;
152
+ const i = o.target;
153
+ (typeof o.composedPath == "function" ? o.composedPath() : []).includes(t.options.node) || i instanceof Node && (y(t.options.node, i) || c());
154
+ }, f.push(t), w(t), document.addEventListener("keydown", t.onKeyDown, !0), document.addEventListener("focusin", t.onFocusIn, !0), c(), {
155
+ destroy() {
156
+ const o = f.findIndex((s) => s.id === t.id);
157
+ if (o >= 0 && f.splice(o, 1), document.removeEventListener("keydown", t.onKeyDown, !0), document.removeEventListener("focusin", t.onFocusIn, !0), L(t), !t.options.restoreFocus) return;
158
+ const i = F(t.options.finalFocus) || t.previouslyFocused;
159
+ u(i);
160
+ },
161
+ focusFirst: n,
162
+ focusLast: r,
163
+ focusInitial: c,
164
+ pause() {
165
+ t.paused = !0;
166
+ },
167
+ resume() {
168
+ t.paused = !1;
169
+ }
170
+ };
171
+ }
172
+ export {
173
+ S as a,
174
+ y as c,
175
+ m as d,
176
+ a as g
177
+ };
@@ -0,0 +1 @@
1
+ "use strict";const f=[],E=["a[href]","area[href]",'input:not([type="hidden"])',"select","textarea","button","iframe","[tabindex]",'[contenteditable="true"]'].join(", ");function m(){const e=f.filter(t=>!t.paused);return e.length?e[e.length-1]:null}function A(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true"||e.hasAttribute("hidden")||e.getAttribute("tabindex")==="-1")}function y(e){if(e instanceof HTMLSlotElement){const n=e.assignedElements({flatten:!0});return n.length?n:Array.from(e.children)}const t=e.shadowRoot;return Array.from(t?t.children:e.children)}function v(e){return typeof e.checkVisibility=="function"?e.checkVisibility():!0}function a(e){const t=[],n=r=>{if(!(r instanceof HTMLElement)){y(r).forEach(n);return}r!==e&&(r.hasAttribute("hidden")||r.hasAttribute("inert")||r.getAttribute("aria-hidden")==="true")||(r!==e&&r.matches(E)&&A(r)&&v(r)&&t.push(r),y(r).forEach(n))};return n(e),t}function l(){let e=typeof document<"u"?document.activeElement:null;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function p(e,t){let n=t;for(;n;){if(n===e)return!0;const r=n.assignedSlot;if(r){n=r;continue}n=n.parentNode||(n.host??null)}return!1}function d(e){e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1")}function F(e){return typeof e=="function"?e():e??null}function u(e){if(!e||!e.isConnected)return!1;try{return e.focus(),!0}catch{return!1}}function g(e){return e.querySelector('[aria-selected="true"], [data-selected="true"], [selected], [checked], [aria-current="true"]')||null}function w(e){if(!e.options.inertOthers||typeof document>"u"||!document.body)return;const t=Array.from(document.body.children);e.inerted=t.filter(n=>n!==e.options.node&&!n.contains(e.options.node)).map(n=>{const r=n.hasAttribute("inert");return r||n.setAttribute("inert",""),{element:n,hadInert:r}})}function L(e){e.inerted.forEach(({element:t,hadInert:n})=>{n||t.removeAttribute("inert")}),e.inerted=[]}function S(e){if(!(e.node instanceof HTMLElement))throw new Error("createFocusScope requires a valid HTMLElement node");const t={id:Symbol("focus-scope"),options:{trapped:!0,loop:!0,restoreFocus:!0,autoFocus:"first",inertOthers:!1,...e},paused:!1,previouslyFocused:l(),inerted:[],onKeyDown:()=>{},onFocusIn:()=>{}},n=()=>{const o=a(t.options.node)[0]||null;u(o)||(d(t.options.node),u(t.options.node))},r=()=>{const o=a(t.options.node),i=o.length?o[o.length-1]:null;u(i)||(d(t.options.node),u(t.options.node))},c=()=>{const o=F(t.options.initialFocus);if(u(o))return;const i=t.options.autoFocus;if(i!=="none"){if(i==="container"){d(t.options.node),u(t.options.node);return}if(i==="selected"){const s=g(t.options.node);if(u(s))return}n()}};return t.onKeyDown=o=>{if(t.paused||m()?.id!==t.id||!t.options.trapped||o.key!=="Tab")return;const i=a(t.options.node);if(!i.length){o.preventDefault(),c();return}const s=l();if(!s||!p(t.options.node,s)){o.preventDefault(),c();return}const h=i[0],b=i[i.length-1];if(o.shiftKey){(s===h||s===t.options.node)&&(o.preventDefault(),t.options.loop&&u(b));return}s===b&&(o.preventDefault(),t.options.loop&&u(h))},t.onFocusIn=o=>{if(t.paused||m()?.id!==t.id||!t.options.trapped)return;const i=o.target;(typeof o.composedPath=="function"?o.composedPath():[]).includes(t.options.node)||i instanceof Node&&(p(t.options.node,i)||c())},f.push(t),w(t),document.addEventListener("keydown",t.onKeyDown,!0),document.addEventListener("focusin",t.onFocusIn,!0),c(),{destroy(){const o=f.findIndex(s=>s.id===t.id);if(o>=0&&f.splice(o,1),document.removeEventListener("keydown",t.onKeyDown,!0),document.removeEventListener("focusin",t.onFocusIn,!0),L(t),!t.options.restoreFocus)return;const i=F(t.options.finalFocus)||t.previouslyFocused;u(i)},focusFirst:n,focusLast:r,focusInitial:c,pause(){t.paused=!0},resume(){t.paused=!1}}}exports.composedContains=p;exports.createFocusScope=S;exports.deepActiveElement=l;exports.getFocusable=a;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),n=require("./focus-scope-Bwug2gDv.js"),u=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-CbUsP3D6.js"),n=require("./focus-scope-Doz0bnE1.js"),u=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -1,5 +1,5 @@
1
- import { E as r } from "./ElementBase-BeZT54Hj.mjs";
2
- import { c as n } from "./focus-scope-CmEsG5UZ.mjs";
1
+ import { E as r } from "./ElementBase-D5QsC5Vw.mjs";
2
+ import { a as n } from "./focus-scope-Dl0qk5GP.mjs";
3
3
  const c = `
4
4
  :host {
5
5
  display: contents;
@@ -0,0 +1 @@
1
+ "use strict";class h{constructor(t,e){this.host=t,this.options=e,this._default=null,this._dirty=!1,this._restoring=!1,this._formDisabled=!1,this._observer=null,this._queued=!1;let s=null;try{s=typeof t.attachInternals=="function"?t.attachInternals():null}catch{s=null}this.internals=s,this._onUserChange=this._onUserChange.bind(this)}get form(){try{return this.internals?.form??null}catch{return null}}get disabledByForm(){return this._formDisabled}connect(){this._dirty||(this._default=this.host.getAttribute(this.options.defaultAttribute)),this.host.addEventListener("input",this._onUserChange),this.host.addEventListener("change",this._onUserChange),typeof MutationObserver<"u"&&!this._observer&&(this._observer=new MutationObserver(t=>{t.some(e=>e.attributeName===this.options.defaultAttribute)&&!this._dirty&&!this._restoring&&(this._default=this.host.getAttribute(this.options.defaultAttribute)),this.sync()}),this._observer.observe(this.host,{attributes:!0,attributeFilter:[this.options.defaultAttribute,"name","required","disabled",...this.options.observe||[]]})),this.sync()}disconnect(){this.host.removeEventListener("input",this._onUserChange),this.host.removeEventListener("change",this._onUserChange),this._observer?.disconnect(),this._observer=null}formResetCallback(){this._dirty=!1,this._restoring=!0;try{const t=this.options.defaultAttribute;this._default==null?this.host.removeAttribute(t):this.host.setAttribute(t,this._default)}finally{this._restoring=!1}this.sync()}formDisabledCallback(t){this._formDisabled!==t&&(this._formDisabled=t,this.options.onFormDisabled?.(t))}sync(){this._queued||(this._queued=!0,queueMicrotask(()=>{this._queued=!1,this.syncNow()}))}syncNow(){const t=this.internals;if(t)try{const e=this.options.getValue();if(Array.isArray(e)){const n=this.host.getAttribute("name")||"",o=new FormData;n&&e.forEach(a=>o.append(n,a)),t.setFormValue?.(e.length?o:null)}else t.setFormValue?.(e);if(typeof t.setValidity!="function")return;const s=this.options.getValidity?.()||{},i=s.control;i&&i.validity&&!i.validity.valid?t.setValidity(i.validity,i.validationMessage,i):!i&&s.valueMissing?t.setValidity({valueMissing:!0},s.message||"Please fill out this field.",s.anchor||void 0):t.setValidity({})}catch{}}_onUserChange(t){t.target===this.host&&(this._dirty=!0,this.sync())}}function l(r){const t=r.getAttribute("required");return t!=null&&t!=="false"}exports.FormControl=h;exports.isRequired=l;
@@ -0,0 +1,86 @@
1
+ class h {
2
+ constructor(t, e) {
3
+ this.host = t, this.options = e, this._default = null, this._dirty = !1, this._restoring = !1, this._formDisabled = !1, this._observer = null, this._queued = !1;
4
+ let s = null;
5
+ try {
6
+ s = typeof t.attachInternals == "function" ? t.attachInternals() : null;
7
+ } catch {
8
+ s = null;
9
+ }
10
+ this.internals = s, this._onUserChange = this._onUserChange.bind(this);
11
+ }
12
+ get form() {
13
+ try {
14
+ return this.internals?.form ?? null;
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ /** True while a disabled fieldset disables the element (its own `disabled` attribute aside). */
20
+ get disabledByForm() {
21
+ return this._formDisabled;
22
+ }
23
+ /** Call from connectedCallback. */
24
+ connect() {
25
+ this._dirty || (this._default = this.host.getAttribute(this.options.defaultAttribute)), this.host.addEventListener("input", this._onUserChange), this.host.addEventListener("change", this._onUserChange), typeof MutationObserver < "u" && !this._observer && (this._observer = new MutationObserver((t) => {
26
+ t.some((e) => e.attributeName === this.options.defaultAttribute) && !this._dirty && !this._restoring && (this._default = this.host.getAttribute(this.options.defaultAttribute)), this.sync();
27
+ }), this._observer.observe(this.host, {
28
+ attributes: !0,
29
+ attributeFilter: [this.options.defaultAttribute, "name", "required", "disabled", ...this.options.observe || []]
30
+ })), this.sync();
31
+ }
32
+ /** Call from disconnectedCallback. */
33
+ disconnect() {
34
+ this.host.removeEventListener("input", this._onUserChange), this.host.removeEventListener("change", this._onUserChange), this._observer?.disconnect(), this._observer = null;
35
+ }
36
+ formResetCallback() {
37
+ this._dirty = !1, this._restoring = !0;
38
+ try {
39
+ const t = this.options.defaultAttribute;
40
+ this._default == null ? this.host.removeAttribute(t) : this.host.setAttribute(t, this._default);
41
+ } finally {
42
+ this._restoring = !1;
43
+ }
44
+ this.sync();
45
+ }
46
+ formDisabledCallback(t) {
47
+ this._formDisabled !== t && (this._formDisabled = t, this.options.onFormDisabled?.(t));
48
+ }
49
+ /** Re-reads value and validity on the next microtask (several changes usually come together). */
50
+ sync() {
51
+ this._queued || (this._queued = !0, queueMicrotask(() => {
52
+ this._queued = !1, this.syncNow();
53
+ }));
54
+ }
55
+ syncNow() {
56
+ const t = this.internals;
57
+ if (t)
58
+ try {
59
+ const e = this.options.getValue();
60
+ if (Array.isArray(e)) {
61
+ const n = this.host.getAttribute("name") || "", o = new FormData();
62
+ n && e.forEach((a) => o.append(n, a)), t.setFormValue?.(e.length ? o : null);
63
+ } else
64
+ t.setFormValue?.(e);
65
+ if (typeof t.setValidity != "function") return;
66
+ const s = this.options.getValidity?.() || {}, i = s.control;
67
+ i && i.validity && !i.validity.valid ? t.setValidity(i.validity, i.validationMessage, i) : !i && s.valueMissing ? t.setValidity(
68
+ { valueMissing: !0 },
69
+ s.message || "Please fill out this field.",
70
+ s.anchor || void 0
71
+ ) : t.setValidity({});
72
+ } catch {
73
+ }
74
+ }
75
+ _onUserChange(t) {
76
+ t.target === this.host && (this._dirty = !0, this.sync());
77
+ }
78
+ }
79
+ function l(r) {
80
+ const t = r.getAttribute("required");
81
+ return t != null && t !== "false";
82
+ }
83
+ export {
84
+ h as F,
85
+ l as i
86
+ };
package/dist/form.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ElementBase-DxbvhLJs.js");class _{constructor(){this.fields=new Map}registerField(t,e){if(!t)throw new Error("Field must have a name to register with the form");return this.fields.set(t,e),()=>{this.fields.delete(t)}}getValues(){const t={};for(const[e,i]of this.fields)t[e]=i.getValue();return t}setValue(t,e){const i=this.fields.get(t);i&&typeof i.setValue=="function"&&i.setValue(e)}async validateField(t){const e=this.fields.get(t);if(!e)return{valid:!0};if(typeof e.validate=="function"){const i=await e.validate();return e.setError&&e.setError(i.valid?void 0:i.message),i}return{valid:!0}}async validateAll(){const t={};let e=!0;const i=Array.from(this.fields.entries());for(const[r,s]of i){const n=await this.validateField(r);n.valid||(e=!1,t[r]=n.message||"invalid")}return{valid:e,errors:t}}}const v=new Set(["heading","title","description","state-text","loading-text"]),y=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ElementBase-CbUsP3D6.js");class _{constructor(){this.fields=new Map}registerField(t,e){if(!t)throw new Error("Field must have a name to register with the form");return this.fields.set(t,e),()=>{this.fields.delete(t)}}getValues(){const t={};for(const[e,i]of this.fields)t[e]=i.getValue();return t}setValue(t,e){const i=this.fields.get(t);i&&typeof i.setValue=="function"&&i.setValue(e)}async validateField(t){const e=this.fields.get(t);if(!e)return{valid:!0};if(typeof e.validate=="function"){const i=await e.validate();return e.setError&&e.setError(i.valid?void 0:i.message),i}return{valid:!0}}async validateAll(){const t={};let e=!0;const i=Array.from(this.fields.entries());for(const[r,s]of i){const n=await this.validateField(r);n.valid||(e=!1,t[r]=n.message||"invalid")}return{valid:e,errors:t}}}const v=new Set(["heading","title","description","state-text","loading-text"]),y=`
2
2
  :host {
3
3
  --ui-form-gap: 12px;
4
4
  --ui-form-radius: calc(var(--ui-radius, 6px) + 4px);
@@ -198,7 +198,7 @@
198
198
  --ui-form-muted: #93a4bd;
199
199
  --ui-form-border-color: #334155;
200
200
  --ui-form-padding: 16px;
201
- --ui-form-focus-ring: #93c5fd;
201
+ --ui-form-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
202
202
  --ui-form-shadow: var(--shadow-3, 0 4px 12px rgba(2, 6, 23, 0.1));
203
203
  }
204
204
 
package/dist/form.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as p } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as p } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  class g {
3
3
  constructor() {
4
4
  this.fields = /* @__PURE__ */ new Map();
@@ -239,7 +239,7 @@ const _ = /* @__PURE__ */ new Set(["heading", "title", "description", "state-tex
239
239
  --ui-form-muted: #93a4bd;
240
240
  --ui-form-border-color: #334155;
241
241
  --ui-form-padding: 16px;
242
- --ui-form-focus-ring: #93c5fd;
242
+ --ui-form-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
243
243
  --ui-form-shadow: var(--shadow-3, 0 4px 12px rgba(2, 6, 23, 0.1));
244
244
  }
245
245
 
package/dist/gantt.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Ee=require("./ElementBase-DxbvhLJs.js");function H(n,t){const e=new Date(n);return e.setDate(e.getDate()+t),e.setHours(0,0,0,0),e.getTime()}function wt(n,t){return Math.round((t-n)/864e5)}function le(n){const t=new Set(n.map(r=>r.id)),e=new Map;for(const r of n){if(!r.parent||!t.has(r.parent)||r.parent===r.id)continue;const i=e.get(r.parent)||[];i.push(r),e.set(r.parent,i)}return e}function de(n,t){const e=le(n),r=[],i=new Set([t]),a=[t];for(;a.length;)for(const s of e.get(a.shift())||[])i.has(s.id)||(i.add(s.id),r.push(s),a.push(s.id));return r}function Te(n){const t=le(n),e=new Map,r=new Set,i=a=>{const s=e.get(a.id);if(s)return s;const o={start:a.start,end:a.end,progress:a.progress},c=t.get(a.id);if(!c?.length||r.has(a.id))return o;r.add(a.id);let h=1/0,d=-1/0,g=0,u=0;for(const m of c){const p=i(m);if(h=Math.min(h,p.start),d=Math.max(d,p.end),p.progress!=null){const k=Math.max(1,wt(p.start,p.end));g+=k,u+=p.progress*k}}r.delete(a.id);const b={start:h,end:d,progress:g?u/g:void 0};return e.set(a.id,b),b};for(const a of n)i(a);return e}function Bt(n,t){const e=n.type==="e2s"||n.type==="e2e"?t.end:t.start;return{side:n.type==="e2s"||n.type==="s2s"?"start":"end",min:H(e,n.lag)}}function Ae(n,t,e){const r=Bt(n,t);return(r.side==="start"?e.start:e.end)>=r.min}function Le(n,t){const e=new Map(n.map(i=>[i.id,i])),r=new Set;for(const i of t){const a=e.get(i.source),s=e.get(i.target);a&&s&&!Ae(i,a,s)&&r.add(i.id)}return r}function Ie(n,t,e,r=!1){const i=new Map(n.map(u=>[u.id,{start:u.start,end:u.end}]));for(const[u,b]of e)i.has(u)&&i.set(u,{...b});const a=new Map(n.map(u=>[u.id,u])),s=new Map;for(const u of t){const b=s.get(u.source)||[];b.push(u),s.set(u.source,b)}const o=new Set,c=new Map,h=[...e.keys()],d=(u,b)=>{const m=i.get(u);m&&(i.set(u,{start:H(m.start,b),end:H(m.end,b)}),o.add(u))};for(;h.length;){const u=h.shift(),b=i.get(u);if(b)for(const m of s.get(u)||[]){const p=a.get(m.target),k=i.get(m.target);if(!p||!k||p.readonly)continue;const y=Bt(m,b),w=y.side==="start"?k.start:k.end;if(w>=y.min)continue;const x=(c.get(m.target)||0)+1;if(x>n.length)continue;c.set(m.target,x);const M=wt(w,y.min);if(d(m.target,M),h.push(m.target),r)for(const T of de(n,m.target))T.readonly||(d(T.id,M),h.push(T.id))}}const g=[];for(const u of o){const b=i.get(u),m=e.get(u);(!m||m.start!==b.start||m.end!==b.end)&&g.push({id:u,...b})}return g}function ze(n,t){const e=new Set(n.map(p=>p.parent).filter(p=>!!p)),r=new Map(n.filter(p=>!e.has(p.id)).map(p=>[p.id,p])),i=t.filter(p=>r.has(p.source)&&r.has(p.target)&&p.source!==p.target);if(!i.length)return new Set;const a=p=>wt(p.start,p.end),s=Math.max(...[...r.values()].map(p=>p.end)),o=new Map,c=new Map;for(const p of i)o.set(p.source,[...o.get(p.source)||[],p]),c.set(p.target,[...c.get(p.target)||[],p]);const h=new Map([...r.keys()].map(p=>[p,s])),d=new Map([...r.keys()].map(p=>[p,(o.get(p)||[]).length])),g=[...r.keys()].filter(p=>d.get(p)===0),u=new Set;for(;g.length;){const p=g.shift();u.add(p);const k=r.get(p),y=h.get(p),w=H(y,-a(k));for(const x of c.get(p)||[]){const M=r.get(x.source),T=-x.lag,z=x.type==="e2s"?H(w,T):x.type==="s2s"?H(H(w,T),a(M)):x.type==="e2e"?H(y,T):H(H(y,T),a(M));h.set(x.source,Math.min(h.get(x.source),z));const U=d.get(x.source)-1;d.set(x.source,U),U===0&&g.push(x.source)}}const b=new Set;for(const p of i){const k=r.get(p.source),y=r.get(p.target),w=Bt(p,k);(w.side==="start"?y.start:y.end)===w.min&&b.add(p.target)}const m=new Set;for(const p of u){const k=r.get(p),y=(o.get(p)||[]).length+(c.get(p)||[]).length>0,w=wt(k.end,h.get(p));y&&w<=0&&(!(c.get(p)||[]).length||b.has(p))&&m.add(p)}return m}const D=1440*60*1e3,S=42,N=62,Tt=376,ce="minmax(170px, 1fr) 82px 80px 44px",Ce=640,De=148,Fe=2,vt=28,Re=15,he=Re*Math.SQRT2/2,Jt={day:36,week:13,month:4.4,quarter:2.2,year:1.15},Gt=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Ee=require("./ElementBase-CbUsP3D6.js");function H(n,t){const e=new Date(n);return e.setDate(e.getDate()+t),e.setHours(0,0,0,0),e.getTime()}function wt(n,t){return Math.round((t-n)/864e5)}function le(n){const t=new Set(n.map(r=>r.id)),e=new Map;for(const r of n){if(!r.parent||!t.has(r.parent)||r.parent===r.id)continue;const i=e.get(r.parent)||[];i.push(r),e.set(r.parent,i)}return e}function de(n,t){const e=le(n),r=[],i=new Set([t]),a=[t];for(;a.length;)for(const s of e.get(a.shift())||[])i.has(s.id)||(i.add(s.id),r.push(s),a.push(s.id));return r}function Te(n){const t=le(n),e=new Map,r=new Set,i=a=>{const s=e.get(a.id);if(s)return s;const o={start:a.start,end:a.end,progress:a.progress},c=t.get(a.id);if(!c?.length||r.has(a.id))return o;r.add(a.id);let h=1/0,d=-1/0,g=0,u=0;for(const m of c){const p=i(m);if(h=Math.min(h,p.start),d=Math.max(d,p.end),p.progress!=null){const k=Math.max(1,wt(p.start,p.end));g+=k,u+=p.progress*k}}r.delete(a.id);const b={start:h,end:d,progress:g?u/g:void 0};return e.set(a.id,b),b};for(const a of n)i(a);return e}function Bt(n,t){const e=n.type==="e2s"||n.type==="e2e"?t.end:t.start;return{side:n.type==="e2s"||n.type==="s2s"?"start":"end",min:H(e,n.lag)}}function Ae(n,t,e){const r=Bt(n,t);return(r.side==="start"?e.start:e.end)>=r.min}function Le(n,t){const e=new Map(n.map(i=>[i.id,i])),r=new Set;for(const i of t){const a=e.get(i.source),s=e.get(i.target);a&&s&&!Ae(i,a,s)&&r.add(i.id)}return r}function Ie(n,t,e,r=!1){const i=new Map(n.map(u=>[u.id,{start:u.start,end:u.end}]));for(const[u,b]of e)i.has(u)&&i.set(u,{...b});const a=new Map(n.map(u=>[u.id,u])),s=new Map;for(const u of t){const b=s.get(u.source)||[];b.push(u),s.set(u.source,b)}const o=new Set,c=new Map,h=[...e.keys()],d=(u,b)=>{const m=i.get(u);m&&(i.set(u,{start:H(m.start,b),end:H(m.end,b)}),o.add(u))};for(;h.length;){const u=h.shift(),b=i.get(u);if(b)for(const m of s.get(u)||[]){const p=a.get(m.target),k=i.get(m.target);if(!p||!k||p.readonly)continue;const y=Bt(m,b),w=y.side==="start"?k.start:k.end;if(w>=y.min)continue;const x=(c.get(m.target)||0)+1;if(x>n.length)continue;c.set(m.target,x);const M=wt(w,y.min);if(d(m.target,M),h.push(m.target),r)for(const T of de(n,m.target))T.readonly||(d(T.id,M),h.push(T.id))}}const g=[];for(const u of o){const b=i.get(u),m=e.get(u);(!m||m.start!==b.start||m.end!==b.end)&&g.push({id:u,...b})}return g}function ze(n,t){const e=new Set(n.map(p=>p.parent).filter(p=>!!p)),r=new Map(n.filter(p=>!e.has(p.id)).map(p=>[p.id,p])),i=t.filter(p=>r.has(p.source)&&r.has(p.target)&&p.source!==p.target);if(!i.length)return new Set;const a=p=>wt(p.start,p.end),s=Math.max(...[...r.values()].map(p=>p.end)),o=new Map,c=new Map;for(const p of i)o.set(p.source,[...o.get(p.source)||[],p]),c.set(p.target,[...c.get(p.target)||[],p]);const h=new Map([...r.keys()].map(p=>[p,s])),d=new Map([...r.keys()].map(p=>[p,(o.get(p)||[]).length])),g=[...r.keys()].filter(p=>d.get(p)===0),u=new Set;for(;g.length;){const p=g.shift();u.add(p);const k=r.get(p),y=h.get(p),w=H(y,-a(k));for(const x of c.get(p)||[]){const M=r.get(x.source),T=-x.lag,z=x.type==="e2s"?H(w,T):x.type==="s2s"?H(H(w,T),a(M)):x.type==="e2e"?H(y,T):H(H(y,T),a(M));h.set(x.source,Math.min(h.get(x.source),z));const U=d.get(x.source)-1;d.set(x.source,U),U===0&&g.push(x.source)}}const b=new Set;for(const p of i){const k=r.get(p.source),y=r.get(p.target),w=Bt(p,k);(w.side==="start"?y.start:y.end)===w.min&&b.add(p.target)}const m=new Set;for(const p of u){const k=r.get(p),y=(o.get(p)||[]).length+(c.get(p)||[]).length>0,w=wt(k.end,h.get(p));y&&w<=0&&(!(c.get(p)||[]).length||b.has(p))&&m.add(p)}return m}const D=1440*60*1e3,S=42,N=62,Tt=376,ce="minmax(170px, 1fr) 82px 80px 44px",Ce=640,De=148,Fe=2,vt=28,Re=15,he=Re*Math.SQRT2/2,Jt={day:36,week:13,month:4.4,quarter:2.2,year:1.15},Gt=`
2
2
  :host {
3
3
  --ui-gantt-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
4
4
  --ui-gantt-panel: var(--ui-color-surface, #ffffff);
@@ -992,7 +992,7 @@
992
992
  --ui-gantt-text: #e2e8f0;
993
993
  --ui-gantt-muted: #93a4bd;
994
994
  --ui-gantt-accent: #60a5fa;
995
- --ui-gantt-accent-text: #93c5fd;
995
+ --ui-gantt-accent-text: var(--ui-color-accent-on-dark, #93c5fd);
996
996
  --ui-gantt-selected: rgba(96, 165, 250, 0.13);
997
997
  }
998
998
 
package/dist/gantt.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as Se } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as Se } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  function O(n, t) {
3
3
  const e = new Date(n);
4
4
  return e.setDate(e.getDate() + t), e.setHours(0, 0, 0, 0), e.getTime();
@@ -1126,7 +1126,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
1126
1126
  --ui-gantt-text: #e2e8f0;
1127
1127
  --ui-gantt-muted: #93a4bd;
1128
1128
  --ui-gantt-accent: #60a5fa;
1129
- --ui-gantt-accent-text: #93c5fd;
1129
+ --ui-gantt-accent-text: var(--ui-color-accent-on-dark, #93c5fd);
1130
1130
  --ui-gantt-selected: rgba(96, 165, 250, 0.13);
1131
1131
  }
1132
1132
 
package/dist/grid.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-DxbvhLJs.js"),w={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},g=["display","columns","rows","gap","rowgap","columngap","autoflow","autorows","autocolumns","align","justify","place","aligncontent","justifycontent","placecontent"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-CbUsP3D6.js"),w={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},g=["display","columns","rows","gap","rowgap","columngap","autoflow","autorows","autocolumns","align","justify","place","aligncontent","justifycontent","placecontent"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
2
2
  :host {
3
3
  --ui-grid-display: grid;
4
4
  --ui-grid-columns: 1fr;
package/dist/grid.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as h } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as h } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  const y = {
3
3
  sm: "var(--ui-breakpoint-sm, 640px)",
4
4
  md: "var(--ui-breakpoint-md, 768px)",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-DxbvhLJs.js"),p=require("./positioner-DZ1FW6A9.js"),v=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./ElementBase-CbUsP3D6.js"),h=require("./number-attribute-C4Rrl7d3.js"),v=require("./positioner-DZ1FW6A9.js"),f=`
2
2
  :host {
3
3
  --ui-hover-card-z: 1700;
4
4
  --ui-hover-card-radius: var(--base-card-radius, calc(var(--ui-radius, 6px) + 2px));
@@ -145,7 +145,7 @@
145
145
  --ui-hover-card-bg: #0f172a;
146
146
  --ui-hover-card-color: #e2e8f0;
147
147
  --ui-hover-card-border-color: #334155;
148
- --ui-hover-card-focus-ring: #93c5fd;
148
+ --ui-hover-card-focus-ring: var(--ui-color-accent-on-dark, #93c5fd);
149
149
  --ui-hover-card-shadow:
150
150
  0 2px 8px rgba(2, 6, 23, 0.24),
151
151
  0 30px 62px rgba(2, 6, 23, 0.4);
@@ -262,8 +262,8 @@
262
262
  box-shadow: none;
263
263
  }
264
264
  }
265
- `;function f(i){return i==="top"||i==="left"||i==="right"?i:"bottom"}class l extends u.ElementBase{constructor(){super(),this._openTimer=null,this._closeTimer=null,this._positionRaf=null,this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._isOpen=!1,this._globalListenersBound=!1,this._onPointerEnter=this._onPointerEnter.bind(this),this._onPointerLeave=this._onPointerLeave.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onDocumentPointerDown=this._onDocumentPointerDown.bind(this),this._onViewportChange=this._onViewportChange.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["open","headless","delay","close-delay","placement","offset","variant","tone","density","shape","elevation"]}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this._onPointerEnter),this.addEventListener("pointerleave",this._onPointerLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("slotchange",this._onSlotChange),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("pointerenter",this._onPointerEnter),this.removeEventListener("pointerleave",this._onPointerLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("slotchange",this._onSlotChange),this._unbindGlobalListeners(),this._clearTimers(),this._positionRaf!=null&&(cancelAnimationFrame(this._positionRaf),this._positionRaf=null),this._positioner?.destroy(),this._positioner=null,super.disconnectedCallback()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"||e==="headless"){this._syncOpenState();return}this._isOpen&&(e==="placement"||e==="offset"||e==="density"||e==="shape")&&this._schedulePosition()}}get open(){return this.hasAttribute("open")}set open(e){e?this.setAttribute("open",""):this.removeAttribute("open")}get delay(){const e=Number(this.getAttribute("delay"));return Number.isFinite(e)&&e>=0?e:120}set delay(e){this.setAttribute("delay",String(e))}get closeDelay(){const e=Number(this.getAttribute("close-delay"));return Number.isFinite(e)&&e>=0?e:this.delay}set closeDelay(e){this.setAttribute("close-delay",String(e))}_onSlotChange(){this._isOpen&&this._schedulePosition()}_getPanel(){return this.root.querySelector(".panel")}_getAnchor(){const e=this.querySelector('[slot="trigger"]');return e||Array.from(this.children).find(r=>r instanceof HTMLElement?!r.hasAttribute("slot")||r.getAttribute("slot")==="trigger":!1)||this}_isNodeWithinComponent(e){return e?!!(e===this||this.contains(e)||this.root.contains(e)):!1}_clearTimers(){this._openTimer!=null&&(window.clearTimeout(this._openTimer),this._openTimer=null),this._closeTimer!=null&&(window.clearTimeout(this._closeTimer),this._closeTimer=null)}_scheduleOpen(e){this._clearTimers(),this._openTimer=window.setTimeout(()=>{this._openTimer=null,this.open=!0},Math.max(0,e))}_scheduleClose(e){this._clearTimers(),this._closeTimer=window.setTimeout(()=>{this._closeTimer=null,this.open=!1},Math.max(0,e))}_onPointerEnter(){if(!this.hasAttribute("headless")){if(this._isOpen){this._clearTimers();return}this._scheduleOpen(this.delay)}}_onPointerLeave(e){const t=e.relatedTarget;this._isNodeWithinComponent(t)||this._scheduleClose(this.closeDelay)}_onFocusIn(){this.hasAttribute("headless")||(this._clearTimers(),this.open=!0)}_onFocusOut(e){const t=e.relatedTarget;this._isNodeWithinComponent(t)||this._scheduleClose(this.closeDelay)}_onKeyDown(e){if(!this._isOpen||e.key!=="Escape")return;e.preventDefault(),this.open=!1;const t=this._getAnchor();try{t.focus()}catch{}}_onDocumentPointerDown(e){!this._isOpen||e.composedPath().includes(this)||(this.open=!1)}_onViewportChange(){this._isOpen&&this._schedulePosition()}_syncOpenState(){const e=this.hasAttribute("open")&&!this.hasAttribute("headless");if(e===this._isOpen){this._syncPanelA11y(),e?(this._bindGlobalListeners(),this._schedulePosition()):this._unbindGlobalListeners();return}this._isOpen=e,this._syncPanelA11y();const t=this._getPanel();if(e){this._bindGlobalListeners(),t&&t.setAttribute("data-ready","false"),this.dispatchEvent(new CustomEvent("open",{bubbles:!0})),this.dispatchEvent(new CustomEvent("show",{bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{open:!0}})),this._schedulePosition();return}this._unbindGlobalListeners(),this._clearTimers(),this._positionRaf!=null&&(cancelAnimationFrame(this._positionRaf),this._positionRaf=null),this._positioner?.destroy(),this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,t&&t.setAttribute("data-ready","false"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0})),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{open:!1}}))}_syncPanelA11y(){const e=this._getPanel();if(!e)return;e.setAttribute("aria-hidden",this._isOpen?"false":"true"),this._isOpen||e.setAttribute("data-ready","false");const t=this.querySelector('[slot="trigger"]'),r=this.querySelector('[slot="card"] :is(h1, h2, h3, h4, h5, h6, strong)'),o=(this.getAttribute("aria-label")||this.getAttribute("label")||"").trim()||(t?.getAttribute("aria-label")||t?.textContent||"").trim()||(r?.textContent||"").trim()||"Details";e.setAttribute("aria-label",o)}_bindGlobalListeners(){this._globalListenersBound||(document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),window.addEventListener("resize",this._onViewportChange),window.addEventListener("scroll",this._onViewportChange,{passive:!0,capture:!0}),this._globalListenersBound=!0)}_unbindGlobalListeners(){this._globalListenersBound&&(document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),window.removeEventListener("resize",this._onViewportChange),window.removeEventListener("scroll",this._onViewportChange,!0),this._globalListenersBound=!1)}_schedulePosition(){this._isOpen&&(this._positionRaf!=null&&cancelAnimationFrame(this._positionRaf),this._positionRaf=requestAnimationFrame(()=>{this._positionRaf=null,this._positionPanel()}))}_positionPanel(){const e=this._getPanel();if(!e||!this._isOpen)return;const t=this._getAnchor();if(!t||!t.isConnected){this.open=!1;return}const r=t.getBoundingClientRect();if(r.width===0&&r.height===0){this.open=!1;return}const o=Number(this.getAttribute("offset")),s=Number.isFinite(o)?o:10,a=f(this.getAttribute("placement")),c=e.querySelector(".arrow");if(!this._positioner||this._positionerPlacement!==a||this._positionerOffset!==s){this._positioner?.destroy(),this._positioner=p.createPositioner({anchor:t,floating:e,placement:a,strategy:"fixed",offset:s,flip:!0,shift:!0,boundaryPadding:8,arrow:c,observeWindowResize:!1,observeScroll:!1,observeAncestorScroll:!1,observeAncestorResize:!1,observeLayoutShift:!1,observeAnchorResize:!1,observeFloatingResize:!1,onUpdate:h=>{const d=h.placement.split("-")[0];e.setAttribute("data-placement",d);const n=h.middlewareData?.arrow;typeof n?.x=="number"&&e.style.setProperty("--ui-hover-card-arrow-x",`${Math.round(n.x)}px`),typeof n?.y=="number"&&e.style.setProperty("--ui-hover-card-arrow-y",`${Math.round(n.y)}px`),e.setAttribute("data-ready","true")}}),this._positionerPlacement=a,this._positionerOffset=s;return}this._positioner?.update()}render(){this.setContent(`
266
- <style>${v}</style>
265
+ `;function b(i){return i==="top"||i==="left"||i==="right"?i:"bottom"}class c extends p.ElementBase{constructor(){super(),this._openTimer=null,this._closeTimer=null,this._positionRaf=null,this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._isOpen=!1,this._globalListenersBound=!1,this._onPointerEnter=this._onPointerEnter.bind(this),this._onPointerLeave=this._onPointerLeave.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onDocumentPointerDown=this._onDocumentPointerDown.bind(this),this._onViewportChange=this._onViewportChange.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["open","headless","delay","close-delay","placement","offset","variant","tone","density","shape","elevation"]}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this._onPointerEnter),this.addEventListener("pointerleave",this._onPointerLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("slotchange",this._onSlotChange),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("pointerenter",this._onPointerEnter),this.removeEventListener("pointerleave",this._onPointerLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("slotchange",this._onSlotChange),this._unbindGlobalListeners(),this._clearTimers(),this._positionRaf!=null&&(cancelAnimationFrame(this._positionRaf),this._positionRaf=null),this._positioner?.destroy(),this._positioner=null,super.disconnectedCallback()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"||e==="headless"){this._syncOpenState();return}this._isOpen&&(e==="placement"||e==="offset"||e==="density"||e==="shape")&&this._schedulePosition()}}get open(){return this.hasAttribute("open")}set open(e){e?this.setAttribute("open",""):this.removeAttribute("open")}get delay(){const e=h.numberAttribute(this.getAttribute("delay"),120);return Number.isFinite(e)&&e>=0?e:120}set delay(e){this.setAttribute("delay",String(e))}get closeDelay(){const e=h.numberAttribute(this.getAttribute("close-delay"),Number.NaN);return Number.isFinite(e)&&e>=0?e:this.delay}set closeDelay(e){this.setAttribute("close-delay",String(e))}_onSlotChange(){this._isOpen&&this._schedulePosition()}_getPanel(){return this.root.querySelector(".panel")}_getAnchor(){const e=this.querySelector('[slot="trigger"]');return e||Array.from(this.children).find(r=>r instanceof HTMLElement?!r.hasAttribute("slot")||r.getAttribute("slot")==="trigger":!1)||this}_isNodeWithinComponent(e){return e?!!(e===this||this.contains(e)||this.root.contains(e)):!1}_clearTimers(){this._openTimer!=null&&(window.clearTimeout(this._openTimer),this._openTimer=null),this._closeTimer!=null&&(window.clearTimeout(this._closeTimer),this._closeTimer=null)}_scheduleOpen(e){this._clearTimers(),this._openTimer=window.setTimeout(()=>{this._openTimer=null,this.open=!0},Math.max(0,e))}_scheduleClose(e){this._clearTimers(),this._closeTimer=window.setTimeout(()=>{this._closeTimer=null,this.open=!1},Math.max(0,e))}_onPointerEnter(){if(!this.hasAttribute("headless")){if(this._isOpen){this._clearTimers();return}this._scheduleOpen(this.delay)}}_onPointerLeave(e){const t=e.relatedTarget;this._isNodeWithinComponent(t)||this._scheduleClose(this.closeDelay)}_onFocusIn(){this.hasAttribute("headless")||(this._clearTimers(),this.open=!0)}_onFocusOut(e){const t=e.relatedTarget;this._isNodeWithinComponent(t)||this._scheduleClose(this.closeDelay)}_onKeyDown(e){if(!this._isOpen||e.key!=="Escape")return;e.preventDefault(),this.open=!1;const t=this._getAnchor();try{t.focus()}catch{}}_onDocumentPointerDown(e){!this._isOpen||e.composedPath().includes(this)||(this.open=!1)}_onViewportChange(){this._isOpen&&this._schedulePosition()}_syncOpenState(){const e=this.hasAttribute("open")&&!this.hasAttribute("headless");if(e===this._isOpen){this._syncPanelA11y(),e?(this._bindGlobalListeners(),this._schedulePosition()):this._unbindGlobalListeners();return}this._isOpen=e,this._syncPanelA11y();const t=this._getPanel();if(e){this._bindGlobalListeners(),t&&t.setAttribute("data-ready","false"),this.dispatchEvent(new CustomEvent("open",{bubbles:!0})),this.dispatchEvent(new CustomEvent("show",{bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{open:!0}})),this._schedulePosition();return}this._unbindGlobalListeners(),this._clearTimers(),this._positionRaf!=null&&(cancelAnimationFrame(this._positionRaf),this._positionRaf=null),this._positioner?.destroy(),this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,t&&t.setAttribute("data-ready","false"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0})),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{open:!1}}))}_syncPanelA11y(){const e=this._getPanel();if(!e)return;e.setAttribute("aria-hidden",this._isOpen?"false":"true"),this._isOpen||e.setAttribute("data-ready","false");const t=this.querySelector('[slot="trigger"]'),r=this.querySelector('[slot="card"] :is(h1, h2, h3, h4, h5, h6, strong)'),o=(this.getAttribute("aria-label")||this.getAttribute("label")||"").trim()||(t?.getAttribute("aria-label")||t?.textContent||"").trim()||(r?.textContent||"").trim()||"Details";e.setAttribute("aria-label",o)}_bindGlobalListeners(){this._globalListenersBound||(document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),window.addEventListener("resize",this._onViewportChange),window.addEventListener("scroll",this._onViewportChange,{passive:!0,capture:!0}),this._globalListenersBound=!0)}_unbindGlobalListeners(){this._globalListenersBound&&(document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),window.removeEventListener("resize",this._onViewportChange),window.removeEventListener("scroll",this._onViewportChange,!0),this._globalListenersBound=!1)}_schedulePosition(){this._isOpen&&(this._positionRaf!=null&&cancelAnimationFrame(this._positionRaf),this._positionRaf=requestAnimationFrame(()=>{this._positionRaf=null,this._positionPanel()}))}_positionPanel(){const e=this._getPanel();if(!e||!this._isOpen)return;const t=this._getAnchor();if(!t||!t.isConnected){this.open=!1;return}const r=t.getBoundingClientRect();if(r.width===0&&r.height===0){this.open=!1;return}const o=h.numberAttribute(this.getAttribute("offset"),10),s=Number.isFinite(o)?o:10,a=b(this.getAttribute("placement")),d=e.querySelector(".arrow");if(!this._positioner||this._positionerPlacement!==a||this._positionerOffset!==s){this._positioner?.destroy(),this._positioner=v.createPositioner({anchor:t,floating:e,placement:a,strategy:"fixed",offset:s,flip:!0,shift:!0,boundaryPadding:8,arrow:d,observeWindowResize:!1,observeScroll:!1,observeAncestorScroll:!1,observeAncestorResize:!1,observeLayoutShift:!1,observeAnchorResize:!1,observeFloatingResize:!1,onUpdate:l=>{const u=l.placement.split("-")[0];e.setAttribute("data-placement",u);const n=l.middlewareData?.arrow;typeof n?.x=="number"&&e.style.setProperty("--ui-hover-card-arrow-x",`${Math.round(n.x)}px`),typeof n?.y=="number"&&e.style.setProperty("--ui-hover-card-arrow-y",`${Math.round(n.y)}px`),e.setAttribute("data-ready","true")}}),this._positionerPlacement=a,this._positionerOffset=s;return}this._positioner?.update()}render(){this.setContent(`
266
+ <style>${f}</style>
267
267
  <div class="anchor" part="anchor">
268
268
  <slot name="trigger"></slot>
269
269
  <slot></slot>
@@ -281,4 +281,4 @@
281
281
  <div class="arrow" part="arrow" aria-hidden="true"></div>
282
282
  <div class="panel-body" part="body"><slot name="card"></slot></div>
283
283
  </div>
284
- `),this._syncPanelA11y(),this._isOpen&&this._schedulePosition()}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-hover-card")&&customElements.define("ui-hover-card",l);exports.UIHoverCard=l;
284
+ `),this._syncPanelA11y(),this._isOpen&&this._schedulePosition()}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-hover-card")&&customElements.define("ui-hover-card",c);exports.UIHoverCard=c;