@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 b } from "./ElementBase-YlTLMsGk.mjs";
2
- const _ = {
1
+ import { E as _ } from "./ElementBase-BeZT54Hj.mjs";
2
+ const b = {
3
3
  sm: "var(--ui-breakpoint-sm, 640px)",
4
4
  md: "var(--ui-breakpoint-md, 768px)",
5
5
  lg: "var(--ui-breakpoint-lg, 1024px)",
@@ -187,7 +187,7 @@ function g(u, t) {
187
187
  return {};
188
188
  }
189
189
  }
190
- class I extends b {
190
+ class I extends _ {
191
191
  constructor() {
192
192
  super(...arguments), this._lastClassname = "", this._appliedInlineProps = /* @__PURE__ */ new Set(), this._mutationObserver = null, this._suppressMutations = !1, this._focusedValue = null, this._dragItem = null, this._dragOverItem = null, this._onKeyDownBound = (t) => this._onKeyDown(t), this._onClickBound = (t) => this._onClick(t), this._onDragStartBound = (t) => this._onDragStart(t), this._onDragOverBound = (t) => this._onDragOver(t), this._onDropBound = (t) => this._onDrop(t), this._onDragEndBound = () => this._clearDragState();
193
193
  }
@@ -234,8 +234,8 @@ class I extends b {
234
234
  const e = this.getAttribute(t);
235
235
  if (!e || f(e)) return;
236
236
  const s = g(t, e);
237
- Object.entries(s).forEach(([r, i]) => {
238
- this.style.setProperty(r, i), this._appliedInlineProps.add(r);
237
+ Object.entries(s).forEach(([r, a]) => {
238
+ this.style.setProperty(r, a), this._appliedInlineProps.add(r);
239
239
  });
240
240
  });
241
241
  }
@@ -246,21 +246,21 @@ class I extends b {
246
246
  lg: {},
247
247
  xl: {}
248
248
  };
249
- p.forEach((a) => {
250
- const o = this.getAttribute(a), n = f(o);
249
+ p.forEach((i) => {
250
+ const o = this.getAttribute(i), n = f(o);
251
251
  if (!n) return;
252
252
  const l = (c, m) => {
253
- Object.assign(c, g(a, m));
253
+ Object.assign(c, g(i, m));
254
254
  };
255
255
  typeof n.initial == "string" && l(t, n.initial), typeof n.sm == "string" && l(e.sm, n.sm), typeof n.md == "string" && l(e.md, n.md), typeof n.lg == "string" && l(e.lg, n.lg), typeof n.xl == "string" && l(e.xl, n.xl);
256
256
  });
257
- const s = (a, o) => {
257
+ const s = (i, o) => {
258
258
  const n = Object.entries(o);
259
- return n.length ? `${a} { ${n.map(([l, c]) => `${l}: ${c};`).join(" ")} }` : "";
260
- }, r = [], i = s(":host", t);
261
- return i && r.push(i), Object.keys(e).forEach((a) => {
262
- const o = s(":host", e[a]);
263
- o && r.push(`@media (min-width: ${_[a]}) { ${o} }`);
259
+ return n.length ? `${i} { ${n.map(([l, c]) => `${l}: ${c};`).join(" ")} }` : "";
260
+ }, r = [], a = s(":host", t);
261
+ return a && r.push(a), Object.keys(e).forEach((i) => {
262
+ const o = s(":host", e[i]);
263
+ o && r.push(`@media (min-width: ${b[i]}) { ${o} }`);
264
264
  }), r.join(`
265
265
  `);
266
266
  }
@@ -280,17 +280,17 @@ class I extends b {
280
280
  const t = this._fallbackColumnCount();
281
281
  let e = 0;
282
282
  return this._items().map((s, r) => {
283
- let i = d(s.getAttribute("data-row")), a = d(s.getAttribute("data-column"));
283
+ let a = d(s.getAttribute("data-row")), i = d(s.getAttribute("data-column"));
284
284
  const o = d(s.getAttribute("data-row-span")) || 1, n = d(s.getAttribute("data-column-span")) || 1;
285
- if (i == null || a == null) {
285
+ if (a == null || i == null) {
286
286
  const l = e++, c = Math.floor(l / t) + 1, m = l % t + 1;
287
- i == null && (i = c), a == null && (a = m);
287
+ a == null && (a = c), i == null && (i = m);
288
288
  }
289
289
  return {
290
290
  el: s,
291
291
  index: r,
292
- row: i,
293
- column: a,
292
+ row: a,
293
+ column: i,
294
294
  rowSpan: o,
295
295
  columnSpan: n,
296
296
  value: s.getAttribute("data-value") || s.id || String(r),
@@ -312,18 +312,12 @@ class I extends b {
312
312
  return [...t].sort((e, s) => e.row !== s.row ? e.row - s.row : e.column !== s.column ? e.column - s.column : e.index - s.index);
313
313
  }
314
314
  _syncHostSemantics(t) {
315
- this._isInteractive() ? (this.hasAttribute("role") || (this.setAttribute("role", "grid"), this.setAttribute("data-ui-placement-role", "")), this.setAttribute(
316
- "aria-rowcount",
317
- String(t.reduce((e, s) => Math.max(e, s.row + s.rowSpan - 1), 0))
318
- ), this.setAttribute(
319
- "aria-colcount",
320
- String(t.reduce((e, s) => Math.max(e, s.column + s.columnSpan - 1), this._fallbackColumnCount()))
321
- )) : this.hasAttribute("data-ui-placement-role") && (this.removeAttribute("role"), this.removeAttribute("data-ui-placement-role"), this.removeAttribute("aria-rowcount"), this.removeAttribute("aria-colcount"));
315
+ this._isInteractive() ? this.hasAttribute("role") || (this.setAttribute("role", "list"), this.setAttribute("data-ui-placement-role", "")) : this.hasAttribute("data-ui-placement-role") && (this.removeAttribute("role"), this.removeAttribute("data-ui-placement-role")), (!this._isInteractive() || this.hasAttribute("data-ui-placement-role")) && (this.removeAttribute("aria-rowcount"), this.removeAttribute("aria-colcount"));
322
316
  }
323
317
  _setFocusedItem(t, e = !1) {
324
318
  const s = this._items(), r = t || s[0] || null;
325
- this._focusedValue = r && (r.getAttribute("data-value") || r.id) || null, s.forEach((i) => {
326
- this._isInteractive() ? i.tabIndex = i === r ? 0 : -1 : i.removeAttribute("tabindex");
319
+ this._focusedValue = r && (r.getAttribute("data-value") || r.id) || null, s.forEach((a) => {
320
+ this._isInteractive() ? a.tabIndex = a === r ? 0 : -1 : a.removeAttribute("tabindex");
327
321
  }), e && r && r.focus({ preventScroll: !0 });
328
322
  }
329
323
  _syncItems() {
@@ -333,7 +327,13 @@ class I extends b {
333
327
  this._order() === "row-major" && e.forEach((r) => this.appendChild(r.el)), this._syncHostSemantics(e);
334
328
  const s = e.find((r) => r.value === this._focusedValue)?.el || e[0]?.el || null;
335
329
  e.forEach((r) => {
336
- r.el.style.gridColumn = `${r.column} / span ${r.columnSpan}`, r.el.style.gridRow = `${r.row} / span ${r.rowSpan}`, r.el.style.minInlineSize = "0", r.el.style.boxSizing = "border-box", this._isInteractive() ? (r.el.hasAttribute("role") || r.el.setAttribute("role", "gridcell"), r.el.setAttribute("aria-rowindex", String(r.row)), r.el.setAttribute("aria-colindex", String(r.column)), r.columnSpan > 1 ? r.el.setAttribute("aria-colspan", String(r.columnSpan)) : r.el.removeAttribute("aria-colspan"), r.rowSpan > 1 ? r.el.setAttribute("aria-rowspan", String(r.rowSpan)) : r.el.removeAttribute("aria-rowspan"), r.selected ? r.el.setAttribute("aria-selected", "true") : r.el.removeAttribute("aria-selected"), r.disabled ? r.el.setAttribute("aria-disabled", "true") : r.el.removeAttribute("aria-disabled")) : (r.el.removeAttribute("aria-rowindex"), r.el.removeAttribute("aria-colindex"), r.el.removeAttribute("aria-rowspan"), r.el.removeAttribute("aria-colspan"), r.el.removeAttribute("aria-selected"), r.el.removeAttribute("aria-disabled")), this._isDraggable() && !r.disabled ? (r.el.setAttribute("data-draggable", ""), r.el.setAttribute("draggable", "true")) : (r.el.removeAttribute("data-draggable"), r.el.removeAttribute("draggable"));
330
+ if (r.el.style.gridColumn = `${r.column} / span ${r.columnSpan}`, r.el.style.gridRow = `${r.row} / span ${r.rowSpan}`, r.el.style.minInlineSize = "0", r.el.style.boxSizing = "border-box", this._isInteractive()) {
331
+ r.el.hasAttribute("role") || (r.el.setAttribute("role", "listitem"), r.el.setAttribute("data-ui-placement-item-role", ""));
332
+ const a = e.indexOf(r) + 1;
333
+ r.el.hasAttribute("data-ui-placement-item-role") && (r.el.setAttribute("aria-posinset", String(a)), r.el.setAttribute("aria-setsize", String(e.length)), r.selected ? r.el.setAttribute("aria-current", "true") : r.el.removeAttribute("aria-current")), r.disabled ? r.el.setAttribute("aria-disabled", "true") : r.el.removeAttribute("aria-disabled");
334
+ } else
335
+ r.el.hasAttribute("data-ui-placement-item-role") && (r.el.removeAttribute("role"), r.el.removeAttribute("data-ui-placement-item-role")), r.el.removeAttribute("aria-posinset"), r.el.removeAttribute("aria-setsize"), r.el.removeAttribute("aria-current"), r.el.removeAttribute("aria-disabled");
336
+ this._isDraggable() && !r.disabled ? (r.el.setAttribute("data-draggable", ""), r.el.setAttribute("draggable", "true")) : (r.el.removeAttribute("data-draggable"), r.el.removeAttribute("draggable"));
337
337
  }), this._setFocusedItem(s, !1);
338
338
  } finally {
339
339
  this._suppressMutations = !1;
@@ -348,53 +348,53 @@ class I extends b {
348
348
  return this._computeItems().find((e) => e.el === t) || null;
349
349
  }
350
350
  _intervalsOverlap(t, e, s, r) {
351
- const i = t + e - 1, a = s + r - 1;
352
- return t <= a && s <= i;
351
+ const a = t + e - 1, i = s + r - 1;
352
+ return t <= i && s <= a;
353
353
  }
354
354
  _findNeighbor(t, e) {
355
- const s = this._computeItems().filter((a) => !a.disabled && a.el !== t.el);
355
+ const s = this._computeItems().filter((i) => !i.disabled && i.el !== t.el);
356
356
  if (!s.length) return null;
357
- const r = s.filter((a) => e === "left" || e === "right" ? this._intervalsOverlap(t.row, t.rowSpan, a.row, a.rowSpan) ? e === "left" ? a.column < t.column : a.column > t.column : !1 : this._intervalsOverlap(t.column, t.columnSpan, a.column, a.columnSpan) ? e === "up" ? a.row < t.row : a.row > t.row : !1);
357
+ const r = s.filter((i) => e === "left" || e === "right" ? this._intervalsOverlap(t.row, t.rowSpan, i.row, i.rowSpan) ? e === "left" ? i.column < t.column : i.column > t.column : !1 : this._intervalsOverlap(t.column, t.columnSpan, i.column, i.columnSpan) ? e === "up" ? i.row < t.row : i.row > t.row : !1);
358
358
  if (!r.length) {
359
- const a = this._order() === "row-major" ? this._sortMeta(this._computeItems()) : this._computeItems(), o = a.findIndex((l) => l.el === t.el);
360
- return a[o + (e === "left" || e === "up" ? -1 : 1)]?.el || null;
359
+ const i = this._order() === "row-major" ? this._sortMeta(this._computeItems()) : this._computeItems(), o = i.findIndex((l) => l.el === t.el);
360
+ return i[o + (e === "left" || e === "up" ? -1 : 1)]?.el || null;
361
361
  }
362
- return r.sort((a, o) => {
362
+ return r.sort((i, o) => {
363
363
  if (e === "left" || e === "right") {
364
- const c = Math.abs(a.column - t.column), m = Math.abs(o.column - t.column);
365
- return c !== m ? c - m : Math.abs(a.row - t.row) - Math.abs(o.row - t.row);
364
+ const c = Math.abs(i.column - t.column), m = Math.abs(o.column - t.column);
365
+ return c !== m ? c - m : Math.abs(i.row - t.row) - Math.abs(o.row - t.row);
366
366
  }
367
- const n = Math.abs(a.row - t.row), l = Math.abs(o.row - t.row);
368
- return n !== l ? n - l : Math.abs(a.column - t.column) - Math.abs(o.column - t.column);
367
+ const n = Math.abs(i.row - t.row), l = Math.abs(o.row - t.row);
368
+ return n !== l ? n - l : Math.abs(i.column - t.column) - Math.abs(o.column - t.column);
369
369
  })[0]?.el || null;
370
370
  }
371
371
  _moveItemTo(t, e, s, r) {
372
- const i = this._metaForItem(t);
373
- !i || i.disabled || (t.setAttribute("data-row", String(e)), t.setAttribute("data-column", String(s)), this.dispatchEvent(
372
+ const a = this._metaForItem(t);
373
+ !a || a.disabled || (t.setAttribute("data-row", String(e)), t.setAttribute("data-column", String(s)), this.dispatchEvent(
374
374
  new CustomEvent("itemmove", {
375
375
  bubbles: !0,
376
376
  composed: !0,
377
377
  detail: {
378
- value: i.value,
378
+ value: a.value,
379
379
  reason: r,
380
- from: { row: i.row, column: i.column },
380
+ from: { row: a.row, column: a.column },
381
381
  to: { row: e, column: s }
382
382
  }
383
383
  })
384
384
  ), this.requestRender());
385
385
  }
386
386
  _swapItems(t, e, s) {
387
- const r = this._metaForItem(t), i = this._metaForItem(e);
388
- !r || !i || (t.setAttribute("data-row", String(i.row)), t.setAttribute("data-column", String(i.column)), e.setAttribute("data-row", String(r.row)), e.setAttribute("data-column", String(r.column)), this.dispatchEvent(
387
+ const r = this._metaForItem(t), a = this._metaForItem(e);
388
+ !r || !a || (t.setAttribute("data-row", String(a.row)), t.setAttribute("data-column", String(a.column)), e.setAttribute("data-row", String(r.row)), e.setAttribute("data-column", String(r.column)), this.dispatchEvent(
389
389
  new CustomEvent("itemmove", {
390
390
  bubbles: !0,
391
391
  composed: !0,
392
392
  detail: {
393
393
  value: r.value,
394
- targetValue: i.value,
394
+ targetValue: a.value,
395
395
  reason: s,
396
396
  from: { row: r.row, column: r.column },
397
- to: { row: i.row, column: i.column }
397
+ to: { row: a.row, column: a.column }
398
398
  }
399
399
  })
400
400
  ), this.requestRender());
@@ -410,24 +410,24 @@ class I extends b {
410
410
  if (!e) return;
411
411
  const s = this._metaForItem(e);
412
412
  if (!s || s.disabled) return;
413
- const r = t.key, i = r === "ArrowLeft" || r === "ArrowRight" || r === "ArrowUp" || r === "ArrowDown";
414
- if (t.altKey && this._isDraggable() && i) {
413
+ const r = t.key, a = r === "ArrowLeft" || r === "ArrowRight" || r === "ArrowUp" || r === "ArrowDown";
414
+ if (t.altKey && this._isDraggable() && a) {
415
415
  t.preventDefault();
416
416
  const o = r === "ArrowDown" ? 1 : r === "ArrowUp" ? -1 : 0, n = r === "ArrowRight" ? 1 : r === "ArrowLeft" ? -1 : 0;
417
417
  this._moveItemTo(e, Math.max(1, s.row + o), Math.max(1, s.column + n), "keyboard"), this._setFocusedItem(e, !0);
418
418
  return;
419
419
  }
420
- let a = null;
421
- if (r === "ArrowLeft") a = this._findNeighbor(s, "left");
422
- else if (r === "ArrowRight") a = this._findNeighbor(s, "right");
423
- else if (r === "ArrowUp") a = this._findNeighbor(s, "up");
424
- else if (r === "ArrowDown") a = this._findNeighbor(s, "down");
425
- else if (r === "Home") a = (this._order() === "row-major" ? this._sortMeta(this._computeItems()) : this._computeItems())[0]?.el || null;
420
+ let i = null;
421
+ if (r === "ArrowLeft") i = this._findNeighbor(s, "left");
422
+ else if (r === "ArrowRight") i = this._findNeighbor(s, "right");
423
+ else if (r === "ArrowUp") i = this._findNeighbor(s, "up");
424
+ else if (r === "ArrowDown") i = this._findNeighbor(s, "down");
425
+ else if (r === "Home") i = (this._order() === "row-major" ? this._sortMeta(this._computeItems()) : this._computeItems())[0]?.el || null;
426
426
  else if (r === "End") {
427
427
  const o = this._order() === "row-major" ? this._sortMeta(this._computeItems()) : this._computeItems();
428
- a = o[o.length - 1]?.el || null;
428
+ i = o[o.length - 1]?.el || null;
429
429
  }
430
- a && (t.preventDefault(), this._setFocusedItem(a, !0));
430
+ i && (t.preventDefault(), this._setFocusedItem(i, !0));
431
431
  }
432
432
  _onDragStart(t) {
433
433
  if (!this._isDraggable()) return;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./ElementBase-EV6mVBUV.js"),o=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./ElementBase-DxbvhLJs.js"),o=`
2
2
  :host {
3
3
  position: fixed;
4
4
  display: block;
@@ -121,7 +121,7 @@
121
121
  <header class="header" part="header" style="display:flex;align-items:flex-start;gap:10px;padding:12px 14px 0;">
122
122
  <div style="min-width:0;display:grid;gap:4px;flex:1 1 auto;">
123
123
  ${e?`<strong part="title" style="font-size:14px;line-height:1.3;">${e}</strong>`:""}
124
- ${t?`<p part="description" style="margin:0;font-size:12px;line-height:1.4;color:var(--ui-color-muted, #64748b);">${t}</p>`:""}
124
+ ${t?`<p part="description" style="margin:0;font-size:12px;line-height:1.4;color:var(--ui-color-muted, #526175);">${t}</p>`:""}
125
125
  </div>
126
126
  ${i?'<button type="button" class="dismiss" part="dismiss-button" aria-label="Close panel" style="border:none;background:transparent;color:inherit;cursor:pointer;font:inherit;padding:4px 6px;">Close</button>':""}
127
127
  </header>
@@ -1,4 +1,4 @@
1
- import { E as a } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as a } from "./ElementBase-BeZT54Hj.mjs";
2
2
  const s = `
3
3
  :host {
4
4
  position: fixed;
@@ -155,7 +155,7 @@ class o extends a {
155
155
  <header class="header" part="header" style="display:flex;align-items:flex-start;gap:10px;padding:12px 14px 0;">
156
156
  <div style="min-width:0;display:grid;gap:4px;flex:1 1 auto;">
157
157
  ${e ? `<strong part="title" style="font-size:14px;line-height:1.3;">${e}</strong>` : ""}
158
- ${t ? `<p part="description" style="margin:0;font-size:12px;line-height:1.4;color:var(--ui-color-muted, #64748b);">${t}</p>` : ""}
158
+ ${t ? `<p part="description" style="margin:0;font-size:12px;line-height:1.4;color:var(--ui-color-muted, #526175);">${t}</p>` : ""}
159
159
  </div>
160
160
  ${i ? '<button type="button" class="dismiss" part="dismiss-button" aria-label="Close panel" style="border:none;background:transparent;color:inherit;cursor:pointer;font:inherit;padding:4px 6px;">Close</button>' : ""}
161
161
  </header>
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-EV6mVBUV.js"),f=require("./portal-DgpQ3Jo1.js"),b=require("./dismissable-layer-DNfrKA20.js"),g=require("./positioner-D_fqyx_j.js"),m=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),f=require("./portal-DgpQ3Jo1.js"),b=require("./dismissable-layer-DNfrKA20.js"),g=require("./positioner-D_fqyx_j.js"),m=`
2
2
  .popover-shell {
3
3
  --ui-popover-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
4
4
  --ui-popover-bg:
@@ -8,7 +8,7 @@
8
8
  color-mix(in srgb, var(--ui-color-surface-elevated, #f8fafc) 24%, var(--ui-color-surface, #ffffff)) 100%
9
9
  );
10
10
  --ui-popover-text: var(--ui-color-text, #0f172a);
11
- --ui-popover-muted: var(--ui-color-muted, #64748b);
11
+ --ui-popover-muted: var(--ui-color-muted, #526175);
12
12
  --ui-popover-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 70%, transparent);
13
13
  --ui-popover-border: 1px solid var(--ui-popover-border-color);
14
14
  --ui-popover-shadow:
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  .popover-shell[data-tone="neutral"] {
48
- --ui-popover-accent: var(--ui-color-muted, #64748b);
48
+ --ui-popover-accent: var(--ui-color-muted, #526175);
49
49
  }
50
50
 
51
51
  .popover-shell[data-tone="brand"],
@@ -54,11 +54,11 @@
54
54
  }
55
55
 
56
56
  .popover-shell[data-tone="success"] {
57
- --ui-popover-accent: var(--ui-color-success, #16a34a);
57
+ --ui-popover-accent: var(--ui-color-success, #15803d);
58
58
  }
59
59
 
60
60
  .popover-shell[data-tone="warning"] {
61
- --ui-popover-accent: var(--ui-color-warning, #d97706);
61
+ --ui-popover-accent: var(--ui-color-warning, #b45309);
62
62
  }
63
63
 
64
64
  .popover-shell[data-tone="danger"] {
@@ -283,4 +283,4 @@
283
283
  box-shadow: none;
284
284
  }
285
285
  }
286
- `;class d extends h.ElementBase{constructor(){super(),this._portalEl=null,this._panelEl=null,this._positioner=null,this._layer=null,this._isOpen=!1,this._restoreFocusEl=null,this._contentObserver=null,this._hostObserver=null,this._syncPortalScheduled=!1,this._onHostClick=this._handleHostClick.bind(this)}static get observedAttributes(){return["open","placement","offset","flip","shift","close-on-escape","close-on-outside","variant","tone","size","radius","elevation"]}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"){this._syncOpenState();return}this._isOpen&&this._portalEl?.isConnected&&(e==="placement"||e==="offset"||e==="flip"||e==="shift"||e==="variant"||e==="tone"||e==="size"||e==="radius"||e==="elevation"?this._mountPortal():(e==="close-on-escape"||e==="close-on-outside")&&this._syncDismissableLayer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onHostClick),this._observeHost(),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("click",this._onHostClick),this._hostObserver?.disconnect(),this._hostObserver=null,this._teardownPortal(),super.disconnectedCallback()}_handleHostClick(e){const t=this._getTrigger();if(!t)return;const r=typeof e.composedPath=="function"?e.composedPath():[],o=e.target instanceof Node?e.target:null;(r.includes(t)||o&&(t===o||t.contains(o)))&&this.toggle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}toggle(){this.hasAttribute("open")?this.close():this.open()}updatePosition(){this._positioner?.update()}_getTrigger(){return this.querySelector('[slot="trigger"]')}_buildPortalContent(){const e=document.createElement("div");e.className="popover-shell",e.style.pointerEvents="auto";const t=this.getAttribute("variant");t&&(e.dataset.variant=t);const r=this.getAttribute("tone");r&&(e.dataset.tone=r);const o=this.getAttribute("size");o&&(e.dataset.size=o);const a=this.getAttribute("elevation");a&&(e.dataset.elevation=a);const s=this.getAttribute("radius");if(s&&s.trim()){const p=s.trim(),v=/^-?\d+(\.\d+)?$/.test(p)?`${p}px`:p;e.style.setProperty("--ui-popover-radius",v)}const l=document.createElement("style");l.textContent=m,e.appendChild(l);const i=document.createElement("div");i.className="panel show",this._panelEl=i;const c=document.createElement("div");c.className="arrow",i.appendChild(c);const u=this.querySelector('[slot="content"]'),n=document.createElement("div");return n.className="content",u&&n.appendChild(u.cloneNode(!0)),i.appendChild(n),e.appendChild(i),e}_getContentSource(){return this.querySelector('[slot="content"]')}_placement(){const e=this.getAttribute("placement");return e||"bottom"}_offset(){const e=Number(this.getAttribute("offset"));return Number.isFinite(e)?e:8}_closeOnEscape(){return this.getAttribute("close-on-escape")!=="false"}_closeOnOutside(){return this.getAttribute("close-on-outside")!=="false"}_syncDismissableLayer(){const e=this._getTrigger();!e||!this._panelEl||(this._layer?.destroy(),this._layer=b.createDismissableLayer({node:this._panelEl,trigger:e,closeOnEscape:this._closeOnEscape(),closeOnPointerOutside:this._closeOnOutside(),onDismiss:()=>this.close()}))}_teardownPortal(){if(this._contentObserver?.disconnect(),this._contentObserver=null,this._layer?.destroy(),this._layer=null,this._positioner?.destroy(),this._positioner=null,this._panelEl=null,this._portalEl?.parentElement)try{this._portalEl.parentElement.removeChild(this._portalEl)}catch{}this._portalEl=null}_schedulePortalSync(){this._syncPortalScheduled||!this._isOpen||(this._syncPortalScheduled=!0,queueMicrotask(()=>{this._syncPortalScheduled=!1,this._isOpen&&this._mountPortal()}))}_observeContent(){this._contentObserver?.disconnect(),this._contentObserver=null;const e=this._getContentSource();!e||typeof MutationObserver>"u"||(this._contentObserver=new MutationObserver(()=>this._schedulePortalSync()),this._contentObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}_observeHost(){this._hostObserver?.disconnect(),this._hostObserver=null,!(typeof MutationObserver>"u")&&(this._hostObserver=new MutationObserver(()=>this._schedulePortalSync()),this._hostObserver.observe(this,{childList:!0,subtree:!1}))}_mountPortal(){const e=this._getTrigger();if(!e)return;this._teardownPortal(),this._portalEl=this._buildPortalContent();const t=f.createPortalContainer();t&&(t.appendChild(this._portalEl),this._observeContent(),this._positioner=g.createPositioner({anchor:e,floating:this._portalEl,placement:this._placement(),offset:this._offset(),shift:this.getAttribute("shift")!=="false",flip:this.getAttribute("flip")!=="false",arrow:this._portalEl.querySelector(".arrow")}),this._syncDismissableLayer())}_syncOpenState(){const e=this.hasAttribute("open");if(e===this._isOpen){e&&(!this._portalEl||!this._portalEl.isConnected?this._mountPortal():this._positioner?.update());return}if(this._isOpen=e,e){this._restoreFocusEl=document.activeElement instanceof HTMLElement?document.activeElement:null,this._mountPortal(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!0},bubbles:!0,composed:!0}));return}this._teardownPortal(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!1},bubbles:!0,composed:!0}));const t=this._getTrigger(),r=this._restoreFocusEl;this._restoreFocusEl=null;const o=(t&&t.isConnected?t:r)||null;if(o&&o.isConnected)try{o.focus()}catch{}}render(){this.setContent('<slot name="trigger"></slot>')}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-popover")&&customElements.define("ui-popover",d);exports.UIPopover=d;
286
+ `;class d extends h.ElementBase{constructor(){super(),this._portalEl=null,this._panelEl=null,this._positioner=null,this._layer=null,this._isOpen=!1,this._restoreFocusEl=null,this._contentObserver=null,this._hostObserver=null,this._syncPortalScheduled=!1,this._onHostClick=this._handleHostClick.bind(this)}static get observedAttributes(){return["open","placement","offset","flip","shift","close-on-escape","close-on-outside","variant","tone","size","radius","elevation"]}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"){this._syncOpenState();return}this._isOpen&&this._portalEl?.isConnected&&(e==="placement"||e==="offset"||e==="flip"||e==="shift"||e==="variant"||e==="tone"||e==="size"||e==="radius"||e==="elevation"?this._mountPortal():(e==="close-on-escape"||e==="close-on-outside")&&this._syncDismissableLayer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onHostClick),this._observeHost(),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("click",this._onHostClick),this._hostObserver?.disconnect(),this._hostObserver=null,this._teardownPortal(),super.disconnectedCallback()}_handleHostClick(e){const t=this._getTrigger();if(!t)return;const r=typeof e.composedPath=="function"?e.composedPath():[],o=e.target instanceof Node?e.target:null;(r.includes(t)||o&&(t===o||t.contains(o)))&&this.toggle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}toggle(){this.hasAttribute("open")?this.close():this.open()}updatePosition(){this._positioner?.update()}_getTrigger(){return this.querySelector('[slot="trigger"]')}_buildPortalContent(){const e=document.createElement("div");e.className="popover-shell",e.style.pointerEvents="auto";const t=this.getAttribute("variant");t&&(e.dataset.variant=t);const r=this.getAttribute("tone");r&&(e.dataset.tone=r);const o=this.getAttribute("size");o&&(e.dataset.size=o);const s=this.getAttribute("elevation");s&&(e.dataset.elevation=s);const a=this.getAttribute("radius");if(a&&a.trim()){const p=a.trim(),v=/^-?\d+(\.\d+)?$/.test(p)?`${p}px`:p;e.style.setProperty("--ui-popover-radius",v)}const l=document.createElement("style");l.textContent=m,e.appendChild(l);const i=document.createElement("div");i.className="panel show",this._panelEl=i;const c=document.createElement("div");c.className="arrow",i.appendChild(c);const u=this.querySelector('[slot="content"]'),n=document.createElement("div");return n.className="content",u&&n.appendChild(u.cloneNode(!0)),i.appendChild(n),e.appendChild(i),e}_getContentSource(){return this.querySelector('[slot="content"]')}_placement(){const e=this.getAttribute("placement");return e||"bottom"}_offset(){const e=Number(this.getAttribute("offset"));return Number.isFinite(e)?e:8}_closeOnEscape(){return this.getAttribute("close-on-escape")!=="false"}_closeOnOutside(){return this.getAttribute("close-on-outside")!=="false"}_syncDismissableLayer(){const e=this._getTrigger();!e||!this._panelEl||(this._layer?.destroy(),this._layer=b.createDismissableLayer({node:this._panelEl,trigger:e,closeOnEscape:this._closeOnEscape(),closeOnPointerOutside:this._closeOnOutside(),onDismiss:()=>this.close()}))}_teardownPortal(){if(this._contentObserver?.disconnect(),this._contentObserver=null,this._layer?.destroy(),this._layer=null,this._positioner?.destroy(),this._positioner=null,this._panelEl=null,this._portalEl?.parentElement)try{this._portalEl.parentElement.removeChild(this._portalEl)}catch{}this._portalEl=null}_schedulePortalSync(){this._syncPortalScheduled||!this._isOpen||(this._syncPortalScheduled=!0,queueMicrotask(()=>{this._syncPortalScheduled=!1,this._isOpen&&this._mountPortal()}))}_observeContent(){this._contentObserver?.disconnect(),this._contentObserver=null;const e=this._getContentSource();!e||typeof MutationObserver>"u"||(this._contentObserver=new MutationObserver(()=>this._schedulePortalSync()),this._contentObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}_observeHost(){this._hostObserver?.disconnect(),this._hostObserver=null,!(typeof MutationObserver>"u")&&(this._hostObserver=new MutationObserver(()=>this._schedulePortalSync()),this._hostObserver.observe(this,{childList:!0,subtree:!1}))}_mountPortal(){const e=this._getTrigger();if(!e)return;this._teardownPortal(),this._portalEl=this._buildPortalContent();const t=f.createPortalContainer();t&&(t.appendChild(this._portalEl),this._observeContent(),this._positioner=g.createPositioner({anchor:e,floating:this._portalEl,placement:this._placement(),offset:this._offset(),shift:this.getAttribute("shift")!=="false",flip:this.getAttribute("flip")!=="false",arrow:this._portalEl.querySelector(".arrow")}),this._syncDismissableLayer())}_syncOpenState(){const e=this.hasAttribute("open");if(e===this._isOpen){e&&(!this._portalEl||!this._portalEl.isConnected?this._mountPortal():this._positioner?.update());return}if(this._isOpen=e,e){this._restoreFocusEl=document.activeElement instanceof HTMLElement?document.activeElement:null,this._mountPortal(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!0},bubbles:!0,composed:!0}));return}this._teardownPortal(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!1},bubbles:!0,composed:!0}));const t=this._getTrigger(),r=this._restoreFocusEl;this._restoreFocusEl=null;const o=(t&&t.isConnected?t:r)||null;if(o&&o.isConnected)try{o.focus()}catch{}}render(){this.setContent('<slot name="trigger"></slot>')}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-popover")&&customElements.define("ui-popover",d);exports.UIPopover=d;
@@ -1,4 +1,4 @@
1
- import { E as v } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as v } from "./ElementBase-BeZT54Hj.mjs";
2
2
  import { b as h } from "./portal-bR42gHvG.mjs";
3
3
  import { c as f } from "./dismissable-layer-BmPIoK80.mjs";
4
4
  import { e as b } from "./positioner-D0VGxtYU.mjs";
@@ -12,7 +12,7 @@ const g = `
12
12
  color-mix(in srgb, var(--ui-color-surface-elevated, #f8fafc) 24%, var(--ui-color-surface, #ffffff)) 100%
13
13
  );
14
14
  --ui-popover-text: var(--ui-color-text, #0f172a);
15
- --ui-popover-muted: var(--ui-color-muted, #64748b);
15
+ --ui-popover-muted: var(--ui-color-muted, #526175);
16
16
  --ui-popover-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 70%, transparent);
17
17
  --ui-popover-border: 1px solid var(--ui-popover-border-color);
18
18
  --ui-popover-shadow:
@@ -49,7 +49,7 @@ const g = `
49
49
  }
50
50
 
51
51
  .popover-shell[data-tone="neutral"] {
52
- --ui-popover-accent: var(--ui-color-muted, #64748b);
52
+ --ui-popover-accent: var(--ui-color-muted, #526175);
53
53
  }
54
54
 
55
55
  .popover-shell[data-tone="brand"],
@@ -58,11 +58,11 @@ const g = `
58
58
  }
59
59
 
60
60
  .popover-shell[data-tone="success"] {
61
- --ui-popover-accent: var(--ui-color-success, #16a34a);
61
+ --ui-popover-accent: var(--ui-color-success, #15803d);
62
62
  }
63
63
 
64
64
  .popover-shell[data-tone="warning"] {
65
- --ui-popover-accent: var(--ui-color-warning, #d97706);
65
+ --ui-popover-accent: var(--ui-color-warning, #b45309);
66
66
  }
67
67
 
68
68
  .popover-shell[data-tone="danger"] {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-EV6mVBUV.js"),l=require("./selector-BvAh35ve.js"),a=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-DxbvhLJs.js"),l=require("./selector-BvAh35ve.js"),a=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -1,4 +1,4 @@
1
- import { E as n } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as n } from "./ElementBase-BeZT54Hj.mjs";
2
2
  import { s as o } from "./selector-WI8pD7YO.mjs";
3
3
  const a = `
4
4
  :host {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-EV6mVBUV.js"),h=require("./positioner-D_fqyx_j.js"),a=require("./selector-BvAh35ve.js"),d=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),h=require("./positioner-D_fqyx_j.js"),a=require("./selector-BvAh35ve.js"),d=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -1,4 +1,4 @@
1
- import { E as h } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as h } from "./ElementBase-BeZT54Hj.mjs";
2
2
  import { e as c } from "./positioner-D0VGxtYU.mjs";
3
3
  import { s as l } from "./selector-WI8pD7YO.mjs";
4
4
  const u = `
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-EV6mVBUV.js"),l=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-DxbvhLJs.js"),l=`
2
2
  :host {
3
3
  --ui-presence-duration-enter: 180ms;
4
4
  --ui-presence-duration-exit: 150ms;
@@ -1,4 +1,4 @@
1
- import { E as c } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as c } from "./ElementBase-BeZT54Hj.mjs";
2
2
  const d = `
3
3
  :host {
4
4
  --ui-presence-duration-enter: 180ms;
@@ -0,0 +1,30 @@
1
+ export declare function syncControlName(control: HTMLElement | null | undefined, host: HTMLElement, labelId: string | null, fallbackName?: string): void;
2
+ /**
3
+ * Keeps the text of an `<slot>`'s fallback content in step with an attribute. Fallback text written
4
+ * only at first render goes stale when a framework sets the attribute after the element connects
5
+ * (React does), leaving an empty label or description.
6
+ */
7
+ export declare function syncSlotFallbackText(slot: HTMLSlotElement | null | undefined, text: string): void;
8
+ /**
9
+ * What the host was described with from outside its shadow root: its own `aria-description` plus the text
10
+ * of any `aria-describedby` ids that resolve where the host lives. A `ui-field` supplies its description
11
+ * and error this way; its own ids sit in another shadow root and could never be followed.
12
+ */
13
+ export declare function externalDescriptionText(host: HTMLElement): string;
14
+ /**
15
+ * Keeps one visually hidden element, next to `anchor`, holding the host's external description, and
16
+ * returns its id (or null when there is nothing to say) so a control in the same shadow root can point
17
+ * an aria-describedby at it.
18
+ */
19
+ export declare function syncExternalDescription(anchor: HTMLElement | null | undefined, host: HTMLElement, uid: string): string | null;
20
+ /**
21
+ * Sets `aria-describedby` on a control inside a shadow root: the ids of descriptions that live in that
22
+ * same root (`ownIds`), plus the host's external description (see `syncExternalDescription`).
23
+ */
24
+ export declare function syncControlDescription(control: HTMLElement | null | undefined, host: HTMLElement, uid: string, ownIds?: string[]): void;
25
+ /** The same hidden description as markup, for components that render their shadow root from a template. */
26
+ export declare function externalDescriptionMarkup(host: HTMLElement, uid: string): {
27
+ id: string;
28
+ html: string;
29
+ };
30
+ //# sourceMappingURL=control-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-name.d.ts","sourceRoot":"","sources":["../../src/primitives/control-name.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EACvC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,YAAY,SAAK,GAChB,IAAI,CAaN;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAIjG;AAKD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAUjE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqB7H;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EACvC,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,MAAM,EACX,MAAM,GAAE,MAAM,EAAO,GACpB,IAAI,CASN;AAED,2GAA2G;AAC3G,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAMtG"}
@@ -0,0 +1,2 @@
1
+ export declare function resolveTriggerControl(trigger: HTMLElement): HTMLElement;
2
+ //# sourceMappingURL=trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/primitives/trigger.ts"],"names":[],"mappings":"AAMA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAQvE"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./ElementBase-EV6mVBUV.js"),g=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("./ElementBase-DxbvhLJs.js"),m=`
2
2
  :host {
3
3
  display: block;
4
4
  width: 100%;
@@ -311,8 +311,8 @@
311
311
  border-width: 2px;
312
312
  }
313
313
  }
314
- `;function u(e,r,t){return Number.isNaN(e)||e<r?r:e>t?t:e}function b(e,r){if(e==null)return r;const t=String(e).toLowerCase();return t!=="false"&&t!=="0"}function d(e,r){if(e==null||e==="")return r;const t=Number(e);return Number.isFinite(t)?t:r}function m(e){return e==="xs"||e==="sm"||e==="lg"?e:"md"}function v(e){return e==="solid"||e==="soft"||e==="line"||e==="glass"||e==="contrast"?e:"default"}function _(e){return e==="success"||e==="warning"||e==="danger"||e==="info"||e==="neutral"?e:"brand"}function x(e){return e==="square"||e==="round"?e:"pill"}function E(e){return e==="circle"||e==="radial"?"circle":"line"}class p extends f.ElementBase{constructor(){super(),this._value=0,this._buffer=0,this._max=100,this._min=0,this._percent=0,this._bufferPercent=0,this._indeterminate=!1,this._domReady=!1,this._metaEl=null,this._trackEl=null,this._bufferEl=null,this._valueEl=null,this._radialWrapEl=null,this._radialBufferEl=null,this._radialValueEl=null,this._radialCenterEl=null,this._lastEmitted="",this._completeFired=!1}static get observedAttributes(){return["value","buffer","max","min","indeterminate","size","variant","tone","shape","mode","striped","animated","show-label","label","format","precision","headless"]}connectedCallback(){this._syncFromAttributes(),super.connectedCallback(),this._emitState()}attributeChangedCallback(r,t,i){t!==i&&(this._syncFromAttributes(),this.isConnected&&this.render(),(r==="value"||r==="buffer"||r==="max"||r==="min"||r==="indeterminate")&&this._emitState())}setValue(r){this.setAttribute("value",String(r))}setBuffer(r){this.setAttribute("buffer",String(r))}increment(r=1){this.setValue(this._value+r)}reset(){this.setValue(this._min)}_syncFromAttributes(){const r=d(this.getAttribute("min"),0),t=d(this.getAttribute("max"),100),i=t>r?t:r+1,s=d(this.getAttribute("value"),r),o=d(this.getAttribute("buffer"),s),c=this.hasAttribute("indeterminate"),n=u(s,r,i),a=u(o,r,i),l=Math.max(1e-6,i-r);this._min=r,this._max=i,this._value=n,this._buffer=a,this._indeterminate=c,this._percent=u((n-r)/l*100,0,100),this._bufferPercent=u((a-r)/l*100,0,100)}_formatLabel(r){const t=(this.getAttribute("format")||"percent").toLowerCase(),i=u(Math.round(d(this.getAttribute("precision"),0)),0,3);if(t==="value")return`${this._value.toFixed(i)} / ${this._max.toFixed(i)}`;if(t==="fraction"){const s=Math.max(1,this._max-this._min);return`${Math.max(0,this._value-this._min).toFixed(i)}/${s.toFixed(i)}`}return`${r.toFixed(i)}%`}_emitState(){if(this._indeterminate)return;const r=`${this._value}|${this._buffer}|${this._max}|${this._min}`;r!==this._lastEmitted&&(this._lastEmitted=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:this._value,buffer:this._buffer,max:this._max,min:this._min,percent:this._percent,bufferPercent:this._bufferPercent},bubbles:!0})),this._value>=this._max?this._completeFired||(this.dispatchEvent(new CustomEvent("complete",{detail:{value:this._value,max:this._max},bubbles:!0})),this._completeFired=!0):this._completeFired=!1)}_ensureDom(){this._domReady||(this.setContent(`
315
- <style>${g}</style>
314
+ `;function u(e,r,t){return Number.isNaN(e)||e<r?r:e>t?t:e}function v(e,r){if(e==null)return r;const t=String(e).toLowerCase();return t!=="false"&&t!=="0"}function c(e,r){if(e==null||e==="")return r;const t=Number(e);return Number.isFinite(t)?t:r}function _(e){return e==="xs"||e==="sm"||e==="lg"?e:"md"}function x(e){return e==="solid"||e==="soft"||e==="line"||e==="glass"||e==="contrast"?e:"default"}function E(e){return e==="success"||e==="warning"||e==="danger"||e==="info"||e==="neutral"?e:"brand"}function k(e){return e==="square"||e==="round"?e:"pill"}function A(e){return e==="circle"||e==="radial"?"circle":"line"}class p extends b.ElementBase{constructor(){super(),this._value=0,this._buffer=0,this._max=100,this._min=0,this._percent=0,this._bufferPercent=0,this._indeterminate=!1,this._domReady=!1,this._metaEl=null,this._trackEl=null,this._bufferEl=null,this._valueEl=null,this._radialWrapEl=null,this._radialBufferEl=null,this._radialValueEl=null,this._radialCenterEl=null,this._lastEmitted="",this._completeFired=!1}static get observedAttributes(){return["value","buffer","max","min","indeterminate","size","variant","tone","shape","mode","striped","animated","show-label","label","aria-label","format","precision","headless"]}connectedCallback(){this._syncFromAttributes(),super.connectedCallback(),this._emitState()}attributeChangedCallback(r,t,i){t!==i&&(this._syncFromAttributes(),this.isConnected&&this.render(),(r==="value"||r==="buffer"||r==="max"||r==="min"||r==="indeterminate")&&this._emitState())}setValue(r){this.setAttribute("value",String(r))}setBuffer(r){this.setAttribute("buffer",String(r))}increment(r=1){this.setValue(this._value+r)}reset(){this.setValue(this._min)}_syncFromAttributes(){const r=c(this.getAttribute("min"),0),t=c(this.getAttribute("max"),100),i=t>r?t:r+1,s=c(this.getAttribute("value"),r),o=c(this.getAttribute("buffer"),s),d=this.hasAttribute("indeterminate"),l=u(s,r,i),a=u(o,r,i),n=Math.max(1e-6,i-r);this._min=r,this._max=i,this._value=l,this._buffer=a,this._indeterminate=d,this._percent=u((l-r)/n*100,0,100),this._bufferPercent=u((a-r)/n*100,0,100)}_formatLabel(r){const t=(this.getAttribute("format")||"percent").toLowerCase(),i=u(Math.round(c(this.getAttribute("precision"),0)),0,3);if(t==="value")return`${this._value.toFixed(i)} / ${this._max.toFixed(i)}`;if(t==="fraction"){const s=Math.max(1,this._max-this._min);return`${Math.max(0,this._value-this._min).toFixed(i)}/${s.toFixed(i)}`}return`${r.toFixed(i)}%`}_emitState(){if(this._indeterminate)return;const r=`${this._value}|${this._buffer}|${this._max}|${this._min}`;r!==this._lastEmitted&&(this._lastEmitted=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:this._value,buffer:this._buffer,max:this._max,min:this._min,percent:this._percent,bufferPercent:this._bufferPercent},bubbles:!0})),this._value>=this._max?this._completeFired||(this.dispatchEvent(new CustomEvent("complete",{detail:{value:this._value,max:this._max},bubbles:!0})),this._completeFired=!0):this._completeFired=!1)}_ensureDom(){this._domReady||(this.setContent(`
315
+ <style>${m}</style>
316
316
  <div class="root" part="root">
317
317
  <div class="meta" part="label"></div>
318
318
  <div class="track" part="track" role="progressbar">
@@ -326,4 +326,4 @@
326
326
  <div class="radial-center" part="radial-label"></div>
327
327
  </div>
328
328
  </div>
329
- `),this._metaEl=this.root.querySelector(".meta"),this._trackEl=this.root.querySelector(".track"),this._bufferEl=this.root.querySelector(".buffer"),this._valueEl=this.root.querySelector(".value"),this._radialWrapEl=this.root.querySelector(".radial-wrap"),this._radialBufferEl=this.root.querySelector(".radial-buffer"),this._radialValueEl=this.root.querySelector(".radial-value"),this._radialCenterEl=this.root.querySelector(".radial-center"),this._domReady=!0)}render(){this._ensureDom();const r=b(this.getAttribute("show-label"),!1),t=this.getAttribute("label"),i=t!=null&&t!==""?t:this._indeterminate?"Loading...":this._formatLabel(this._percent),s=m(this.getAttribute("size")),o=v(this.getAttribute("variant")),c=_(this.getAttribute("tone")),n=x(this.getAttribute("shape")),a=E(this.getAttribute("mode")),l=r&&a==="circle",h=r&&a!=="circle";this._metaEl&&(this._metaEl.textContent=h?i:"",this._metaEl.setAttribute("aria-hidden",h?"false":"true")),this._trackEl&&(this._trackEl.dataset.size=s,this._trackEl.dataset.variant=o,this._trackEl.dataset.tone=c,this._trackEl.dataset.shape=n,a==="line"?(this._trackEl.setAttribute("aria-valuemin",String(this._min)),this._trackEl.setAttribute("aria-valuemax",String(this._max)),this._trackEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._trackEl.setAttribute("role","progressbar"),this._indeterminate?(this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.setAttribute("aria-valuetext","Loading")):(this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.setAttribute("aria-valuenow",String(this._value)))):(this._trackEl.removeAttribute("role"),this._trackEl.removeAttribute("aria-valuemin"),this._trackEl.removeAttribute("aria-valuemax"),this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.removeAttribute("aria-busy"))),this._bufferEl&&(this._bufferEl.style.width=`${this._indeterminate?0:this._bufferPercent}%`),this._valueEl&&(this._valueEl.style.width=`${this._indeterminate?38:this._percent}%`),this._radialWrapEl&&(this._radialWrapEl.dataset.size=s,this._radialWrapEl.dataset.variant=o,this._radialWrapEl.dataset.tone=c,this._radialWrapEl.dataset.shape=n,a==="circle"?(this._radialWrapEl.setAttribute("aria-valuemin",String(this._min)),this._radialWrapEl.setAttribute("aria-valuemax",String(this._max)),this._radialWrapEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._radialWrapEl.setAttribute("role","progressbar"),this._indeterminate?(this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.setAttribute("aria-valuetext","Loading")):(this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.setAttribute("aria-valuenow",String(this._value)))):(this._radialWrapEl.removeAttribute("role"),this._radialWrapEl.removeAttribute("aria-valuemin"),this._radialWrapEl.removeAttribute("aria-valuemax"),this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.removeAttribute("aria-busy"))),this._radialBufferEl&&this._radialBufferEl.style.setProperty("--ui-radial-buffer",String(this._indeterminate?0:this._bufferPercent)),this._radialValueEl&&this._radialValueEl.style.setProperty("--ui-radial-value",String(this._indeterminate?24:this._percent)),this._radialCenterEl&&(this._radialCenterEl.textContent=l?i:"",this._radialCenterEl.setAttribute("aria-hidden",l?"false":"true"))}}typeof customElements<"u"&&!customElements.get("ui-progress")&&customElements.define("ui-progress",p);exports.UIProgress=p;
329
+ `),this._metaEl=this.root.querySelector(".meta"),this._trackEl=this.root.querySelector(".track"),this._bufferEl=this.root.querySelector(".buffer"),this._valueEl=this.root.querySelector(".value"),this._radialWrapEl=this.root.querySelector(".radial-wrap"),this._radialBufferEl=this.root.querySelector(".radial-buffer"),this._radialValueEl=this.root.querySelector(".radial-value"),this._radialCenterEl=this.root.querySelector(".radial-center"),this._domReady=!0)}render(){this._ensureDom();const r=v(this.getAttribute("show-label"),!1),t=this.getAttribute("label"),i=t!=null&&t!==""?t:this._indeterminate?"Loading...":this._formatLabel(this._percent),s=_(this.getAttribute("size")),o=x(this.getAttribute("variant")),d=E(this.getAttribute("tone")),l=k(this.getAttribute("shape")),a=A(this.getAttribute("mode")),n=r&&a==="circle",h=r&&a!=="circle",f=(this.getAttribute("aria-label")||"").trim()||(t||"").trim()||"Progress";for(const g of[this._trackEl,this._radialWrapEl])g?.setAttribute("aria-label",f);this._metaEl&&(this._metaEl.textContent=h?i:"",this._metaEl.setAttribute("aria-hidden",h?"false":"true")),this._trackEl&&(this._trackEl.dataset.size=s,this._trackEl.dataset.variant=o,this._trackEl.dataset.tone=d,this._trackEl.dataset.shape=l,a==="line"?(this._trackEl.setAttribute("aria-valuemin",String(this._min)),this._trackEl.setAttribute("aria-valuemax",String(this._max)),this._trackEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._trackEl.setAttribute("role","progressbar"),this._indeterminate?(this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.setAttribute("aria-valuetext","Loading")):(this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.setAttribute("aria-valuenow",String(this._value)))):(this._trackEl.removeAttribute("role"),this._trackEl.removeAttribute("aria-valuemin"),this._trackEl.removeAttribute("aria-valuemax"),this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.removeAttribute("aria-busy"))),this._bufferEl&&(this._bufferEl.style.width=`${this._indeterminate?0:this._bufferPercent}%`),this._valueEl&&(this._valueEl.style.width=`${this._indeterminate?38:this._percent}%`),this._radialWrapEl&&(this._radialWrapEl.dataset.size=s,this._radialWrapEl.dataset.variant=o,this._radialWrapEl.dataset.tone=d,this._radialWrapEl.dataset.shape=l,a==="circle"?(this._radialWrapEl.setAttribute("aria-valuemin",String(this._min)),this._radialWrapEl.setAttribute("aria-valuemax",String(this._max)),this._radialWrapEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._radialWrapEl.setAttribute("role","progressbar"),this._indeterminate?(this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.setAttribute("aria-valuetext","Loading")):(this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.setAttribute("aria-valuenow",String(this._value)))):(this._radialWrapEl.removeAttribute("role"),this._radialWrapEl.removeAttribute("aria-valuemin"),this._radialWrapEl.removeAttribute("aria-valuemax"),this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.removeAttribute("aria-busy"))),this._radialBufferEl&&this._radialBufferEl.style.setProperty("--ui-radial-buffer",String(this._indeterminate?0:this._bufferPercent)),this._radialValueEl&&this._radialValueEl.style.setProperty("--ui-radial-value",String(this._indeterminate?24:this._percent)),this._radialCenterEl&&(this._radialCenterEl.textContent=n?i:"",this._radialCenterEl.setAttribute("aria-hidden",n?"false":"true"))}}typeof customElements<"u"&&!customElements.get("ui-progress")&&customElements.define("ui-progress",p);exports.UIProgress=p;