@editora/ui-core 0.1.21 → 0.1.23

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 (348) hide show
  1. package/README.md +292 -221
  2. package/dist/{ElementBase-YlTLMsGk.mjs → ElementBase-BeZT54Hj.mjs} +3 -2
  3. package/dist/ElementBase-DxbvhLJs.js +1 -0
  4. package/dist/ElementBase.d.ts +2 -1
  5. package/dist/ElementBase.d.ts.map +1 -1
  6. package/dist/__tests__/setup.d.ts +0 -2
  7. package/dist/__tests__/setup.d.ts.map +1 -1
  8. package/dist/accordion.cjs.js +4 -4
  9. package/dist/accordion.esm.js +4 -4
  10. package/dist/alert-dialog.cjs.js +32 -32
  11. package/dist/alert-dialog.esm.js +95 -75
  12. package/dist/alert.cjs.js +7 -7
  13. package/dist/alert.esm.js +7 -7
  14. package/dist/anchor.cjs.js +3 -3
  15. package/dist/anchor.esm.js +6 -5
  16. package/dist/animated-beam.cjs.js +1 -1
  17. package/dist/animated-beam.esm.js +1 -1
  18. package/dist/animated-list.cjs.js +5 -5
  19. package/dist/animated-list.esm.js +5 -5
  20. package/dist/animated-text.cjs.js +5 -5
  21. package/dist/animated-text.esm.js +5 -5
  22. package/dist/app-header.cjs.js +4 -4
  23. package/dist/app-header.esm.js +4 -4
  24. package/dist/aspect-ratio.cjs.js +4 -4
  25. package/dist/aspect-ratio.esm.js +4 -4
  26. package/dist/avatar.cjs.js +14 -14
  27. package/dist/avatar.esm.js +31 -29
  28. package/dist/badge.cjs.js +5 -5
  29. package/dist/badge.esm.js +5 -5
  30. package/dist/block-controls.cjs.js +5 -5
  31. package/dist/block-controls.esm.js +5 -5
  32. package/dist/box.cjs.js +3 -3
  33. package/dist/box.esm.js +3 -3
  34. package/dist/breadcrumb.cjs.js +6 -6
  35. package/dist/breadcrumb.esm.js +6 -6
  36. package/dist/button.cjs.js +1 -1
  37. package/dist/button.esm.js +1 -1
  38. package/dist/{calendar-DLY4acgn.mjs → calendar-B3PUKHQm.mjs} +227 -183
  39. package/dist/{calendar-Dkof-FTK.js → calendar-D-mXMgqc.js} +74 -35
  40. package/dist/calendar.cjs.js +1 -1
  41. package/dist/calendar.esm.js +1 -1
  42. package/dist/card.cjs.js +8 -8
  43. package/dist/card.esm.js +63 -20
  44. package/dist/chart.cjs.js +5 -5
  45. package/dist/chart.esm.js +7 -7
  46. package/dist/checkbox.cjs.js +3 -3
  47. package/dist/checkbox.esm.js +3 -3
  48. package/dist/collapsible.cjs.js +8 -8
  49. package/dist/collapsible.esm.js +8 -8
  50. package/dist/collection.cjs.js +1 -1
  51. package/dist/collection.esm.js +9 -8
  52. package/dist/color-picker.cjs.js +30 -10
  53. package/dist/color-picker.esm.js +84 -62
  54. package/dist/combobox.cjs.js +29 -27
  55. package/dist/combobox.esm.js +51 -45
  56. package/dist/command-palette.cjs.js +1 -1
  57. package/dist/command-palette.esm.js +1 -1
  58. package/dist/command.cjs.js +2 -2
  59. package/dist/command.esm.js +3 -3
  60. package/dist/components/ui-alert-dialog.d.ts +1 -0
  61. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  62. package/dist/components/ui-anchor.d.ts +2 -1
  63. package/dist/components/ui-anchor.d.ts.map +1 -1
  64. package/dist/components/ui-avatar.d.ts +1 -0
  65. package/dist/components/ui-avatar.d.ts.map +1 -1
  66. package/dist/components/ui-button.d.ts +1 -0
  67. package/dist/components/ui-button.d.ts.map +1 -1
  68. package/dist/components/ui-calendar.d.ts.map +1 -1
  69. package/dist/components/ui-card.d.ts +3 -0
  70. package/dist/components/ui-card.d.ts.map +1 -1
  71. package/dist/components/ui-checkbox.d.ts.map +1 -1
  72. package/dist/components/ui-collection.d.ts +2 -1
  73. package/dist/components/ui-collection.d.ts.map +1 -1
  74. package/dist/components/ui-color-picker.d.ts.map +1 -1
  75. package/dist/components/ui-combobox.d.ts.map +1 -1
  76. package/dist/components/ui-data-table.d.ts.map +1 -1
  77. package/dist/components/ui-date-field.d.ts.map +1 -1
  78. package/dist/components/ui-date-picker.d.ts.map +1 -1
  79. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  80. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  81. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  82. package/dist/components/ui-dock.d.ts +1 -0
  83. package/dist/components/ui-dock.d.ts.map +1 -1
  84. package/dist/components/ui-drawer.d.ts.map +1 -1
  85. package/dist/components/ui-dropdown.d.ts.map +1 -1
  86. package/dist/components/ui-field.d.ts.map +1 -1
  87. package/dist/components/ui-file-upload.d.ts.map +1 -1
  88. package/dist/components/ui-form.d.ts +1 -0
  89. package/dist/components/ui-form.d.ts.map +1 -1
  90. package/dist/components/ui-gantt.d.ts.map +1 -1
  91. package/dist/components/ui-input.d.ts.map +1 -1
  92. package/dist/components/ui-menu.d.ts.map +1 -1
  93. package/dist/components/ui-multi-select.d.ts.map +1 -1
  94. package/dist/components/ui-number-field.d.ts.map +1 -1
  95. package/dist/components/ui-password-field.d.ts.map +1 -1
  96. package/dist/components/ui-pin-input.d.ts +1 -0
  97. package/dist/components/ui-pin-input.d.ts.map +1 -1
  98. package/dist/components/ui-placement-grid.d.ts.map +1 -1
  99. package/dist/components/ui-progress.d.ts.map +1 -1
  100. package/dist/components/ui-radio.d.ts.map +1 -1
  101. package/dist/components/ui-rating.d.ts +1 -0
  102. package/dist/components/ui-rating.d.ts.map +1 -1
  103. package/dist/components/ui-roving-focus-group.d.ts +2 -1
  104. package/dist/components/ui-roving-focus-group.d.ts.map +1 -1
  105. package/dist/components/ui-select.d.ts.map +1 -1
  106. package/dist/components/ui-sortable.d.ts.map +1 -1
  107. package/dist/components/ui-switch.d.ts.map +1 -1
  108. package/dist/components/ui-table.d.ts.map +1 -1
  109. package/dist/components/ui-tabs.d.ts +1 -0
  110. package/dist/components/ui-tabs.d.ts.map +1 -1
  111. package/dist/components/ui-tags-input.d.ts +1 -0
  112. package/dist/components/ui-tags-input.d.ts.map +1 -1
  113. package/dist/components/ui-textarea.d.ts.map +1 -1
  114. package/dist/components/ui-time-field.d.ts.map +1 -1
  115. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  116. package/dist/components/ui-toggle.d.ts.map +1 -1
  117. package/dist/components/ui-tree.d.ts.map +1 -1
  118. package/dist/components/ui-wizard.d.ts.map +1 -1
  119. package/dist/container.cjs.js +1 -1
  120. package/dist/container.esm.js +1 -1
  121. package/dist/context-menu.cjs.js +3 -3
  122. package/dist/context-menu.esm.js +5 -5
  123. package/dist/control-group.cjs.js +1 -1
  124. package/dist/control-group.esm.js +1 -1
  125. package/dist/control-name-BmoI1m3a.js +1 -0
  126. package/dist/control-name-Bpj7F34X.mjs +48 -0
  127. package/dist/data-table.cjs.js +6 -3
  128. package/dist/data-table.esm.js +146 -143
  129. package/dist/date-field.cjs.js +5 -5
  130. package/dist/date-field.esm.js +34 -31
  131. package/dist/date-picker.cjs.js +16 -16
  132. package/dist/date-picker.esm.js +49 -45
  133. package/dist/date-range-picker.cjs.js +5 -5
  134. package/dist/date-range-picker.esm.js +120 -118
  135. package/dist/date-range-time-picker.cjs.js +22 -22
  136. package/dist/date-range-time-picker.esm.js +89 -85
  137. package/dist/date-time-picker.cjs.js +23 -23
  138. package/dist/date-time-picker.esm.js +103 -99
  139. package/dist/{date-time-utils-y1N2gvG2.mjs → date-time-utils-BTlxnz5j.mjs} +1 -1
  140. package/dist/{date-time-utils-Dmost5Ee.js → date-time-utils-y3AvNvGe.js} +1 -1
  141. package/dist/description.cjs.js +4 -4
  142. package/dist/description.esm.js +4 -4
  143. package/dist/dialog.cjs.js +3 -3
  144. package/dist/dialog.esm.js +3 -3
  145. package/dist/direction-provider.cjs.js +1 -1
  146. package/dist/direction-provider.esm.js +1 -1
  147. package/dist/dismissable-layer.cjs.js +1 -1
  148. package/dist/dismissable-layer.esm.js +1 -1
  149. package/dist/dock.cjs.js +12 -12
  150. package/dist/dock.esm.js +73 -75
  151. package/dist/domElement-DazSZBjV.js +1 -0
  152. package/dist/domElement-ZlSGVP0l.mjs +5 -0
  153. package/dist/domElement.d.ts +2 -0
  154. package/dist/domElement.d.ts.map +1 -0
  155. package/dist/drawer.cjs.js +19 -19
  156. package/dist/drawer.esm.js +58 -58
  157. package/dist/dropdown.cjs.js +13 -13
  158. package/dist/dropdown.esm.js +50 -49
  159. package/dist/empty-state.cjs.js +4 -4
  160. package/dist/empty-state.esm.js +4 -4
  161. package/dist/field-error.cjs.js +2 -2
  162. package/dist/field-error.esm.js +2 -2
  163. package/dist/field.cjs.js +12 -12
  164. package/dist/field.esm.js +84 -75
  165. package/dist/fieldset.cjs.js +5 -5
  166. package/dist/fieldset.esm.js +5 -5
  167. package/dist/file-upload.cjs.js +4 -4
  168. package/dist/file-upload.esm.js +6 -4
  169. package/dist/flex.cjs.js +1 -1
  170. package/dist/flex.esm.js +1 -1
  171. package/dist/floating-toolbar.cjs.js +8 -8
  172. package/dist/floating-toolbar.esm.js +10 -10
  173. package/dist/focus-scope.cjs.js +1 -1
  174. package/dist/focus-scope.esm.js +1 -1
  175. package/dist/form.cjs.js +13 -13
  176. package/dist/form.esm.js +23 -13
  177. package/dist/gantt.cjs.js +43 -32
  178. package/dist/gantt.esm.js +100 -89
  179. package/dist/grid.cjs.js +1 -1
  180. package/dist/grid.esm.js +1 -1
  181. package/dist/hover-card.cjs.js +1 -1
  182. package/dist/hover-card.esm.js +1 -1
  183. package/dist/icon-cloud.cjs.js +4 -4
  184. package/dist/icon-cloud.esm.js +4 -4
  185. package/dist/icon.cjs.js +1 -1
  186. package/dist/icon.esm.js +1 -1
  187. package/dist/index.cjs.js +1 -1
  188. package/dist/index.esm.js +121 -118
  189. package/dist/inline-edit.cjs.js +2 -2
  190. package/dist/inline-edit.esm.js +2 -2
  191. package/dist/input.cjs.js +14 -14
  192. package/dist/input.esm.js +40 -33
  193. package/dist/label.cjs.js +4 -4
  194. package/dist/label.esm.js +4 -4
  195. package/dist/layout.cjs.js +1 -1
  196. package/dist/layout.esm.js +1 -1
  197. package/dist/{listbox-B6QgECax.js → listbox-CTpRpuF7.js} +1 -1
  198. package/dist/{listbox-DJamVeFj.mjs → listbox-hMVOhKHC.mjs} +1 -1
  199. package/dist/listbox.cjs.js +1 -1
  200. package/dist/listbox.esm.js +1 -1
  201. package/dist/marquee.cjs.js +4 -4
  202. package/dist/marquee.esm.js +4 -4
  203. package/dist/masonry-grid.cjs.js +1 -1
  204. package/dist/masonry-grid.esm.js +1 -1
  205. package/dist/{menu-item-styles-CbNUEwP2.js → menu-item-styles-B4onAr4C.js} +3 -3
  206. package/dist/{menu-item-styles-CZiPwPwl.mjs → menu-item-styles-IGSFLAHu.mjs} +3 -3
  207. package/dist/menu.cjs.js +7 -7
  208. package/dist/menu.esm.js +30 -29
  209. package/dist/menubar.cjs.js +1 -1
  210. package/dist/menubar.esm.js +3 -3
  211. package/dist/meter.cjs.js +2 -2
  212. package/dist/meter.esm.js +2 -2
  213. package/dist/multi-select.cjs.js +17 -17
  214. package/dist/multi-select.esm.js +52 -44
  215. package/dist/navigation-menu.cjs.js +2 -2
  216. package/dist/navigation-menu.esm.js +2 -2
  217. package/dist/number-field.cjs.js +11 -13
  218. package/dist/number-field.esm.js +30 -28
  219. package/dist/number-ticker.cjs.js +5 -5
  220. package/dist/number-ticker.esm.js +5 -5
  221. package/dist/odometer.cjs.js +3 -3
  222. package/dist/odometer.esm.js +3 -3
  223. package/dist/orbiter.cjs.js +4 -4
  224. package/dist/orbiter.esm.js +4 -4
  225. package/dist/pagination.cjs.js +2 -2
  226. package/dist/pagination.esm.js +2 -2
  227. package/dist/{panel-group-CaD0_KQf.js → panel-group-BVHJEdfx.js} +1 -1
  228. package/dist/{panel-group-8sVNnGxg.mjs → panel-group-BxO_eNW6.mjs} +1 -1
  229. package/dist/panel-group.cjs.js +1 -1
  230. package/dist/panel-group.esm.js +1 -1
  231. package/dist/panel.cjs.js +1 -1
  232. package/dist/panel.esm.js +1 -1
  233. package/dist/password-field.cjs.js +23 -23
  234. package/dist/password-field.esm.js +48 -47
  235. package/dist/pin-input.cjs.js +8 -6
  236. package/dist/pin-input.esm.js +21 -15
  237. package/dist/placement-grid.cjs.js +4 -4
  238. package/dist/placement-grid.esm.js +58 -58
  239. package/dist/plugin-panel.cjs.js +2 -2
  240. package/dist/plugin-panel.esm.js +2 -2
  241. package/dist/popover.cjs.js +6 -6
  242. package/dist/popover.esm.js +5 -5
  243. package/dist/portal.cjs.js +1 -1
  244. package/dist/portal.esm.js +1 -1
  245. package/dist/positioner.cjs.js +1 -1
  246. package/dist/positioner.esm.js +1 -1
  247. package/dist/presence.cjs.js +1 -1
  248. package/dist/presence.esm.js +1 -1
  249. package/dist/primitives/control-name.d.ts +30 -0
  250. package/dist/primitives/control-name.d.ts.map +1 -0
  251. package/dist/primitives/trigger.d.ts +2 -0
  252. package/dist/primitives/trigger.d.ts.map +1 -0
  253. package/dist/progress.cjs.js +4 -4
  254. package/dist/progress.esm.js +20 -18
  255. package/dist/quick-actions.cjs.js +4 -4
  256. package/dist/quick-actions.esm.js +4 -4
  257. package/dist/radio-group.cjs.js +2 -2
  258. package/dist/radio-group.esm.js +2 -2
  259. package/dist/radio.cjs.js +3 -3
  260. package/dist/radio.esm.js +3 -3
  261. package/dist/rating.cjs.js +18 -17
  262. package/dist/rating.esm.js +91 -92
  263. package/dist/roving-focus-group.cjs.js +1 -1
  264. package/dist/roving-focus-group.esm.js +11 -10
  265. package/dist/{runtime-D1gFh1fS.mjs → runtime-CFnK53iC.mjs} +133 -94
  266. package/dist/runtime-DwE-tizc.js +1 -0
  267. package/dist/runtime.cjs.js +1 -1
  268. package/dist/runtime.d.ts +1 -1
  269. package/dist/runtime.d.ts.map +1 -1
  270. package/dist/runtime.esm.js +29 -26
  271. package/dist/scroll-area.cjs.js +1 -1
  272. package/dist/scroll-area.esm.js +1 -1
  273. package/dist/section.cjs.js +1 -1
  274. package/dist/section.esm.js +1 -1
  275. package/dist/select.cjs.js +20 -19
  276. package/dist/select.esm.js +37 -33
  277. package/dist/selection-popup.cjs.js +3 -3
  278. package/dist/selection-popup.esm.js +3 -3
  279. package/dist/separator.cjs.js +8 -8
  280. package/dist/separator.esm.js +8 -8
  281. package/dist/sidebar.cjs.js +9 -9
  282. package/dist/sidebar.esm.js +16 -16
  283. package/dist/skeleton.cjs.js +8 -8
  284. package/dist/skeleton.esm.js +8 -8
  285. package/dist/slider.cjs.js +4 -4
  286. package/dist/slider.esm.js +4 -4
  287. package/dist/slot.cjs.js +4 -4
  288. package/dist/slot.esm.js +4 -4
  289. package/dist/sortable.cjs.js +43 -44
  290. package/dist/sortable.esm.js +100 -101
  291. package/dist/spinning-text.cjs.js +4 -4
  292. package/dist/spinning-text.esm.js +4 -4
  293. package/dist/split-button.cjs.js +1 -1
  294. package/dist/split-button.esm.js +2 -2
  295. package/dist/splitter.cjs.js +1 -1
  296. package/dist/splitter.esm.js +1 -1
  297. package/dist/stepper.cjs.js +2 -2
  298. package/dist/stepper.esm.js +2 -2
  299. package/dist/switch.cjs.js +11 -13
  300. package/dist/switch.esm.js +11 -13
  301. package/dist/table.cjs.js +10 -7
  302. package/dist/table.esm.js +47 -44
  303. package/dist/tabs.cjs.js +21 -22
  304. package/dist/tabs.esm.js +71 -67
  305. package/dist/tags-input.cjs.js +9 -9
  306. package/dist/tags-input.esm.js +32 -25
  307. package/dist/textarea.cjs.js +10 -10
  308. package/dist/textarea.esm.js +30 -21
  309. package/dist/theme.d.ts +18 -0
  310. package/dist/theme.d.ts.map +1 -1
  311. package/dist/time-field.cjs.js +5 -5
  312. package/dist/time-field.esm.js +21 -18
  313. package/dist/time-picker.cjs.js +4 -4
  314. package/dist/time-picker.esm.js +6 -6
  315. package/dist/timeline.cjs.js +3 -3
  316. package/dist/timeline.esm.js +5 -5
  317. package/dist/toast.cjs.js +7 -7
  318. package/dist/toast.esm.js +14 -14
  319. package/dist/toggle-group.cjs.js +6 -7
  320. package/dist/toggle-group.esm.js +64 -61
  321. package/dist/toggle.cjs.js +18 -18
  322. package/dist/toggle.esm.js +32 -31
  323. package/dist/toolbar.cjs.js +1 -1
  324. package/dist/toolbar.esm.js +1 -1
  325. package/dist/tooltip.cjs.js +5 -5
  326. package/dist/tooltip.esm.js +5 -5
  327. package/dist/transfer-list.cjs.js +4 -4
  328. package/dist/transfer-list.esm.js +4 -4
  329. package/dist/{tree-B3kE8ESs.mjs → tree-B_oQput6.mjs} +35 -34
  330. package/dist/tree-SivHxcAy.js +39 -0
  331. package/dist/tree-item.cjs.js +1 -1
  332. package/dist/tree-item.esm.js +1 -1
  333. package/dist/tree.cjs.js +1 -1
  334. package/dist/tree.esm.js +1 -1
  335. package/dist/trigger-BjnxLCeQ.mjs +9 -0
  336. package/dist/trigger-DkPsKxsP.js +1 -0
  337. package/dist/{ui-button-rXQOS9QJ.js → ui-button-BPrzJScZ.js} +29 -28
  338. package/dist/{ui-button-Q0GNNWKC.mjs → ui-button-Co8Sid6t.mjs} +70 -49
  339. package/dist/{ui-icon-BzVNC_lr.js → ui-icon-D3avtxX_.js} +5 -5
  340. package/dist/{ui-icon-YI6lyuqU.mjs → ui-icon-DLhB08Fo.mjs} +3 -3
  341. package/dist/visually-hidden.cjs.js +1 -1
  342. package/dist/visually-hidden.esm.js +1 -1
  343. package/dist/wizard.cjs.js +12 -13
  344. package/dist/wizard.esm.js +18 -16
  345. package/package.json +2 -2
  346. package/dist/ElementBase-EV6mVBUV.js +0 -1
  347. package/dist/runtime-CTaOSmBj.js +0 -1
  348. package/dist/tree-Dx_kv_ih.js +0 -39
@@ -1,5 +1,5 @@
1
- import { E as V } from "./ElementBase-YlTLMsGk.mjs";
2
- const M = `
1
+ import { E as M } from "./ElementBase-BeZT54Hj.mjs";
2
+ const V = `
3
3
  :host {
4
4
  --ui-rating-size: var(--ui-control-size, var(--ui-font-size-lg, 20px));
5
5
  --ui-rating-gap: var(--ui-control-gap, 6px);
@@ -13,6 +13,8 @@ const M = `
13
13
  --ui-rating-easing: var(--ui-motion-easing, cubic-bezier(0.2, 0.8, 0.2, 1));
14
14
  --ui-rating-radius: var(--ui-control-radius, var(--ui-radius, 4px));
15
15
  display: inline-flex;
16
+ flex-wrap: wrap;
17
+ max-inline-size: 100%;
16
18
  align-items: center;
17
19
  gap: var(--ui-rating-gap);
18
20
  color-scheme: light dark;
@@ -28,7 +30,7 @@ const M = `
28
30
  }
29
31
 
30
32
  :host([tone="neutral"]) {
31
- --ui-rating-color: color-mix(in srgb, var(--ui-color-muted, #64748b) 74%, var(--ui-color-text, #0f172a) 26%);
33
+ --ui-rating-color: color-mix(in srgb, var(--ui-color-muted, #526175) 74%, var(--ui-color-text, #0f172a) 26%);
32
34
  }
33
35
 
34
36
  :host([tone="info"]) {
@@ -36,7 +38,7 @@ const M = `
36
38
  }
37
39
 
38
40
  :host([tone="success"]) {
39
- --ui-rating-color: var(--ui-color-success, #16a34a);
41
+ --ui-rating-color: var(--ui-color-success, #15803d);
40
42
  }
41
43
 
42
44
  :host([tone="warning"]) {
@@ -253,7 +255,7 @@ const M = `
253
255
 
254
256
  .label {
255
257
  font-size: var(--ui-font-size-sm, 12px);
256
- color: var(--ui-color-muted, #64748b);
258
+ color: var(--ui-color-muted, #526175);
257
259
  white-space: nowrap;
258
260
  }
259
261
 
@@ -317,68 +319,68 @@ const M = `
317
319
  }
318
320
  }
319
321
  `;
320
- function x(e) {
321
- return e !== null && e.toLowerCase() !== "false" && e !== "0";
322
+ function x(i) {
323
+ return i !== null && i.toLowerCase() !== "false" && i !== "0";
322
324
  }
323
- function C(e) {
324
- return e === "soft" || e === "glass" || e === "contrast" || e === "minimal" ? e : "default";
325
+ function C(i) {
326
+ return i === "soft" || i === "glass" || i === "contrast" || i === "minimal" ? i : "default";
325
327
  }
326
- function $(e) {
327
- return e === "sm" || e === "lg" ? e : "md";
328
+ function $(i) {
329
+ return i === "sm" || i === "lg" ? i : "md";
328
330
  }
329
- function N(e) {
330
- return e === "square" || e === "pill" ? e : "rounded";
331
+ function N(i) {
332
+ return i === "square" || i === "pill" ? i : "rounded";
331
333
  }
332
- function T(e) {
333
- return e === "neutral" || e === "info" || e === "success" || e === "warning" || e === "danger" ? e : null;
334
+ function T(i) {
335
+ return i === "neutral" || i === "info" || i === "success" || i === "warning" || i === "danger" ? i : null;
334
336
  }
335
- function I(e) {
336
- return e === "hover" || e === "focus" || e === "disabled" ? e : "idle";
337
+ function I(i) {
338
+ return i === "hover" || i === "focus" || i === "disabled" ? i : "idle";
337
339
  }
338
- function y(e) {
339
- return e === "scale" || e === "pulse" || e === "none" ? e : null;
340
+ function y(i) {
341
+ return i === "scale" || i === "pulse" || i === "none" ? i : null;
340
342
  }
341
- function q(e) {
342
- if (!e) return null;
343
- const t = e.trim();
343
+ function q(i) {
344
+ if (!i) return null;
345
+ const t = i.trim();
344
346
  return t ? t === "full" ? "999px" : /^-?\\d+(\\.\\d+)?$/.test(t) ? `${t}px` : t : null;
345
347
  }
346
- function A(e) {
347
- const t = Number(e);
348
+ function A(i) {
349
+ const t = Number(i);
348
350
  return !Number.isFinite(t) || t <= 0 ? 1 : t === 0.5 ? 0.5 : 1;
349
351
  }
350
- function l(e, t, i) {
351
- return Math.min(i, Math.max(t, e));
352
+ function n(i, t, e) {
353
+ return Math.min(e, Math.max(t, i));
352
354
  }
353
- function u(e, t) {
354
- const i = Math.round(e / t) * t;
355
- return Number(i.toFixed(2));
355
+ function u(i, t) {
356
+ const e = Math.round(i / t) * t;
357
+ return Number(e.toFixed(2));
356
358
  }
357
- function o(e, t) {
358
- const i = e.getAttribute(t);
359
- if (i != null) return i;
360
- const r = e[t];
359
+ function o(i, t) {
360
+ const e = i.getAttribute(t);
361
+ if (e != null) return e;
362
+ const r = i[t];
361
363
  return typeof r == "string" && r.length > 0 ? r : null;
362
364
  }
363
- function f(e, t) {
364
- const i = e.getAttribute(t);
365
- if (i != null) return x(i);
366
- const r = e[t];
365
+ function g(i, t) {
366
+ const e = i.getAttribute(t);
367
+ if (e != null) return x(e);
368
+ const r = i[t];
367
369
  return typeof r == "boolean" ? r : typeof r == "string" ? x(r) : !1;
368
370
  }
369
- function w(e) {
370
- return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
371
+ function w(i) {
372
+ return i.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
371
373
  }
372
- function z(e) {
374
+ function z(i) {
373
375
  return `
374
- <svg viewBox="0 0 24 24" aria-hidden="true"${e ? ` class="${e}"` : ""}>
376
+ <svg viewBox="0 0 24 24" aria-hidden="true"${i ? ` class="${i}"` : ""}>
375
377
  <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
376
378
  </svg>
377
379
  `;
378
380
  }
379
- class B extends V {
381
+ class B extends M {
380
382
  constructor() {
381
- super(), this._stars = [], this._value = 0, this._max = 5, this._precision = 1, this._disabled = !1, this._readonly = !1, this._hoverValue = 0, this._onRootClick = this._onRootClick.bind(this), this._onRootMouseMove = this._onRootMouseMove.bind(this), this._onRootMouseLeave = this._onRootMouseLeave.bind(this), this._onRootFocusIn = this._onRootFocusIn.bind(this), this._onRootFocusOut = this._onRootFocusOut.bind(this), this._onRootKeyDown = this._onRootKeyDown.bind(this);
383
+ super(), this._autoAriaLabel = !1, this._stars = [], this._value = 0, this._max = 5, this._precision = 1, this._disabled = !1, this._readonly = !1, this._hoverValue = 0, this._onRootClick = this._onRootClick.bind(this), this._onRootMouseMove = this._onRootMouseMove.bind(this), this._onRootMouseLeave = this._onRootMouseLeave.bind(this), this._onRootFocusIn = this._onRootFocusIn.bind(this), this._onRootFocusOut = this._onRootFocusOut.bind(this), this._onRootKeyDown = this._onRootKeyDown.bind(this);
382
384
  }
383
385
  static get observedAttributes() {
384
386
  return [
@@ -409,17 +411,17 @@ class B extends V {
409
411
  disconnectedCallback() {
410
412
  this.root.removeEventListener("click", this._onRootClick, !0), this.root.removeEventListener("mousemove", this._onRootMouseMove, !0), this.root.removeEventListener("mouseleave", this._onRootMouseLeave, !0), this.root.removeEventListener("focusin", this._onRootFocusIn, !0), this.root.removeEventListener("focusout", this._onRootFocusOut, !0), this.root.removeEventListener("keydown", this._onRootKeyDown, !0), super.disconnectedCallback();
411
413
  }
412
- attributeChangedCallback(t, i, r) {
413
- if (i !== r) {
414
+ attributeChangedCallback(t, e, r) {
415
+ if (e !== r) {
414
416
  if (t === "value") {
415
417
  const s = Number(r);
416
- Number.isFinite(s) && (this._value = l(u(s, this._precision), 0, this._max), this._syncStars(), this._syncAria());
418
+ Number.isFinite(s) && (this._value = n(u(s, this._precision), 0, this._max), this._syncStars(), this._syncAria());
417
419
  }
418
420
  if (t === "max") {
419
421
  const s = Number(r);
420
422
  Number.isFinite(s) && s > 0 && (this._max = Math.max(1, s), this._value > this._max && (this._value = this._max), this._syncStars(), this._syncAria());
421
423
  }
422
- if (t === "precision" && (this._precision = A(r), this._value = l(u(this._value, this._precision), 0, this._max), this._hoverValue = this._hoverValue > 0 ? l(u(this._hoverValue, this._precision), 0, this._max) : 0, this._syncStars(), this._syncAria()), t === "disabled" && (this._disabled = r !== null), t === "readonly" && (this._readonly = r !== null), t === "animation") {
424
+ if (t === "precision" && (this._precision = A(r), this._value = n(u(this._value, this._precision), 0, this._max), this._hoverValue = this._hoverValue > 0 ? n(u(this._hoverValue, this._precision), 0, this._max) : 0, this._syncStars(), this._syncAria()), t === "disabled" && (this._disabled = r !== null), t === "readonly" && (this._readonly = r !== null), t === "animation") {
423
425
  const s = y(r);
424
426
  s ? this.setAttribute("data-animation", s) : this.removeAttribute("data-animation");
425
427
  }
@@ -430,23 +432,23 @@ class B extends V {
430
432
  return this._value;
431
433
  }
432
434
  set value(t) {
433
- const i = Number(t);
434
- if (!Number.isFinite(i)) return;
435
- const r = l(u(i, this._precision), 0, this._max);
435
+ const e = Number(t);
436
+ if (!Number.isFinite(e)) return;
437
+ const r = n(u(e, this._precision), 0, this._max);
436
438
  this._value !== r && (this._value = r, this.setAttribute("value", String(this._value)), this._syncStars(), this._syncAria(), this._emit("change"), this._emit("input"));
437
439
  }
438
440
  get max() {
439
441
  return this._max;
440
442
  }
441
443
  set max(t) {
442
- const i = Number(t);
443
- Number.isFinite(i) && (this._max = Math.max(1, i), this.setAttribute("max", String(this._max)), this._value > this._max && (this._value = this._max, this.setAttribute("value", String(this._value))), this.requestRender());
444
+ const e = Number(t);
445
+ Number.isFinite(e) && (this._max = Math.max(1, e), this.setAttribute("max", String(this._max)), this._value > this._max && (this._value = this._max, this.setAttribute("value", String(this._value))), this.requestRender());
444
446
  }
445
447
  get precision() {
446
448
  return this._precision;
447
449
  }
448
450
  set precision(t) {
449
- this._precision = t === 0.5 ? 0.5 : 1, this.setAttribute("precision", String(this._precision)), this._value = l(u(this._value, this._precision), 0, this._max), this.requestRender();
451
+ this._precision = t === 0.5 ? 0.5 : 1, this.setAttribute("precision", String(this._precision)), this._value = n(u(this._value, this._precision), 0, this._max), this.requestRender();
450
452
  }
451
453
  get disabled() {
452
454
  return this._disabled;
@@ -465,16 +467,16 @@ class B extends V {
465
467
  }
466
468
  _getStarIndex(t) {
467
469
  if (!t) return -1;
468
- const i = Number(t.dataset.index);
469
- return Number.isFinite(i) ? i : -1;
470
+ const e = Number(t.dataset.index);
471
+ return Number.isFinite(e) ? e : -1;
470
472
  }
471
- _getValueFromPointer(t, i) {
472
- const r = this._getStarIndex(i);
473
+ _getValueFromPointer(t, e) {
474
+ const r = this._getStarIndex(e);
473
475
  if (r === -1) return this._value;
474
476
  if (this._precision !== 0.5)
475
477
  return r + 1;
476
- const s = i.getBoundingClientRect(), n = t.clientX - s.left <= s.width / 2 ? 0.5 : 1;
477
- return r + n;
478
+ const s = e.getBoundingClientRect(), l = t.clientX - s.left <= s.width / 2 ? 0.5 : 1;
479
+ return r + l;
478
480
  }
479
481
  _formatValue(t) {
480
482
  return Number.isInteger(t) ? String(t) : t.toFixed(1);
@@ -484,20 +486,20 @@ class B extends V {
484
486
  }
485
487
  _onRootClick(t) {
486
488
  if (this._disabled || this._readonly) return;
487
- const i = t, r = this._getStarFromEventTarget(i.target);
488
- r && (this.value = this._getValueFromPointer(i, r));
489
+ const e = t, r = this._getStarFromEventTarget(e.target);
490
+ r && (this.value = this._getValueFromPointer(e, r));
489
491
  }
490
492
  _onRootMouseMove(t) {
491
493
  if (this._disabled || this._readonly) return;
492
- const i = t, r = this._getStarFromEventTarget(i.target);
493
- r && (this._hoverValue = this._getValueFromPointer(i, r), this.setAttribute("state", "hover"), this._syncStars());
494
+ const e = t, r = this._getStarFromEventTarget(e.target);
495
+ r && (this._hoverValue = this._getValueFromPointer(e, r), this.setAttribute("state", "hover"), this._syncStars());
494
496
  }
495
497
  _onRootMouseLeave() {
496
498
  this._disabled || this._readonly || (this._hoverValue = 0, this.removeAttribute("state"), this._syncStars());
497
499
  }
498
500
  _onRootFocusIn(t) {
499
501
  if (this._disabled || this._readonly) return;
500
- const i = this._getStarFromEventTarget(t.target), r = this._getStarIndex(i);
502
+ const e = this._getStarFromEventTarget(t.target), r = this._getStarIndex(e);
501
503
  r !== -1 && (this._hoverValue = r + 1, this.setAttribute("state", "focus"), this._syncStars());
502
504
  }
503
505
  _onRootFocusOut() {
@@ -505,20 +507,20 @@ class B extends V {
505
507
  }
506
508
  _onRootKeyDown(t) {
507
509
  if (this._disabled || this._readonly) return;
508
- const i = t, r = this._getStarFromEventTarget(i.target), s = this._getStarIndex(r);
510
+ const e = t, r = this._getStarFromEventTarget(e.target), s = this._getStarIndex(r);
509
511
  if (s === -1) return;
510
512
  let a = this._value;
511
- const n = this._precision;
512
- switch (i.key) {
513
+ const l = this._precision;
514
+ switch (e.key) {
513
515
  case "ArrowRight":
514
516
  case "ArrowUp":
515
517
  case "+":
516
- a = l(this._value + n, 0, this._max);
518
+ a = n(this._value + l, 0, this._max);
517
519
  break;
518
520
  case "ArrowLeft":
519
521
  case "ArrowDown":
520
522
  case "-":
521
- a = l(this._value - n, 0, this._max);
523
+ a = n(this._value - l, 0, this._max);
522
524
  break;
523
525
  case "Home":
524
526
  a = 0;
@@ -533,34 +535,32 @@ class B extends V {
533
535
  default:
534
536
  return;
535
537
  }
536
- i.preventDefault(), this.value = a;
538
+ e.preventDefault(), this.value = a;
537
539
  }
538
- _getFillPercent(t, i) {
539
- const r = i - (t - 1);
540
+ _getFillPercent(t, e) {
541
+ const r = e - (t - 1);
540
542
  return r >= 1 ? 100 : r <= 0 ? 0 : r * 100;
541
543
  }
542
544
  _syncStars() {
543
545
  const t = this._hoverValue > 0 ? this._hoverValue : this._value;
544
- this._stars.forEach((i, r) => {
546
+ this._stars.forEach((e, r) => {
545
547
  const s = r + 1, a = this._getFillPercent(s, t);
546
- if (i.style.setProperty("--fill-percent", `${a}%`), this._disabled) {
547
- i.setAttribute("data-state", "disabled"), i.setAttribute("aria-disabled", "true");
548
+ if (e.style.setProperty("--fill-percent", `${a}%`), this._disabled) {
549
+ e.setAttribute("data-state", "disabled"), e.setAttribute("aria-disabled", "true");
548
550
  return;
549
551
  }
550
- if (i.removeAttribute("aria-disabled"), this._hoverValue > 0) {
551
- a > 0 ? i.setAttribute("data-state", "hover") : i.removeAttribute("data-state");
552
+ if (e.removeAttribute("aria-disabled"), this._hoverValue > 0) {
553
+ a > 0 ? e.setAttribute("data-state", "hover") : e.removeAttribute("data-state");
552
554
  return;
553
555
  }
554
- a > 0 ? i.setAttribute("data-state", "active") : i.removeAttribute("data-state");
556
+ a > 0 ? e.setAttribute("data-state", "active") : e.removeAttribute("data-state");
555
557
  }), this._syncAria();
556
558
  }
557
559
  _syncAria() {
558
560
  const t = this._getAriaValueText(this._value);
559
- this.setAttribute("role", "slider"), this.setAttribute("tabindex", this._disabled || this._readonly ? "-1" : "0"), this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", String(this._max)), this.setAttribute("aria-valuenow", String(this._value)), this.setAttribute("aria-valuetext", t), this.setAttribute("aria-orientation", "horizontal"), this.setAttribute("aria-disabled", this._disabled ? "true" : "false"), this.setAttribute("aria-readonly", this._readonly ? "true" : "false"), this._stars.forEach((i, r) => {
561
+ this.setAttribute("role", "slider"), this.setAttribute("tabindex", this._disabled || this._readonly ? "-1" : "0"), this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", String(this._max)), this.setAttribute("aria-valuenow", String(this._value)), this.setAttribute("aria-valuetext", t), this.setAttribute("aria-orientation", "horizontal"), this.setAttribute("aria-disabled", this._disabled ? "true" : "false"), this.setAttribute("aria-readonly", this._readonly ? "true" : "false"), this._stars.forEach((e, r) => {
560
562
  const s = r + 1, a = this._getFillPercent(s, this._hoverValue > 0 ? this._hoverValue : this._value);
561
- i.setAttribute("role", "presentation"), i.setAttribute("tabindex", "-1"), i.setAttribute("aria-hidden", "true"), i.setAttribute("aria-checked", "false");
562
- const n = this._precision === 0.5 ? `${r + 0.5} to ${r + 1}` : `${r + 1}`;
563
- i.setAttribute("data-fill", String(a)), i.setAttribute("data-star-value", String(s)), i.setAttribute("aria-label", `${n}`);
563
+ e.setAttribute("aria-hidden", "true"), e.setAttribute("data-fill", String(a)), e.setAttribute("data-star-value", String(s));
564
564
  });
565
565
  }
566
566
  _emit(t) {
@@ -579,13 +579,12 @@ class B extends V {
579
579
  );
580
580
  }
581
581
  render() {
582
- const t = f(this, "disabled"), i = f(this, "readonly"), r = C(o(this, "variant")), s = $(o(this, "size")), a = o(this, "theme"), n = T(o(this, "tone")), h = I(o(this, "state")), g = y(o(this, "animation")), c = N(o(this, "shape")), m = q(o(this, "radius")), k = A(o(this, "precision")), v = o(this, "aria-label"), p = o(this, "aria-labelledby"), _ = o(this, "aria-describedby"), d = o(this, "label"), b = f(this, "show-value"), R = o(this, "value"), S = o(this, "max");
583
- this._max = Math.max(1, Number(S) || 5), this._precision = k, this._value = l(u(Number(R) || 0, this._precision), 0, this._max), this._disabled = t, this._readonly = i, g ? this.setAttribute("data-animation", g) : this.removeAttribute("data-animation"), a === "dark" || a === "brand" ? this.setAttribute("theme", a) : this.removeAttribute("theme"), n ? this.setAttribute("tone", n) : this.removeAttribute("tone"), h === "disabled" ? this.setAttribute("state", "disabled") : h !== "idle" ? this.setAttribute("state", h) : this.removeAttribute("state"), c === "square" || c === "pill" ? this.setAttribute("shape", c) : this.removeAttribute("shape"), r === "default" ? this.removeAttribute("variant") : this.setAttribute("variant", r), s === "md" ? this.removeAttribute("size") : this.setAttribute("size", s), m ? this.style.setProperty("--ui-rating-radius", m) : this.style.removeProperty("--ui-rating-radius"), this.setAttribute("precision", String(this._precision));
582
+ const t = g(this, "disabled"), e = g(this, "readonly"), r = C(o(this, "variant")), s = $(o(this, "size")), a = o(this, "theme"), l = T(o(this, "tone")), c = I(o(this, "state")), m = y(o(this, "animation")), d = N(o(this, "shape")), v = q(o(this, "radius")), k = A(o(this, "precision")), p = this._autoAriaLabel ? null : o(this, "aria-label"), f = o(this, "aria-labelledby"), _ = o(this, "aria-describedby"), h = o(this, "label"), b = g(this, "show-value"), R = o(this, "value"), S = o(this, "max");
583
+ this._max = Math.max(1, Number(S) || 5), this._precision = k, this._value = n(u(Number(R) || 0, this._precision), 0, this._max), this._disabled = t, this._readonly = e, m ? this.setAttribute("data-animation", m) : this.removeAttribute("data-animation"), a === "dark" || a === "brand" ? this.setAttribute("theme", a) : this.removeAttribute("theme"), l ? this.setAttribute("tone", l) : this.removeAttribute("tone"), c === "disabled" ? this.setAttribute("state", "disabled") : c !== "idle" ? this.setAttribute("state", c) : this.removeAttribute("state"), d === "square" || d === "pill" ? this.setAttribute("shape", d) : this.removeAttribute("shape"), r === "default" ? this.removeAttribute("variant") : this.setAttribute("variant", r), s === "md" ? this.removeAttribute("size") : this.setAttribute("size", s), v ? this.style.setProperty("--ui-rating-radius", v) : this.style.removeProperty("--ui-rating-radius"), this.setAttribute("precision", String(this._precision));
584
584
  const E = Array.from({ length: this._max }, (P, L) => `
585
- <button
586
- type="button"
585
+ <span
587
586
  class="star"
588
- tabindex="-1"
587
+ aria-hidden="true"
589
588
  data-index="${L}"
590
589
  part="star"
591
590
  style="--fill-percent: 0%;"
@@ -598,10 +597,10 @@ class B extends V {
598
597
  </span>
599
598
  </span>
600
599
  </span>
601
- </button>
600
+ </span>
602
601
  `).join(""), F = b ? `${this._formatValue(this._value)} / ${this._max}` : "";
603
602
  this.setContent(`
604
- <style>${M}</style>
603
+ <style>${V}</style>
605
604
  <div
606
605
  class="stars"
607
606
  part="stars"
@@ -609,15 +608,15 @@ class B extends V {
609
608
  >
610
609
  ${E}
611
610
  </div>
612
- ${d || b ? `
611
+ ${h || b ? `
613
612
  <div class="label" part="label">
614
- ${d ? `<span class="label-text">${w(d)}</span>` : ""}
613
+ ${h ? `<span class="label-text">${w(h)}</span>` : ""}
615
614
  ${b ? `<span class="value">${w(F)}</span>` : ""}
616
615
  </div>
617
616
  ` : ""}
618
617
  `), queueMicrotask(() => {
619
618
  this._stars = Array.from(this.root.querySelectorAll(".star")), this._syncStars();
620
- }), v ? this.setAttribute("aria-label", v) : this.removeAttribute("aria-label"), p ? this.setAttribute("aria-labelledby", p) : this.removeAttribute("aria-labelledby"), _ ? this.setAttribute("aria-describedby", _) : this.removeAttribute("aria-describedby"), this._disabled ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"), this._readonly ? this.setAttribute("readonly", "") : this.removeAttribute("readonly"), this._syncAria();
619
+ }), this._autoAriaLabel = !1, p ? this.setAttribute("aria-label", p) : f ? this.removeAttribute("aria-label") : (this.setAttribute("aria-label", (h || "").trim() || "Rating"), this._autoAriaLabel = !0), f ? this.setAttribute("aria-labelledby", f) : this.removeAttribute("aria-labelledby"), _ ? this.setAttribute("aria-describedby", _) : this.removeAttribute("aria-describedby"), this._disabled ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"), this._readonly ? this.setAttribute("readonly", "") : this.removeAttribute("readonly"), this._syncAria();
621
620
  }
622
621
  }
623
622
  typeof customElements < "u" && !customElements.get("ui-rating") && customElements.define("ui-rating", B);
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./roving-focus-group-BdJ_4Njm.js");function d(n){if(!n.isConnected||n.hidden)return!1;const t=window.getComputedStyle(n);return!(t.display==="none"||t.visibility==="hidden")}function u(n){const t=n.getAttribute("aria-disabled");return n.hasAttribute("disabled")||t==="true"||n.disabled===!0}class l extends HTMLElement{constructor(){super(...arguments),this._container=null}static get observedAttributes(){return["item-selector","direct-item-selector","active-attribute","loop"]}get container(){return this._container}set container(t){this._container=t}get itemSelector(){return this.getAttribute("item-selector")||'[tabindex], button, [role="tab"], [role="radio"]'}get directItemSelector(){return this.getAttribute("direct-item-selector")||""}get activeAttribute(){const t=this.getAttribute("active-attribute");return t===""?null:t||null}queryItems(){const t=this._container||this,i=this.directItemSelector.trim();let e=i?Array.from(t.querySelectorAll(i)):[];return e.length||(e=Array.from(t.querySelectorAll(this.itemSelector))),e.filter(r=>d(r))}queryEnabledItems(){return this.queryItems().filter(t=>!u(t))}getActiveItem(){return this.queryItems().find(t=>t.getAttribute("tabindex")==="0")||null}setActiveItem(t,i={}){const e=this.queryItems(),r=t&&e.includes(t)&&!u(t)?t:null;return s.syncRovingTabStops(e,r,{activeAttribute:this.activeAttribute}),r&&i.focus&&s.focusRovingItem(r),this.dispatchEvent(new CustomEvent("active-item-change",{detail:{item:r},bubbles:!0,composed:!0})),r}focusBoundary(t,i={}){const e=this.queryItems(),r=s.getRovingFocusBoundaryIndex(e,t,u);return r<0?null:this.setActiveItem(e[r],i)}move(t,i={}){const e=this.queryItems();if(!e.length)return null;const r=i.current||this.getActiveItem(),o=r?e.indexOf(r):-1,a=s.resolveRovingFocusIndex(e,{activeIndex:o,getDisabled:u}),c=s.moveRovingFocusIndex(e,o,t,{wrap:i.wrap!==!1&&this.getAttribute("loop")!=="false",fallbackIndex:a,getDisabled:u});return c<0?null:this.setActiveItem(e[c],{focus:i.focus})}}typeof customElements<"u"&&!customElements.get("ui-roving-focus-group")&&customElements.define("ui-roving-focus-group",l);exports.UIRovingFocusGroup=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./domElement-DazSZBjV.js"),s=require("./roving-focus-group-BdJ_4Njm.js");function m(n){if(!n.isConnected||n.hidden)return!1;const e=window.getComputedStyle(n);return!(e.display==="none"||e.visibility==="hidden")}function u(n){const e=n.getAttribute("aria-disabled");return n.hasAttribute("disabled")||e==="true"||n.disabled===!0}class l extends d.DOMElement{constructor(){super(...arguments),this._container=null}static get observedAttributes(){return["item-selector","direct-item-selector","active-attribute","loop"]}get container(){return this._container}set container(e){this._container=e}get itemSelector(){return this.getAttribute("item-selector")||'[tabindex], button, [role="tab"], [role="radio"]'}get directItemSelector(){return this.getAttribute("direct-item-selector")||""}get activeAttribute(){const e=this.getAttribute("active-attribute");return e===""?null:e||null}queryItems(){const e=this._container||this,i=this.directItemSelector.trim();let t=i?Array.from(e.querySelectorAll(i)):[];return t.length||(t=Array.from(e.querySelectorAll(this.itemSelector))),t.filter(r=>m(r))}queryEnabledItems(){return this.queryItems().filter(e=>!u(e))}getActiveItem(){return this.queryItems().find(e=>e.getAttribute("tabindex")==="0")||null}setActiveItem(e,i={}){const t=this.queryItems(),r=e&&t.includes(e)&&!u(e)?e:null;return s.syncRovingTabStops(t,r,{activeAttribute:this.activeAttribute}),r&&i.focus&&s.focusRovingItem(r),this.dispatchEvent(new CustomEvent("active-item-change",{detail:{item:r},bubbles:!0,composed:!0})),r}focusBoundary(e,i={}){const t=this.queryItems(),r=s.getRovingFocusBoundaryIndex(t,e,u);return r<0?null:this.setActiveItem(t[r],i)}move(e,i={}){const t=this.queryItems();if(!t.length)return null;const r=i.current||this.getActiveItem(),o=r?t.indexOf(r):-1,a=s.resolveRovingFocusIndex(t,{activeIndex:o,getDisabled:u}),c=s.moveRovingFocusIndex(t,o,e,{wrap:i.wrap!==!1&&this.getAttribute("loop")!=="false",fallbackIndex:a,getDisabled:u});return c<0?null:this.setActiveItem(t[c],{focus:i.focus})}}typeof customElements<"u"&&!customElements.get("ui-roving-focus-group")&&customElements.define("ui-roving-focus-group",l);exports.UIRovingFocusGroup=l;
@@ -1,5 +1,6 @@
1
- import { s as l, f as a, g as d, r as m, m as f } from "./roving-focus-group-Dbm1Jko_.mjs";
2
- function b(s) {
1
+ import { D as l } from "./domElement-ZlSGVP0l.mjs";
2
+ import { s as a, f as d, g as m, r as f, m as b } from "./roving-focus-group-Dbm1Jko_.mjs";
3
+ function g(s) {
3
4
  if (!s.isConnected || s.hidden) return !1;
4
5
  const t = window.getComputedStyle(s);
5
6
  return !(t.display === "none" || t.visibility === "hidden");
@@ -8,7 +9,7 @@ function n(s) {
8
9
  const t = s.getAttribute("aria-disabled");
9
10
  return s.hasAttribute("disabled") || t === "true" || s.disabled === !0;
10
11
  }
11
- class g extends HTMLElement {
12
+ class h extends l {
12
13
  constructor() {
13
14
  super(...arguments), this._container = null;
14
15
  }
@@ -34,7 +35,7 @@ class g extends HTMLElement {
34
35
  queryItems() {
35
36
  const t = this._container || this, i = this.directItemSelector.trim();
36
37
  let e = i ? Array.from(t.querySelectorAll(i)) : [];
37
- return e.length || (e = Array.from(t.querySelectorAll(this.itemSelector))), e.filter((r) => b(r));
38
+ return e.length || (e = Array.from(t.querySelectorAll(this.itemSelector))), e.filter((r) => g(r));
38
39
  }
39
40
  queryEnabledItems() {
40
41
  return this.queryItems().filter((t) => !n(t));
@@ -44,19 +45,19 @@ class g extends HTMLElement {
44
45
  }
45
46
  setActiveItem(t, i = {}) {
46
47
  const e = this.queryItems(), r = t && e.includes(t) && !n(t) ? t : null;
47
- return l(e, r, { activeAttribute: this.activeAttribute }), r && i.focus && a(r), this.dispatchEvent(new CustomEvent("active-item-change", { detail: { item: r }, bubbles: !0, composed: !0 })), r;
48
+ return a(e, r, { activeAttribute: this.activeAttribute }), r && i.focus && d(r), this.dispatchEvent(new CustomEvent("active-item-change", { detail: { item: r }, bubbles: !0, composed: !0 })), r;
48
49
  }
49
50
  focusBoundary(t, i = {}) {
50
- const e = this.queryItems(), r = d(e, t, n);
51
+ const e = this.queryItems(), r = m(e, t, n);
51
52
  return r < 0 ? null : this.setActiveItem(e[r], i);
52
53
  }
53
54
  move(t, i = {}) {
54
55
  const e = this.queryItems();
55
56
  if (!e.length) return null;
56
- const r = i.current || this.getActiveItem(), u = r ? e.indexOf(r) : -1, c = m(e, {
57
+ const r = i.current || this.getActiveItem(), u = r ? e.indexOf(r) : -1, c = f(e, {
57
58
  activeIndex: u,
58
59
  getDisabled: n
59
- }), o = f(e, u, t, {
60
+ }), o = b(e, u, t, {
60
61
  wrap: i.wrap !== !1 && this.getAttribute("loop") !== "false",
61
62
  fallbackIndex: c,
62
63
  getDisabled: n
@@ -64,7 +65,7 @@ class g extends HTMLElement {
64
65
  return o < 0 ? null : this.setActiveItem(e[o], { focus: i.focus });
65
66
  }
66
67
  }
67
- typeof customElements < "u" && !customElements.get("ui-roving-focus-group") && customElements.define("ui-roving-focus-group", g);
68
+ typeof customElements < "u" && !customElements.get("ui-roving-focus-group") && customElements.define("ui-roving-focus-group", h);
68
69
  export {
69
- g as UIRovingFocusGroup
70
+ h as UIRovingFocusGroup
70
71
  };