@editora/ui-core 0.1.25 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/README.md +124 -0
  2. package/dist/accordion.cjs.js +13 -12
  3. package/dist/accordion.esm.js +13 -12
  4. package/dist/alert-dialog.cjs.js +76 -45
  5. package/dist/alert-dialog.esm.js +179 -135
  6. package/dist/alert.cjs.js +41 -32
  7. package/dist/alert.esm.js +79 -70
  8. package/dist/animated-beam.cjs.js +42 -50
  9. package/dist/animated-beam.esm.js +47 -55
  10. package/dist/animated-list.cjs.js +11 -27
  11. package/dist/animated-list.esm.js +12 -28
  12. package/dist/animated-text.cjs.js +4 -4
  13. package/dist/animated-text.esm.js +4 -4
  14. package/dist/app-header.cjs.js +5 -5
  15. package/dist/app-header.esm.js +6 -6
  16. package/dist/aspect-ratio.cjs.js +10 -12
  17. package/dist/aspect-ratio.esm.js +11 -13
  18. package/dist/avatar.cjs.js +13 -17
  19. package/dist/avatar.esm.js +13 -17
  20. package/dist/badge.cjs.js +27 -22
  21. package/dist/badge.esm.js +32 -27
  22. package/dist/block-controls.cjs.js +11 -12
  23. package/dist/block-controls.esm.js +8 -9
  24. package/dist/box.cjs.js +2 -3
  25. package/dist/box.esm.js +2 -3
  26. package/dist/breadcrumb.cjs.js +12 -18
  27. package/dist/breadcrumb.esm.js +11 -17
  28. package/dist/button.cjs.js +1 -1
  29. package/dist/button.esm.js +1 -1
  30. package/dist/{calendar-B3PUKHQm.mjs → calendar-DmxiZrR7.mjs} +126 -117
  31. package/dist/{calendar-D-mXMgqc.js → calendar-o273O28D.js} +53 -44
  32. package/dist/calendar.cjs.js +1 -1
  33. package/dist/calendar.esm.js +1 -1
  34. package/dist/card.cjs.js +6 -7
  35. package/dist/card.esm.js +5 -6
  36. package/dist/chart.cjs.js +52 -52
  37. package/dist/chart.esm.js +95 -95
  38. package/dist/checkbox.cjs.js +19 -15
  39. package/dist/checkbox.esm.js +19 -15
  40. package/dist/collapsible.cjs.js +7 -11
  41. package/dist/collapsible.esm.js +7 -11
  42. package/dist/color-picker.cjs.js +36 -17
  43. package/dist/color-picker.esm.js +132 -113
  44. package/dist/combobox.cjs.js +57 -54
  45. package/dist/combobox.esm.js +62 -58
  46. package/dist/command-palette.cjs.js +1 -0
  47. package/dist/command-palette.esm.js +1 -0
  48. package/dist/command.cjs.js +32 -14
  49. package/dist/command.esm.js +46 -28
  50. package/dist/components/date-time-utils.d.ts.map +1 -1
  51. package/dist/components/ui-accordion.d.ts.map +1 -1
  52. package/dist/components/ui-alert-dialog.d.ts +2 -0
  53. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  54. package/dist/components/ui-alert.d.ts.map +1 -1
  55. package/dist/components/ui-animated-beam.d.ts.map +1 -1
  56. package/dist/components/ui-animated-list.d.ts.map +1 -1
  57. package/dist/components/ui-aspect-ratio.d.ts.map +1 -1
  58. package/dist/components/ui-avatar.d.ts.map +1 -1
  59. package/dist/components/ui-badge.d.ts.map +1 -1
  60. package/dist/components/ui-block-controls.d.ts.map +1 -1
  61. package/dist/components/ui-box.d.ts.map +1 -1
  62. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  63. package/dist/components/ui-button.d.ts.map +1 -1
  64. package/dist/components/ui-calendar.d.ts.map +1 -1
  65. package/dist/components/ui-card.d.ts.map +1 -1
  66. package/dist/components/ui-checkbox.d.ts.map +1 -1
  67. package/dist/components/ui-collapsible.d.ts.map +1 -1
  68. package/dist/components/ui-color-picker.d.ts.map +1 -1
  69. package/dist/components/ui-combobox.d.ts.map +1 -1
  70. package/dist/components/ui-command-palette.d.ts.map +1 -1
  71. package/dist/components/ui-command.d.ts.map +1 -1
  72. package/dist/components/ui-container.d.ts.map +1 -1
  73. package/dist/components/ui-context-menu.d.ts.map +1 -1
  74. package/dist/components/ui-data-table.d.ts +7 -0
  75. package/dist/components/ui-data-table.d.ts.map +1 -1
  76. package/dist/components/ui-date-picker.d.ts.map +1 -1
  77. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  78. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  79. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  80. package/dist/components/ui-dialog.d.ts +2 -0
  81. package/dist/components/ui-dialog.d.ts.map +1 -1
  82. package/dist/components/ui-dock.d.ts.map +1 -1
  83. package/dist/components/ui-drawer.d.ts.map +1 -1
  84. package/dist/components/ui-dropdown.d.ts.map +1 -1
  85. package/dist/components/ui-empty-state.d.ts.map +1 -1
  86. package/dist/components/ui-field.d.ts.map +1 -1
  87. package/dist/components/ui-fieldset.d.ts.map +1 -1
  88. package/dist/components/ui-file-upload.d.ts.map +1 -1
  89. package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
  90. package/dist/components/ui-form.d.ts.map +1 -1
  91. package/dist/components/ui-icon-cloud.d.ts.map +1 -1
  92. package/dist/components/ui-inline-edit.d.ts.map +1 -1
  93. package/dist/components/ui-input.d.ts.map +1 -1
  94. package/dist/components/ui-marquee.d.ts.map +1 -1
  95. package/dist/components/ui-menu.d.ts.map +1 -1
  96. package/dist/components/ui-menubar.d.ts.map +1 -1
  97. package/dist/components/ui-meter.d.ts.map +1 -1
  98. package/dist/components/ui-multi-select.d.ts.map +1 -1
  99. package/dist/components/ui-number-field.d.ts.map +1 -1
  100. package/dist/components/ui-orbiter.d.ts.map +1 -1
  101. package/dist/components/ui-pagination.d.ts.map +1 -1
  102. package/dist/components/ui-password-field.d.ts.map +1 -1
  103. package/dist/components/ui-pin-input.d.ts.map +1 -1
  104. package/dist/components/ui-popover.d.ts.map +1 -1
  105. package/dist/components/ui-progress.d.ts.map +1 -1
  106. package/dist/components/ui-radio-group.d.ts.map +1 -1
  107. package/dist/components/ui-radio.d.ts.map +1 -1
  108. package/dist/components/ui-rating.d.ts +1 -0
  109. package/dist/components/ui-rating.d.ts.map +1 -1
  110. package/dist/components/ui-scroll-area.d.ts.map +1 -1
  111. package/dist/components/ui-section.d.ts.map +1 -1
  112. package/dist/components/ui-select.d.ts.map +1 -1
  113. package/dist/components/ui-selection-popup.d.ts.map +1 -1
  114. package/dist/components/ui-slider.d.ts.map +1 -1
  115. package/dist/components/ui-sortable.d.ts.map +1 -1
  116. package/dist/components/ui-spinning-text.d.ts.map +1 -1
  117. package/dist/components/ui-split-button.d.ts.map +1 -1
  118. package/dist/components/ui-splitter.d.ts.map +1 -1
  119. package/dist/components/ui-stepper.d.ts.map +1 -1
  120. package/dist/components/ui-switch.d.ts.map +1 -1
  121. package/dist/components/ui-tabs.d.ts.map +1 -1
  122. package/dist/components/ui-tags-input.d.ts.map +1 -1
  123. package/dist/components/ui-textarea.d.ts.map +1 -1
  124. package/dist/components/ui-time-picker.d.ts.map +1 -1
  125. package/dist/components/ui-toggle-group.d.ts +2 -0
  126. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  127. package/dist/components/ui-toggle.d.ts.map +1 -1
  128. package/dist/components/ui-toolbar.d.ts +2 -0
  129. package/dist/components/ui-toolbar.d.ts.map +1 -1
  130. package/dist/components/ui-tooltip.d.ts.map +1 -1
  131. package/dist/components/ui-transfer-list.d.ts.map +1 -1
  132. package/dist/components/ui-tree-item.d.ts.map +1 -1
  133. package/dist/components/ui-tree.d.ts.map +1 -1
  134. package/dist/components/ui-wizard.d.ts.map +1 -1
  135. package/dist/container.cjs.js +6 -12
  136. package/dist/container.esm.js +8 -14
  137. package/dist/context-menu.cjs.js +8 -8
  138. package/dist/context-menu.esm.js +42 -41
  139. package/dist/data-table.cjs.js +18 -15
  140. package/dist/data-table.esm.js +207 -187
  141. package/dist/date-field.cjs.js +8 -8
  142. package/dist/date-field.esm.js +7 -7
  143. package/dist/date-picker.cjs.js +27 -18
  144. package/dist/date-picker.esm.js +57 -48
  145. package/dist/date-range-picker.cjs.js +22 -17
  146. package/dist/date-range-picker.esm.js +31 -26
  147. package/dist/date-range-time-picker.cjs.js +26 -19
  148. package/dist/date-range-time-picker.esm.js +23 -16
  149. package/dist/date-time-picker.cjs.js +23 -16
  150. package/dist/date-time-picker.esm.js +88 -81
  151. package/dist/{date-time-utils-BTlxnz5j.mjs → date-time-utils-B4hAkt36.mjs} +75 -68
  152. package/dist/date-time-utils-DdigV4hs.js +1 -0
  153. package/dist/dialog.cjs.js +57 -41
  154. package/dist/dialog.esm.js +84 -51
  155. package/dist/dock.cjs.js +16 -30
  156. package/dist/dock.esm.js +26 -40
  157. package/dist/drawer.cjs.js +8 -12
  158. package/dist/drawer.esm.js +6 -10
  159. package/dist/dropdown.cjs.js +8 -6
  160. package/dist/dropdown.esm.js +33 -30
  161. package/dist/empty-state.cjs.js +17 -15
  162. package/dist/empty-state.esm.js +13 -11
  163. package/dist/field.cjs.js +22 -13
  164. package/dist/field.esm.js +54 -45
  165. package/dist/fieldset.cjs.js +18 -11
  166. package/dist/fieldset.esm.js +20 -13
  167. package/dist/file-upload.cjs.js +77 -35
  168. package/dist/file-upload.esm.js +152 -110
  169. package/dist/floating-toolbar.cjs.js +6 -7
  170. package/dist/floating-toolbar.esm.js +8 -9
  171. package/dist/form.cjs.js +20 -23
  172. package/dist/form.esm.js +20 -23
  173. package/dist/gantt.cjs.js +6 -6
  174. package/dist/gantt.esm.js +6 -6
  175. package/dist/hover-card.cjs.js +7 -7
  176. package/dist/hover-card.esm.js +7 -7
  177. package/dist/icon-cloud.cjs.js +19 -36
  178. package/dist/icon-cloud.esm.js +41 -58
  179. package/dist/index.cjs.js +1 -1
  180. package/dist/index.d.ts +2 -0
  181. package/dist/index.d.ts.map +1 -1
  182. package/dist/index.esm.js +108 -104
  183. package/dist/inline-edit.cjs.js +47 -19
  184. package/dist/inline-edit.esm.js +66 -38
  185. package/dist/input.cjs.js +44 -37
  186. package/dist/input.esm.js +59 -52
  187. package/dist/layout.cjs.js +3 -3
  188. package/dist/layout.esm.js +3 -3
  189. package/dist/marquee.cjs.js +7 -10
  190. package/dist/marquee.esm.js +7 -10
  191. package/dist/menu.cjs.js +8 -24
  192. package/dist/menu.esm.js +52 -72
  193. package/dist/menubar.cjs.js +9 -31
  194. package/dist/menubar.esm.js +127 -153
  195. package/dist/meter.cjs.js +4 -9
  196. package/dist/meter.esm.js +6 -11
  197. package/dist/multi-select.cjs.js +48 -35
  198. package/dist/multi-select.esm.js +67 -53
  199. package/dist/navigation-menu.cjs.js +10 -10
  200. package/dist/navigation-menu.esm.js +33 -33
  201. package/dist/number-field.cjs.js +27 -16
  202. package/dist/number-field.esm.js +36 -25
  203. package/dist/odometer.cjs.js +5 -5
  204. package/dist/odometer.esm.js +3 -3
  205. package/dist/orbiter.cjs.js +11 -28
  206. package/dist/orbiter.esm.js +28 -45
  207. package/dist/overlay-motion-B56x1GoY.js +49 -0
  208. package/dist/overlay-motion-BX3dPLay.mjs +120 -0
  209. package/dist/pagination.cjs.js +28 -25
  210. package/dist/pagination.esm.js +54 -51
  211. package/dist/password-field.cjs.js +38 -33
  212. package/dist/password-field.esm.js +62 -57
  213. package/dist/pin-input.cjs.js +17 -13
  214. package/dist/pin-input.esm.js +23 -19
  215. package/dist/plugin-panel.cjs.js +1 -1
  216. package/dist/plugin-panel.esm.js +1 -1
  217. package/dist/popover.cjs.js +16 -28
  218. package/dist/popover.esm.js +29 -45
  219. package/dist/portal-DeaM1tYY.mjs +121 -0
  220. package/dist/portal-XbYR3m_q.js +1 -0
  221. package/dist/portal.d.ts +3 -1
  222. package/dist/portal.d.ts.map +1 -1
  223. package/dist/{positioner-D0VGxtYU.mjs → positioner-BE8Nbho2.mjs} +5 -3
  224. package/dist/{positioner-D_fqyx_j.js → positioner-DZ1FW6A9.js} +1 -1
  225. package/dist/positioner.cjs.js +1 -1
  226. package/dist/positioner.esm.js +1 -1
  227. package/dist/primitives/overlay-motion.d.ts +47 -0
  228. package/dist/primitives/overlay-motion.d.ts.map +1 -0
  229. package/dist/primitives/positioner.d.ts.map +1 -1
  230. package/dist/progress.cjs.js +11 -16
  231. package/dist/progress.esm.js +37 -42
  232. package/dist/quick-actions.cjs.js +13 -13
  233. package/dist/quick-actions.esm.js +11 -11
  234. package/dist/radio-group.cjs.js +50 -26
  235. package/dist/radio-group.esm.js +53 -29
  236. package/dist/radio.cjs.js +15 -12
  237. package/dist/radio.esm.js +15 -12
  238. package/dist/rating.cjs.js +11 -15
  239. package/dist/rating.esm.js +48 -50
  240. package/dist/{runtime-CFnK53iC.mjs → runtime-CQM6wZOc.mjs} +498 -514
  241. package/dist/runtime-DxCl0A5q.js +5 -0
  242. package/dist/runtime.cjs.js +1 -1
  243. package/dist/runtime.d.ts +3 -2
  244. package/dist/runtime.d.ts.map +1 -1
  245. package/dist/runtime.esm.js +36 -32
  246. package/dist/scroll-area.cjs.js +3 -4
  247. package/dist/scroll-area.esm.js +3 -4
  248. package/dist/section.cjs.js +2 -4
  249. package/dist/section.esm.js +2 -4
  250. package/dist/select.cjs.js +40 -73
  251. package/dist/select.esm.js +55 -87
  252. package/dist/selection-popup.cjs.js +3 -4
  253. package/dist/selection-popup.esm.js +3 -4
  254. package/dist/semantic-tokens.d.ts +17 -0
  255. package/dist/semantic-tokens.d.ts.map +1 -0
  256. package/dist/sidebar.cjs.js +22 -22
  257. package/dist/sidebar.esm.js +25 -25
  258. package/dist/skeleton.cjs.js +2 -2
  259. package/dist/skeleton.esm.js +2 -2
  260. package/dist/slider.cjs.js +22 -26
  261. package/dist/slider.esm.js +25 -29
  262. package/dist/sortable.cjs.js +4 -5
  263. package/dist/sortable.esm.js +4 -5
  264. package/dist/spinning-text.cjs.js +4 -13
  265. package/dist/spinning-text.esm.js +4 -13
  266. package/dist/split-button.cjs.js +5 -5
  267. package/dist/split-button.esm.js +15 -14
  268. package/dist/splitter.cjs.js +52 -10
  269. package/dist/splitter.esm.js +55 -13
  270. package/dist/stepper.cjs.js +31 -65
  271. package/dist/stepper.esm.js +32 -66
  272. package/dist/switch.cjs.js +20 -22
  273. package/dist/switch.esm.js +20 -22
  274. package/dist/table.cjs.js +5 -5
  275. package/dist/table.esm.js +20 -20
  276. package/dist/tabs.cjs.js +91 -21
  277. package/dist/tabs.esm.js +182 -112
  278. package/dist/tags-input.cjs.js +41 -15
  279. package/dist/tags-input.esm.js +73 -47
  280. package/dist/textarea.cjs.js +32 -33
  281. package/dist/textarea.esm.js +38 -39
  282. package/dist/theme.d.ts +25 -1
  283. package/dist/theme.d.ts.map +1 -1
  284. package/dist/time-field.cjs.js +7 -7
  285. package/dist/time-field.esm.js +6 -6
  286. package/dist/time-picker.cjs.js +16 -13
  287. package/dist/time-picker.esm.js +27 -24
  288. package/dist/timeline.cjs.js +10 -10
  289. package/dist/timeline.esm.js +7 -7
  290. package/dist/toggle-group.cjs.js +13 -13
  291. package/dist/toggle-group.esm.js +66 -61
  292. package/dist/toggle.cjs.js +52 -34
  293. package/dist/toggle.esm.js +80 -62
  294. package/dist/toolbar.cjs.js +14 -14
  295. package/dist/toolbar.esm.js +41 -33
  296. package/dist/tooltip.cjs.js +3 -3
  297. package/dist/tooltip.esm.js +39 -33
  298. package/dist/transfer-list.cjs.js +28 -29
  299. package/dist/transfer-list.esm.js +28 -29
  300. package/dist/{tree-B_oQput6.mjs → tree-33fVNnaf.mjs} +6 -5
  301. package/dist/{tree-SivHxcAy.js → tree-Dc02MChE.js} +6 -5
  302. package/dist/tree-item.cjs.js +9 -8
  303. package/dist/tree-item.esm.js +13 -12
  304. package/dist/tree.cjs.js +1 -1
  305. package/dist/tree.esm.js +1 -1
  306. package/dist/{ui-button-Co8Sid6t.mjs → ui-button-C3OmI7Sn.mjs} +152 -154
  307. package/dist/{ui-button-BPrzJScZ.js → ui-button-CnLwXBnx.js} +107 -109
  308. package/dist/wizard.cjs.js +39 -36
  309. package/dist/wizard.esm.js +39 -36
  310. package/package.json +1 -1
  311. package/dist/date-time-utils-y3AvNvGe.js +0 -1
  312. package/dist/portal-DgpQ3Jo1.js +0 -1
  313. package/dist/portal-bR42gHvG.mjs +0 -118
  314. package/dist/runtime-DwE-tizc.js +0 -1
@@ -1,9 +1,9 @@
1
1
  import { E as I } from "./ElementBase-BeZT54Hj.mjs";
2
2
  const M = `
3
3
  :host {
4
- --ui-file-upload-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
4
+ --ui-file-upload-border-color: var(--ui-color-line, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent));
5
5
  --ui-file-upload-border: 1px solid var(--ui-file-upload-border-color);
6
- --ui-file-upload-radius: var(--ui-radius, 12px);
6
+ --ui-file-upload-radius: calc(var(--ui-radius, 6px) + 2px);
7
7
  --ui-file-upload-bg: var(--ui-color-surface, #ffffff);
8
8
  --ui-file-upload-text: var(--ui-color-text, #0f172a);
9
9
  --ui-file-upload-muted: var(--ui-color-muted, #526175);
@@ -75,10 +75,16 @@ const M = `
75
75
  box-sizing: border-box;
76
76
  }
77
77
 
78
+ :host(:not([disabled])) .surface:hover:not([data-dragging="true"]) {
79
+ border-color: var(--ui-color-line-strong, var(--ui-file-upload-border-color));
80
+ background: color-mix(in srgb, currentColor 2%, var(--ui-file-upload-bg));
81
+ }
82
+
78
83
  .surface[data-dragging="true"] {
79
- border-color: color-mix(in srgb, var(--ui-file-upload-focus) 62%, transparent);
80
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-file-upload-focus) 18%, transparent);
81
- transform: translateY(-1px);
84
+ border-color: var(--ui-file-upload-focus);
85
+ outline: var(--ui-ring-width, 2px) solid var(--ui-file-upload-focus);
86
+ outline-offset: -1px;
87
+ background: color-mix(in srgb, var(--ui-file-upload-focus) 6%, var(--ui-file-upload-bg));
82
88
  }
83
89
 
84
90
  :host([surface="dropzone"]) .surface {
@@ -86,16 +92,10 @@ const M = `
86
92
  justify-items: center;
87
93
  text-align: center;
88
94
  min-block-size: 168px;
89
- background:
90
- linear-gradient(
91
- 180deg,
92
- color-mix(in srgb, var(--ui-file-upload-bg) 94%, #ffffff 6%),
93
- var(--ui-file-upload-bg)
94
- );
95
95
  }
96
96
 
97
97
  .headline {
98
- font: 600 14px/1.35 "Inter", "IBM Plex Sans", sans-serif;
98
+ font: 500 14px/1.35 "Inter", "IBM Plex Sans", sans-serif;
99
99
  }
100
100
 
101
101
  .subline {
@@ -109,12 +109,24 @@ const M = `
109
109
  align-items: center;
110
110
  justify-content: center;
111
111
  border: none;
112
- border-radius: 999px;
113
- padding: 8px 12px;
114
- background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 12%, transparent);
115
- color: color-mix(in srgb, var(--ui-color-primary, #2563eb) 82%, #0f172a 18%);
116
- font: 600 12px/1 "Inter", "IBM Plex Sans", sans-serif;
112
+ border-radius: var(--ui-control-radius-2, var(--ui-radius, 6px));
113
+ min-height: var(--ui-control-height-2, 32px);
114
+ padding: 0 12px;
115
+ /* A primary button: the theme's text colour on its fill (the tinted version was unreadable on amber). */
116
+ background: var(--ui-color-primary, #2563eb);
117
+ color: var(--ui-color-foreground-on-primary, #ffffff);
118
+ font: 500 14px/1 "Inter", "IBM Plex Sans", sans-serif;
117
119
  cursor: pointer;
120
+ transition: background-color 120ms ease;
121
+ }
122
+
123
+ .cta:hover {
124
+ background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 88%, #000);
125
+ }
126
+
127
+ .cta:focus-visible {
128
+ outline: var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--ui-color-primary, #2563eb));
129
+ outline-offset: var(--ui-ring-offset, 2px);
118
130
  }
119
131
 
120
132
  .list {
@@ -129,9 +141,9 @@ const M = `
129
141
  justify-content: space-between;
130
142
  gap: 10px;
131
143
  padding: 10px 12px;
132
- border: 1px solid color-mix(in srgb, var(--ui-file-upload-border-color) 70%, transparent);
133
- border-radius: 14px;
134
- background: color-mix(in srgb, var(--ui-file-upload-bg) 97%, transparent);
144
+ border: 1px solid var(--ui-file-upload-border-color);
145
+ border-radius: var(--ui-file-upload-radius);
146
+ background: transparent;
135
147
  }
136
148
 
137
149
  .actions[hidden] {
@@ -166,15 +178,15 @@ const M = `
166
178
  gap: 10px;
167
179
  align-items: center;
168
180
  padding: 10px 12px;
169
- border: 1px solid color-mix(in srgb, var(--ui-file-upload-border-color) 76%, transparent);
170
- border-radius: 12px;
171
- background: color-mix(in srgb, var(--ui-file-upload-bg) 94%, transparent);
181
+ border: 1px solid var(--ui-file-upload-border-color);
182
+ border-radius: var(--ui-file-upload-radius);
183
+ background: transparent;
172
184
  }
173
185
 
174
186
  .preview {
175
187
  inline-size: 38px;
176
188
  block-size: 38px;
177
- border-radius: 10px;
189
+ border-radius: var(--ui-control-radius-2, var(--ui-radius, 6px));
178
190
  background: color-mix(in srgb, var(--ui-file-upload-text) 8%, transparent);
179
191
  overflow: hidden;
180
192
  display: inline-grid;
@@ -231,12 +243,12 @@ const M = `
231
243
 
232
244
  .status[data-state="pending"] {
233
245
  background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 10%, transparent);
234
- color: color-mix(in srgb, var(--ui-color-primary, #2563eb) 82%, #0f172a 18%);
246
+ color: var(--ui-color-accent-text, color-mix(in srgb, var(--ui-color-primary, #2563eb) 82%, #0f172a 18%));
235
247
  }
236
248
 
237
249
  .status[data-state="uploading"] {
238
250
  background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 14%, transparent);
239
- color: color-mix(in srgb, var(--ui-color-primary, #2563eb) 84%, #0f172a 16%);
251
+ color: var(--ui-color-accent-text, color-mix(in srgb, var(--ui-color-primary, #2563eb) 84%, #0f172a 16%));
240
252
  }
241
253
 
242
254
  .status[data-state="success"] {
@@ -271,7 +283,16 @@ const M = `
271
283
  .progress-bar {
272
284
  block-size: 100%;
273
285
  border-radius: inherit;
274
- background: color-mix(in srgb, var(--ui-file-upload-success) 74%, transparent);
286
+ background: var(--ui-color-primary, #2563eb);
287
+ transition: inline-size 200ms ease;
288
+ }
289
+
290
+ .progress-bar[data-state="success"] {
291
+ background: var(--ui-file-upload-success);
292
+ }
293
+
294
+ .progress-bar[data-state="error"] {
295
+ background: var(--ui-file-upload-danger);
275
296
  }
276
297
 
277
298
  .progress-text {
@@ -281,13 +302,24 @@ const M = `
281
302
  }
282
303
 
283
304
  .file-remove {
284
- border: none;
285
- border-radius: 999px;
286
- padding: 6px 9px;
287
- background: color-mix(in srgb, currentColor 8%, transparent);
305
+ border: 1px solid var(--ui-file-upload-border-color);
306
+ border-radius: var(--ui-control-radius-1, var(--ui-radius, 6px));
307
+ min-block-size: var(--ui-control-height-1, 24px);
308
+ padding: 0 8px;
309
+ background: transparent;
288
310
  color: inherit;
289
311
  cursor: pointer;
290
- font: 600 11px/1 "Inter", sans-serif;
312
+ font: 500 12px/1 "Inter", sans-serif;
313
+ transition: background-color 120ms ease;
314
+ }
315
+
316
+ .file-remove:hover {
317
+ background: var(--ui-color-fill-hover, color-mix(in srgb, currentColor 8%, transparent));
318
+ }
319
+
320
+ .file-remove:focus-visible {
321
+ outline: var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--ui-file-upload-focus));
322
+ outline-offset: var(--ui-ring-offset, 1px);
291
323
  }
292
324
 
293
325
  .file-remove[data-tone="danger"] {
@@ -295,8 +327,9 @@ const M = `
295
327
  }
296
328
 
297
329
  .file-remove[data-variant="primary"] {
330
+ border-color: transparent;
298
331
  background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 12%, transparent);
299
- color: color-mix(in srgb, var(--ui-color-primary, #2563eb) 84%, #0f172a 16%);
332
+ color: var(--ui-color-accent-text, color-mix(in srgb, var(--ui-color-primary, #2563eb) 84%, #0f172a 16%));
300
333
  }
301
334
 
302
335
  .file-error {
@@ -322,6 +355,15 @@ const M = `
322
355
  display: none;
323
356
  }
324
357
 
358
+ @media (prefers-reduced-motion: reduce) {
359
+ .surface,
360
+ .cta,
361
+ .file-remove,
362
+ .progress-bar {
363
+ transition: none !important;
364
+ }
365
+ }
366
+
325
367
  :host([disabled]) .surface,
326
368
  :host([disabled]) .file-remove,
327
369
  :host([disabled]) .cta {
@@ -341,10 +383,10 @@ function O(g, e) {
341
383
  if (!e.trim()) return !0;
342
384
  const t = e.split(",").map((a) => a.trim()).filter(Boolean);
343
385
  if (!t.length) return !0;
344
- const i = g.name.toLowerCase(), s = (g.type || "").toLowerCase();
386
+ const i = g.name.toLowerCase(), r = (g.type || "").toLowerCase();
345
387
  return t.some((a) => {
346
- const r = a.toLowerCase();
347
- return r.startsWith(".") ? i.endsWith(r) : r.endsWith("/*") ? s.startsWith(r.slice(0, -1)) : s === r;
388
+ const s = a.toLowerCase();
389
+ return s.startsWith(".") ? i.endsWith(s) : s.endsWith("/*") ? r.startsWith(s.slice(0, -1)) : r === s;
348
390
  });
349
391
  }
350
392
  class W extends I {
@@ -390,20 +432,20 @@ class W extends I {
390
432
  removeFile(e) {
391
433
  if (this._disabled() || e < 0 || e >= this._files.length) return;
392
434
  const t = this._files[e];
393
- this.cancelUpload(this._fileKey(t)), this._uploadState.delete(this._fileKey(t)), this._files = this._files.filter((i, s) => s !== e), this._syncUi(), this._emit("change", { files: this.files, source: "remove" });
435
+ this.cancelUpload(this._fileKey(t)), this._uploadState.delete(this._fileKey(t)), this._files = this._files.filter((i, r) => r !== e), this._syncUi(), this._emit("change", { files: this.files, source: "remove" });
394
436
  }
395
437
  async startUpload() {
396
438
  if (!this.uploadRequest || this._disabled()) return;
397
439
  const e = this._files.filter((i) => {
398
- const s = this._uploadState.get(this._fileKey(i));
399
- return !s || s.state === "pending" || s.state === "error" || s.state === "canceled";
440
+ const r = this._uploadState.get(this._fileKey(i));
441
+ return !r || r.state === "pending" || r.state === "error" || r.state === "canceled";
400
442
  });
401
443
  if (!e.length) return;
402
444
  const t = ++this._uploadSequence;
403
445
  this._emit("upload-start", { files: e, requestId: t }), await Promise.all(e.map((i) => this._runUpload(i, t))), this._emit("upload-complete", {
404
446
  files: this.files,
405
447
  requestId: t,
406
- statuses: Object.fromEntries(Array.from(this._uploadState.entries()).map(([i, s]) => [i, { ...s }]))
448
+ statuses: Object.fromEntries(Array.from(this._uploadState.entries()).map(([i, r]) => [i, { ...r }]))
407
449
  }), this._syncUi();
408
450
  }
409
451
  cancelUploads() {
@@ -470,32 +512,32 @@ class W extends I {
470
512
  this._applyFiles(e, t, !1);
471
513
  }
472
514
  _applyFiles(e, t, i) {
473
- const s = this.hasAttribute("multiple"), a = i ? [] : s ? [...this._files] : [], r = [], n = [], m = this.getAttribute("accept") || "", _ = this._maxFiles(), v = this._maxSize(), x = new Set(a.map((o) => this._fileKey(o)));
474
- e.forEach((o) => {
475
- const b = this._fileKey(o);
515
+ const r = this.hasAttribute("multiple"), a = i ? [] : r ? [...this._files] : [], s = [], o = [], m = this.getAttribute("accept") || "", _ = this._maxFiles(), v = this._maxSize(), x = new Set(a.map((n) => this._fileKey(n)));
516
+ e.forEach((n) => {
517
+ const b = this._fileKey(n);
476
518
  if (!x.has(b)) {
477
- if (!O(o, m)) {
478
- n.push({ file: o, reason: "accept" });
519
+ if (!O(n, m)) {
520
+ o.push({ file: n, reason: "accept" });
479
521
  return;
480
522
  }
481
- if (v != null && o.size > v) {
482
- n.push({ file: o, reason: "max-size" });
523
+ if (v != null && n.size > v) {
524
+ o.push({ file: n, reason: "max-size" });
483
525
  return;
484
526
  }
485
- if (_ != null && a.length + r.length >= _) {
486
- n.push({ file: o, reason: "max-files" });
527
+ if (_ != null && a.length + s.length >= _) {
528
+ o.push({ file: n, reason: "max-files" });
487
529
  return;
488
530
  }
489
- x.add(b), r.push(o);
531
+ x.add(b), s.push(n);
490
532
  }
491
- }), i && (this.cancelUploads(), this._uploadState.clear()), this._files = [...a, ...r], !s && this._files.length > 1 && (this._files = [this._files[this._files.length - 1]]);
492
- const w = new Set(this._files.map((o) => this._fileKey(o)));
493
- Array.from(this._uploadState.keys()).forEach((o) => {
494
- w.has(o) || this._uploadState.delete(o);
495
- }), this._files.forEach((o) => {
496
- const b = this._fileKey(o);
533
+ }), i && (this.cancelUploads(), this._uploadState.clear()), this._files = [...a, ...s], !r && this._files.length > 1 && (this._files = [this._files[this._files.length - 1]]);
534
+ const w = new Set(this._files.map((n) => this._fileKey(n)));
535
+ Array.from(this._uploadState.keys()).forEach((n) => {
536
+ w.has(n) || this._uploadState.delete(n);
537
+ }), this._files.forEach((n) => {
538
+ const b = this._fileKey(n);
497
539
  this._uploadState.has(b) || this._uploadState.set(b, { state: "pending", progress: null });
498
- }), this._syncUi(), this._emit("change", { files: this.files, source: t }), n.length ? (this._emit("reject", { rejected: n, source: t }), this.setAttribute("data-error", n[0].reason === "accept" ? "One or more files do not match the accepted types" : n[0].reason === "max-size" ? "One or more files exceed the size limit" : "Too many files selected")) : this.removeAttribute("data-error"), r.length && this.hasAttribute("upload-on-select") && this.uploadRequest && this.startUpload(), this._syncUi();
540
+ }), this._syncUi(), this._emit("change", { files: this.files, source: t }), o.length ? (this._emit("reject", { rejected: o, source: t }), this.setAttribute("data-error", o[0].reason === "accept" ? "One or more files do not match the accepted types" : o[0].reason === "max-size" ? "One or more files exceed the size limit" : "Too many files selected")) : this.removeAttribute("data-error"), s.length && this.hasAttribute("upload-on-select") && this.uploadRequest && this.startUpload(), this._syncUi();
499
541
  }
500
542
  _emit(e, t) {
501
543
  this.dispatchEvent(new CustomEvent(e, { detail: t, bubbles: !0, composed: !0 }));
@@ -508,28 +550,28 @@ class W extends I {
508
550
  }
509
551
  async _runUpload(e, t) {
510
552
  if (!this.uploadRequest) return;
511
- const i = this._fileKey(e), s = new AbortController();
512
- this._uploadControllers.set(i, s), this._setUploadEntry(i, { state: "uploading", progress: 0 });
513
- const a = (r) => {
514
- const n = this._uploadState.get(i);
515
- if (!n || n.state !== "uploading") return;
516
- const m = Number.isFinite(r) ? Math.max(0, Math.min(100, r)) : 0;
517
- this._uploadState.set(i, { ...n, progress: m }), this._emit("upload-progress", { file: e, fileKey: i, progress: m, requestId: t }), this._syncUi();
553
+ const i = this._fileKey(e), r = new AbortController();
554
+ this._uploadControllers.set(i, r), this._setUploadEntry(i, { state: "uploading", progress: 0 });
555
+ const a = (s) => {
556
+ const o = this._uploadState.get(i);
557
+ if (!o || o.state !== "uploading") return;
558
+ const m = Number.isFinite(s) ? Math.max(0, Math.min(100, s)) : 0;
559
+ this._uploadState.set(i, { ...o, progress: m }), this._emit("upload-progress", { file: e, fileKey: i, progress: m, requestId: t }), this._syncUi();
518
560
  };
519
561
  try {
520
- const r = await this.uploadRequest({
562
+ const s = await this.uploadRequest({
521
563
  file: e,
522
564
  files: this.files,
523
- signal: s.signal,
565
+ signal: r.signal,
524
566
  setProgress: a
525
567
  });
526
- s.signal.aborted ? (this._uploadState.set(i, { state: "canceled", progress: null }), this._emit("upload-cancel", { file: e, fileKey: i, requestId: t })) : (this._uploadState.set(i, { state: "success", progress: 100, result: r }), this._emit("upload-success", { file: e, fileKey: i, requestId: t, result: r }));
527
- } catch (r) {
528
- if (s.signal.aborted)
568
+ r.signal.aborted ? (this._uploadState.set(i, { state: "canceled", progress: null }), this._emit("upload-cancel", { file: e, fileKey: i, requestId: t })) : (this._uploadState.set(i, { state: "success", progress: 100, result: s }), this._emit("upload-success", { file: e, fileKey: i, requestId: t, result: s }));
569
+ } catch (s) {
570
+ if (r.signal.aborted)
529
571
  this._uploadState.set(i, { state: "canceled", progress: null }), this._emit("upload-cancel", { file: e, fileKey: i, requestId: t });
530
572
  else {
531
- const n = r instanceof Error ? r.message : "Upload failed";
532
- this._uploadState.set(i, { state: "error", progress: null, error: n }), this._emit("upload-error", { file: e, fileKey: i, requestId: t, error: n });
573
+ const o = s instanceof Error ? s.message : "Upload failed";
574
+ this._uploadState.set(i, { state: "error", progress: null, error: o }), this._emit("upload-error", { file: e, fileKey: i, requestId: t, error: o });
533
575
  }
534
576
  } finally {
535
577
  this._uploadControllers.delete(i), this._syncUi();
@@ -541,8 +583,8 @@ class W extends I {
541
583
  try {
542
584
  const t = JSON.parse(e);
543
585
  return !t || typeof t != "object" || Array.isArray(t) ? {} : Object.fromEntries(
544
- Object.entries(t).map(([i, s]) => {
545
- const a = Number(s);
586
+ Object.entries(t).map(([i, r]) => {
587
+ const a = Number(r);
546
588
  return [i, Number.isFinite(a) ? Math.max(0, Math.min(100, a)) : 0];
547
589
  })
548
590
  );
@@ -565,16 +607,16 @@ class W extends I {
565
607
  }
566
608
  }
567
609
  _actionSummary() {
568
- const e = this._files.map((a) => this._uploadState.get(this._fileKey(a)) || { state: "pending", progress: null }), t = e.filter((a) => a.state === "uploading").length, i = e.filter((a) => a.state === "error").length, s = e.filter((a) => a.state === "success").length;
610
+ const e = this._files.map((a) => this._uploadState.get(this._fileKey(a)) || { state: "pending", progress: null }), t = e.filter((a) => a.state === "uploading").length, i = e.filter((a) => a.state === "error").length, r = e.filter((a) => a.state === "success").length;
569
611
  return t > 0 ? {
570
612
  title: "Upload in progress",
571
613
  subtitle: `${t} file${t === 1 ? "" : "s"} still uploading`
572
614
  } : i > 0 ? {
573
615
  title: "Retry required",
574
616
  subtitle: `${i} file${i === 1 ? "" : "s"} failed to upload`
575
- } : s > 0 && s === this._files.length ? {
617
+ } : r > 0 && r === this._files.length ? {
576
618
  title: "Uploads complete",
577
- subtitle: `${s} file${s === 1 ? "" : "s"} uploaded successfully`
619
+ subtitle: `${r} file${r === 1 ? "" : "s"} uploaded successfully`
578
620
  } : {
579
621
  title: "Ready to upload",
580
622
  subtitle: `${this._files.length} file${this._files.length === 1 ? "" : "s"} queued`
@@ -584,8 +626,8 @@ class W extends I {
584
626
  if (!this.hasAttribute("show-previews") || typeof URL > "u" || typeof URL.createObjectURL != "function" || !e.type.startsWith("image/")) return null;
585
627
  const t = this._fileKey(e), i = this._previewUrls.get(t);
586
628
  if (i) return i;
587
- const s = URL.createObjectURL(e);
588
- return this._previewUrls.set(t, s), s;
629
+ const r = URL.createObjectURL(e);
630
+ return this._previewUrls.set(t, r), r;
589
631
  }
590
632
  _revokePreviewUrls(e = /* @__PURE__ */ new Set()) {
591
633
  this._previewUrls.forEach((t, i) => {
@@ -600,23 +642,23 @@ class W extends I {
600
642
  }
601
643
  _syncUi() {
602
644
  if (!this._surfaceEl || !this._inputEl || !this._listEl || !this._errorEl || !this._actionsEl) return;
603
- const e = (this.getAttribute("label") || "").trim(), t = (this.getAttribute("description") || "").trim(), i = this.hasAttribute("required"), s = this._disabled();
645
+ const e = (this.getAttribute("label") || "").trim(), t = (this.getAttribute("description") || "").trim(), i = this.hasAttribute("required"), r = this._disabled();
604
646
  this._inputEl.setAttribute("aria-label", e || (this.getAttribute("aria-label") || "").trim() || "Choose files");
605
- const a = this.getAttribute("drop-label") || "Drag files here or browse from your device", r = this.getAttribute("button-text") || "Choose files", n = this.getAttribute("upload-button-text") || "Start upload", m = (this.getAttribute("data-error") || "").trim(), _ = this._parseProgress(), v = this.root.querySelector(".label"), x = this.root.querySelector(".description"), w = this.root.querySelector(".meta"), o = this.root.querySelector(".headline"), b = this.root.querySelector(".subline"), D = this.root.querySelector(".cta"), R = this.root.querySelector(".required"), $ = this.root.querySelector(".actions-title"), B = this.root.querySelector(".actions-subtitle"), k = this.root.querySelector(".actions-row");
606
- v.hidden = !e, v.querySelector(".label-text").textContent = e, R.hidden = !i, x.hidden = !t, x.textContent = t, w.hidden = !e && !t, o.textContent = this._files.length ? `${this._files.length} file${this._files.length === 1 ? "" : "s"} selected` : a, b.textContent = this._files.length ? this._files.map((p) => p.name).join(", ") : this.getAttribute("accept") ? `Accepted: ${this.getAttribute("accept")}` : "Supports click, keyboard, and drag-and-drop upload", D.textContent = r, D.disabled = s, this._surfaceEl.setAttribute("data-dragging", this._dragging ? "true" : "false"), this._surfaceEl.setAttribute("aria-disabled", s ? "true" : "false"), this._inputEl.disabled = s, this._inputEl.multiple = this.hasAttribute("multiple"), this._inputEl.name = this.getAttribute("name") || "", this._inputEl.accept = this.getAttribute("accept") || "", this._errorEl.hidden = !m, this._errorEl.textContent = m;
647
+ const a = this.getAttribute("drop-label") || "Drag files here or browse from your device", s = this.getAttribute("button-text") || "Choose files", o = this.getAttribute("upload-button-text") || "Start upload", m = (this.getAttribute("data-error") || "").trim(), _ = this._parseProgress(), v = this.root.querySelector(".label"), x = this.root.querySelector(".description"), w = this.root.querySelector(".meta"), n = this.root.querySelector(".headline"), b = this.root.querySelector(".subline"), D = this.root.querySelector(".cta"), R = this.root.querySelector(".required"), $ = this.root.querySelector(".actions-title"), B = this.root.querySelector(".actions-subtitle"), S = this.root.querySelector(".actions-row");
648
+ v.hidden = !e, v.querySelector(".label-text").textContent = e, R.hidden = !i, x.hidden = !t, x.textContent = t, w.hidden = !e && !t, n.textContent = this._files.length ? `${this._files.length} file${this._files.length === 1 ? "" : "s"} selected` : a, b.textContent = this._files.length ? this._files.map((p) => p.name).join(", ") : this.getAttribute("accept") ? `Accepted: ${this.getAttribute("accept")}` : "Supports click, keyboard, and drag-and-drop upload", D.textContent = s, D.disabled = r, this._surfaceEl.setAttribute("data-dragging", this._dragging ? "true" : "false"), this._surfaceEl.setAttribute("aria-disabled", r ? "true" : "false"), this._inputEl.disabled = r, this._inputEl.multiple = this.hasAttribute("multiple"), this._inputEl.name = this.getAttribute("name") || "", this._inputEl.accept = this.getAttribute("accept") || "", this._errorEl.hidden = !m, this._errorEl.textContent = m;
607
649
  const L = !!this.uploadRequest && this._files.length > 0, N = this._actionSummary();
608
- if (this._actionsEl.hidden = !L, $.textContent = N.title, B.textContent = N.subtitle, k.replaceChildren(), L) {
650
+ if (this._actionsEl.hidden = !L, $.textContent = N.title, B.textContent = N.subtitle, S.replaceChildren(), L) {
609
651
  const p = this._files.some((l) => {
610
652
  const h = this._uploadState.get(this._fileKey(l))?.state || "pending";
611
653
  return h === "pending" || h === "error" || h === "canceled";
612
654
  }), f = document.createElement("button");
613
- if (f.type = "button", f.className = "file-remove", f.dataset.variant = "primary", f.textContent = this.uploading ? "Uploading…" : p ? n : "Upload complete", f.disabled = s || this.uploading || !p, f.addEventListener("click", (l) => {
655
+ if (f.type = "button", f.className = "file-remove", f.dataset.variant = "primary", f.textContent = this.uploading ? "Uploading…" : p ? o : "Upload complete", f.disabled = r || this.uploading || !p, f.addEventListener("click", (l) => {
614
656
  l.stopPropagation(), this.startUpload();
615
- }), k.append(f), this.uploading) {
657
+ }), S.append(f), this.uploading) {
616
658
  const l = document.createElement("button");
617
- l.type = "button", l.className = "file-remove", l.dataset.tone = "danger", l.textContent = "Cancel uploads", l.disabled = s, l.addEventListener("click", (h) => {
659
+ l.type = "button", l.className = "file-remove", l.dataset.tone = "danger", l.textContent = "Cancel uploads", l.disabled = r, l.addEventListener("click", (h) => {
618
660
  h.stopPropagation(), this.cancelUploads();
619
- }), k.append(l);
661
+ }), S.append(l);
620
662
  }
621
663
  }
622
664
  const P = /* @__PURE__ */ new Set();
@@ -625,7 +667,7 @@ class W extends I {
625
667
  l.className = "file";
626
668
  const h = this._fileKey(p);
627
669
  P.add(h);
628
- const c = this._uploadState.get(h) || { state: "pending", progress: null }, y = document.createElement("div");
670
+ const u = this._uploadState.get(h) || { state: "pending", progress: null }, y = document.createElement("div");
629
671
  y.className = "preview";
630
672
  const K = this._getPreviewUrl(p);
631
673
  if (K) {
@@ -633,35 +675,35 @@ class W extends I {
633
675
  d.src = K, d.alt = "", y.append(d);
634
676
  } else
635
677
  y.textContent = p.name.split(".").pop()?.slice(0, 4).toUpperCase() || "FILE";
636
- const S = document.createElement("div");
637
- S.className = "file-text";
638
678
  const C = document.createElement("div");
639
- C.className = "file-name", C.textContent = p.name;
679
+ C.className = "file-text";
680
+ const A = document.createElement("div");
681
+ A.className = "file-name", A.textContent = p.name;
640
682
  const E = document.createElement("div");
641
683
  E.className = "file-meta", E.textContent = j(p.size);
642
684
  const U = document.createElement("span");
643
- U.className = "status", U.dataset.state = c.state, U.textContent = this._statusLabel(c.state), E.append(U), S.append(C, E);
644
- const u = document.createElement("button");
645
- u.type = "button", u.className = "file-remove", u.disabled = s, c.state === "uploading" ? (u.textContent = "Cancel", u.dataset.tone = "danger", u.addEventListener("click", (d) => {
685
+ U.className = "status", U.dataset.state = u.state, U.textContent = this._statusLabel(u.state), E.append(U), C.append(A, E);
686
+ const c = document.createElement("button");
687
+ c.type = "button", c.className = "file-remove", c.disabled = r, u.state === "uploading" ? (c.textContent = "Cancel", c.dataset.tone = "danger", c.addEventListener("click", (d) => {
646
688
  d.stopPropagation(), this.cancelUpload(h);
647
- })) : c.state === "error" ? (u.textContent = "Retry", u.dataset.variant = "primary", u.addEventListener("click", (d) => {
689
+ })) : u.state === "error" ? (c.textContent = "Retry", c.dataset.variant = "primary", c.addEventListener("click", (d) => {
648
690
  d.stopPropagation(), this._uploadState.set(h, { state: "pending", progress: null }), this._syncUi(), this.startUpload();
649
- })) : (u.textContent = "Remove", u.addEventListener("click", (d) => {
691
+ })) : (c.textContent = "Remove", c.addEventListener("click", (d) => {
650
692
  d.stopPropagation(), this.removeFile(f);
651
- })), l.append(y, S, u);
652
- const A = typeof c.progress == "number" ? c.progress : _[h] ?? _[p.name];
653
- if (typeof A == "number") {
693
+ })), l.append(y, C, c);
694
+ const z = typeof u.progress == "number" ? u.progress : _[h] ?? _[p.name];
695
+ if (typeof z == "number") {
654
696
  const d = document.createElement("div");
655
697
  d.className = "progress";
656
- const z = document.createElement("div");
657
- z.className = "progress-track";
658
698
  const F = document.createElement("div");
659
- F.className = "progress-bar", F.style.inlineSize = `${A}%`, z.append(F);
699
+ F.className = "progress-track";
700
+ const k = document.createElement("div");
701
+ k.className = "progress-bar", k.dataset.state = u.state, k.style.inlineSize = `${z}%`, F.append(k);
660
702
  const q = document.createElement("div");
661
- q.className = "progress-text", q.textContent = c.state === "success" ? "Upload complete" : c.state === "error" ? c.error || "Upload failed" : c.state === "canceled" ? "Upload canceled" : `Uploading ${Math.round(A)}%`, d.append(z, q), l.append(d);
662
- } else if (c.state === "error" && c.error) {
703
+ q.className = "progress-text", q.textContent = u.state === "success" ? "Upload complete" : u.state === "error" ? u.error || "Upload failed" : u.state === "canceled" ? "Upload canceled" : `Uploading ${Math.round(z)}%`, d.append(F, q), l.append(d);
704
+ } else if (u.state === "error" && u.error) {
663
705
  const d = document.createElement("div");
664
- d.className = "file-error", d.textContent = c.error, l.append(d);
706
+ d.className = "file-error", d.textContent = u.error, l.append(d);
665
707
  }
666
708
  return l;
667
709
  })), this._revokePreviewUrls(P);
@@ -669,16 +711,16 @@ class W extends I {
669
711
  _registerWithForm() {
670
712
  this._formUnregister && (this._formUnregister(), this._formUnregister = null);
671
713
  try {
672
- const s = this.getRootNode().host?.closest?.("ui-form") || null || this.closest("ui-form"), a = this.getAttribute("name");
673
- s && typeof s.registerField == "function" && a && (this._formUnregister = s.registerField(a, {
714
+ const r = this.getRootNode().host?.closest?.("ui-form") || null || this.closest("ui-form"), a = this.getAttribute("name");
715
+ r && typeof r.registerField == "function" && a && (this._formUnregister = r.registerField(a, {
674
716
  name: a,
675
717
  getValue: () => this.files,
676
- setValue: (r) => {
677
- Array.isArray(r) && r.every((n) => n instanceof File) && this.setFiles(r);
718
+ setValue: (s) => {
719
+ Array.isArray(s) && s.every((o) => o instanceof File) && this.setFiles(s);
678
720
  },
679
721
  validate: async () => this.hasAttribute("required") && this._files.length === 0 ? { valid: !1, message: "At least one file is required" } : { valid: !0 },
680
- setError: (r) => {
681
- r ? this.setAttribute("data-error", r) : this.removeAttribute("data-error"), this._syncUi();
722
+ setError: (s) => {
723
+ s ? this.setAttribute("data-error", s) : this.removeAttribute("data-error"), this._syncUi();
682
724
  }
683
725
  }));
684
726
  } catch {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),d=require("./positioner-D_fqyx_j.js"),b=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),d=require("./positioner-DZ1FW6A9.js"),c=`
2
2
  :host {
3
3
  position: fixed;
4
4
  inset: 0;
@@ -7,14 +7,13 @@
7
7
  display: none;
8
8
  color-scheme: light dark;
9
9
 
10
- --ui-floating-toolbar-bg: var(--ui-color-surface, #ffffff);
10
+ --ui-floating-toolbar-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
11
11
  --ui-floating-toolbar-color: var(--ui-color-text, #0f172a);
12
12
  --ui-floating-toolbar-muted: var(--ui-color-muted, #526175);
13
13
  --ui-floating-toolbar-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
14
14
  --ui-floating-toolbar-border: 1px solid var(--ui-floating-toolbar-border-color);
15
- --ui-floating-toolbar-radius: 12px;
16
- --ui-floating-toolbar-shadow:
17
- none;
15
+ --ui-floating-toolbar-radius: calc(var(--ui-radius, 6px) + 2px);
16
+ --ui-floating-toolbar-shadow: var(--shadow-5, 0 8px 24px rgba(15, 23, 42, 0.12));
18
17
  --ui-floating-toolbar-padding: 6px;
19
18
  --ui-floating-toolbar-gap: 6px;
20
19
  --ui-floating-toolbar-focus-ring: var(--ui-color-focus-ring, #2563eb);
@@ -200,8 +199,8 @@
200
199
  transition: none !important;
201
200
  }
202
201
  }
203
- `;function c(o,t){if(o==null||o==="")return t;const e=Number(o);return Number.isFinite(e)?e:t}function a(o,t){if(o==null)return t;const e=o.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="off"}function f(o){if(!document.body.contains(o))return!1;const t=window.getComputedStyle(o);return!(t.display==="none"||t.visibility==="hidden"||Number.parseFloat(t.opacity||"1")<=0)}function p(o){return o==="top"||o==="bottom"?o:"auto"}function g(o){return o==="start"||o==="end"?o:"center"}function _(o,t){const e=o==="top"?"top":"bottom";return t==="start"?`${e}-start`:t==="end"?`${e}-end`:e}function m(o){const t='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',e=[];return o.forEach(i=>{i instanceof HTMLElement&&(i.matches(t)&&e.push(i),e.push(...Array.from(i.querySelectorAll(t))))}),Array.from(new Set(e))}class l extends h.ElementBase{constructor(){super(...arguments),this._anchor=null,this._panel=null,this._toolbarSlot=null,this._defaultSlot=null,this._raf=null,this._resizeObserver=null,this._mutationObserver=null,this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._globalListenersBound=!1,this._isOpen=!1,this._closeReason="programmatic",this._onWindowChangeBound=this._onWindowChange.bind(this),this._onDocumentPointerDownBound=this._onDocumentPointerDown.bind(this),this._onDocumentKeyDownBound=this._onDocumentKeyDown.bind(this),this._onPanelKeyDownBound=this._onPanelKeyDown.bind(this),this._onSlotChangeBound=this._onSlotChange.bind(this)}static get observedAttributes(){return["open","anchor-id","headless","disabled","placement","align","offset","close-on-outside","close-on-escape","aria-label","aria-labelledby","variant","density","shape","elevation","tone"]}connectedCallback(){super.connectedCallback(),this._syncAnchorFromAttribute(),this._syncOpenState(),this._schedulePosition()}disconnectedCallback(){this._unbindGlobalListeners(),this._teardownObservers(),this._positioner?.destroy(),this._positioner=null,this._raf!=null&&(cancelAnimationFrame(this._raf),this._raf=null),super.disconnectedCallback()}attributeChangedCallback(t,e,i){if(e!==i){if(t==="anchor-id"){this._syncAnchorFromAttribute(),this.hasAttribute("open")&&!this._anchor&&this._requestClose("anchor-missing"),this._schedulePosition();return}if(t==="open"){this._syncOpenState(),this._schedulePosition();return}if(t==="disabled"){this.hasAttribute("disabled")&&this.hasAttribute("open")&&this._requestClose("disabled");return}if(t==="headless"){this._syncOpenState(),this._schedulePosition();return}if(t==="aria-label"||t==="aria-labelledby"){this._syncPanelA11y();return}(t==="placement"||t==="align"||t==="offset")&&this._schedulePosition()}}showForAnchorId(t){if(this.hasAttribute("disabled")||!t)return;const e=document.getElementById(t);if(!e){this._requestClose("anchor-missing");return}this._anchor=e,this.setAttribute("anchor-id",t),this.openToolbar()}hide(){this.closeToolbar("programmatic")}openToolbar(){this.hasAttribute("disabled")||(this.hasAttribute("open")||this.setAttribute("open",""),this._schedulePosition())}closeToolbar(t="programmatic"){this.hasAttribute("open")&&(this._closeReason=t,this.removeAttribute("open"))}_syncOpenState(){const t=this.hasAttribute("open")&&!this.hasAttribute("headless")&&!this.hasAttribute("disabled");if(t===this._isOpen){t&&this._schedulePosition();return}if(this._isOpen=t,t){this._bindGlobalListeners(),this._ensureObservers(),this._dispatchOpenEvents(),this._schedulePosition();return}this._unbindGlobalListeners(),this._teardownObservers(),this._positioner?.destroy(),this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._raf!=null&&(cancelAnimationFrame(this._raf),this._raf=null),this._dispatchCloseEvents(this._closeReason),this._closeReason="programmatic"}_dispatchOpenEvents(){this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{open:!0}}))}_dispatchCloseEvents(t){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0,detail:{reason:t}})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{open:!1,reason:t}}))}_requestClose(t){if(!this.hasAttribute("open"))return;const e=new CustomEvent("request-close",{detail:{reason:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e);const i=new CustomEvent("ui-request-close",{detail:{reason:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(i),!(e.defaultPrevented||i.defaultPrevented)&&this.closeToolbar(t)}_syncAnchorFromAttribute(){const t=this.getAttribute("anchor-id");if(!t){this._anchor=null;return}this._anchor=document.getElementById(t)}_schedulePosition(){!this.hasAttribute("open")||this.hasAttribute("headless")||this.hasAttribute("disabled")||(this._raf!=null&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{this._raf=null,this._position()}))}_ensureObservers(){if(!(this._resizeObserver&&this._mutationObserver)){if(typeof ResizeObserver<"u"){if(this._resizeObserver=new ResizeObserver(()=>this._schedulePosition()),this._panel)try{this._resizeObserver.observe(this._panel)}catch{}if(this._anchor)try{this._resizeObserver.observe(this._anchor)}catch{}}if(typeof MutationObserver<"u"&&this._anchor){this._mutationObserver=new MutationObserver(()=>this._schedulePosition());try{this._mutationObserver.observe(this._anchor,{attributes:!0,childList:!1,subtree:!1})}catch{}}}}_teardownObservers(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}_refreshObservers(){this._isOpen&&(this._teardownObservers(),this._ensureObservers())}_bindGlobalListeners(){this._globalListenersBound||(window.addEventListener("scroll",this._onWindowChangeBound,{passive:!0,capture:!0}),window.addEventListener("resize",this._onWindowChangeBound),document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound,!0),this._globalListenersBound=!0)}_unbindGlobalListeners(){this._globalListenersBound&&(window.removeEventListener("scroll",this._onWindowChangeBound,!0),window.removeEventListener("resize",this._onWindowChangeBound),document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound,!0),this._globalListenersBound=!1)}_position(){if(!this.hasAttribute("open")||this.hasAttribute("headless")||this.hasAttribute("disabled"))return;if(!this._anchor){this._requestClose("anchor-missing");return}if(!f(this._anchor)){this._requestClose("anchor-hidden");return}if(!this._panel)return;const t=Math.max(0,c(this.getAttribute("offset"),8)),e=p(this.getAttribute("placement")),i=g(this.getAttribute("align")),r=_(e,i);if(!this._positioner||this._positionerPlacement!==r||this._positionerOffset!==t){this._positioner?.destroy(),this._positioner=d.createPositioner({anchor:this._anchor,floating:this._panel,placement:r,strategy:"fixed",offset:t,flip:!0,shift:!0,boundaryPadding:8,observeWindowResize:!1,observeScroll:!1,observeAncestorScroll:!1,observeAncestorResize:!1,observeLayoutShift:!1,observeAnchorResize:!1,observeFloatingResize:!1,onUpdate:s=>{const u=s.placement.startsWith("top")?"top":"bottom";this.style.setProperty("--ui-floating-toolbar-origin-x",i==="start"?"0%":i==="end"?"100%":"50%"),this._panel?.setAttribute("data-side",u)}}),this._positionerPlacement=r,this._positionerOffset=t;return}this._positioner?.update()}_onWindowChange(){this.hasAttribute("open")&&this._schedulePosition()}_onDocumentPointerDown(t){if(!this.hasAttribute("open")||!a(this.getAttribute("close-on-outside"),!0))return;const e=t.composedPath();e.includes(this)||this._anchor&&e.includes(this._anchor)||this._requestClose("outside")}_onDocumentKeyDown(t){this.hasAttribute("open")&&t.key==="Escape"&&a(this.getAttribute("close-on-escape"),!0)&&(t.preventDefault(),this._requestClose("escape"))}_onPanelKeyDown(t){if(!this._panel||!["ArrowRight","ArrowLeft","Home","End"].includes(t.key))return;const e=this._getFocusableItems();if(e.length===0)return;const i=document.activeElement,r=i?e.indexOf(i):-1;let n=r;t.key==="Home"?n=0:t.key==="End"?n=e.length-1:t.key==="ArrowRight"?n=r<0?0:(r+1)%e.length:t.key==="ArrowLeft"&&(n=r<0?e.length-1:(r-1+e.length)%e.length);const s=e[n];s&&(t.preventDefault(),s.focus())}_getFocusableItems(){const t=this._toolbarSlot?.assignedElements({flatten:!0})||[],e=this._defaultSlot?.assignedElements({flatten:!0})||[];return m([...t,...e])}_onSlotChange(){this._syncRowVisibility(),this._schedulePosition()}_syncRowVisibility(){const t=this.root.querySelector(".row-toolbar"),e=this.root.querySelector(".row-default");if(!t||!e)return;const i=(this._toolbarSlot?.assignedNodes({flatten:!0})||[]).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE),r=(this._defaultSlot?.assignedNodes({flatten:!0})||[]).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);i?t.removeAttribute("hidden"):t.setAttribute("hidden",""),r?e.removeAttribute("hidden"):e.setAttribute("hidden","")}_syncPanelA11y(){if(!this._panel)return;const t=this.getAttribute("aria-labelledby"),e=this.getAttribute("aria-label")||(t?null:"Floating toolbar");t?this._panel.setAttribute("aria-labelledby",t):this._panel.removeAttribute("aria-labelledby"),e?this._panel.setAttribute("aria-label",e):this._panel.removeAttribute("aria-label")}render(){this.setContent(`
204
- <style>${b}</style>
202
+ `;function b(o,t){if(o==null||o==="")return t;const e=Number(o);return Number.isFinite(e)?e:t}function a(o,t){if(o==null)return t;const e=o.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="off"}function f(o){if(!document.body.contains(o))return!1;const t=window.getComputedStyle(o);return!(t.display==="none"||t.visibility==="hidden"||Number.parseFloat(t.opacity||"1")<=0)}function p(o){return o==="top"||o==="bottom"?o:"auto"}function g(o){return o==="start"||o==="end"?o:"center"}function _(o,t){const e=o==="top"?"top":"bottom";return t==="start"?`${e}-start`:t==="end"?`${e}-end`:e}function m(o){const t='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',e=[];return o.forEach(i=>{i instanceof HTMLElement&&(i.matches(t)&&e.push(i),e.push(...Array.from(i.querySelectorAll(t))))}),Array.from(new Set(e))}class l extends h.ElementBase{constructor(){super(...arguments),this._anchor=null,this._panel=null,this._toolbarSlot=null,this._defaultSlot=null,this._raf=null,this._resizeObserver=null,this._mutationObserver=null,this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._globalListenersBound=!1,this._isOpen=!1,this._closeReason="programmatic",this._onWindowChangeBound=this._onWindowChange.bind(this),this._onDocumentPointerDownBound=this._onDocumentPointerDown.bind(this),this._onDocumentKeyDownBound=this._onDocumentKeyDown.bind(this),this._onPanelKeyDownBound=this._onPanelKeyDown.bind(this),this._onSlotChangeBound=this._onSlotChange.bind(this)}static get observedAttributes(){return["open","anchor-id","headless","disabled","placement","align","offset","close-on-outside","close-on-escape","aria-label","aria-labelledby","variant","density","shape","elevation","tone"]}connectedCallback(){super.connectedCallback(),this._syncAnchorFromAttribute(),this._syncOpenState(),this._schedulePosition()}disconnectedCallback(){this._unbindGlobalListeners(),this._teardownObservers(),this._positioner?.destroy(),this._positioner=null,this._raf!=null&&(cancelAnimationFrame(this._raf),this._raf=null),super.disconnectedCallback()}attributeChangedCallback(t,e,i){if(e!==i){if(t==="anchor-id"){this._syncAnchorFromAttribute(),this.hasAttribute("open")&&!this._anchor&&this._requestClose("anchor-missing"),this._schedulePosition();return}if(t==="open"){this._syncOpenState(),this._schedulePosition();return}if(t==="disabled"){this.hasAttribute("disabled")&&this.hasAttribute("open")&&this._requestClose("disabled");return}if(t==="headless"){this._syncOpenState(),this._schedulePosition();return}if(t==="aria-label"||t==="aria-labelledby"){this._syncPanelA11y();return}(t==="placement"||t==="align"||t==="offset")&&this._schedulePosition()}}showForAnchorId(t){if(this.hasAttribute("disabled")||!t)return;const e=document.getElementById(t);if(!e){this._requestClose("anchor-missing");return}this._anchor=e,this.setAttribute("anchor-id",t),this.openToolbar()}hide(){this.closeToolbar("programmatic")}openToolbar(){this.hasAttribute("disabled")||(this.hasAttribute("open")||this.setAttribute("open",""),this._schedulePosition())}closeToolbar(t="programmatic"){this.hasAttribute("open")&&(this._closeReason=t,this.removeAttribute("open"))}_syncOpenState(){const t=this.hasAttribute("open")&&!this.hasAttribute("headless")&&!this.hasAttribute("disabled");if(t===this._isOpen){t&&this._schedulePosition();return}if(this._isOpen=t,t){this._bindGlobalListeners(),this._ensureObservers(),this._dispatchOpenEvents(),this._schedulePosition();return}this._unbindGlobalListeners(),this._teardownObservers(),this._positioner?.destroy(),this._positioner=null,this._positionerPlacement=null,this._positionerOffset=0,this._raf!=null&&(cancelAnimationFrame(this._raf),this._raf=null),this._dispatchCloseEvents(this._closeReason),this._closeReason="programmatic"}_dispatchOpenEvents(){this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{open:!0}}))}_dispatchCloseEvents(t){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0,detail:{reason:t}})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{open:!1,reason:t}}))}_requestClose(t){if(!this.hasAttribute("open"))return;const e=new CustomEvent("request-close",{detail:{reason:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e);const i=new CustomEvent("ui-request-close",{detail:{reason:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(i),!(e.defaultPrevented||i.defaultPrevented)&&this.closeToolbar(t)}_syncAnchorFromAttribute(){const t=this.getAttribute("anchor-id");if(!t){this._anchor=null;return}this._anchor=document.getElementById(t)}_schedulePosition(){!this.hasAttribute("open")||this.hasAttribute("headless")||this.hasAttribute("disabled")||(this._raf!=null&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{this._raf=null,this._position()}))}_ensureObservers(){if(!(this._resizeObserver&&this._mutationObserver)){if(typeof ResizeObserver<"u"){if(this._resizeObserver=new ResizeObserver(()=>this._schedulePosition()),this._panel)try{this._resizeObserver.observe(this._panel)}catch{}if(this._anchor)try{this._resizeObserver.observe(this._anchor)}catch{}}if(typeof MutationObserver<"u"&&this._anchor){this._mutationObserver=new MutationObserver(()=>this._schedulePosition());try{this._mutationObserver.observe(this._anchor,{attributes:!0,childList:!1,subtree:!1})}catch{}}}}_teardownObservers(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}_refreshObservers(){this._isOpen&&(this._teardownObservers(),this._ensureObservers())}_bindGlobalListeners(){this._globalListenersBound||(window.addEventListener("scroll",this._onWindowChangeBound,{passive:!0,capture:!0}),window.addEventListener("resize",this._onWindowChangeBound),document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound,!0),this._globalListenersBound=!0)}_unbindGlobalListeners(){this._globalListenersBound&&(window.removeEventListener("scroll",this._onWindowChangeBound,!0),window.removeEventListener("resize",this._onWindowChangeBound),document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound,!0),this._globalListenersBound=!1)}_position(){if(!this.hasAttribute("open")||this.hasAttribute("headless")||this.hasAttribute("disabled"))return;if(!this._anchor){this._requestClose("anchor-missing");return}if(!f(this._anchor)){this._requestClose("anchor-hidden");return}if(!this._panel)return;const t=Math.max(0,b(this.getAttribute("offset"),8)),e=p(this.getAttribute("placement")),i=g(this.getAttribute("align")),r=_(e,i);if(!this._positioner||this._positionerPlacement!==r||this._positionerOffset!==t){this._positioner?.destroy(),this._positioner=d.createPositioner({anchor:this._anchor,floating:this._panel,placement:r,strategy:"fixed",offset:t,flip:!0,shift:!0,boundaryPadding:8,observeWindowResize:!1,observeScroll:!1,observeAncestorScroll:!1,observeAncestorResize:!1,observeLayoutShift:!1,observeAnchorResize:!1,observeFloatingResize:!1,onUpdate:s=>{const u=s.placement.startsWith("top")?"top":"bottom";this.style.setProperty("--ui-floating-toolbar-origin-x",i==="start"?"0%":i==="end"?"100%":"50%"),this._panel?.setAttribute("data-side",u)}}),this._positionerPlacement=r,this._positionerOffset=t;return}this._positioner?.update()}_onWindowChange(){this.hasAttribute("open")&&this._schedulePosition()}_onDocumentPointerDown(t){if(!this.hasAttribute("open")||!a(this.getAttribute("close-on-outside"),!0))return;const e=t.composedPath();e.includes(this)||this._anchor&&e.includes(this._anchor)||this._requestClose("outside")}_onDocumentKeyDown(t){this.hasAttribute("open")&&t.key==="Escape"&&a(this.getAttribute("close-on-escape"),!0)&&(t.preventDefault(),this._requestClose("escape"))}_onPanelKeyDown(t){if(!this._panel||!["ArrowRight","ArrowLeft","Home","End"].includes(t.key))return;const e=this._getFocusableItems();if(e.length===0)return;const i=document.activeElement,r=i?e.indexOf(i):-1;let n=r;t.key==="Home"?n=0:t.key==="End"?n=e.length-1:t.key==="ArrowRight"?n=r<0?0:(r+1)%e.length:t.key==="ArrowLeft"&&(n=r<0?e.length-1:(r-1+e.length)%e.length);const s=e[n];s&&(t.preventDefault(),s.focus())}_getFocusableItems(){const t=this._toolbarSlot?.assignedElements({flatten:!0})||[],e=this._defaultSlot?.assignedElements({flatten:!0})||[];return m([...t,...e])}_onSlotChange(){this._syncRowVisibility(),this._schedulePosition()}_syncRowVisibility(){const t=this.root.querySelector(".row-toolbar"),e=this.root.querySelector(".row-default");if(!t||!e)return;const i=(this._toolbarSlot?.assignedNodes({flatten:!0})||[]).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE),r=(this._defaultSlot?.assignedNodes({flatten:!0})||[]).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);i?t.removeAttribute("hidden"):t.setAttribute("hidden",""),r?e.removeAttribute("hidden"):e.setAttribute("hidden","")}_syncPanelA11y(){if(!this._panel)return;const t=this.getAttribute("aria-labelledby"),e=this.getAttribute("aria-label")||(t?null:"Floating toolbar");t?this._panel.setAttribute("aria-labelledby",t):this._panel.removeAttribute("aria-labelledby"),e?this._panel.setAttribute("aria-label",e):this._panel.removeAttribute("aria-label")}render(){this.setContent(`
203
+ <style>${c}</style>
205
204
  <div class="panel" part="panel" role="toolbar" aria-orientation="horizontal" tabindex="-1">
206
205
  <div class="row row-toolbar" part="row-toolbar">
207
206
  <slot name="toolbar"></slot>
@@ -1,5 +1,5 @@
1
1
  import { E as u } from "./ElementBase-BeZT54Hj.mjs";
2
- import { e as h } from "./positioner-D0VGxtYU.mjs";
2
+ import { e as h } from "./positioner-BE8Nbho2.mjs";
3
3
  const d = `
4
4
  :host {
5
5
  position: fixed;
@@ -9,14 +9,13 @@ const d = `
9
9
  display: none;
10
10
  color-scheme: light dark;
11
11
 
12
- --ui-floating-toolbar-bg: var(--ui-color-surface, #ffffff);
12
+ --ui-floating-toolbar-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
13
13
  --ui-floating-toolbar-color: var(--ui-color-text, #0f172a);
14
14
  --ui-floating-toolbar-muted: var(--ui-color-muted, #526175);
15
15
  --ui-floating-toolbar-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
16
16
  --ui-floating-toolbar-border: 1px solid var(--ui-floating-toolbar-border-color);
17
- --ui-floating-toolbar-radius: 12px;
18
- --ui-floating-toolbar-shadow:
19
- none;
17
+ --ui-floating-toolbar-radius: calc(var(--ui-radius, 6px) + 2px);
18
+ --ui-floating-toolbar-shadow: var(--shadow-5, 0 8px 24px rgba(15, 23, 42, 0.12));
20
19
  --ui-floating-toolbar-padding: 6px;
21
20
  --ui-floating-toolbar-gap: 6px;
22
21
  --ui-floating-toolbar-focus-ring: var(--ui-color-focus-ring, #2563eb);
@@ -203,7 +202,7 @@ const d = `
203
202
  }
204
203
  }
205
204
  `;
206
- function b(o, t) {
205
+ function c(o, t) {
207
206
  if (o == null || o === "") return t;
208
207
  const e = Number(o);
209
208
  return Number.isFinite(e) ? e : t;
@@ -213,7 +212,7 @@ function a(o, t) {
213
212
  const e = o.trim().toLowerCase();
214
213
  return e !== "false" && e !== "0" && e !== "off";
215
214
  }
216
- function c(o) {
215
+ function b(o) {
217
216
  if (!document.body.contains(o)) return !1;
218
217
  const t = window.getComputedStyle(o);
219
218
  return !(t.display === "none" || t.visibility === "hidden" || Number.parseFloat(t.opacity || "1") <= 0);
@@ -414,12 +413,12 @@ class m extends u {
414
413
  this._requestClose("anchor-missing");
415
414
  return;
416
415
  }
417
- if (!c(this._anchor)) {
416
+ if (!b(this._anchor)) {
418
417
  this._requestClose("anchor-hidden");
419
418
  return;
420
419
  }
421
420
  if (!this._panel) return;
422
- const t = Math.max(0, b(this.getAttribute("offset"), 8)), e = f(this.getAttribute("placement")), i = p(this.getAttribute("align")), r = g(e, i);
421
+ const t = Math.max(0, c(this.getAttribute("offset"), 8)), e = f(this.getAttribute("placement")), i = p(this.getAttribute("align")), r = g(e, i);
423
422
  if (!this._positioner || this._positionerPlacement !== r || this._positionerOffset !== t) {
424
423
  this._positioner?.destroy(), this._positioner = h({
425
424
  anchor: this._anchor,